(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-479271e4"],{"00a3":function(e,t,i){"use strict";i.d(t,"b",(function(){return a})),i.d(t,"a",(function(){return l}));var n=i("11f7"),s=i("e757"),o=i("5d28"),r=i("a666");function a(e,t){let i=new o["a"](t);return i.preventDefault(),{leftButton:i.leftButton,buttons:i.buttons,posx:i.posx,posy:i.posy}}class l{constructor(){this._hooks=new r["b"],this._mouseMoveEventMerger=null,this._mouseMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._mouseMoveEventMerger=null,this._mouseMoveCallback=null;const i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._mouseMoveEventMerger}startMonitoring(e,t,i,r,a){if(this.isMonitoring())return;this._mouseMoveEventMerger=i,this._mouseMoveCallback=r,this._onStopCallback=a;const l=s["a"].getSameOriginWindowChain(),h="mousemove",c="mouseup",d=l.map(e=>e.window.document),u=n["B"](e);u&&d.unshift(u);for(const s of d)this._hooks.add(n["j"](s,h,e=>{e.buttons===t?this._mouseMoveCallback(e):this.stopMonitoring(!0)},(e,t)=>this._mouseMoveEventMerger(e,t))),this._hooks.add(n["g"](s,c,e=>this.stopMonitoring(!0)));if(s["a"].hasDifferentOriginAncestor()){let e=l[l.length-1];this._hooks.add(n["g"](e.window.document,"mouseout",e=>{let t=new o["a"](e);"html"===t.target.tagName.toLowerCase()&&this.stopMonitoring(!0)})),this._hooks.add(n["g"](e.window.document,"mouseover",e=>{let t=new o["a"](e);"html"===t.target.tagName.toLowerCase()&&this.stopMonitoring(!0)})),this._hooks.add(n["g"](e.window.document.body,"mouseleave",e=>{this.stopMonitoring(!0)}))}}}},"01b0":function(e,t,i){},"03e8":function(e,t,i){"use strict";i.d(t,"a",(function(){return g})),i.d(t,"c",(function(){return p})),i.d(t,"b",(function(){return f}));var n,s=i("0a0f"),o=i("308f"),r=i("a666"),a=i("ef8e"),l=i("5fe7"),h=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};(function(e){e[e["None"]=0]="None",e[e["Initialized"]=1]="Initialized",e[e["Closed"]=2]="Closed"})(n||(n={}));class c extends r["a"]{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new o["a"]),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=n.None,this.cache=new Map,this.flushDelayer=new l["f"](c.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(e=>this.onDidChangeItemsExternal(e)))}onDidChangeItemsExternal(e){var t,i;null===(t=e.changed)||void 0===t||t.forEach((e,t)=>this.accept(t,e)),null===(i=e.deleted)||void 0===i||i.forEach(e=>this.accept(e,void 0))}accept(e,t){if(this.state===n.Closed)return;let i=!1;if(Object(a["k"])(t))i=this.cache.delete(e);else{const n=this.cache.get(e);n!==t&&(this.cache.set(e,t),i=!0)}i&&this._onDidChangeStorage.fire(e)}get(e,t){const i=this.cache.get(e);return Object(a["k"])(i)?t:i}getBoolean(e,t){const i=this.get(e);return Object(a["k"])(i)?t:"true"===i}getNumber(e,t){const i=this.get(e);return Object(a["k"])(i)?t:parseInt(i,10)}set(e,t){return h(this,void 0,void 0,(function*(){if(this.state===n.Closed)return;if(Object(a["k"])(t))return this.delete(e);const i=String(t),s=this.cache.get(e);return s!==i?(this.cache.set(e,i),this.pendingInserts.set(e,i),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire(e),this.flushDelayer.trigger(()=>this.flushPending())):void 0}))}delete(e){return h(this,void 0,void 0,(function*(){if(this.state===n.Closed)return;const t=this.cache.delete(e);return t?(this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire(e),this.flushDelayer.trigger(()=>this.flushPending())):void 0}))}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return h(this,void 0,void 0,(function*(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally(()=>{var e;if(!this.hasPending)while(this.whenFlushedCallbacks.length)null===(e=this.whenFlushedCallbacks.pop())||void 0===e||e()})}))}dispose(){this.flushDelayer.cancel(),this.flushDelayer.dispose(),super.dispose()}}c.DEFAULT_FLUSH_DELAY=100;class d{constructor(){this.onDidChangeItemsExternal=o["b"].None,this.items=new Map}updateItems(e){return h(this,void 0,void 0,(function*(){e.insert&&e.insert.forEach((e,t)=>this.items.set(t,e)),e.delete&&e.delete.forEach(e=>this.items.delete(e))}))}}const u="__$__targetStorageMarker",g=Object(s["c"])("storageService");var p;(function(e){e[e["NONE"]=0]="NONE",e[e["SHUTDOWN"]=1]="SHUTDOWN"})(p||(p={}));class m extends r["a"]{constructor(e={flushInterval:m.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new o["d"]),this._onDidChangeTarget=this._register(new o["d"]),this._onWillSaveState=this._register(new o["a"]),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._globalKeyTargets=void 0}emitDidChangeValue(e,t){t===u?(0===e?this._globalKeyTargets=void 0:1===e&&(this._workspaceKeyTargets=void 0),this._onDidChangeTarget.fire({scope:e})):this._onDidChangeValue.fire({scope:e,key:t,target:this.getKeyTargets(e)[t]})}get(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.get(e,i)}getBoolean(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getBoolean(e,i)}getNumber(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getNumber(e,i)}store(e,t,i,n){Object(a["k"])(t)?this.remove(e,i):this.withPausedEmitters(()=>{var s;this.updateKeyTarget(e,i,n),null===(s=this.getStorage(i))||void 0===s||s.set(e,t)})}remove(e,t){this.withPausedEmitters(()=>{var i;this.updateKeyTarget(e,t,void 0),null===(i=this.getStorage(t))||void 0===i||i.delete(e)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i){var n,s;const o=this.getKeyTargets(t);"number"===typeof i?o[e]!==i&&(o[e]=i,null===(n=this.getStorage(t))||void 0===n||n.set(u,JSON.stringify(o))):"number"===typeof o[e]&&(delete o[e],null===(s=this.getStorage(t))||void 0===s||s.set(u,JSON.stringify(o)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get globalKeyTargets(){return this._globalKeyTargets||(this._globalKeyTargets=this.loadKeyTargets(0)),this._globalKeyTargets}getKeyTargets(e){return 0===e?this.globalKeyTargets:this.workspaceKeyTargets}loadKeyTargets(e){const t=this.get(u,e);if(t)try{return JSON.parse(t)}catch(i){}return Object.create(null)}}m.DEFAULT_FLUSH_INTERVAL=6e4;class f extends m{constructor(){super(),this.globalStorage=new c(new d),this.workspaceStorage=new c(new d),this._register(this.workspaceStorage.onDidChangeStorage(e=>this.emitDidChangeValue(1,e))),this._register(this.globalStorage.onDidChangeStorage(e=>this.emitDidChangeValue(0,e)))}getStorage(e){return 0===e?this.globalStorage:this.workspaceStorage}}},"045b":function(e,t,i){"use strict";function n(e,t){let i=e.getCount(),n=e.findTokenIndexAtOffset(t),o=e.getLanguageId(n),r=n;while(r+1<i&&e.getLanguageId(r+1)===o)r++;let a=n;while(a>0&&e.getLanguageId(a-1)===o)a--;return new s(e,o,a,r+1,e.getStartOffset(a),e.getEndOffset(r))}i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return o}));class s{constructor(e,t,i,n,s,o){this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=s,this._lastCharOffset=o}getLineContent(){const e=this._actual.getLineContent();return e.substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){const t=this._actual.getLineContent();return t.substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}function o(e){return 0!==(7&e)}},"0829":function(e,t,i){},"0836":function(e,t,i){},"0910":function(e,t,i){"use strict";i.d(t,"a",(function(){return l})),i.d(t,"b",(function(){return v})),i.d(t,"c",(function(){return C}));var n=i("dff7"),s=i("308f"),o=i("89cd"),r=i("ef8e"),a=i("dd1b");const l={Configuration:"base.contributions.configuration"},h={properties:{},patternProperties:{}},c={properties:{},patternProperties:{}},d={properties:{},patternProperties:{}},u={properties:{},patternProperties:{}},g={properties:{},patternProperties:{}},p={properties:{},patternProperties:{}},m="vscode://schemas/settings/resourceLanguage",f=o["a"].as(a["a"].JSONContribution);class _{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new s["a"],this._onDidUpdateConfiguration=new s["a"],this.defaultValues={},this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:n["a"]("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},f.registerSchema(m,this.resourceLanguageSettingsSchema)}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const i=[];e.forEach(e=>{i.push(...this.validateAndRegisterProperties(e,t)),this.configurationContributors.push(e),this.registerJSONConfiguration(e)}),f.registerSchema(m,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(i)}registerOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}validateAndRegisterProperties(e,t=!0,i=3){i=r["k"](e.scope)?i:e.scope;let n=[],s=e.properties;if(s)for(let a in s){if(t&&y(a)){delete s[a];continue}const e=s[a];this.updatePropertyDefaultValue(a,e),v.test(a)?e.scope=void 0:e.scope=r["k"](e.scope)?i:e.scope,!s[a].hasOwnProperty("included")||s[a].included?(this.configurationProperties[a]=s[a],!s[a].deprecationMessage&&s[a].markdownDeprecationMessage&&(s[a].deprecationMessage=s[a].markdownDeprecationMessage),n.push(a)):(this.excludedConfigurationProperties[a]=s[a],delete s[a])}let o=e.allOf;if(o)for(let r of o)n.push(...this.validateAndRegisterProperties(r,t,i));return n}getConfigurationProperties(){return this.configurationProperties}registerJSONConfiguration(e){const t=e=>{let i=e.properties;if(i)for(const t in i)this.updateSchema(t,i[t]);let n=e.allOf;n&&n.forEach(t)};t(e)}updateSchema(e,t){switch(h.properties[e]=t,t.scope){case 1:c.properties[e]=t;break;case 2:d.properties[e]=t;break;case 6:u.properties[e]=t;break;case 3:g.properties[e]=t;break;case 4:p.properties[e]=t;break;case 5:p.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t;break}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,i={type:"object",description:n["a"]("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:n["a"]("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:m};this.updatePropertyDefaultValue(t,i),h.properties[t]=i,c.properties[t]=i,d.properties[t]=i,u.properties[t]=i,g.properties[t]=i,p.properties[t]=i}this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){let i=this.defaultValues[e];r["j"](i)&&(i=t.default),r["j"](i)&&(i=w(t.type)),t.default=i}}const b="\\[.*\\]$",v=new RegExp(b);function C(e){return e.substring(1,e.length-1)}function w(e){const t=Array.isArray(e)?e[0]:e;switch(t){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const S=new _;function y(e){return e.trim()?v.test(e)?n["a"]("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==S.getConfigurationProperties()[e]?n["a"]("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):null:n["a"]("config.property.empty","Cannot register an empty property")}o["a"].add(l.Configuration,S)},"099d":function(e,t,i){"use strict";function n(e){return e<0?0:e>255?255:0|e}function s(e){return e<0?0:e>4294967295?4294967295:0|e}i.d(t,"b",(function(){return n})),i.d(t,"a",(function(){return s}))},"0a0f":function(e,t,i){"use strict";var n;i.d(t,"b",(function(){return n})),i.d(t,"a",(function(){return s})),i.d(t,"c",(function(){return r})),i.d(t,"d",(function(){return a})),function(e){function t(t){return t[e.DI_DEPENDENCIES]||[]}e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=t}(n||(n={}));const s=r("instantiationService");function o(e,t,i,s){t[n.DI_TARGET]===t?t[n.DI_DEPENDENCIES].push({id:e,index:i,optional:s}):(t[n.DI_DEPENDENCIES]=[{id:e,index:i,optional:s}],t[n.DI_TARGET]=t)}function r(e){if(n.serviceIds.has(e))return n.serviceIds.get(e);const t=function(e,i,n){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");o(t,e,n,!1)};return t.toString=()=>e,n.serviceIds.set(e,t),t}function a(e){return function(t,i,n){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter");o(e,t,n,!0)}}},"0a31":function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var n=i("0f70"),s=i("30db");const o={clipboard:{writeText:s["g"]||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:s["g"]||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>s["g"]||n["k"]?0:navigator.keyboard||n["j"]?1:2)(),touch:"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0)}},"0ab8":function(e,t,i){"use strict";var n=i("33f9");i.o(n,"Emitter")&&i.d(t,"Emitter",(function(){return n["Emitter"]})),i.o(n,"MarkerSeverity")&&i.d(t,"MarkerSeverity",(function(){return n["MarkerSeverity"]})),i.o(n,"Range")&&i.d(t,"Range",(function(){return n["Range"]})),i.o(n,"Uri")&&i.d(t,"Uri",(function(){return n["Uri"]})),i.o(n,"editor")&&i.d(t,"editor",(function(){return n["editor"]})),i.o(n,"languages")&&i.d(t,"languages",(function(){return n["languages"]}))},"0b3c":function(e,t,i){"use strict";var n=i("33f9");i.o(n,"Emitter")&&i.d(t,"Emitter",(function(){return n["Emitter"]})),i.o(n,"MarkerSeverity")&&i.d(t,"MarkerSeverity",(function(){return n["MarkerSeverity"]})),i.o(n,"Range")&&i.d(t,"Range",(function(){return n["Range"]})),i.o(n,"Uri")&&i.d(t,"Uri",(function(){return n["Uri"]})),i.o(n,"editor")&&i.d(t,"editor",(function(){return n["editor"]})),i.o(n,"languages")&&i.d(t,"languages",(function(){return n["languages"]}))},"0baa":function(e,t,i){},"0bfb":function(e,t,i){"use strict";function n(e){const t=this;let i,n=!1;return function(){return n||(n=!0,i=e.apply(t,arguments)),i}}i.d(t,"a",(function(){return n}))},"0d30":function(e,t,i){},"0f70":function(e,t,i){"use strict";i.d(t,"d",(function(){return o})),i.d(t,"b",(function(){return r})),i.d(t,"n",(function(){return a})),i.d(t,"c",(function(){return l})),i.d(t,"a",(function(){return h})),i.d(t,"i",(function(){return d})),i.d(t,"l",(function(){return u})),i.d(t,"f",(function(){return g})),i.d(t,"j",(function(){return p})),i.d(t,"m",(function(){return m})),i.d(t,"g",(function(){return f})),i.d(t,"h",(function(){return _})),i.d(t,"e",(function(){return b})),i.d(t,"k",(function(){return v}));var n=i("308f");class s{constructor(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new n["a"],this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._zoomFactor=1}getZoomLevel(){return this._zoomLevel}getTimeSinceLastZoomLevelChanged(){return Date.now()-this._lastZoomLevelChangeTime}getZoomFactor(){return this._zoomFactor}getPixelRatio(){let e=document.createElement("canvas").getContext("2d"),t=window.devicePixelRatio||1,i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/i}}function o(){return s.INSTANCE.getZoomLevel()}function r(){return s.INSTANCE.getTimeSinceLastZoomLevelChanged()}function a(e){return s.INSTANCE.onDidChangeZoomLevel(e)}function l(){return s.INSTANCE.getZoomFactor()}function h(){return s.INSTANCE.getPixelRatio()}s.INSTANCE=new s;const c=navigator.userAgent,d=c.indexOf("Firefox")>=0,u=c.indexOf("AppleWebKit")>=0,g=c.indexOf("Chrome")>=0,p=!g&&c.indexOf("Safari")>=0,m=!g&&!p&&u,f=(c.indexOf("iPad")>=0||p&&navigator.maxTouchPoints,c.indexOf("Edge/")>=0&&c.indexOf("WebView/")>=0),_=c.indexOf("Electron/")>=0,b=c.indexOf("Android")>=0,v=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches},1080:function(e,t,i){"use strict";i.d(t,"b",(function(){return l})),i.d(t,"a",(function(){return v}));var n=i("3742"),s=i("7ab3"),o=i("6a89");class r{constructor(e,t,i,n,s,o){this.languageIdentifier=e,this.index=t,this.open=i,this.close=n,this.forwardRegex=s,this.reversedRegex=o,this._openSet=r._toSet(this.open),this._closeSet=r._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const i of e)t.add(i);return t}}function a(e){const t=e.length;e=e.map(e=>[e[0].toLowerCase(),e[1].toLowerCase()]);const i=[];for(let r=0;r<t;r++)i[r]=r;const n=(e,t)=>{const[i,n]=e,[s,o]=t;return i===s||i===o||n===s||n===o},s=(e,n)=>{const s=Math.min(e,n),o=Math.max(e,n);for(let r=0;r<t;r++)i[r]===o&&(i[r]=s)};for(let r=0;r<t;r++){const o=e[r];for(let a=r+1;a<t;a++){const t=e[a];n(o,t)&&s(i[r],i[a])}}const o=[];for(let r=0;r<t;r++){let n=[],s=[];for(let o=0;o<t;o++)if(i[o]===r){const[t,i]=e[o];n.push(t),s.push(i)}n.length>0&&o.push({open:n,close:s})}return o}class l{constructor(e,t){const i=a(t);this.brackets=i.map((t,n)=>new r(e,n,t.open,t.close,u(t.open,t.close,i,n),g(t.open,t.close,i,n))),this.forwardRegex=p(this.brackets),this.reversedRegex=m(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const n of this.brackets){for(const e of n.open)this.textIsBracket[e]=n,this.textIsOpenBracket[e]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,e.length);for(const e of n.close)this.textIsBracket[e]=n,this.textIsOpenBracket[e]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,e.length)}}}function h(e,t,i,n){for(let s=0,o=t.length;s<o;s++){if(s===i)continue;const o=t[s];for(const t of o.open)t.indexOf(e)>=0&&n.push(t);for(const t of o.close)t.indexOf(e)>=0&&n.push(t)}}function c(e,t){return e.length-t.length}function d(e){if(e.length<=1)return e;const t=[],i=new Set;for(const n of e)i.has(n)||(t.push(n),i.add(n));return t}function u(e,t,i,n){let s=[];s=s.concat(e),s=s.concat(t);for(let o=0,r=s.length;o<r;o++)h(s[o],i,n,s);return s=d(s),s.sort(c),s.reverse(),_(s)}function g(e,t,i,n){let s=[];s=s.concat(e),s=s.concat(t);for(let o=0,r=s.length;o<r;o++)h(s[o],i,n,s);return s=d(s),s.sort(c),s.reverse(),_(s.map(b))}function p(e){let t=[];for(const i of e){for(const e of i.open)t.push(e);for(const e of i.close)t.push(e)}return t=d(t),_(t)}function m(e){let t=[];for(const i of e){for(const e of i.open)t.push(e);for(const e of i.close)t.push(e)}return t=d(t),_(t.map(b))}function f(e){const t=/^[\w ]+$/.test(e);return e=n["u"](e),t?`\\b${e}\\b`:e}function _(e){let t=`(${e.map(f).join(")|(")})`;return n["q"](t,!0)}const b=function(){function e(e){if(s["d"]){const t=new Uint16Array(e.length);let i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charCodeAt(n);return s["c"]().decode(t)}{let t=[],i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charAt(n);return t.join("")}}let t=null,i=null;return function(n){return t!==n&&(t=n,i=e(t)),i}}();class v{static _findPrevBracketInText(e,t,i,n){let s=i.match(e);if(!s)return null;let r=i.length-(s.index||0),a=s[0].length,l=n+r;return new o["a"](t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,i,n,s){const o=b(i),r=o.substring(i.length-s,i.length-n);return this._findPrevBracketInText(e,t,r,n)}static findNextBracketInText(e,t,i,n){let s=i.match(e);if(!s)return null;let r=s.index||0,a=s[0].length;if(0===a)return null;let l=n+r;return new o["a"](t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,i,n,s){const o=i.substring(n,s);return this.findNextBracketInText(e,t,o,n)}}},1097:function(e,t,i){"use strict";i.d(t,"a",(function(){return h})),i.d(t,"b",(function(){return d})),i.d(t,"e",(function(){return g})),i.d(t,"d",(function(){return p})),i.d(t,"c",(function(){return f}));var n=i("561a"),s=i("7e93"),o=i("3742");const r="$(",a=new RegExp(`\\$\\(${n["a"].iconNameExpression}(?:${n["a"].iconModifierExpression})?\\)`,"g"),l=new RegExp("(\\\\)?"+a.source,"g");function h(e){return e.replace(l,(e,t)=>t?e:"\\"+e)}const c=new RegExp("\\\\"+a.source,"g");function d(e){return e.replace(c,e=>"\\"+e)}const u=new RegExp(`(\\s)?(\\\\)?${a.source}(\\s)?`,"g");function g(e){return-1===e.indexOf(r)?e:e.replace(u,(e,t,i,n)=>i?e:t||n||"")}function p(e){const t=e.indexOf(r);return-1===t?{text:e}:m(e,t)}function m(e,t){const i=[];let n="";function s(e){if(e){n+=e;for(const t of e)i.push(c)}}let o,a,l=-1,h="",c=0,d=t;const u=e.length;s(e.substr(0,t));while(d<u){if(o=e[d],a=e[d+1],o===r[0]&&a===r[1])l=d,s(h),h=r,d++;else if(")"===o&&-1!==l){const e=d-l+1;c+=e,l=-1,h=""}else-1!==l?/^[a-z0-9\-]$/i.test(o)?h+=o:(s(h),l=-1,h=""):s(o);d++}return s(h),{text:n,iconOffsets:i}}function f(e,t,i=!1){const{text:n,iconOffsets:r}=t;if(!r||0===r.length)return Object(s["f"])(e,n,i);const a=Object(o["J"])(n," "),l=n.length-a.length,h=Object(s["f"])(e,a,i);if(h)for(const s of h){const e=r[s.start+l]+l;s.start+=e,s.end+=e}return h}},"10eb":function(e,t,i){"use strict";i.r(t);var n=i("fa12");Object(n["a"])({id:"typescript",extensions:[".ts",".tsx"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:function(){return i.e("chunk-2d22ca58").then(i.bind(null,"f3b7"))}})},1165:function(e,t,i){"use strict";i.d(t,"a",(function(){return s})),i.d(t,"b",(function(){return o}));var n=i("0a0f");i("4035");const s=Object(n["c"])("contextService");class o{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}},"11f7":function(e,t,i){"use strict";i.d(t,"p",(function(){return g})),i.d(t,"J",(function(){return p})),i.d(t,"g",(function(){return f})),i.d(t,"k",(function(){return v})),i.d(t,"h",(function(){return C})),i.d(t,"i",(function(){return w})),i.d(t,"O",(function(){return S})),i.d(t,"Q",(function(){return y})),i.d(t,"j",(function(){return O})),i.d(t,"w",(function(){return I})),i.d(t,"v",(function(){return T})),i.d(t,"b",(function(){return A})),i.d(t,"C",(function(){return R})),i.d(t,"S",(function(){return F})),i.d(t,"z",(function(){return P})),i.d(t,"f",(function(){return B})),i.d(t,"E",(function(){return W})),i.d(t,"y",(function(){return V})),i.d(t,"x",(function(){return j})),i.d(t,"D",(function(){return H})),i.d(t,"H",(function(){return z})),i.d(t,"t",(function(){return U})),i.d(t,"F",(function(){return K})),i.d(t,"K",(function(){return q})),i.d(t,"B",(function(){return G})),i.d(t,"u",(function(){return Y})),i.d(t,"s",(function(){return Z})),i.d(t,"r",(function(){return ee})),i.d(t,"L",(function(){return te})),i.d(t,"I",(function(){return ie})),i.d(t,"d",(function(){return ne})),i.d(t,"c",(function(){return se})),i.d(t,"P",(function(){return oe})),i.d(t,"N",(function(){return re})),i.d(t,"T",(function(){return le})),i.d(t,"m",(function(){return he})),i.d(t,"M",(function(){return ce})),i.d(t,"a",(function(){return pe})),i.d(t,"R",(function(){return me})),i.d(t,"G",(function(){return fe})),i.d(t,"A",(function(){return _e})),i.d(t,"q",(function(){return be})),i.d(t,"U",(function(){return ve})),i.d(t,"l",(function(){return Ce})),i.d(t,"o",(function(){return we})),i.d(t,"n",(function(){return Se})),i.d(t,"e",(function(){return ye}));var n=i("0f70"),s=i("e32d"),o=i("b835"),r=i("5d28"),a=i("5fe7"),l=i("fdcc"),h=i("308f"),c=i("a666"),d=i("30db"),u=i("b589");i("0a31");function g(e){while(e.firstChild)e.firstChild.remove()}function p(e){var t;return null!==(t=null===e||void 0===e?void 0:e.isConnected)&&void 0!==t&&t}class m{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function f(e,t,i,n){return new m(e,t,i,n)}function _(e){return function(t){return e(new r["a"](t))}}function b(e){return function(t){return e(new o["a"](t))}}let v=function(e,t,i,n){let s=i;return"click"===t||"mousedown"===t?s=_(i):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(s=b(i)),f(e,t,s,n)};function C(e,t){return f(e,"mouseout",i=>{let n=i.relatedTarget;while(n&&n!==e)n=n.parentNode;n!==e&&t(i)})}function w(e,t){return f(e,"pointerout",i=>{let n=i.relatedTarget;while(n&&n!==e)n=n.parentNode;n!==e&&t(i)})}let S,y,D=null;function L(e){if(!D){const e=e=>setTimeout(()=>e((new Date).getTime()),0);D=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||e}return D.call(self,e)}class x{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){Object(l["e"])(e)}}static sort(e,t){return t.priority-e.priority}}(function(){let e=[],t=null,i=!1,n=!1,s=()=>{i=!1,t=e,e=[],n=!0;while(t.length>0){t.sort(x.sort);let e=t.shift();e.execute()}n=!1};y=(t,n=0)=>{let o=new x(t,n);return e.push(o),i||(i=!0,L(s)),o},S=(e,i)=>{if(n){let n=new x(e,i);return t.push(n),n}return y(e,i)}})();const k=8,E=function(e,t){return t};class N extends c["a"]{constructor(e,t,i,n=E,s=k){super();let o=null,r=0,l=this._register(new a["g"]),h=()=>{r=(new Date).getTime(),i(o),o=null};this._register(f(e,t,e=>{o=n(o,e);let t=(new Date).getTime()-r;t>=s?(l.cancel(),h()):l.setIfNotSet(h,s-t)}))}}function O(e,t,i,n,s){return new N(e,t,i,n,s)}function I(e){return document.defaultView.getComputedStyle(e,null)}function T(e){if(e!==document.body)return new A(e.clientWidth,e.clientHeight);if(d["c"]&&window.visualViewport){const e=window.visualViewport.width,t=window.visualViewport.height-(n["k"]?24:0);return new A(e,t)}if(window.innerWidth&&window.innerHeight)return new A(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new A(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new A(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class M{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){let n=I(e),s="0";return n&&(s=n.getPropertyValue?n.getPropertyValue(t):n.getAttribute(i)),M.convertToPixels(e,s)}static getBorderLeftWidth(e){return M.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return M.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return M.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return M.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return M.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return M.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return M.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return M.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return M.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return M.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return M.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return M.getDimension(e,"margin-bottom","marginBottom")}}class A{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new A(e,t):this}static is(e){return"object"===typeof e&&"number"===typeof e.height&&"number"===typeof e.width}static lift(e){return e instanceof A?e:new A(e.width,e.height)}static equals(e,t){return e===t||!(!e||!t)&&(e.width===t.width&&e.height===t.height)}}function R(e){let t=e.offsetParent,i=e.offsetTop,n=e.offsetLeft;while(null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement){i-=e.scrollTop;const s=$(e)?null:I(e);s&&(n-="rtl"!==s.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=M.getBorderLeftWidth(e),i+=M.getBorderTopWidth(e),i+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:i}}function F(e,t,i){"number"===typeof t&&(e.style.width=t+"px"),"number"===typeof i&&(e.style.height=i+"px")}function P(e){let t=e.getBoundingClientRect();return{left:t.left+B.scrollX,top:t.top+B.scrollY,width:t.width,height:t.height}}const B=new class{get scrollX(){return"number"===typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return"number"===typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}};function W(e){let t=M.getMarginLeft(e)+M.getMarginRight(e);return e.offsetWidth+t}function V(e){let t=M.getBorderLeftWidth(e)+M.getBorderRightWidth(e),i=M.getPaddingLeft(e)+M.getPaddingRight(e);return e.offsetWidth-t-i}function j(e){let t=M.getBorderTopWidth(e)+M.getBorderBottomWidth(e),i=M.getPaddingTop(e)+M.getPaddingBottom(e);return e.offsetHeight-t-i}function H(e){let t=M.getMarginTop(e)+M.getMarginBottom(e);return e.offsetHeight+t}function z(e,t){while(e){if(e===t)return!0;e=e.parentNode}return!1}function U(e,t,i){while(e&&e.nodeType===e.ELEMENT_NODE){if(e.classList.contains(t))return e;if(i)if("string"===typeof i){if(e.classList.contains(i))return null}else if(e===i)return null;e=e.parentNode}return null}function K(e,t,i){return!!U(e,t,i)}function $(e){return e&&!!e.host&&!!e.mode}function q(e){return!!G(e)}function G(e){while(e.parentNode){if(e===document.body)return null;e=e.parentNode}return $(e)?e:null}function Y(){let e=document.activeElement;while(null===e||void 0===e?void 0:e.shadowRoot)e=e.shadowRoot.activeElement;return e}function Z(e=document.getElementsByTagName("head")[0]){let t=document.createElement("style");return t.type="text/css",t.media="screen",e.appendChild(t),t}let X=null;function Q(){return X||(X=Z()),X}function J(e){var t,i;return(null===(t=null===e||void 0===e?void 0:e.sheet)||void 0===t?void 0:t.rules)?e.sheet.rules:(null===(i=null===e||void 0===e?void 0:e.sheet)||void 0===i?void 0:i.cssRules)?e.sheet.cssRules:[]}function ee(e,t,i=Q()){i&&t&&i.sheet.insertRule(e+"{"+t+"}",0)}function te(e,t=Q()){if(!t)return;let i=J(t),n=[];for(let s=0;s<i.length;s++){let t=i[s];-1!==t.selectorText.indexOf(e)&&n.push(s)}for(let s=n.length-1;s>=0;s--)t.sheet.deleteRule(n[s])}function ie(e){return"object"===typeof HTMLElement?e instanceof HTMLElement:e&&"object"===typeof e&&1===e.nodeType&&"string"===typeof e.nodeName}const ne={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",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",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:n["l"]?"webkitAnimationStart":"animationstart",ANIMATION_END:n["l"]?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:n["l"]?"webkitAnimationIteration":"animationiteration"},se={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}};function oe(e){let t=[];for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)t[i]=e.scrollTop,e=e.parentNode;return t}function re(e,t){for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)e.scrollTop!==t[i]&&(e.scrollTop=t[i]),e=e.parentNode}class ae extends c["a"]{constructor(e){super(),this._onDidFocus=this._register(new h["a"]),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new h["a"]),this.onDidBlur=this._onDidBlur.event;let t=z(document.activeElement,e),i=!1;const n=()=>{i=!1,t||(t=!0,this._onDidFocus.fire())},o=()=>{t&&(i=!0,window.setTimeout(()=>{i&&(i=!1,t=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{let i=z(document.activeElement,e);i!==t&&(t?o():n())},this._register(Object(s["a"])(e,ne.FOCUS,!0)(n)),this._register(Object(s["a"])(e,ne.BLUR,!0)(o))}}function le(e){return new ae(e)}function he(e,...t){if(e.append(...t),1===t.length&&"string"!==typeof t[0])return t[0]}function ce(e,...t){e.innerText="",he(e,...t)}const de=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var ue;function ge(e,t,i,...n){let s=de.exec(t);if(!s)throw new Error("Bad use of emmet");i=Object.assign({},i||{});let o,r=s[1]||"div";return o=e!==ue.HTML?document.createElementNS(e,r):document.createElement(r),s[3]&&(o.id=s[3]),s[4]&&(o.className=s[4].replace(/\./g," ").trim()),Object.keys(i).forEach(e=>{const t=i[e];"undefined"!==typeof t&&(/^on\w+$/.test(e)?o[e]=t:"selected"===e?t&&o.setAttribute(e,"true"):o.setAttribute(e,t))}),o.append(...n),o}function pe(e,t,...i){return ge(ue.HTML,e,t,...i)}function me(...e){for(let t of e)t.style.display="",t.removeAttribute("aria-hidden")}function fe(...e){for(let t of e)t.style.display="none",t.setAttribute("aria-hidden","true")}function _e(e){return Array.prototype.slice.call(document.getElementsByTagName(e),0)}function be(e){const t=window.devicePixelRatio*e;return Math.max(1,Math.floor(t))/window.devicePixelRatio}function ve(e){if(n["h"]||n["g"])window.open(e);else{let t=window.open();t&&(t.opener=null,t.location.href=e)}}function Ce(e){const t=()=>{e(),i=y(t)};let i=y(t);return Object(c["h"])(()=>i.dispose())}function we(e){return e?`url('${u["a"].asBrowserUri(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function Se(e){return`'${e.replace(/'/g,"%27")}'`}(function(e){e["HTML"]="http://www.w3.org/1999/xhtml",e["SVG"]="http://www.w3.org/2000/svg"})(ue||(ue={})),pe.SVG=function(e,t,...i){return ge(ue.SVG,e,t,...i)},u["b"].setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");class ye extends h["a"]{constructor(){super(),this._subscriptions=new c["b"],this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(Object(s["a"])(window,"keydown",!0)(e=>{const t=new o["a"](e);if(6!==t.keyCode||!e.repeat){if(e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(e.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else{if(6===t.keyCode)return;this._keyStatus.lastKeyPressed=void 0}this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=e,this.fire(this._keyStatus))}})),this._subscriptions.add(Object(s["a"])(window,"keyup",!0)(e=>{!e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!e.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!e.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=e,this.fire(this._keyStatus))})),this._subscriptions.add(Object(s["a"])(document.body,"mousedown",!0)(e=>{this._keyStatus.lastKeyPressed=void 0})),this._subscriptions.add(Object(s["a"])(document.body,"mouseup",!0)(e=>{this._keyStatus.lastKeyPressed=void 0})),this._subscriptions.add(Object(s["a"])(document.body,"mousemove",!0)(e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)})),this._subscriptions.add(Object(s["a"])(window,"blur")(e=>{this.resetKeyStatus()}))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return ye.instance||(ye.instance=new ye),ye.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}},1569:function(e,t,i){"use strict";function n(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}i.d(t,"a",(function(){return n}))},1898:function(e,t,i){"use strict";i.d(t,"b",(function(){return A})),i.d(t,"c",(function(){return R})),i.d(t,"a",(function(){return F}));i("7aad");var n=i("11f7"),s=i("6653"),o=i("5d28"),r=i("00a3"),a=i("1b7d"),l=i("5fe7");const h=11;class c extends a["a"]{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px","undefined"!==typeof e.top&&(this.bgDomNode.style.top="0px"),"undefined"!==typeof e.left&&(this.bgDomNode.style.left="0px"),"undefined"!==typeof e.bottom&&(this.bgDomNode.style.bottom="0px"),"undefined"!==typeof e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...e.icon.classNamesArray),this.domNode.style.position="absolute",this.domNode.style.width=h+"px",this.domNode.style.height=h+"px","undefined"!==typeof e.top&&(this.domNode.style.top=e.top+"px"),"undefined"!==typeof e.left&&(this.domNode.style.left=e.left+"px"),"undefined"!==typeof e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),"undefined"!==typeof e.right&&(this.domNode.style.right=e.right+"px"),this._mouseMoveMonitor=this._register(new r["a"]),this.onmousedown(this.bgDomNode,e=>this._arrowMouseDown(e)),this.onmousedown(this.domNode,e=>this._arrowMouseDown(e)),this._mousedownRepeatTimer=this._register(new l["c"]),this._mousedownScheduleRepeatTimer=this._register(new l["g"])}_arrowMouseDown(e){const t=()=>{this._mousedownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24)};this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet(t,200),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,r["b"],e=>{},()=>{this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancel()}),e.preventDefault()}}var d=i("a666");class u extends d["a"]{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new l["g"])}applyVisibilitySetting(e){return 2!==this._visibility&&(3===this._visibility||e)}setShouldBeVisible(e){const t=this.applyVisibilitySetting(e);this._shouldBeVisible!==t&&(this._shouldBeVisible=t,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode&&this._domNode.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))}}var g=i("30db");const p=140;class m extends a["a"]{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new u(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._mouseMoveMonitor=this._register(new r["a"]),this._shouldRender=!0,this.domNode=Object(s["b"])(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this.onmousedown(this.domNode.domNode,e=>this._domNodeMouseDown(e))}_createArrow(e){const t=this._register(new c(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=Object(s["b"])(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"===typeof i&&this.slider.setWidth(i),"number"===typeof n&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,e=>{e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,()=>{}))}),this.onclick(this.slider.domNode,e=>{e.leftButton&&e.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodeMouseDown(e){e.target===this.domNode.domNode&&this._onMouseDown(e)}delegateMouseDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),s=this._sliderMousePosition(e);i<=s&&s<=n?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,()=>{})):this._onMouseDown(e)}_onMouseDown(e){let t,i;if(e.target===this.domNode.domNode&&"number"===typeof e.browserEvent.offsetX&&"number"===typeof e.browserEvent.offsetY)t=e.browserEvent.offsetX,i=e.browserEvent.offsetY;else{const s=n["z"](this.domNode.domNode);t=e.posx-s.left,i=e.posy-s.top}const s=this._mouseDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(s):this._scrollbarState.getDesiredScrollPositionFromOffset(s)),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,()=>{}))}_sliderMouseDown(e,t){const i=this._sliderMousePosition(e),n=this._sliderOrthogonalMousePosition(e),s=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,r["b"],e=>{const t=this._sliderOrthogonalMousePosition(e),o=Math.abs(t-n);if(g["j"]&&o>p)return void this._setDesiredScrollPositionNow(s.getScrollPosition());const r=this._sliderMousePosition(e),a=r-i;this._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(a))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd(),t()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}const f=20;class _{constructor(e,t,i,n,s,o){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=s,this._scrollPosition=o,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new _(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=e}static _computeValues(e,t,i,n,s){const o=Math.max(0,i-e),r=Math.max(0,o-2*t),a=n>0&&n>i;if(!a)return{computedAvailableSize:Math.round(o),computedIsNeeded:a,computedSliderSize:Math.round(r),computedSliderRatio:0,computedSliderPosition:0};const l=Math.round(Math.max(f,Math.floor(i*r/n))),h=(r-l)/(n-i),c=s*h;return{computedAvailableSize:Math.round(o),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:h,computedSliderPosition:Math.round(c)}}_refreshComputedValues(){const e=_._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let i=this._scrollPosition;return t<this._computedSliderPosition?i-=this._visibleSize:i+=this._visibleSize,i}getDesiredScrollPositionFromDelta(e){if(!this._computedIsNeeded)return 0;const t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio)}}var b=i("561a");const v=Object(b["d"])("scrollbar-button-left",b["b"].triangleLeft),C=Object(b["d"])("scrollbar-button-right",b["b"].triangleRight);class w extends m{constructor(e,t,i){const n=e.getScrollDimensions(),s=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new _(t.horizontalHasArrows?t.arrowSize:0,2===t.horizontal?0:t.horizontalScrollbarSize,2===t.vertical?0:t.verticalScrollbarSize,n.width,n.scrollWidth,s.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows){const e=(t.arrowSize-h)/2,i=(t.horizontalScrollbarSize-h)/2;this._createArrow({className:"scra",icon:v,top:i,left:e,bottom:void 0,right:void 0,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new o["b"](null,1,0))}),this._createArrow({className:"scra",icon:C,top:i,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new o["b"](null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(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}_mouseDownRelativePosition(e,t){return e}_sliderMousePosition(e){return e.posx}_sliderOrthogonalMousePosition(e){return e.posy}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}}const S=Object(b["d"])("scrollbar-button-up",b["b"].triangleUp),y=Object(b["d"])("scrollbar-button-down",b["b"].triangleDown);class D extends m{constructor(e,t,i){const n=e.getScrollDimensions(),s=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new _(t.verticalHasArrows?t.arrowSize:0,2===t.vertical?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,s.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const e=(t.arrowSize-h)/2,i=(t.verticalScrollbarSize-h)/2;this._createArrow({className:"scra",icon:S,top:e,left:i,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new o["b"](null,0,1))}),this._createArrow({className:"scra",icon:y,top:void 0,left:i,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new o["b"](null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(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}_mouseDownRelativePosition(e,t){return t}_sliderMousePosition(e){return e.posy}_sliderOrthogonalMousePosition(e){return e.posx}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}}var L=i("308f"),x=i("42e3"),k=i("0f70");const E=500,N=50,O=!0;class I{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}}class T{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(-1===this._front&&-1===this._rear)return!1;let e=1,t=0,i=1,n=this._rear;do{const s=n===this._front?e:Math.pow(2,-i);if(e-=s,t+=this._memory[n].score*s,n===this._front)break;n=(this._capacity+n-1)%this._capacity,i++}while(1);return t<=.5}accept(e,t,i){const n=new I(e,t,i);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)}_computeScore(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let t=.5;-1===this._front&&-1===this._rear||this._memory[this._rear];return this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){const t=Math.abs(Math.round(e)-e);return t<.01}}T.INSTANCE=new T;class M extends a["a"]{constructor(e,t,i){super(),this._onScroll=this._register(new L["a"]),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new L["a"]),e.style.overflow="hidden",this._options=P(t),this._scrollable=i,this._register(this._scrollable.onScroll(e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)}));const n={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new D(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new w(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=Object(s["b"])(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=Object(s["b"])(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=Object(s["b"])(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,e=>this._onMouseOver(e)),this.onnonbubblingmouseout(this._listenOnDomNode,e=>this._onMouseOut(e)),this._hideTimeout=this._register(new l["g"]),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=Object(d["f"])(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarMouseDown(e){this._verticalScrollbar.delegateMouseDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,g["f"]&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){"undefined"!==typeof e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),"undefined"!==typeof e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),"undefined"!==typeof e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),"undefined"!==typeof e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),"undefined"!==typeof e.horizontalScrollbarSize&&this._horizontalScrollbar.updateScrollbarSize(e.horizontalScrollbarSize),this._options.lazyRender||this._render()}_setListeningToMouseWheel(e){const t=this._mouseWheelToDispose.length>0;if(t!==e&&(this._mouseWheelToDispose=Object(d["f"])(this._mouseWheelToDispose),e)){const e=e=>{this._onMouseWheel(new o["b"](e))};this._mouseWheelToDispose.push(n["g"](this._listenOnDomNode,n["d"].MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){const t=T.INSTANCE;if(O){const i=window.devicePixelRatio/Object(k["c"])();g["j"]||g["d"]?t.accept(Date.now(),e.deltaX/i,e.deltaY/i):t.accept(Date.now(),e.deltaX,e.deltaY)}let i=!1;if(e.deltaY||e.deltaX){let n=e.deltaY*this._options.mouseWheelScrollSensitivity,s=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(n)>=Math.abs(s)?s=0:n=0),this._options.flipAxes&&([n,s]=[s,n]);const o=!g["f"]&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!o||s||(s=n,n=0),e.browserEvent&&e.browserEvent.altKey&&(s*=this._options.fastScrollSensitivity,n*=this._options.fastScrollSensitivity);const r=this._scrollable.getFutureScrollPosition();let a={};if(n){const e=r.scrollTop-N*n;this._verticalScrollbar.writeScrollPosition(a,e)}if(s){const e=r.scrollLeft-N*s;this._horizontalScrollbar.writeScrollPosition(a,e)}if(a=this._scrollable.validateScrollPosition(a),r.scrollLeft!==a.scrollLeft||r.scrollTop!==a.scrollTop){const e=O&&this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel();e?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),i=!0}}let n=i;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(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()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0;this._leftShadowDomNode.setClassName("shadow"+(i?" left":"")),this._topShadowDomNode.setClassName("shadow"+(t?" top":"")),this._topLeftShadowDomNode.setClassName("shadow top-left-corner"+(t?" top":"")+(i?" left":""))}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseOut(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet(()=>this._hide(),E)}}class A extends M{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;const i=new x["a"](0,e=>n["Q"](e));super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class R extends M{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class F extends A{constructor(e,t){super(e,t),this._element=e,this.onScroll(e=>{e.scrollTopChanged&&(this._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this._element.scrollLeft=e.scrollLeft)}),this.scanDomNode()}scanDomNode(){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})}}function P(e){const t={lazyRender:"undefined"!==typeof e.lazyRender&&e.lazyRender,className:"undefined"!==typeof e.className?e.className:"",useShadows:"undefined"===typeof e.useShadows||e.useShadows,handleMouseWheel:"undefined"===typeof e.handleMouseWheel||e.handleMouseWheel,flipAxes:"undefined"!==typeof e.flipAxes&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:"undefined"!==typeof e.consumeMouseWheelIfScrollbarIsNeeded&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:"undefined"!==typeof e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:"undefined"!==typeof e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:"undefined"!==typeof e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:"undefined"!==typeof e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:"undefined"===typeof e.scrollPredominantAxis||e.scrollPredominantAxis,mouseWheelSmoothScroll:"undefined"===typeof e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:"undefined"!==typeof e.arrowSize?e.arrowSize:11,listenOnDomNode:"undefined"!==typeof e.listenOnDomNode?e.listenOnDomNode:null,horizontal:"undefined"!==typeof e.horizontal?e.horizontal:1,horizontalScrollbarSize:"undefined"!==typeof e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:"undefined"!==typeof e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:"undefined"!==typeof e.horizontalHasArrows&&e.horizontalHasArrows,vertical:"undefined"!==typeof e.vertical?e.vertical:1,verticalScrollbarSize:"undefined"!==typeof e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:"undefined"!==typeof e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:"undefined"!==typeof e.verticalSliderSize?e.verticalSliderSize:0,scrollByPage:"undefined"!==typeof e.scrollByPage&&e.scrollByPage};return t.horizontalSliderSize="undefined"!==typeof e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize="undefined"!==typeof e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,g["f"]&&(t.className+=" mac"),t}},"1b69":function(e,t,i){"use strict";i.d(t,"a",(function(){return s})),i.d(t,"b",(function(){return o}));var n=i("0a0f");const s=Object(n["c"])("modelService");function o(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},"1b7d":function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var n=i("11f7"),s=i("b835"),o=i("5d28"),r=i("a666"),a=i("a60f");class l extends r["a"]{onclick(e,t){this._register(n["g"](e,n["d"].CLICK,e=>t(new o["a"](e))))}onmousedown(e,t){this._register(n["g"](e,n["d"].MOUSE_DOWN,e=>t(new o["a"](e))))}onmouseover(e,t){this._register(n["g"](e,n["d"].MOUSE_OVER,e=>t(new o["a"](e))))}onnonbubblingmouseout(e,t){this._register(n["h"](e,e=>t(new o["a"](e))))}onkeydown(e,t){this._register(n["g"](e,n["d"].KEY_DOWN,e=>t(new s["a"](e))))}onkeyup(e,t){this._register(n["g"](e,n["d"].KEY_UP,e=>t(new s["a"](e))))}oninput(e,t){this._register(n["g"](e,n["d"].INPUT,t))}onblur(e,t){this._register(n["g"](e,n["d"].BLUR,t))}onfocus(e,t){this._register(n["g"](e,n["d"].FOCUS,t))}ignoreGesture(e){a["b"].ignoreTarget(e)}}},"1ddc":function(e,t,i){"use strict";i.d(t,"b",(function(){return m})),i.d(t,"a",(function(){return _}));var n=i("0f70"),s=i("308f"),o=i("a666"),r=i("30db");class a{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class l{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");t.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),t.style.fontWeight=this._bareFontInfo.fontWeight,t.style.fontSize=this._bareFontInfo.fontSize+"px",t.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,t.style.lineHeight=this._bareFontInfo.lineHeight+"px",t.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",e.appendChild(t);const i=document.createElement("div");i.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),i.style.fontWeight="bold",i.style.fontSize=this._bareFontInfo.fontSize+"px",i.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,i.style.lineHeight=this._bareFontInfo.lineHeight+"px",i.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",e.appendChild(i);const n=document.createElement("div");n.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),n.style.fontWeight=this._bareFontInfo.fontWeight,n.style.fontSize=this._bareFontInfo.fontSize+"px",n.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,n.style.lineHeight=this._bareFontInfo.lineHeight+"px",n.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",n.style.fontStyle="italic",e.appendChild(n);const s=[];for(const o of this._requests){let e;0===o.type&&(e=t),2===o.type&&(e=i),1===o.type&&(e=n),e.appendChild(document.createElement("br"));const r=document.createElement("span");l._render(r,o),e.appendChild(r),s.push(r)}this._container=e,this._testElements=s}static _render(e,t){if(" "===t.chr){let t=" ";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let i=t.chr;for(let e=0;e<8;e++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;e<t;e++){const t=this._requests[e],i=this._testElements[e];t.fulfill(i.offsetWidth/256)}}}function h(e,t){const i=new l(e,t);i.read()}var c=i("a37f"),d=i("8830"),u=i("fd49"),g=i("fb71");class p{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const i=e.getId();this._keys[i]=e,this._values[i]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map(e=>this._values[e])}}function m(){f.INSTANCE.clearCache()}class f extends o["a"]{constructor(){super(),this._onDidChange=this._register(new s["a"]),this.onDidChange=this._onDidChange.event,this._cache=new p,this._evictUntrustedReadingsTimeout=-1}dispose(){-1!==this._evictUntrustedReadingsTimeout&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearCache(){this._cache=new p,this._onDidChange.fire()}_writeToCache(e,t){this._cache.put(e,t),t.isTrusted||-1!==this._evictUntrustedReadingsTimeout||(this._evictUntrustedReadingsTimeout=setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const e=this._cache.getValues();let t=!1;for(const i of e)i.isTrusted||(t=!0,this._cache.remove(i));t&&this._onDidChange.fire()}readConfiguration(e){if(!this._cache.has(e)){let t=f._actualReadConfiguration(e);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new g["b"]({zoomLevel:n["d"](),pixelRatio:n["a"](),fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:t.isMonospace,typicalHalfwidthCharacterWidth:Math.max(t.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(t.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:t.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(t.spaceWidth,5),middotWidth:Math.max(t.middotWidth,5),wsmiddotWidth:Math.max(t.wsmiddotWidth,5),maxDigitWidth:Math.max(t.maxDigitWidth,5)},!1)),this._writeToCache(e,t)}return this._cache.get(e)}static createRequest(e,t,i,n){const s=new a(e,t);return i.push(s),n&&n.push(s),s}static _actualReadConfiguration(e){const t=[],i=[],s=this.createRequest("n",0,t,i),o=this.createRequest("ｍ",0,t,null),r=this.createRequest(" ",0,t,i),a=this.createRequest("0",0,t,i),l=this.createRequest("1",0,t,i),c=this.createRequest("2",0,t,i),d=this.createRequest("3",0,t,i),p=this.createRequest("4",0,t,i),m=this.createRequest("5",0,t,i),f=this.createRequest("6",0,t,i),_=this.createRequest("7",0,t,i),b=this.createRequest("8",0,t,i),v=this.createRequest("9",0,t,i),C=this.createRequest("→",0,t,i),w=this.createRequest("￫",0,t,null),S=this.createRequest("·",0,t,i),y=this.createRequest(String.fromCharCode(11825),0,t,null);this.createRequest("|",0,t,i),this.createRequest("/",0,t,i),this.createRequest("-",0,t,i),this.createRequest("_",0,t,i),this.createRequest("i",0,t,i),this.createRequest("l",0,t,i),this.createRequest("m",0,t,i),this.createRequest("|",1,t,i),this.createRequest("_",1,t,i),this.createRequest("i",1,t,i),this.createRequest("l",1,t,i),this.createRequest("m",1,t,i),this.createRequest("n",1,t,i),this.createRequest("|",2,t,i),this.createRequest("_",2,t,i),this.createRequest("i",2,t,i),this.createRequest("l",2,t,i),this.createRequest("m",2,t,i),this.createRequest("n",2,t,i),h(e,t);const D=Math.max(a.width,l.width,c.width,d.width,p.width,m.width,f.width,_.width,b.width,v.width);let L=e.fontFeatureSettings===u["e"].OFF;const x=i[0].width;for(let n=1,h=i.length;L&&n<h;n++){const e=x-i[n].width;if(e<-.001||e>.001){L=!1;break}}let k=!0;L&&w.width!==x&&(k=!1),w.width>C.width&&(k=!1);const E=n["b"]()>2e3;return new g["b"]({zoomLevel:n["d"](),pixelRatio:n["a"](),fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:L,typicalHalfwidthCharacterWidth:s.width,typicalFullwidthCharacterWidth:o.width,canUseHalfwidthRightwardsArrow:k,spaceWidth:r.width,middotWidth:S.width,wsmiddotWidth:y.width,maxDigitWidth:D},E)}}f.INSTANCE=new f;class _ extends d["a"]{constructor(e,t,i=null,s){super(e,t),this.accessibilityService=s,this._elementSizeObserver=this._register(new c["a"](i,t.dimension,()=>this._recomputeOptions())),this._register(f.INSTANCE.onDidChange(()=>this._recomputeOptions())),this._validatedOptions.get(9)&&this._elementSizeObserver.startObserving(),this._register(n["n"](e=>this._recomputeOptions())),this._register(this.accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions())),this._recomputeOptions()}static applyFontInfoSlow(e,t){e.style.fontFamily=t.getMassagedFontFamily(),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px"}static applyFontInfo(e,t){e.setFontFamily(t.getMassagedFontFamily()),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)}observeReferenceElement(e){this._elementSizeObserver.observe(e)}updatePixelRatio(){this._recomputeOptions()}static _getExtraEditorClassName(){let e="";return n["j"]||n["m"]||(e+="no-user-select "),n["j"]&&(e+="no-minimap-shadow "),r["f"]&&(e+="mac "),e}_getEnvConfiguration(){return{extraEditorClassName:_._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:n["l"]||n["i"],pixelRatio:n["a"](),zoomLevel:n["d"](),accessibilitySupport:this.accessibilityService.isScreenReaderOptimized()?2:this.accessibilityService.getAccessibilitySupport()}}readConfiguration(e){return f.INSTANCE.readConfiguration(e)}}},"1e03":function(e,t,i){},"1e93":function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return a})),i.d(t,"b",(function(){return l})),i.d(t,"e",(function(){return h})),i.d(t,"c",(function(){return c})),i.d(t,"f",(function(){return d})),i.d(t,"d",(function(){return u})),i.d(t,"g",(function(){return g}));var n=i("3742");const s="undefined"!==typeof e,o="undefined"!==typeof TextDecoder;let r;class a{constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}static wrap(t){return s&&!e.isBuffer(t)&&(t=e.from(t.buffer,t.byteOffset,t.byteLength)),new a(t)}toString(){return s?this.buffer.toString():o?(r||(r=new TextDecoder),r.decode(this.buffer)):n["r"](this.buffer)}}function l(e,t){return e[t+0]<<0>>>0|e[t+1]<<8>>>0}function h(e,t,i){e[i+0]=255&t,t>>>=8,e[i+1]=255&t}function c(e,t){return e[t]*Math.pow(2,24)+e[t+1]*Math.pow(2,16)+e[t+2]*Math.pow(2,8)+e[t+3]}function d(e,t,i){e[i+3]=t,t>>>=8,e[i+2]=t,t>>>=8,e[i+1]=t,t>>>=8,e[i]=t}function u(e,t){return e[t]}function g(e,t,i){e[i]=t}}).call(this,i("b639").Buffer)},"1f26":function(e,t,i){},"1f54":function(e,t,i){},2504:function(e,t,i){"use strict";i.d(t,"a",(function(){return o})),i.d(t,"b",(function(){return a}));var n=i("308f");const s=Object.freeze((function(e,t){const i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}));var o;(function(e){function t(t){return t===e.None||t===e.Cancelled||(t instanceof r||!(!t||"object"!==typeof t)&&("boolean"===typeof t.isCancellationRequested&&"function"===typeof t.onCancellationRequested))}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n["b"].None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:s})})(o||(o={}));class r{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?s:(this._emitter||(this._emitter=new n["a"]),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class a{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new r),this._token}cancel(){this._token?this._token instanceof r&&this._token.cancel():this._token=o.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof r&&this._token.dispose():this._token=o.None}}},"258a":function(e,t,i){"use strict";var n;i.d(t,"a",(function(){return n})),function(e){function t(e){return e&&"object"===typeof e&&"function"===typeof e[Symbol.iterator]}e.is=t;const i=Object.freeze([]);function n(){return i}function*s(e){yield e}function o(e){return e||i}function r(e){return!e||!0===e[Symbol.iterator]().next().done}function a(e){return e[Symbol.iterator]().next().value}function l(e,t){for(const i of e)if(t(i))return!0;return!1}function h(e,t){for(const i of e)if(t(i))return i}function*c(e,t){for(const i of e)t(i)&&(yield i)}function*d(e,t){for(const i of e)yield t(i)}function*u(...e){for(const t of e)for(const e of t)yield e}function*g(e){for(const t of e)for(const e of t)yield e}function p(e,t,i){let n=i;for(const s of e)n=t(n,s);return n}function*m(e,t,i=e.length){for(t<0&&(t+=e.length),i<0?i+=e.length:i>e.length&&(i=e.length);t<i;t++)yield e[t]}function f(t,i=Number.POSITIVE_INFINITY){const n=[];if(0===i)return[n,t];const s=t[Symbol.iterator]();for(let o=0;o<i;o++){const t=s.next();if(t.done)return[n,e.empty()];n.push(t.value)}return[n,{[Symbol.iterator](){return s}}]}function _(e,t,i=((e,t)=>e===t)){const n=e[Symbol.iterator](),s=t[Symbol.iterator]();while(1){const e=n.next(),t=s.next();if(e.done!==t.done)return!1;if(e.done)return!0;if(!i(e.value,t.value))return!1}}e.empty=n,e.single=s,e.from=o,e.isEmpty=r,e.first=a,e.some=l,e.find=h,e.filter=c,e.map=d,e.concat=u,e.concatNested=g,e.reduce=p,e.slice=m,e.consume=f,e.equals=_}(n||(n={}))},"27e6":function(e,t,i){},2837:function(e,t,i){"use strict";var n;i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return s})),i.d(t,"a",(function(){return o})),function(e){e[e["None"]=0]="None",e[e["Indent"]=1]="Indent",e[e["IndentOutdent"]=2]="IndentOutdent",e[e["Outdent"]=3]="Outdent"}(n||(n={}));class s{constructor(e){if(this.open=e.open,this.close=e.close,this._standardTokenMask=0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;t<i;t++){const i=e.notIn[t];switch(i){case"string":this._standardTokenMask|=2;break;case"comment":this._standardTokenMask|=1;break;case"regex":this._standardTokenMask|=4;break}}}isOK(e){return 0===(this._standardTokenMask&e)}}class o{constructor(e){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const t of e)r(this.autoClosingPairsOpenByStart,t.open.charAt(0),t),r(this.autoClosingPairsOpenByEnd,t.open.charAt(t.open.length-1),t),r(this.autoClosingPairsCloseByStart,t.close.charAt(0),t),r(this.autoClosingPairsCloseByEnd,t.close.charAt(t.close.length-1),t),1===t.close.length&&1===t.open.length&&r(this.autoClosingPairsCloseSingleChar,t.close,t)}}function r(e,t,i){e.has(t)?e.get(t).push(i):e.set(t,[i])}},"2a04":function(e,t,i){},"2ab7":function(e,t,i){},"2c29":function(e,t,i){"use strict";i.d(t,"a",(function(){return s})),i.d(t,"d",(function(){return o})),i.d(t,"c",(function(){return r})),i.d(t,"b",(function(){return a}));var n=i("8025");class s{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations(),s=i[0].range;return new n["a"](s.endLineNumber,s.endColumn,s.endLineNumber,s.endColumn)}}class o{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations(),s=i[0].range;return new n["a"](s.startLineNumber,s.startColumn,s.startLineNumber,s.startColumn)}}class r{constructor(e,t,i,n,s=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=s}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations(),s=i[0].range;return new n["a"](s.endLineNumber+this._lineNumberDeltaOffset,s.endColumn+this._columnDeltaOffset,s.endLineNumber+this._lineNumberDeltaOffset,s.endColumn+this._columnDeltaOffset)}}class a{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}},"2de5":function(e,t,i){"use strict";i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return o}));var n=i("099d");class s{constructor(e,t){this.index=e,this.remainder=t}}class o{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=Object(n["a"])(e);const i=this.values,s=this.prefixSum,o=t.length;return 0!==o&&(this.values=new Uint32Array(i.length+o),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+o),this.values.set(t,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(e,t){return e=Object(n["a"])(e),t=Object(n["a"])(t),this.values[e]!==t&&(this.values[e]=t,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,t){e=Object(n["a"])(e),t=Object(n["a"])(t);const i=this.values,s=this.prefixSum;if(e>=i.length)return!1;let o=i.length-e;return t>=o&&(t=o),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalValue(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)}getAccumulatedValue(e){return e<0?0:(e=Object(n["a"])(e),this._getAccumulatedValue(e))}_getAccumulatedValue(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalValue();let t=0,i=this.values.length-1,n=0,o=0,r=0;while(t<=i)if(n=t+(i-t)/2|0,o=this.prefixSum[n],r=o-this.values[n],e<r)i=n-1;else{if(!(e>=o))break;t=n+1}return new s(n,e-r)}}},"303e":function(e,t,i){"use strict";i.d(t,"a",(function(){return h})),i.d(t,"Wb",(function(){return u})),i.d(t,"T",(function(){return g})),i.d(t,"R",(function(){return p})),i.d(t,"S",(function(){return m})),i.d(t,"h",(function(){return f})),i.d(t,"b",(function(){return _})),i.d(t,"ic",(function(){return b})),i.d(t,"hc",(function(){return v})),i.d(t,"kc",(function(){return C})),i.d(t,"X",(function(){return w})),i.d(t,"Z",(function(){return S})),i.d(t,"Y",(function(){return y})),i.d(t,"V",(function(){return D})),i.d(t,"U",(function(){return L})),i.d(t,"W",(function(){return x})),i.d(t,"db",(function(){return k})),i.d(t,"fb",(function(){return E})),i.d(t,"eb",(function(){return N})),i.d(t,"gb",(function(){return O})),i.d(t,"ib",(function(){return I})),i.d(t,"hb",(function(){return T})),i.d(t,"ab",(function(){return M})),i.d(t,"cb",(function(){return A})),i.d(t,"bb",(function(){return R})),i.d(t,"f",(function(){return B})),i.d(t,"e",(function(){return W})),i.d(t,"g",(function(){return V})),i.d(t,"c",(function(){return j})),i.d(t,"d",(function(){return H})),i.d(t,"Yb",(function(){return z})),i.d(t,"ac",(function(){return U})),i.d(t,"bc",(function(){return K})),i.d(t,"Zb",(function(){return $})),i.d(t,"Rb",(function(){return q})),i.d(t,"r",(function(){return G})),i.d(t,"t",(function(){return Y})),i.d(t,"s",(function(){return Z})),i.d(t,"K",(function(){return X})),i.d(t,"M",(function(){return Q})),i.d(t,"L",(function(){return J})),i.d(t,"E",(function(){return ee})),i.d(t,"G",(function(){return te})),i.d(t,"F",(function(){return ie})),i.d(t,"C",(function(){return ne})),i.d(t,"B",(function(){return se})),i.d(t,"q",(function(){return oe})),i.d(t,"A",(function(){return re})),i.d(t,"N",(function(){return ae})),i.d(t,"P",(function(){return le})),i.d(t,"O",(function(){return he})),i.d(t,"Q",(function(){return ce})),i.d(t,"Sb",(function(){return de})),i.d(t,"Tb",(function(){return ue})),i.d(t,"Vb",(function(){return ge})),i.d(t,"Ub",(function(){return pe})),i.d(t,"Qb",(function(){return me})),i.d(t,"Pb",(function(){return fe})),i.d(t,"H",(function(){return _e})),i.d(t,"I",(function(){return be})),i.d(t,"D",(function(){return ve})),i.d(t,"J",(function(){return Ce})),i.d(t,"u",(function(){return we})),i.d(t,"w",(function(){return Se})),i.d(t,"y",(function(){return ye})),i.d(t,"v",(function(){return De})),i.d(t,"x",(function(){return Le})),i.d(t,"z",(function(){return xe})),i.d(t,"i",(function(){return Ee})),i.d(t,"j",(function(){return Ne})),i.d(t,"m",(function(){return Oe})),i.d(t,"o",(function(){return Ie})),i.d(t,"n",(function(){return Te})),i.d(t,"p",(function(){return Me})),i.d(t,"k",(function(){return Ae})),i.d(t,"l",(function(){return Re})),i.d(t,"pb",(function(){return Fe})),i.d(t,"qb",(function(){return Pe})),i.d(t,"rb",(function(){return Be})),i.d(t,"jb",(function(){return We})),i.d(t,"kb",(function(){return Ve})),i.d(t,"xb",(function(){return je})),i.d(t,"yb",(function(){return He})),i.d(t,"vb",(function(){return ze})),i.d(t,"wb",(function(){return Ue})),i.d(t,"tb",(function(){return Ke})),i.d(t,"ub",(function(){return $e})),i.d(t,"lb",(function(){return qe})),i.d(t,"sb",(function(){return Ge})),i.d(t,"mb",(function(){return Ye})),i.d(t,"ob",(function(){return Ze})),i.d(t,"nb",(function(){return Xe})),i.d(t,"jc",(function(){return Qe})),i.d(t,"gc",(function(){return Je})),i.d(t,"Ab",(function(){return et})),i.d(t,"Bb",(function(){return tt})),i.d(t,"zb",(function(){return it})),i.d(t,"Eb",(function(){return nt})),i.d(t,"Cb",(function(){return st})),i.d(t,"Db",(function(){return ot})),i.d(t,"Fb",(function(){return rt})),i.d(t,"ec",(function(){return at})),i.d(t,"fc",(function(){return lt})),i.d(t,"cc",(function(){return ht})),i.d(t,"dc",(function(){return ct})),i.d(t,"Ob",(function(){return dt})),i.d(t,"Ib",(function(){return ut})),i.d(t,"Jb",(function(){return gt})),i.d(t,"Hb",(function(){return pt})),i.d(t,"Nb",(function(){return mt})),i.d(t,"Gb",(function(){return ft})),i.d(t,"Lb",(function(){return _t})),i.d(t,"Mb",(function(){return bt})),i.d(t,"Kb",(function(){return vt})),i.d(t,"Xb",(function(){return Dt}));var n=i("89cd"),s=i("ceb8"),o=i("308f"),r=i("dff7"),a=i("dd1b"),l=i("5fe7");const h={ColorContribution:"base.contributions.colors"};class c{constructor(){this._onDidChangeSchema=new o["a"],this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,i,n=!1,s){let o={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:s};this.colorsById[e]=o;let r={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return s&&(r.deprecationMessage=s),this.colorSchema.properties[e]=r,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}resolveDefaultColor(e,t){const i=this.colorsById[e];if(i&&i.defaults){const e=i.defaults[t.type];return Dt(e,t)}}getColorSchema(){return this.colorSchema}toString(){let e=(e,t)=>{let i=-1===e.indexOf(".")?0:1,n=-1===t.indexOf(".")?0:1;return i!==n?i-n:e.localeCompare(t)};return Object.keys(this.colorsById).sort(e).map(e=>`- \`${e}\`: ${this.colorsById[e].description}`).join("\n")}}const d=new c;function u(e,t,i,n,s){return d.registerColor(e,t,i,n,s)}n["a"].add(h.ColorContribution,d);const g=u("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},r["a"]("foreground","Overall foreground color. This color is only used if not overridden by a component.")),p=u("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},r["a"]("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),m=(u("icon.foreground",{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},r["a"]("iconForeground","The default color for icons in the workbench.")),u("focusBorder",{dark:"#007FD4",light:"#0090F1",hc:"#F38518"},r["a"]("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component."))),f=u("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},r["a"]("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),_=u("contrastActiveBorder",{light:null,dark:null,hc:m},r["a"]("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),b=u("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},r["a"]("textLinkForeground","Foreground color for links in text.")),v=u("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:s["a"].black},r["a"]("textCodeBlockBackground","Background color for code blocks in text.")),C=u("widget.shadow",{dark:St(s["a"].black,.36),light:St(s["a"].black,.16),hc:null},r["a"]("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),w=u("input.background",{dark:"#3C3C3C",light:s["a"].white,hc:s["a"].black},r["a"]("inputBoxBackground","Input box background.")),S=u("input.foreground",{dark:g,light:g,hc:g},r["a"]("inputBoxForeground","Input box foreground.")),y=u("input.border",{dark:null,light:null,hc:f},r["a"]("inputBoxBorder","Input box border.")),D=u("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:f},r["a"]("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),L=u("inputOption.activeBackground",{dark:St(m,.4),light:St(m,.2),hc:s["a"].transparent},r["a"]("inputOption.activeBackground","Background color of activated options in input fields.")),x=u("inputOption.activeForeground",{dark:s["a"].white,light:s["a"].black,hc:null},r["a"]("inputOption.activeForeground","Foreground color of activated options in input fields.")),k=u("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:s["a"].black},r["a"]("inputValidationInfoBackground","Input validation background color for information severity.")),E=u("inputValidation.infoForeground",{dark:null,light:null,hc:null},r["a"]("inputValidationInfoForeground","Input validation foreground color for information severity.")),N=u("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:f},r["a"]("inputValidationInfoBorder","Input validation border color for information severity.")),O=u("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:s["a"].black},r["a"]("inputValidationWarningBackground","Input validation background color for warning severity.")),I=u("inputValidation.warningForeground",{dark:null,light:null,hc:null},r["a"]("inputValidationWarningForeground","Input validation foreground color for warning severity.")),T=u("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:f},r["a"]("inputValidationWarningBorder","Input validation border color for warning severity.")),M=u("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:s["a"].black},r["a"]("inputValidationErrorBackground","Input validation background color for error severity.")),A=u("inputValidation.errorForeground",{dark:null,light:null,hc:null},r["a"]("inputValidationErrorForeground","Input validation foreground color for error severity.")),R=u("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:f},r["a"]("inputValidationErrorBorder","Input validation border color for error severity.")),F=u("dropdown.background",{dark:"#3C3C3C",light:s["a"].white,hc:s["a"].black},r["a"]("dropdownBackground","Dropdown background.")),P=u("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:s["a"].white},r["a"]("dropdownForeground","Dropdown foreground.")),B=u("button.foreground",{dark:s["a"].white,light:s["a"].white,hc:s["a"].white},r["a"]("buttonForeground","Button foreground color.")),W=u("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},r["a"]("buttonBackground","Button background color.")),V=u("button.hoverBackground",{dark:wt(W,.2),light:Ct(W,.2),hc:null},r["a"]("buttonHoverBackground","Button background color when hovering.")),j=u("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:s["a"].black},r["a"]("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),H=u("badge.foreground",{dark:s["a"].white,light:"#333",hc:s["a"].white},r["a"]("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),z=u("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},r["a"]("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),U=u("scrollbarSlider.background",{dark:s["a"].fromHex("#797979").transparent(.4),light:s["a"].fromHex("#646464").transparent(.4),hc:St(f,.6)},r["a"]("scrollbarSliderBackground","Scrollbar slider background color.")),K=u("scrollbarSlider.hoverBackground",{dark:s["a"].fromHex("#646464").transparent(.7),light:s["a"].fromHex("#646464").transparent(.7),hc:St(f,.8)},r["a"]("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),$=u("scrollbarSlider.activeBackground",{dark:s["a"].fromHex("#BFBFBF").transparent(.4),light:s["a"].fromHex("#000000").transparent(.6),hc:f},r["a"]("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),q=u("progressBar.background",{dark:s["a"].fromHex("#0E70C0"),light:s["a"].fromHex("#0E70C0"),hc:f},r["a"]("progressBarBackground","Background color of the progress bar that can show for long running operations.")),G=u("editorError.background",{dark:null,light:null,hc:null},r["a"]("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Y=u("editorError.foreground",{dark:"#F48771",light:"#E51400",hc:null},r["a"]("editorError.foreground","Foreground color of error squigglies in the editor.")),Z=u("editorError.border",{dark:null,light:null,hc:s["a"].fromHex("#E47777").transparent(.8)},r["a"]("errorBorder","Border color of error boxes in the editor.")),X=u("editorWarning.background",{dark:null,light:null,hc:null},r["a"]("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Q=u("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hc:null},r["a"]("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),J=u("editorWarning.border",{dark:null,light:null,hc:s["a"].fromHex("#FFCC00").transparent(.8)},r["a"]("warningBorder","Border color of warning boxes in the editor.")),ee=u("editorInfo.background",{dark:null,light:null,hc:null},r["a"]("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),te=u("editorInfo.foreground",{dark:"#75BEFF",light:"#75BEFF",hc:null},r["a"]("editorInfo.foreground","Foreground color of info squigglies in the editor.")),ie=u("editorInfo.border",{dark:null,light:null,hc:s["a"].fromHex("#75BEFF").transparent(.8)},r["a"]("infoBorder","Border color of info boxes in the editor.")),ne=u("editorHint.foreground",{dark:s["a"].fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},r["a"]("editorHint.foreground","Foreground color of hint squigglies in the editor.")),se=u("editorHint.border",{dark:null,light:null,hc:s["a"].fromHex("#eeeeee").transparent(.8)},r["a"]("hintBorder","Border color of hint boxes in the editor.")),oe=u("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:s["a"].black},r["a"]("editorBackground","Editor background color.")),re=u("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:s["a"].white},r["a"]("editorForeground","Editor default foreground color.")),ae=u("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},r["a"]("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),le=u("editorWidget.foreground",{dark:g,light:g,hc:g},r["a"]("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),he=u("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:f},r["a"]("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),ce=u("editorWidget.resizeBorder",{light:null,dark:null,hc:null},r["a"]("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),de=u("quickInput.background",{dark:ae,light:ae,hc:ae},r["a"]("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),ue=u("quickInput.foreground",{dark:le,light:le,hc:le},r["a"]("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),ge=u("quickInputTitle.background",{dark:new s["a"](new s["b"](255,255,255,.105)),light:new s["a"](new s["b"](0,0,0,.06)),hc:"#000000"},r["a"]("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),pe=u("quickInput.list.focusBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},r["a"]("quickInput.listFocusBackground","Quick picker background color for the focused item.")),me=u("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:s["a"].white},r["a"]("pickerGroupForeground","Quick picker color for grouping labels.")),fe=u("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:s["a"].white},r["a"]("pickerGroupBorder","Quick picker color for grouping borders.")),_e=u("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},r["a"]("editorSelectionBackground","Color of the editor selection.")),be=u("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},r["a"]("editorSelectionForeground","Color of the selected text for high contrast.")),ve=u("editor.inactiveSelectionBackground",{light:St(_e,.5),dark:St(_e,.5),hc:St(_e,.5)},r["a"]("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),Ce=u("editor.selectionHighlightBackground",{light:yt(_e,oe,.3,.6),dark:yt(_e,oe,.3,.6),hc:null},r["a"]("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),we=(u("editor.selectionHighlightBorder",{light:null,dark:null,hc:_},r["a"]("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),u("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},r["a"]("editorFindMatch","Color of the current search match."))),Se=u("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},r["a"]("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),ye=u("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},r["a"]("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),De=u("editor.findMatchBorder",{light:null,dark:null,hc:_},r["a"]("editorFindMatchBorder","Border color of the current search match.")),Le=u("editor.findMatchHighlightBorder",{light:null,dark:null,hc:_},r["a"]("findMatchHighlightBorder","Border color of the other search matches.")),xe=u("editor.findRangeHighlightBorder",{dark:null,light:null,hc:St(_,.4)},r["a"]("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),ke=(u("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},r["a"]("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),u("editorHoverWidget.background",{light:ae,dark:ae,hc:ae},r["a"]("hoverBackground","Background color of the editor hover."))),Ee=(u("editorHoverWidget.foreground",{light:le,dark:le,hc:le},r["a"]("hoverForeground","Foreground color of the editor hover.")),u("editorHoverWidget.border",{light:he,dark:he,hc:he},r["a"]("hoverBorder","Border color of the editor hover.")),u("editorHoverWidget.statusBarBackground",{dark:wt(ke,.2),light:Ct(ke,.05),hc:ae},r["a"]("statusBarBackground","Background color of the editor hover status bar.")),u("editorLink.activeForeground",{dark:"#4E94CE",light:s["a"].blue,hc:s["a"].cyan},r["a"]("activeLinkForeground","Color of active links.")),u("editorInlineHint.foreground",{dark:ae,light:le,hc:ae},r["a"]("editorInlineHintForeground","Foreground color of inline hints")),u("editorInlineHint.background",{dark:le,light:ae,hc:le},r["a"]("editorInlineHintBackground","Background color of inline hints")),u("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},r["a"]("editorLightBulbForeground","The color used for the lightbulb actions icon.")),u("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},r["a"]("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),new s["a"](new s["b"](155,185,85,.2))),Ne=new s["a"](new s["b"](255,0,0,.2)),Oe=u("diffEditor.insertedTextBackground",{dark:Ee,light:Ee,hc:null},r["a"]("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),Ie=u("diffEditor.removedTextBackground",{dark:Ne,light:Ne,hc:null},r["a"]("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),Te=u("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},r["a"]("diffEditorInsertedOutline","Outline color for the text that got inserted.")),Me=u("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},r["a"]("diffEditorRemovedOutline","Outline color for text that got removed.")),Ae=u("diffEditor.border",{dark:null,light:null,hc:f},r["a"]("diffEditorBorder","Border color between the two text editors.")),Re=u("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hc:null},r["a"]("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),Fe=u("list.focusBackground",{dark:null,light:null,hc:null},r["a"]("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Pe=u("list.focusForeground",{dark:null,light:null,hc:null},r["a"]("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Be=u("list.focusOutline",{dark:m,light:m,hc:_},r["a"]("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),We=u("list.activeSelectionBackground",{dark:"#094771",light:"#0060C0",hc:null},r["a"]("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Ve=u("list.activeSelectionForeground",{dark:s["a"].white,light:s["a"].white,hc:null},r["a"]("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),je=u("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},r["a"]("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),He=u("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},r["a"]("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),ze=u("list.inactiveFocusBackground",{dark:null,light:null,hc:null},r["a"]("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Ue=u("list.inactiveFocusOutline",{dark:null,light:null,hc:null},r["a"]("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),Ke=u("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},r["a"]("listHoverBackground","List/Tree background when hovering over items using the mouse.")),$e=u("list.hoverForeground",{dark:null,light:null,hc:null},r["a"]("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),qe=u("list.dropBackground",{dark:Fe,light:Fe,hc:null},r["a"]("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),Ge=u("list.highlightForeground",{dark:"#0097fb",light:"#0066BF",hc:m},r["a"]("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),Ye=u("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:s["a"].black},r["a"]("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),Ze=u("listFilterWidget.outline",{dark:s["a"].transparent,light:s["a"].transparent,hc:"#f38518"},r["a"]("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),Xe=u("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:f},r["a"]("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),Qe=u("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},r["a"]("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),Je=u("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hc:null},r["a"]("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),et=u("menu.border",{dark:null,light:null,hc:f},r["a"]("menuBorder","Border color of menus.")),tt=u("menu.foreground",{dark:P,light:g,hc:P},r["a"]("menuForeground","Foreground color of menu items.")),it=u("menu.background",{dark:F,light:F,hc:F},r["a"]("menuBackground","Background color of menu items.")),nt=u("menu.selectionForeground",{dark:Ve,light:Ve,hc:Ve},r["a"]("menuSelectionForeground","Foreground color of the selected menu item in menus.")),st=u("menu.selectionBackground",{dark:We,light:We,hc:We},r["a"]("menuSelectionBackground","Background color of the selected menu item in menus.")),ot=u("menu.selectionBorder",{dark:null,light:null,hc:_},r["a"]("menuSelectionBorder","Border color of the selected menu item in menus.")),rt=u("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:f},r["a"]("menuSeparatorBackground","Color of a separator menu item in menus.")),at=u("editor.snippetTabstopHighlightBackground",{dark:new s["a"](new s["b"](124,124,124,.3)),light:new s["a"](new s["b"](10,50,100,.2)),hc:new s["a"](new s["b"](124,124,124,.3))},r["a"]("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),lt=u("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},r["a"]("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),ht=u("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},r["a"]("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),ct=u("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new s["a"](new s["b"](10,50,100,.5)),hc:"#525252"},r["a"]("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),dt=u("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},r["a"]("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),ut=(u("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},r["a"]("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),u("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},r["a"]("minimapFindMatchHighlight","Minimap marker color for find matches."),!0)),gt=u("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},r["a"]("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),pt=u("minimap.errorHighlight",{dark:new s["a"](new s["b"](255,18,18,.7)),light:new s["a"](new s["b"](255,18,18,.7)),hc:new s["a"](new s["b"](255,50,50,1))},r["a"]("minimapError","Minimap marker color for errors.")),mt=u("minimap.warningHighlight",{dark:Q,light:Q,hc:J},r["a"]("overviewRuleWarning","Minimap marker color for warnings.")),ft=u("minimap.background",{dark:null,light:null,hc:null},r["a"]("minimapBackground","Minimap background color.")),_t=u("minimapSlider.background",{light:St(U,.5),dark:St(U,.5),hc:St(U,.5)},r["a"]("minimapSliderBackground","Minimap slider background color.")),bt=u("minimapSlider.hoverBackground",{light:St(K,.5),dark:St(K,.5),hc:St(K,.5)},r["a"]("minimapSliderHoverBackground","Minimap slider background color when hovering.")),vt=u("minimapSlider.activeBackground",{light:St($,.5),dark:St($,.5),hc:St($,.5)},r["a"]("minimapSliderActiveBackground","Minimap slider background color when clicked on."));u("problemsErrorIcon.foreground",{dark:Y,light:Y,hc:Y},r["a"]("problemsErrorIconForeground","The color used for the problems error icon.")),u("problemsWarningIcon.foreground",{dark:Q,light:Q,hc:Q},r["a"]("problemsWarningIconForeground","The color used for the problems warning icon.")),u("problemsInfoIcon.foreground",{dark:te,light:te,hc:te},r["a"]("problemsInfoIconForeground","The color used for the problems info icon."));function Ct(e,t){return i=>{let n=Dt(e,i);if(n)return n.darken(t)}}function wt(e,t){return i=>{let n=Dt(e,i);if(n)return n.lighten(t)}}function St(e,t){return i=>{let n=Dt(e,i);if(n)return n.transparent(t)}}function yt(e,t,i,n){return o=>{let r=Dt(e,o);if(r){let e=Dt(t,o);return e?r.isDarkerThan(e)?s["a"].getLighterColor(r,e,i).transparent(n):s["a"].getDarkerColor(r,e,i).transparent(n):r.transparent(i*n)}}}function Dt(e,t){if(null!==e)return"string"===typeof e?"#"===e[0]?s["a"].fromHex(e):t.getColor(e):e instanceof s["a"]?e:"function"===typeof e?e(t):void 0}const Lt="vscode://schemas/workbench-colors";let xt=n["a"].as(a["a"].JSONContribution);xt.registerSchema(Lt,d.getColorSchema());const kt=new l["e"](()=>xt.notifySchemaChanged(Lt),200);d.onDidChangeSchema(()=>{kt.isScheduled()||kt.schedule()})},"308f":function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"a",(function(){return d})),i.d(t,"d",(function(){return u})),i.d(t,"c",(function(){return g})),i.d(t,"e",(function(){return p}));var n,s=i("fdcc"),o=i("a666"),r=i("db88"),a=i("e58e");(function(e){function t(e){return(t,i=null,n)=>{let s,o=!1;return s=e(e=>{if(!o)return s?s.dispose():o=!0,t.call(i,e)},null,n),o&&s.dispose(),s}}function i(e,t){return h((i,n=null,s)=>e(e=>i.call(n,t(e)),null,s))}function n(e,t){return h((i,n=null,s)=>e(e=>{t(e),i.call(n,e)},null,s))}function s(e,t){return h((i,n=null,s)=>e(e=>t(e)&&i.call(n,e),null,s))}function r(e){return e}function a(...e){return(t,i=null,n)=>Object(o["e"])(...e.map(e=>e(e=>t.call(i,e),null,n)))}function l(e,t,n){let s=n;return i(e,e=>(s=t(s,e),s))}function h(e){let t;const i=new d({onFirstListenerAdd(){t=e(i.fire,i)},onLastListenerRemove(){t.dispose()}});return i.event}function c(e,t,i=100,n=!1,s){let o,r=void 0,a=void 0,l=0;const h=new d({leakWarningThreshold:s,onFirstListenerAdd(){o=e(e=>{l++,r=t(r,e),n&&!a&&(h.fire(r),r=void 0),clearTimeout(a),a=setTimeout(()=>{const e=r;r=void 0,a=void 0,(!n||l>1)&&h.fire(e),l=0},i)})},onLastListenerRemove(){o.dispose()}});return h.event}function u(e){const n=(new Date).getTime();return i(t(e),e=>(new Date).getTime()-n)}function g(e){let t,i=!0;return s(e,e=>{const n=i||e!==t;return i=!1,t=e,n})}function p(e,t=!1,i=[]){let n=i.slice(),s=e(e=>{n?n.push(e):r.fire(e)});const o=()=>{n&&n.forEach(e=>r.fire(e)),n=null},r=new d({onFirstListenerAdd(){s||(s=e(e=>r.fire(e)))},onFirstListenerDidAdd(){n&&(t?setTimeout(o):o())},onLastListenerRemove(){s&&s.dispose(),s=null}});return r.event}e.None=()=>o["a"].None,e.once=t,e.map=i,e.forEach=n,e.filter=s,e.signal=r,e.any=a,e.reduce=l,e.snapshot=h,e.debounce=c,e.stopwatch=u,e.latch=g,e.buffer=p;class m{constructor(e){this.event=e}map(e){return new m(i(this.event,e))}forEach(e){return new m(n(this.event,e))}filter(e){return new m(s(this.event,e))}reduce(e,t){return new m(l(this.event,e,t))}latch(){return new m(g(this.event))}debounce(e,t=100,i=!1,n){return new m(c(this.event,e,t,i,n))}on(e,t,i){return this.event(e,t,i)}once(e,i,n){return t(this.event)(e,i,n)}}function f(e){return new m(e)}function _(e,t,i=(e=>e)){const n=(...e)=>r.fire(i(...e)),s=()=>e.on(t,n),o=()=>e.removeListener(t,n),r=new d({onFirstListenerAdd:s,onLastListenerRemove:o});return r.event}function b(e,t,i=(e=>e)){const n=(...e)=>r.fire(i(...e)),s=()=>e.addEventListener(t,n),o=()=>e.removeEventListener(t,n),r=new d({onFirstListenerAdd:s,onLastListenerRemove:o});return r.event}function v(e){const t=new d;let i=!1;return e.then(void 0,()=>null).then(()=>{i?t.fire(void 0):setTimeout(()=>t.fire(void 0),0)}),i=!0,t.event}function C(e){return new Promise(i=>t(e)(i))}e.chain=f,e.fromNodeEventEmitter=_,e.fromDOMEventEmitter=b,e.fromPromise=v,e.toPromise=C})(n||(n={}));class l{constructor(e){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${e}_${l._idPool++}`}start(e){this._stopWatch=new a["a"](!0),this._listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this._elapsedOverall+=e,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${e.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}l._idPool=0;let h=-1;class c{constructor(e,t=Math.random().toString(18).slice(2,5)){this.customThreshold=e,this.name=t,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(e){let t=h;if("number"===typeof this.customThreshold&&(t=this.customThreshold),t<=0||e<t)return;this._stacks||(this._stacks=new Map);const i=(new Error).stack.split("\n").slice(3).join("\n"),n=this._stacks.get(i)||0;if(this._stacks.set(i,n+1),this._warnCountdown-=1,this._warnCountdown<=0){let i;this._warnCountdown=.5*t;let n=0;for(const[e,t]of this._stacks)(!i||n<t)&&(i=e,n=t);console.warn(`[${this.name}] potential listener LEAK detected, having ${e} listeners already. MOST frequent listener (${n}):`),console.warn(i)}return()=>{const e=this._stacks.get(i)||0;this._stacks.set(i,e-1)}}}class d{constructor(e){var t;this._disposed=!1,this._options=e,this._leakageMon=h>0?new c(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=(null===(t=this._options)||void 0===t?void 0:t._profName)?new l(this._options._profName):void 0}get event(){return this._event||(this._event=(e,t,i)=>{var n;this._listeners||(this._listeners=new r["a"]);const s=this._listeners.isEmpty();s&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const a=this._listeners.push(t?[e,t]:e);s&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,e,t);const l=null===(n=this._leakageMon)||void 0===n?void 0:n.check(this._listeners.size);let h;return h={dispose:()=>{if(l&&l(),h.dispose=d._noop,!this._disposed&&(a(),this._options&&this._options.onLastListenerRemove)){const e=this._listeners&&!this._listeners.isEmpty();e||this._options.onLastListenerRemove(this)}}},i instanceof o["b"]?i.add(h):Array.isArray(i)&&i.push(h),h}),this._event}fire(e){var t,i;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new r["a"]);for(let t of this._listeners)this._deliveryQueue.push([t,e]);null===(t=this._perfMon)||void 0===t||t.start(this._deliveryQueue.size);while(this._deliveryQueue.size>0){const[e,t]=this._deliveryQueue.shift();try{"function"===typeof e?e.call(void 0,t):e[0].call(e[1],t)}catch(n){Object(s["e"])(n)}}null===(i=this._perfMon)||void 0===i||i.stop()}}dispose(){var e,t,i;null===(e=this._listeners)||void 0===e||e.clear(),null===(t=this._deliveryQueue)||void 0===t||t.clear(),null===(i=this._leakageMon)||void 0===i||i.dispose(),this._disposed=!0}}d._noop=function(){};class u extends d{constructor(e){super(e),this._isPaused=0,this._eventQueue=new r["a"],this._mergeFn=null===e||void 0===e?void 0:e.merge}pause(){this._isPaused++}resume(){if(0!==this._isPaused&&0===--this._isPaused)if(this._mergeFn){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}else while(!this._isPaused&&0!==this._eventQueue.size)super.fire(this._eventQueue.shift())}fire(e){this._listeners&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}}class g{constructor(){this.buffers=[]}wrapEvent(e){return(t,i,n)=>e(e=>{const n=this.buffers[this.buffers.length-1];n?n.push(()=>t.call(i,e)):t.call(i,e)},void 0,n)}bufferEvents(e){const t=[];this.buffers.push(t);const i=e();return this.buffers.pop(),t.forEach(e=>e()),i}}class p{constructor(){this.listening=!1,this.inputEvent=n.None,this.inputEventListener=o["a"].None,this.emitter=new d({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},"30db":function(e,t,i){"use strict";(function(e,n){var s;i.d(t,"h",(function(){return S})),i.d(t,"j",(function(){return D})),i.d(t,"f",(function(){return L})),i.d(t,"d",(function(){return x})),i.d(t,"g",(function(){return k})),i.d(t,"i",(function(){return E})),i.d(t,"c",(function(){return N})),i.d(t,"l",(function(){return O})),i.d(t,"b",(function(){return I})),i.d(t,"k",(function(){return T})),i.d(t,"a",(function(){return M})),i.d(t,"e",(function(){return F}));const o="en";let r=!1,a=!1,l=!1,h=!1,c=!1,d=!1,u=!1,g=void 0,p=o,m=void 0,f=void 0;const _="object"===typeof self?self:"object"===typeof e?e:{};let b=void 0;"undefined"!==typeof n?b=n:"undefined"!==typeof _.vscode&&(b=_.vscode.process);const v="string"===typeof(null===(s=null===b||void 0===b?void 0:b.versions)||void 0===s?void 0:s.electron)&&"renderer"===b.type,C=v&&(null===b||void 0===b?void 0:b.sandboxed),w=(()=>{if(C)return"bypassHeatCheck";const e=null===b||void 0===b?void 0:b.env["ENABLE_VSCODE_BROWSER_CODE_LOADING"];return"string"===typeof e?"none"===e||"code"===e||"bypassHeatCheck"===e||"bypassHeatCheckAndEagerCompile"===e?e:"bypassHeatCheck":void 0})(),S="string"===typeof w;if("object"!==typeof navigator||v)if("object"===typeof b){r="win32"===b.platform,a="darwin"===b.platform,l="linux"===b.platform,h=l&&!!b.env["SNAP"]&&!!b.env["SNAP_REVISION"],g=o,p=o;const e=b.env["VSCODE_NLS_CONFIG"];if(e)try{const t=JSON.parse(e),i=t.availableLanguages["*"];g=t.locale,p=i||o,m=t._translationsConfigFile}catch(P){}c=!0}else console.error("Unable to resolve platform.");else f=navigator.userAgent,r=f.indexOf("Windows")>=0,a=f.indexOf("Macintosh")>=0,u=(f.indexOf("Macintosh")>=0||f.indexOf("iPad")>=0||f.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,l=f.indexOf("Linux")>=0,d=!0,g=navigator.language,p=g;let y=0;a?y=1:r?y=3:l&&(y=2);const D=r,L=a,x=l,k=c,E=d,N=u,O=f,I=_,T=function(){if(I.setImmediate)return I.setImmediate.bind(I);if("function"===typeof I.postMessage&&!I.importScripts){let e=[];I.addEventListener("message",t=>{if(t.data&&t.data.vscodeSetImmediateId)for(let i=0,n=e.length;i<n;i++){const n=e[i];if(n.id===t.data.vscodeSetImmediateId)return e.splice(i,1),void n.callback()}});let t=0;return i=>{const n=++t;e.push({id:n,callback:i}),I.postMessage({vscodeSetImmediateId:n},"*")}}if(b&&"function"===typeof b.nextTick)return b.nextTick.bind(b);const e=Promise.resolve();return t=>e.then(t)}(),M=a||u?2:r?1:3;let A=!0,R=!1;function F(){if(!R){R=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);A=513===t[0]}return A}}).call(this,i("c8ba"),i("4362"))},3170:function(e,t,i){"use strict";i.d(t,"a",(function(){return s})),i.d(t,"b",(function(){return o}));var n=i("099d");class s{constructor(e){let t=Object(n["b"])(e);this._defaultValue=t,this._asciiMap=s._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){let t=new Uint8Array(256);for(let i=0;i<256;i++)t[i]=e;return t}set(e,t){let i=Object(n["b"])(t);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}}class o{constructor(){this._actual=new s(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}}},"31df":function(e,t,i){"use strict";i.d(t,"c",(function(){return s})),i.d(t,"b",(function(){return o})),i.d(t,"a",(function(){return r}));var n=i("11f7");function s(e,t={}){const i=r(t);return i.textContent=e,i}function o(e,t={}){const i=r(t);return l(i,h(e),t.actionHandler),i}function r(e){const t=e.inline?"span":"div",i=document.createElement(t);return e.className&&(i.className=e.className),i}class a{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function l(e,t,i){let s;if(2===t.type)s=document.createTextNode(t.content||"");else if(3===t.type)s=document.createElement("b");else if(4===t.type)s=document.createElement("i");else if(5===t.type&&i){const e=document.createElement("a");e.href="#",i.disposeables.add(n["k"](e,"click",e=>{i.callback(String(t.index),e)})),s=e}else 7===t.type?s=document.createElement("br"):1===t.type&&(s=e);s&&e!==s&&e.appendChild(s),s&&Array.isArray(t.children)&&t.children.forEach(e=>{l(s,e,i)})}function h(e){const t={type:1,children:[]};let i=0,n=t;const s=[],o=new a(e);while(!o.eos()){let e=o.next();const t="\\"===e&&0!==d(o.peek());if(t&&(e=o.next()),!t&&c(e)&&e===o.peek()){o.advance(),2===n.type&&(n=s.pop());const t=d(e);if(n.type===t||5===n.type&&6===t)n=s.pop();else{const e={type:t,children:[]};5===t&&(e.index=i,i++),n.children.push(e),s.push(n),n=e}}else if("\n"===e)2===n.type&&(n=s.pop()),n.children.push({type:7});else if(2!==n.type){const t={type:2,content:e};n.children.push(t),s.push(n),n=t}else n.content+=e}return 2===n.type&&(n=s.pop()),s.length,t}function c(e){return 0!==d(e)}function d(e){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;default:return 0}}},"32a4":function(e,t,i){"use strict";i.d(t,"a",(function(){return c})),i.d(t,"c",(function(){return d})),i.d(t,"b",(function(){return g}));var n=i("dff7"),s=i("308f"),o=i("b707"),r=i("70cb"),a=i("89cd");const l={ModesRegistry:"editor.modesRegistry"};class h{constructor(){this._onDidChangeLanguages=new s["a"],this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[],this._dynamicLanguages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t<i;t++)if(this._languages[t]===e)return void this._languages.splice(t,1)}}}getLanguages(){return[].concat(this._languages).concat(this._dynamicLanguages)}}const c=new h;a["a"].add(l.ModesRegistry,c);const d="plaintext",u=".txt",g=new o["r"](d,1);c.registerLanguage({id:d,extensions:[u],aliases:[n["a"]("plainText.alias","Plain Text"),"text"],mimetypes:["text/plain"]}),r["a"].register(g,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],folding:{offSide:!0}},0)},"32b8":function(e,t,i){"use strict";i.d(t,"i",(function(){return C})),i.d(t,"e",(function(){return w})),i.d(t,"d",(function(){return S})),i.d(t,"g",(function(){return y})),i.d(t,"f",(function(){return D})),i.d(t,"b",(function(){return L})),i.d(t,"a",(function(){return x})),i.d(t,"c",(function(){return k})),i.d(t,"h",(function(){return E}));var n=i("c317");const s=65,o=97,r=90,a=122,l=46,h=47,c=92,d=58,u=63;class g extends Error{constructor(e,t,i){let n;"string"===typeof t&&0===t.indexOf("not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";const s=-1!==e.indexOf(".")?"property":"argument";let o=`The "${e}" ${s} ${n} of type ${t}`;o+=". Received type "+typeof i,super(o),this.code="ERR_INVALID_ARG_TYPE"}}function p(e,t){if("string"!==typeof e)throw new g(t,"string",e)}function m(e){return e===h||e===c}function f(e){return e===h}function _(e){return e>=s&&e<=r||e>=o&&e<=a}function b(e,t,i,n){let s="",o=0,r=-1,a=0,c=0;for(let d=0;d<=e.length;++d){if(d<e.length)c=e.charCodeAt(d);else{if(n(c))break;c=h}if(n(c)){if(r===d-1||1===a);else if(2===a){if(s.length<2||2!==o||s.charCodeAt(s.length-1)!==l||s.charCodeAt(s.length-2)!==l){if(s.length>2){const e=s.lastIndexOf(i);-1===e?(s="",o=0):(s=s.slice(0,e),o=s.length-1-s.lastIndexOf(i)),r=d,a=0;continue}if(0!==s.length){s="",o=0,r=d,a=0;continue}}t&&(s+=s.length>0?i+"..":"..",o=2)}else s.length>0?s+=`${i}${e.slice(r+1,d)}`:s=e.slice(r+1,d),o=d-r-1;r=d,a=0}else c===l&&-1!==a?++a:a=-1}return s}function v(e,t){if(null===t||"object"!==typeof t)throw new g("pathObject","Object",t);const i=t.dir||t.root,n=t.base||`${t.name||""}${t.ext||""}`;return i?i===t.root?`${i}${n}`:`${i}${e}${n}`:n}const C={resolve(...e){let t="",i="",s=!1;for(let o=e.length-1;o>=-1;o--){let r;if(o>=0){if(r=e[o],p(r,"path"),0===r.length)continue}else 0===t.length?r=n["a"]():(r=n["b"]["="+t]||n["a"](),(void 0===r||r.slice(0,2).toLowerCase()!==t.toLowerCase()&&r.charCodeAt(2)===c)&&(r=t+"\\"));const a=r.length;let l=0,h="",u=!1;const g=r.charCodeAt(0);if(1===a)m(g)&&(l=1,u=!0);else if(m(g))if(u=!0,m(r.charCodeAt(1))){let e=2,t=e;while(e<a&&!m(r.charCodeAt(e)))e++;if(e<a&&e!==t){const i=r.slice(t,e);t=e;while(e<a&&m(r.charCodeAt(e)))e++;if(e<a&&e!==t){t=e;while(e<a&&!m(r.charCodeAt(e)))e++;e!==a&&e===t||(h=`\\\\${i}\\${r.slice(t,e)}`,l=e)}}}else l=1;else _(g)&&r.charCodeAt(1)===d&&(h=r.slice(0,2),l=2,a>2&&m(r.charCodeAt(2))&&(u=!0,l=3));if(h.length>0)if(t.length>0){if(h.toLowerCase()!==t.toLowerCase())continue}else t=h;if(s){if(t.length>0)break}else if(i=`${r.slice(l)}\\${i}`,s=u,u&&t.length>0)break}return i=b(i,!s,"\\",m),s?`${t}\\${i}`:`${t}${i}`||"."},normalize(e){p(e,"path");const t=e.length;if(0===t)return".";let i,n=0,s=!1;const o=e.charCodeAt(0);if(1===t)return f(o)?"\\":e;if(m(o))if(s=!0,m(e.charCodeAt(1))){let s=2,o=s;while(s<t&&!m(e.charCodeAt(s)))s++;if(s<t&&s!==o){const r=e.slice(o,s);o=s;while(s<t&&m(e.charCodeAt(s)))s++;if(s<t&&s!==o){o=s;while(s<t&&!m(e.charCodeAt(s)))s++;if(s===t)return`\\\\${r}\\${e.slice(o)}\\`;s!==o&&(i=`\\\\${r}\\${e.slice(o,s)}`,n=s)}}}else n=1;else _(o)&&e.charCodeAt(1)===d&&(i=e.slice(0,2),n=2,t>2&&m(e.charCodeAt(2))&&(s=!0,n=3));let r=n<t?b(e.slice(n),!s,"\\",m):"";return 0!==r.length||s||(r="."),r.length>0&&m(e.charCodeAt(t-1))&&(r+="\\"),void 0===i?s?"\\"+r:r:s?`${i}\\${r}`:`${i}${r}`},isAbsolute(e){p(e,"path");const t=e.length;if(0===t)return!1;const i=e.charCodeAt(0);return m(i)||t>2&&_(i)&&e.charCodeAt(1)===d&&m(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,i;for(let o=0;o<e.length;++o){const n=e[o];p(n,"path"),n.length>0&&(void 0===t?t=i=n:t+="\\"+n)}if(void 0===t)return".";let n=!0,s=0;if("string"===typeof i&&m(i.charCodeAt(0))){++s;const e=i.length;e>1&&m(i.charCodeAt(1))&&(++s,e>2&&(m(i.charCodeAt(2))?++s:n=!1))}if(n){while(s<t.length&&m(t.charCodeAt(s)))s++;s>=2&&(t="\\"+t.slice(s))}return C.normalize(t)},relative(e,t){if(p(e,"from"),p(t,"to"),e===t)return"";const i=C.resolve(e),n=C.resolve(t);if(i===n)return"";if(e=i.toLowerCase(),t=n.toLowerCase(),e===t)return"";let s=0;while(s<e.length&&e.charCodeAt(s)===c)s++;let o=e.length;while(o-1>s&&e.charCodeAt(o-1)===c)o--;const r=o-s;let a=0;while(a<t.length&&t.charCodeAt(a)===c)a++;let l=t.length;while(l-1>a&&t.charCodeAt(l-1)===c)l--;const h=l-a,d=r<h?r:h;let u=-1,g=0;for(;g<d;g++){const i=e.charCodeAt(s+g);if(i!==t.charCodeAt(a+g))break;i===c&&(u=g)}if(g!==d){if(-1===u)return n}else{if(h>d){if(t.charCodeAt(a+g)===c)return n.slice(a+g+1);if(2===g)return n.slice(a+g)}r>d&&(e.charCodeAt(s+g)===c?u=g:2===g&&(u=3)),-1===u&&(u=0)}let m="";for(g=s+u+1;g<=o;++g)g!==o&&e.charCodeAt(g)!==c||(m+=0===m.length?"..":"\\..");return a+=u,m.length>0?`${m}${n.slice(a,l)}`:(n.charCodeAt(a)===c&&++a,n.slice(a,l))},toNamespacedPath(e){if("string"!==typeof e)return e;if(0===e.length)return"";const t=C.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===c){if(t.charCodeAt(1)===c){const e=t.charCodeAt(2);if(e!==u&&e!==l)return"\\\\?\\UNC\\"+t.slice(2)}}else if(_(t.charCodeAt(0))&&t.charCodeAt(1)===d&&t.charCodeAt(2)===c)return"\\\\?\\"+t;return e},dirname(e){p(e,"path");const t=e.length;if(0===t)return".";let i=-1,n=0;const s=e.charCodeAt(0);if(1===t)return m(s)?e:".";if(m(s)){if(i=n=1,m(e.charCodeAt(1))){let s=2,o=s;while(s<t&&!m(e.charCodeAt(s)))s++;if(s<t&&s!==o){o=s;while(s<t&&m(e.charCodeAt(s)))s++;if(s<t&&s!==o){o=s;while(s<t&&!m(e.charCodeAt(s)))s++;if(s===t)return e;s!==o&&(i=n=s+1)}}}}else _(s)&&e.charCodeAt(1)===d&&(i=t>2&&m(e.charCodeAt(2))?3:2,n=i);let o=-1,r=!0;for(let a=t-1;a>=n;--a)if(m(e.charCodeAt(a))){if(!r){o=a;break}}else r=!1;if(-1===o){if(-1===i)return".";o=i}return e.slice(0,o)},basename(e,t){void 0!==t&&p(t,"ext"),p(e,"path");let i,n=0,s=-1,o=!0;if(e.length>=2&&_(e.charCodeAt(0))&&e.charCodeAt(1)===d&&(n=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=n;--i){const l=e.charCodeAt(i);if(m(l)){if(!o){n=i+1;break}}else-1===a&&(o=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1===--r&&(s=i):(r=-1,s=a))}return n===s?s=a:-1===s&&(s=e.length),e.slice(n,s)}for(i=e.length-1;i>=n;--i)if(m(e.charCodeAt(i))){if(!o){n=i+1;break}}else-1===s&&(o=!1,s=i+1);return-1===s?"":e.slice(n,s)},extname(e){p(e,"path");let t=0,i=-1,n=0,s=-1,o=!0,r=0;e.length>=2&&e.charCodeAt(1)===d&&_(e.charCodeAt(0))&&(t=n=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(m(t)){if(!o){n=a+1;break}}else-1===s&&(o=!1,s=a+1),t===l?-1===i?i=a:1!==r&&(r=1):-1!==i&&(r=-1)}return-1===i||-1===s||0===r||1===r&&i===s-1&&i===n+1?"":e.slice(i,s)},format:v.bind(null,"\\"),parse(e){p(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.length;let n=0,s=e.charCodeAt(0);if(1===i)return m(s)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(m(s)){if(n=1,m(e.charCodeAt(1))){let t=2,s=t;while(t<i&&!m(e.charCodeAt(t)))t++;if(t<i&&t!==s){s=t;while(t<i&&m(e.charCodeAt(t)))t++;if(t<i&&t!==s){s=t;while(t<i&&!m(e.charCodeAt(t)))t++;t===i?n=t:t!==s&&(n=t+1)}}}}else if(_(s)&&e.charCodeAt(1)===d){if(i<=2)return t.root=t.dir=e,t;if(n=2,m(e.charCodeAt(2))){if(3===i)return t.root=t.dir=e,t;n=3}}n>0&&(t.root=e.slice(0,n));let o=-1,r=n,a=-1,h=!0,c=e.length-1,u=0;for(;c>=n;--c)if(s=e.charCodeAt(c),m(s)){if(!h){r=c+1;break}}else-1===a&&(h=!1,a=c+1),s===l?-1===o?o=c:1!==u&&(u=1):-1!==o&&(u=-1);return-1!==a&&(-1===o||0===u||1===u&&o===a-1&&o===r+1?t.base=t.name=e.slice(r,a):(t.name=e.slice(r,o),t.base=e.slice(r,a),t.ext=e.slice(o,a))),t.dir=r>0&&r!==n?e.slice(0,r-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},w={resolve(...e){let t="",i=!1;for(let s=e.length-1;s>=-1&&!i;s--){const o=s>=0?e[s]:n["a"]();p(o,"path"),0!==o.length&&(t=`${o}/${t}`,i=o.charCodeAt(0)===h)}return t=b(t,!i,"/",f),i?"/"+t:t.length>0?t:"."},normalize(e){if(p(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===h,i=e.charCodeAt(e.length-1)===h;return e=b(e,!t,"/",f),0===e.length?t?"/":i?"./":".":(i&&(e+="/"),t?"/"+e:e)},isAbsolute(e){return p(e,"path"),e.length>0&&e.charCodeAt(0)===h},join(...e){if(0===e.length)return".";let t;for(let i=0;i<e.length;++i){const n=e[i];p(n,"path"),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":w.normalize(t)},relative(e,t){if(p(e,"from"),p(t,"to"),e===t)return"";if(e=w.resolve(e),t=w.resolve(t),e===t)return"";const i=1,n=e.length,s=n-i,o=1,r=t.length-o,a=s<r?s:r;let l=-1,c=0;for(;c<a;c++){const n=e.charCodeAt(i+c);if(n!==t.charCodeAt(o+c))break;n===h&&(l=c)}if(c===a)if(r>a){if(t.charCodeAt(o+c)===h)return t.slice(o+c+1);if(0===c)return t.slice(o+c)}else s>a&&(e.charCodeAt(i+c)===h?l=c:0===c&&(l=0));let d="";for(c=i+l+1;c<=n;++c)c!==n&&e.charCodeAt(c)!==h||(d+=0===d.length?"..":"/..");return`${d}${t.slice(o+l)}`},toNamespacedPath(e){return e},dirname(e){if(p(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===h;let i=-1,n=!0;for(let s=e.length-1;s>=1;--s)if(e.charCodeAt(s)===h){if(!n){i=s;break}}else n=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename(e,t){void 0!==t&&p(t,"ext"),p(e,"path");let i,n=0,s=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let r=t.length-1,a=-1;for(i=e.length-1;i>=0;--i){const l=e.charCodeAt(i);if(l===h){if(!o){n=i+1;break}}else-1===a&&(o=!1,a=i+1),r>=0&&(l===t.charCodeAt(r)?-1===--r&&(s=i):(r=-1,s=a))}return n===s?s=a:-1===s&&(s=e.length),e.slice(n,s)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===h){if(!o){n=i+1;break}}else-1===s&&(o=!1,s=i+1);return-1===s?"":e.slice(n,s)},extname(e){p(e,"path");let t=-1,i=0,n=-1,s=!0,o=0;for(let r=e.length-1;r>=0;--r){const a=e.charCodeAt(r);if(a!==h)-1===n&&(s=!1,n=r+1),a===l?-1===t?t=r:1!==o&&(o=1):-1!==t&&(o=-1);else if(!s){i=r+1;break}}return-1===t||-1===n||0===o||1===o&&t===n-1&&t===i+1?"":e.slice(t,n)},format:v.bind(null,"/"),parse(e){p(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.charCodeAt(0)===h;let n;i?(t.root="/",n=1):n=0;let s=-1,o=0,r=-1,a=!0,c=e.length-1,d=0;for(;c>=n;--c){const t=e.charCodeAt(c);if(t!==h)-1===r&&(a=!1,r=c+1),t===l?-1===s?s=c:1!==d&&(d=1):-1!==s&&(d=-1);else if(!a){o=c+1;break}}if(-1!==r){const n=0===o&&i?1:o;-1===s||0===d||1===d&&s===r-1&&s===o+1?t.base=t.name=e.slice(n,r):(t.name=e.slice(n,s),t.base=e.slice(n,r),t.ext=e.slice(s,r))}return o>0?t.dir=e.slice(0,o-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};w.win32=C.win32=C,w.posix=C.posix=w;const S="win32"===n["c"]?C.normalize:w.normalize,y="win32"===n["c"]?C.resolve:w.resolve,D="win32"===n["c"]?C.relative:w.relative,L="win32"===n["c"]?C.dirname:w.dirname,x="win32"===n["c"]?C.basename:w.basename,k="win32"===n["c"]?C.extname:w.extname,E="win32"===n["c"]?C.sep:w.sep},"32f2":function(e,t,i){"use strict";i.d(t,"a",(function(){return s})),i.d(t,"b",(function(){return o}));class n{constructor(e,t,i){this.from=0|e,this.to=0|t,this.colorId=0|i}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class s{constructor(e,t,i){this.startLineNumber=e,this.endLineNumber=t,this.color=i,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.color<t.color?-1:1}setColorZone(e){this._colorZone=e}getColorZones(){return this._colorZone}}class o{constructor(e){this._getVerticalOffsetForLine=e,this._zones=[],this._colorZonesInvalid=!1,this._lineHeight=0,this._domWidth=0,this._domHeight=0,this._outerHeight=0,this._pixelRatio=1,this._lastAssignedId=0,this._color2Id=Object.create(null),this._id2Color=[]}getId2Color(){return this._id2Color}setZones(e){this._zones=e,this._zones.sort(s.compare)}setLineHeight(e){return this._lineHeight!==e&&(this._lineHeight=e,this._colorZonesInvalid=!0,!0)}setPixelRatio(e){this._pixelRatio=e,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(e){return this._domWidth!==e&&(this._domWidth=e,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(e){return this._domHeight!==e&&(this._domHeight=e,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(e){return this._outerHeight!==e&&(this._outerHeight=e,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const e=this._colorZonesInvalid,t=Math.floor(this._lineHeight),i=Math.floor(this.getCanvasHeight()),s=Math.floor(this._outerHeight),o=i/s,r=Math.floor(4*this._pixelRatio/2);let a=[];for(let l=0,h=this._zones.length;l<h;l++){const s=this._zones[l];if(!e){const e=s.getColorZones();if(e){a.push(e);continue}}const h=Math.floor(o*this._getVerticalOffsetForLine(s.startLineNumber)),c=Math.floor(o*(this._getVerticalOffsetForLine(s.endLineNumber)+t));let d=Math.floor((h+c)/2),u=c-d;u<r&&(u=r),d-u<0&&(d=u),d+u>i&&(d=i-u);const g=s.color;let p=this._color2Id[g];p||(p=++this._lastAssignedId,this._color2Id[g]=p,this._id2Color[p]=g);const m=new n(d-u,d+u,p);s.setColorZone(m),a.push(m)}return this._colorZonesInvalid=!1,a.sort(n.compare),a}}},3352:function(e,t,i){"use strict";var n,s;i.d(t,"d",(function(){return n})),i.d(t,"c",(function(){return s})),i.d(t,"e",(function(){return o})),i.d(t,"b",(function(){return r})),i.d(t,"f",(function(){return a})),i.d(t,"a",(function(){return l})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=4]="Right",e[e["Full"]=7]="Full"}(n||(n={})),function(e){e[e["Inline"]=1]="Inline",e[e["Gutter"]=2]="Gutter"}(s||(s={}));class o{constructor(e){this.tabSize=Math.max(1,0|e.tabSize),this.indentSize=0|e.tabSize,this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace)}equals(e){return this.tabSize===e.tabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class r{constructor(e,t){this.range=e,this.matches=t}}class a{constructor(e,t,i,n,s,o){this.identifier=e,this.range=t,this.text=i,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=s,this._isTracked=o}}class l{constructor(e,t,i){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=i}}},"33f9":function(e,t,i){self["MonacoEnvironment"]=function(e){function t(e){return e.replace(/\/$/,"")}return{globalAPI:!1,getWorkerUrl:function(n,s){var o=i.p,r=(o?t(o)+"/":"")+e[s];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(r)){var a=String(window.location),l=a.substr(0,a.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(r.substring(0,l.length)!==l){var h="/*"+s+'*/importScripts("'+r+'");',c=new Blob([h],{type:"application/javascript"});return URL.createObjectURL(c)}}return r}}}({editorWorkerService:"editor.worker.js",css:"css.worker.js",html:"html.worker.js",json:"json.worker.js",typescript:"ts.worker.js",javascript:"ts.worker.js",less:"css.worker.js",scss:"css.worker.js",handlebars:"html.worker.js",razor:"html.worker.js"}),i("a106"),i("7a9e"),e.exports=i("f33e"),i("f41d"),i("f570"),i("8457"),i("7367"),i("7257"),i("a79b"),i("10eb"),i("cf78")},3502:function(e,t,i){"use strict";var n=i("33f9");i.o(n,"Emitter")&&i.d(t,"Emitter",(function(){return n["Emitter"]})),i.o(n,"MarkerSeverity")&&i.d(t,"MarkerSeverity",(function(){return n["MarkerSeverity"]})),i.o(n,"Range")&&i.d(t,"Range",(function(){return n["Range"]})),i.o(n,"Uri")&&i.d(t,"Uri",(function(){return n["Uri"]})),i.o(n,"editor")&&i.d(t,"editor",(function(){return n["editor"]})),i.o(n,"languages")&&i.d(t,"languages",(function(){return n["languages"]}))},3742:function(e,t,i){"use strict";function n(e){return!e||"string"!==typeof e||0===e.trim().length}i.d(t,"C",(function(){return n})),i.d(t,"w",(function(){return o})),i.d(t,"t",(function(){return r})),i.d(t,"u",(function(){return a})),i.d(t,"J",(function(){return l})),i.d(t,"O",(function(){return h})),i.d(t,"p",(function(){return c})),i.d(t,"q",(function(){return d})),i.d(t,"N",(function(){return u})),i.d(t,"M",(function(){return g})),i.d(t,"Q",(function(){return p})),i.d(t,"v",(function(){return m})),i.d(t,"y",(function(){return f})),i.d(t,"I",(function(){return _})),i.d(t,"f",(function(){return b})),i.d(t,"h",(function(){return v})),i.d(t,"g",(function(){return C})),i.d(t,"i",(function(){return w})),i.d(t,"G",(function(){return S})),i.d(t,"H",(function(){return y})),i.d(t,"s",(function(){return L})),i.d(t,"R",(function(){return k})),i.d(t,"d",(function(){return E})),i.d(t,"e",(function(){return N})),i.d(t,"E",(function(){return O})),i.d(t,"F",(function(){return I})),i.d(t,"j",(function(){return T})),i.d(t,"z",(function(){return M})),i.d(t,"K",(function(){return R})),i.d(t,"L",(function(){return F})),i.d(t,"r",(function(){return P})),i.d(t,"m",(function(){return W})),i.d(t,"k",(function(){return j})),i.d(t,"A",(function(){return z})),i.d(t,"a",(function(){return U})),i.d(t,"n",(function(){return K})),i.d(t,"l",(function(){return $})),i.d(t,"D",(function(){return q})),i.d(t,"B",(function(){return G})),i.d(t,"b",(function(){return Y})),i.d(t,"S",(function(){return Z})),i.d(t,"o",(function(){return X})),i.d(t,"P",(function(){return Q})),i.d(t,"x",(function(){return J})),i.d(t,"c",(function(){return ee}));const s=/{(\d+)}/g;function o(e,...t){return 0===t.length?e:e.replace(s,(function(e,i){const n=parseInt(i,10);return isNaN(n)||n<0||n>=t.length?e:t[n]}))}function r(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return e}}))}function a(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function l(e,t){if(!e||!t)return e;const i=t.length;if(0===i||0===e.length)return e;let n=0;while(e.indexOf(t,n)===n)n+=i;return e.substring(n)}function h(e,t){if(!e||!t)return e;const i=t.length,n=e.length;if(0===i||0===n)return e;let s=n,o=-1;while(1){if(o=e.lastIndexOf(t,s-1),-1===o||o+i!==s)break;if(0===o)return"";s=o}return e.substring(0,s)}function c(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function d(e,t,i={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=a(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let n="";return i.global&&(n+="g"),i.matchCase||(n+="i"),i.multiline&&(n+="m"),i.unicode&&(n+="u"),new RegExp(e,n)}function u(e){if("^"===e.source||"^$"===e.source||"$"===e.source||"^\\s*$"===e.source)return!1;const t=e.exec("");return!(!t||0!==e.lastIndex)}function g(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")}function p(e){return e.split(/\r\n|\r|\n/)}function m(e){for(let t=0,i=e.length;t<i;t++){const i=e.charCodeAt(t);if(32!==i&&9!==i)return t}return-1}function f(e,t=0,i=e.length){for(let n=t;n<i;n++){const i=e.charCodeAt(n);if(32!==i&&9!==i)return e.substring(t,n)}return e.substring(t,i)}function _(e,t=e.length-1){for(let i=t;i>=0;i--){const t=e.charCodeAt(i);if(32!==t&&9!==t)return i}return-1}function b(e,t){return e<t?-1:e>t?1:0}function v(e,t,i=0,n=e.length,s=0,o=t.length){for(;i<n&&s<o;i++,s++){let n=e.charCodeAt(i),o=t.charCodeAt(s);if(n<o)return-1;if(n>o)return 1}const r=n-i,a=o-s;return r<a?-1:r>a?1:0}function C(e,t){return w(e,t,0,e.length,0,t.length)}function w(e,t,i=0,n=e.length,s=0,o=t.length){for(;i<n&&s<o;i++,s++){let r=e.charCodeAt(i),a=t.charCodeAt(s);if(r===a)continue;const l=r-a;if((32!==l||!y(a))&&(-32!==l||!y(r)))return S(r)&&S(a)?l:v(e.toLowerCase(),t.toLowerCase(),i,n,s,o)}const r=n-i,a=o-s;return r<a?-1:r>a?1:0}function S(e){return e>=97&&e<=122}function y(e){return e>=65&&e<=90}function D(e){return S(e)||y(e)}function L(e,t){return e.length===t.length&&x(e,t)}function x(e,t,i=e.length){for(let n=0;n<i;n++){const i=e.charCodeAt(n),s=t.charCodeAt(n);if(i!==s)if(D(i)&&D(s)){const e=Math.abs(i-s);if(0!==e&&32!==e)return!1}else if(String.fromCharCode(i).toLowerCase()!==String.fromCharCode(s).toLowerCase())return!1}return!0}function k(e,t){const i=t.length;return!(t.length>e.length)&&x(e,t,i)}function E(e,t){let i,n=Math.min(e.length,t.length);for(i=0;i<n;i++)if(e.charCodeAt(i)!==t.charCodeAt(i))return i;return n}function N(e,t){let i,n=Math.min(e.length,t.length);const s=e.length-1,o=t.length-1;for(i=0;i<n;i++)if(e.charCodeAt(s-i)!==t.charCodeAt(o-i))return i;return n}function O(e){return 55296<=e&&e<=56319}function I(e){return 56320<=e&&e<=57343}function T(e,t){return t-56320+(e-55296<<10)+65536}function M(e,t,i){const n=e.charCodeAt(i);if(O(n)&&i+1<t){const t=e.charCodeAt(i+1);if(I(t))return T(n,t)}return n}function A(e,t){const i=e.charCodeAt(t-1);if(I(i)&&t>1){const n=e.charCodeAt(t-2);if(O(n))return T(n,i)}return i}function R(e,t){const i=te.getInstance(),n=t,s=e.length,o=M(e,s,t);t+=o>=65536?2:1;let r=i.getGraphemeBreakType(o);while(t<s){const n=M(e,s,t),o=i.getGraphemeBreakType(n);if(ee(r,o))break;t+=n>=65536?2:1,r=o}return t-n}function F(e,t){const i=te.getInstance(),n=t,s=A(e,t);t-=s>=65536?2:1;let o=i.getGraphemeBreakType(s);while(t>0){const n=A(e,t),s=i.getGraphemeBreakType(n);if(ee(s,o))break;t-=n>=65536?2:1,o=s}return n-t}function P(e){const t=e.byteLength,i=[];let n=0;while(n<t){const s=e[n];let o;if(o=s>=240&&n+3<t?(7&e[n++])<<18>>>0|(63&e[n++])<<12>>>0|(63&e[n++])<<6>>>0|(63&e[n++])<<0>>>0:s>=224&&n+2<t?(15&e[n++])<<12>>>0|(63&e[n++])<<6>>>0|(63&e[n++])<<0>>>0:s>=192&&n+1<t?(31&e[n++])<<6>>>0|(63&e[n++])<<0>>>0:e[n++],o>=0&&o<=55295||o>=57344&&o<=65535)i.push(String.fromCharCode(o));else if(o>=65536&&o<=1114111){const e=o-65536,t=55296+((1047552&e)>>>10),n=56320+((1023&e)>>>0);i.push(String.fromCharCode(t)),i.push(String.fromCharCode(n))}else i.push(String.fromCharCode(65533))}return i.join("")}const B=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function W(e){return B.test(e)}const V=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function j(e){return V.test(e)}const H=/^[\t\n\r\x20-\x7E]*$/;function z(e){return H.test(e)}const U=/[\u2028\u2029]/;function K(e){return U.test(e)}function $(e){for(let t=0,i=e.length;t<i;t++)if(q(e.charCodeAt(t)))return!0;return!1}function q(e){return e=+e,e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function G(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129003||e>=129280&&e<=129535||e>=129648&&e<=129750}const Y=String.fromCharCode(65279);function Z(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function X(e,t=!1){return!!e&&(t&&(e=e.replace(/\\./g,"")),e.toLowerCase()!==e)}function Q(e){const t=26;return e%=2*t,e<t?String.fromCharCode(97+e):String.fromCharCode(65+e-t)}function J(e){const t=te.getInstance();return t.getGraphemeBreakType(e)}function ee(e,t){return 0===e?5!==t&&7!==t:(2!==e||3!==t)&&(4===e||2===e||3===e||(4===t||2===t||3===t||(8!==e||8!==t&&9!==t&&11!==t&&12!==t)&&((11!==e&&9!==e||9!==t&&10!==t)&&((12!==e&&10!==e||10!==t)&&(5!==t&&13!==t&&(7!==t&&(1!==e&&((13!==e||14!==t)&&(6!==e||6!==t)))))))))}class te{constructor(){this._data=ie()}static getInstance(){return te._INSTANCE||(te._INSTANCE=new te),te._INSTANCE}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;const t=this._data,i=t.length/3;let n=1;while(n<=i)if(e<t[3*n])n*=2;else{if(!(e>t[3*n+1]))return t[3*n+2];n=2*n+1}return 0}}function ie(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}te._INSTANCE=null},3813:function(e,t,i){"use strict";i.d(t,"b",(function(){return d})),i.d(t,"a",(function(){return u})),i.d(t,"c",(function(){return g}));i("5029");var n=i("30db"),s=i("11f7");const o=2e4;let r,a,l,h,c;function d(e){r=document.createElement("div"),r.className="monaco-aria-container";const t=()=>{const e=document.createElement("div");return e.className="monaco-alert",e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),r.appendChild(e),e};a=t(),l=t();const i=()=>{const e=document.createElement("div");return e.className="monaco-status",e.setAttribute("role","complementary"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),r.appendChild(e),e};h=i(),c=i(),e.appendChild(r)}function u(e){r&&(a.textContent!==e?(s["p"](l),p(a,e)):(s["p"](a),p(l,e)))}function g(e){r&&(n["f"]?u(e):h.textContent!==e?(s["p"](c),p(h,e)):(s["p"](h),p(c,e)))}function p(e,t){s["p"](e),t.length>o&&(t=t.substr(0,o)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}},"38a2":function(e,t,i){},"3c35":function(e,t){(function(t){e.exports=t}).call(this,{})},"3d37":function(e,t,i){"use strict";i.d(t,"d",(function(){return r})),i.d(t,"b",(function(){return a})),i.d(t,"c",(function(){return h})),i.d(t,"a",(function(){return c}));var n=i("30db"),s=i("3742"),o=i("32b8");function r(e){return e.replace(/[\\/]/g,o["e"].sep)}function a(e,t,i,n=o["h"]){if(e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(i){const i=Object(s["R"])(e,t);if(!i)return!1;if(t.length===e.length)return!0;let o=t.length;return t.charAt(t.length-1)===n&&o--,e.charAt(o)===n}return t.charAt(t.length-1)!==n&&(t+=n),0===e.indexOf(t)}function l(e){return e>=65&&e<=90||e>=97&&e<=122}function h(e){const t=Object(o["d"])(e);return n["j"]?!(e.length>3)&&(c(t)&&(2===e.length||92===t.charCodeAt(2))):t===o["e"].sep}function c(e){return!!n["j"]&&(l(e.charCodeAt(0))&&58===e.charCodeAt(1))}},4035:function(e,t,i){"use strict";i.d(t,"c",(function(){return c})),i.d(t,"b",(function(){return d})),i.d(t,"a",(function(){return g}));var n=i("6d8e"),s=i("3742");class o{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(e){const t=e.charCodeAt(0),i=this._value.charCodeAt(this._pos);return t-i}value(){return this._value[this._pos]}}class r{constructor(e=!0){this._caseSensitive=e}reset(e){return this._value=e,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let e=!0;for(;this._to<this._value.length;this._to++){const t=this._value.charCodeAt(this._to);if(46===t){if(!e)break;this._from++}else e=!1}return this}cmp(e){return this._caseSensitive?Object(s["h"])(e,this._value,0,e.length,this._from,this._to):Object(s["i"])(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class a{constructor(e=!0,t=!0){this._splitOnBackslash=e,this._caseSensitive=t}reset(e){return this._value=e.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let e=!0;for(;this._to<this._value.length;this._to++){const t=this._value.charCodeAt(this._to);if(47===t||this._splitOnBackslash&&92===t){if(!e)break;this._from++}else e=!1}return this}cmp(e){return this._caseSensitive?Object(s["h"])(e,this._value,0,e.length,this._from,this._to):Object(s["i"])(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class l{constructor(e){this._ignorePathCasing=e,this._states=[],this._stateIdx=0}reset(e){return this._value=e,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new a(!1,!this._ignorePathCasing(e)),this._pathIterator.reset(e.path),this._pathIterator.value()&&this._states.push(3)),this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5),this._stateIdx=0,this}next(){return 3===this._states[this._stateIdx]&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return 3===this._states[this._stateIdx]&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(e){if(1===this._states[this._stateIdx])return Object(s["g"])(e,this._value.scheme);if(2===this._states[this._stateIdx])return Object(s["g"])(e,this._value.authority);if(3===this._states[this._stateIdx])return this._pathIterator.cmp(e);if(4===this._states[this._stateIdx])return Object(s["f"])(e,this._value.query);if(5===this._states[this._stateIdx])return Object(s["f"])(e,this._value.fragment);throw new Error}value(){if(1===this._states[this._stateIdx])return this._value.scheme;if(2===this._states[this._stateIdx])return this._value.authority;if(3===this._states[this._stateIdx])return this._pathIterator.value();if(4===this._states[this._stateIdx])return this._value.query;if(5===this._states[this._stateIdx])return this._value.fragment;throw new Error}}class h{isEmpty(){return!this.left&&!this.mid&&!this.right&&!this.value}}class c{constructor(e){this._iter=e}static forUris(e=(()=>!1)){return new c(new l(e))}static forStrings(){return new c(new o)}static forConfigKeys(){return new c(new r)}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;this._root||(this._root=new h,this._root.segment=i.value()),n=this._root;while(1){const e=i.cmp(n.segment);if(e>0)n.left||(n.left=new h,n.left.segment=i.value()),n=n.left;else if(e<0)n.right||(n.right=new h,n.right.segment=i.value()),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new h,n.mid.segment=i.value()),n=n.mid}}const s=n.value;return n.value=t,n.key=e,s}get(e){var t;return null===(t=this._getNode(e))||void 0===t?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;while(i){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())break;t.next(),i=i.mid}}return i}has(e){const t=this._getNode(e);return!(void 0===(null===t||void 0===t?void 0:t.value)&&void 0===(null===t||void 0===t?void 0:t.mid))}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){const i=this._iter.reset(e),n=[];let s=this._root;while(s){const e=i.cmp(s.segment);if(e>0)n.push([1,s]),s=s.left;else if(e<0)n.push([-1,s]),s=s.right;else{if(!i.hasNext()){t?(s.left=void 0,s.mid=void 0,s.right=void 0):s.value=void 0;while(n.length>0&&s.isEmpty()){let[e,t]=n.pop();switch(e){case 1:t.left=void 0;break;case 0:t.mid=void 0;break;case-1:t.right=void 0;break}s=t}break}i.next(),n.push([0,s]),s=s.mid}}}findSubstr(e){const t=this._iter.reset(e);let i=this._root,n=void 0;while(i){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())break;t.next(),n=i.value||n,i=i.mid}}return i&&i.value||n}findSuperstr(e){const t=this._iter.reset(e);let i=this._root;while(i){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())return i.mid?this._entries(i.mid):void 0;t.next(),i=i.mid}}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}*_entries(e){e&&(yield*this._entries(e.left),e.value&&(yield[e.key,e.value]),yield*this._entries(e.mid),yield*this._entries(e.right))}}class d{constructor(e,t){this[Symbol.toStringTag]="ResourceMap",e instanceof d?(this.map=new Map(e.map),this.toKey=null!==t&&void 0!==t?t:d.defaultToKey):(this.map=new Map,this.toKey=null!==e&&void 0!==e?e:d.defaultToKey)}set(e,t){return this.map.set(this.toKey(e),t),this}get(e){return this.map.get(this.toKey(e))}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){"undefined"!==typeof t&&(e=e.bind(t));for(let[i,s]of this.map)e(s,n["a"].parse(i),this)}values(){return this.map.values()}*keys(){for(let e of this.map.keys())yield n["a"].parse(e)}*entries(){for(let e of this.map.entries())yield[n["a"].parse(e[0]),e[1]]}*[Symbol.iterator](){for(let e of this.map)yield[n["a"].parse(e[0]),e[1]]}}d.defaultToKey=e=>e.toString();class u{constructor(){this[Symbol.toStringTag]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(i)return 0!==t&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,0!==i&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:this.addItemLast(n);break;case 1:this.addItemFirst(n);break;case 2:this.addItemLast(n);break;default:this.addItemLast(n);break}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const i=this._state;let n=this._head;while(n){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.key,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.value,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:[i.key,i.value],done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}[Symbol.iterator](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,i=this.size;while(t&&i>e)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}addItemFirst(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,this._state++}addItemLast(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,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(t.previous=i,i.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,i=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=i,i.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach((t,i)=>{e.push([i,t])}),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}class g extends u{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},"40c2":function(e,t,i){},4111:function(e,t,i){"use strict";i.d(t,"f",(function(){return l})),i.d(t,"b",(function(){return d})),i.d(t,"c",(function(){return u})),i.d(t,"a",(function(){return p})),i.d(t,"e",(function(){return _})),i.d(t,"d",(function(){return b}));var n=i("e8e3"),s=i("e1b5"),o=i("7061"),r=i("6a89"),a=i("b707");function l(e){let t=0,i=0,n=0,s=0;for(let o=0,r=e.length;o<r;o++){const a=e.charCodeAt(o);13===a?(0===t&&(i=o),t++,o+1<r&&10===e.charCodeAt(o+1)?(s|=2,o++):s|=3,n=o+1):10===a&&(s|=1,0===t&&(i=o),t++,n=o+1)}return 0===t&&(i=e.length),[t,i,e.length-n,s]}function h(e){return(16384|e<<0|2<<23)>>>0}const c=new Uint32Array(0).buffer;class d{constructor(){this.tokens=[]}add(e,t){if(this.tokens.length>0){const i=this.tokens[this.tokens.length-1],n=i.startLineNumber+i.tokens.length-1;if(n+1===e)return void i.tokens.push(t)}this.tokens.push(new m(e,[t]))}}class u{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){let t=[];for(let i=0;i<this._tokenCount;i++)t.push(`(${this._getDeltaLine(i)+e},${this._getStartCharacter(i)}-${this._getEndCharacter(i)})`);return`[${t.join(",")}]`}getMaxDeltaLine(){const e=this._getTokenCount();return 0===e?-1:this._getDeltaLine(e-1)}getRange(){const e=this._getTokenCount();if(0===e)return null;const t=this._getStartCharacter(0),i=this._getDeltaLine(e-1),n=this._getEndCharacter(e-1);return new r["a"](0,t+1,i,n+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(e){return this._tokens[4*e]}_getStartCharacter(e){return this._tokens[4*e+1]}_getEndCharacter(e){return this._tokens[4*e+2]}isEmpty(){return 0===this._getTokenCount()}getLineTokens(e){let t=0,i=this._getTokenCount()-1;while(t<i){const n=t+Math.floor((i-t)/2),s=this._getDeltaLine(n);if(s<e)t=n+1;else{if(!(s>e)){let s=n;while(s>t&&this._getDeltaLine(s-1)===e)s--;let o=n;while(o<i&&this._getDeltaLine(o+1)===e)o++;return new g(this._tokens.subarray(4*s,4*o+4))}i=n-1}}return this._getDeltaLine(t)===e?new g(this._tokens.subarray(4*t,4*t+4)):null}clear(){this._tokenCount=0}removeTokens(e,t,i,n){const s=this._tokens,o=this._tokenCount;let r=0,a=!1,l=0;for(let h=0;h<o;h++){const o=4*h,c=s[o],d=s[o+1],u=s[o+2],g=s[o+3];if((c>e||c===e&&u>=t)&&(c<i||c===i&&d<=n))a=!0;else{if(0===r&&(l=c),a){const e=4*r;s[e]=c-l,s[e+1]=d,s[e+2]=u,s[e+3]=g}r++}}return this._tokenCount=r,l}split(e,t,i,n){const s=this._tokens,o=this._tokenCount;let r=[],a=[],l=r,h=0,c=0;for(let d=0;d<o;d++){const o=4*d,r=s[o],u=s[o+1],g=s[o+2],p=s[o+3];if(r>e||r===e&&g>=t){if(r<i||r===i&&u<=n)continue;l!==a&&(l=a,h=0,c=r)}l[h++]=r-c,l[h++]=u,l[h++]=g,l[h++]=p}return[new u(new Uint32Array(r)),new u(new Uint32Array(a)),c]}acceptDeleteRange(e,t,i,n,s){const o=this._tokens,r=this._tokenCount,a=n-t;let l=0,h=!1;for(let c=0;c<r;c++){const d=4*c;let u=o[d],g=o[d+1],p=o[d+2];const m=o[d+3];if(u<t||u===t&&p<=i){l++;continue}if(u===t&&g<i)u===n&&p>s?p-=s-i:p=i;else if(u===t&&g===i){if(!(u===n&&p>s)){h=!0;continue}p-=s-i}else if(u<n||u===n&&g<s){if(!(u===n&&p>s)){h=!0;continue}u===t?(g=i,p=g+(p-s)):(g=0,p=g+(p-s))}else if(u>n){if(0===a&&!h){l=r;break}u-=a}else{if(!(u===n&&g>=s))throw new Error("Not possible!");e&&0===u&&(g+=e,p+=e),u-=a,g-=s-i,p-=s-i}const f=4*l;o[f]=u,o[f+1]=g,o[f+2]=p,o[f+3]=m,l++}this._tokenCount=l}acceptInsertText(e,t,i,n,s,o){const r=0===i&&1===n&&(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122),a=this._tokens,l=this._tokenCount;for(let h=0;h<l;h++){const o=4*h;let l=a[o],c=a[o+1],d=a[o+2];if(!(l<e||l===e&&d<t)){if(l===e&&d===t){if(!r)continue;d+=1}else if(l===e&&c<t&&t<d)0===i?d+=n:d=t;else{if(l===e&&c===t&&r)continue;if(l===e)if(l+=i,0===i)c+=n,d+=n;else{const e=d-c;c=s+(c-t),d=c+e}else l+=i}a[o]=l,a[o+1]=c,a[o+2]=d}}}}class g{constructor(e){this._tokens=e}getCount(){return this._tokens.length/4}getStartCharacter(e){return this._tokens[4*e+1]}getEndCharacter(e){return this._tokens[4*e+2]}getMetadata(e){return this._tokens[4*e+3]}}class p{constructor(e,t){this.startLineNumber=e,this.tokens=t,this.endLineNumber=this.startLineNumber+this.tokens.getMaxDeltaLine()}toString(){return this.tokens.toString(this.startLineNumber)}_updateEndLineNumber(){this.endLineNumber=this.startLineNumber+this.tokens.getMaxDeltaLine()}isEmpty(){return this.tokens.isEmpty()}getLineTokens(e){return this.startLineNumber<=e&&e<=this.endLineNumber?this.tokens.getLineTokens(e-this.startLineNumber):null}getRange(){const e=this.tokens.getRange();return e?new r["a"](this.startLineNumber+e.startLineNumber,e.startColumn,this.startLineNumber+e.endLineNumber,e.endColumn):e}removeTokens(e){const t=e.startLineNumber-this.startLineNumber,i=e.endLineNumber-this.startLineNumber;this.startLineNumber+=this.tokens.removeTokens(t,e.startColumn-1,i,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this.startLineNumber,i=e.endLineNumber-this.startLineNumber,[n,s,o]=this.tokens.split(t,e.startColumn-1,i,e.endColumn-1);return[new p(this.startLineNumber,n),new p(this.startLineNumber+o,s)]}applyEdit(e,t){const[i,n,s]=l(t);this.acceptEdit(e,i,n,s,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,s){this._acceptDeleteRange(e),this._acceptInsertText(new o["a"](e.startLineNumber,e.startColumn),t,i,n,s),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this.startLineNumber,i=e.endLineNumber-this.startLineNumber;if(i<0){const e=i-t;return void(this.startLineNumber-=e)}const n=this.tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1)return this.startLineNumber=0,void this.tokens.clear();if(t<0){const n=-t;this.startLineNumber-=n,this.tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this.tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,s){if(0===t&&0===i)return;const o=e.lineNumber-this.startLineNumber;if(o<0)return void(this.startLineNumber+=t);const r=this.tokens.getMaxDeltaLine();o>=r+1||this.tokens.acceptInsertText(o,e.column-1,t,i,n,s)}}class m{constructor(e,t){this.startLineNumber=e,this.tokens=t}}function f(e){return e instanceof Uint32Array?e:new Uint32Array(e)}class _{constructor(){this._pieces=[],this._isComplete=!1}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){const n=t[0].getRange(),s=t[t.length-1].getRange();if(!n||!s)return e;i=e.plusRange(n).plusRange(s)}let s=null;for(let n=0,o=this._pieces.length;n<o;n++){const e=this._pieces[n];if(e.endLineNumber<i.startLineNumber)continue;if(e.startLineNumber>i.endLineNumber){s=s||{index:n};break}if(e.removeTokens(i),e.isEmpty()){this._pieces.splice(n,1),n--,o--;continue}if(e.endLineNumber<i.startLineNumber)continue;if(e.startLineNumber>i.endLineNumber){s=s||{index:n};continue}const[t,r]=e.split(i);t.isEmpty()?s=s||{index:n}:r.isEmpty()||(this._pieces.splice(n,1,t,r),n++,o++,s=s||{index:n})}return s=s||{index:this._pieces.length},t.length>0&&(this._pieces=n["a"](this._pieces,s.index,t)),i}isComplete(){return this._isComplete}addSemanticTokens(e,t){const i=this._pieces;if(0===i.length)return t;const n=_._findFirstPieceWithLine(i,e),o=i[n].getLineTokens(e);if(!o)return t;const r=t.getCount(),a=o.getCount();let l=0,h=[],c=0,d=0;const u=(e,t)=>{e!==d&&(d=e,h[c++]=e,h[c++]=t)};for(let s=0;s<a;s++){const e=o.getStartCharacter(s),i=o.getEndCharacter(s),n=o.getMetadata(s),a=((1&n?2048:0)|(2&n?4096:0)|(4&n?8192:0)|(8&n?8372224:0)|(16&n?4286578688:0))>>>0,h=~a>>>0;while(l<r&&t.getEndOffset(l)<=e)u(t.getEndOffset(l),t.getMetadata(l)),l++;l<r&&t.getStartOffset(l)<e&&u(e,t.getMetadata(l));while(l<r&&t.getEndOffset(l)<i)u(t.getEndOffset(l),t.getMetadata(l)&h|n&a),l++;if(l<r)u(i,t.getMetadata(l)&h|n&a),t.getEndOffset(l)===i&&l++;else{const e=Math.min(Math.max(0,l-1),r-1);u(i,t.getMetadata(e)&h|n&a)}}while(l<r)u(t.getEndOffset(l),t.getMetadata(l)),l++;return new s["a"](new Uint32Array(h),t.getLineContent())}static _findFirstPieceWithLine(e,t){let i=0,n=e.length-1;while(i<n){let s=i+Math.floor((n-i)/2);if(e[s].endLineNumber<t)i=s+1;else{if(!(e[s].startLineNumber>t)){while(s>i&&e[s-1].startLineNumber<=t&&t<=e[s-1].endLineNumber)s--;return s}n=s-1}}return i}acceptEdit(e,t,i,n,s){for(const o of this._pieces)o.acceptEdit(e,t,i,n,s)}}class b{constructor(){this._lineTokens=[],this._len=0}flush(){this._lineTokens=[],this._len=0}getTokens(e,t,i){let n=null;if(t<this._len&&(n=this._lineTokens[t]),null!==n&&n!==c)return new s["a"](f(n),i);let o=new Uint32Array(2);return o[0]=i.length,o[1]=h(e),new s["a"](o,i)}static _massageTokens(e,t,i){const n=i?f(i):null;if(0===t){let t=!1;if(n&&n.length>1&&(t=a["z"].getLanguageId(n[1])!==e),!t)return c}if(!n||0===n.length){const i=new Uint32Array(2);return i[0]=t,i[1]=h(e),i.buffer}return n[n.length-2]=t,0===n.byteOffset&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){while(e>=this._len)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;let i=[];for(let n=0;n<t;n++)i[n]=null;this._lineTokens=n["a"](this._lineTokens,e,i),this._len+=t}setTokens(e,t,i,n,s){const o=b._massageTokens(e,i,n);this._ensureLine(t);const r=this._lineTokens[t];return this._lineTokens[t]=o,!!s&&!b._equals(r,o)}static _equals(e,t){if(!e||!t)return!e&&!t;const i=f(e),n=f(t);if(i.length!==n.length)return!1;for(let s=0,o=i.length;s<o;s++)if(i[s]!==n[s])return!1;return!0}acceptEdit(e,t,i){this._acceptDeleteRange(e),this._acceptInsertText(new o["a"](e.startLineNumber,e.startColumn),t,i)}_acceptDeleteRange(e){const t=e.startLineNumber-1;if(t>=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=b._delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=b._deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i<this._len&&(n=b._deleteBeginning(this._lineTokens[i],e.endColumn-1)),this._lineTokens[t]=b._append(this._lineTokens[t],n),this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t,i){if(0===t&&0===i)return;const n=e.lineNumber-1;n>=this._len||(0!==t?(this._lineTokens[n]=b._deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=b._insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)):this._lineTokens[n]=b._insert(this._lineTokens[n],e.column-1,i))}static _deleteBeginning(e,t){return null===e||e===c?e:b._delete(e,0,t)}static _deleteEnding(e,t){if(null===e||e===c)return e;const i=f(e),n=i[i.length-2];return b._delete(e,t,n)}static _delete(e,t,i){if(null===e||e===c||t===i)return e;const n=f(e),o=n.length>>>1;if(0===t&&n[n.length-2]===i)return c;const r=s["a"].findIndexInTokensArray(n,t),a=r>0?n[r-1<<1]:0,l=n[r<<1];if(i<l){const s=i-t;for(let e=r;e<o;e++)n[e<<1]-=s;return e}let h,d;a!==t?(n[r<<1]=t,h=r+1<<1,d=t):(h=r<<1,d=a);const u=i-t;for(let s=r+1;s<o;s++){const e=n[s<<1]-u;e>d&&(n[h++]=e,n[h++]=n[1+(s<<1)],d=e)}if(h===n.length)return e;let g=new Uint32Array(h);return g.set(n.subarray(0,h),0),g.buffer}static _append(e,t){if(t===c)return e;if(e===c)return t;if(null===e)return e;if(null===t)return null;const i=f(e),n=f(t),s=n.length>>>1;let o=new Uint32Array(i.length+n.length);o.set(i,0);let r=i.length;const a=i[i.length-2];for(let l=0;l<s;l++)o[r++]=n[l<<1]+a,o[r++]=n[1+(l<<1)];return o.buffer}static _insert(e,t,i){if(null===e||e===c)return e;const n=f(e),o=n.length>>>1;let r=s["a"].findIndexInTokensArray(n,t);if(r>0){const e=n[r-1<<1];e===t&&r--}for(let s=r;s<o;s++)n[s<<1]+=i;return e}}},"42e3":function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i("308f"),s=i("a666");class o{constructor(e,t,i,n,s,o){e|=0,t|=0,i|=0,n|=0,s|=0,o|=0,this.rawScrollLeft=i,this.rawScrollTop=o,e<0&&(e=0),i+e>t&&(i=t-e),i<0&&(i=0),n<0&&(n=0),o+n>s&&(o=s-n),o<0&&(o=0),this.width=e,this.scrollWidth=t,this.scrollLeft=i,this.height=n,this.scrollHeight=s,this.scrollTop=o}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new o("undefined"!==typeof e.width?e.width:this.width,"undefined"!==typeof e.scrollWidth?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,"undefined"!==typeof e.height?e.height:this.height,"undefined"!==typeof e.scrollHeight?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new o(this.width,this.scrollWidth,"undefined"!==typeof e.scrollLeft?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,"undefined"!==typeof e.scrollTop?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const i=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,s=this.scrollLeft!==e.scrollLeft,o=this.height!==e.height,r=this.scrollHeight!==e.scrollHeight,a=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:i,scrollWidthChanged:n,scrollLeftChanged:s,heightChanged:o,scrollHeightChanged:r,scrollTopChanged:a}}}class r extends s["a"]{constructor(e,t){super(),this._onScroll=this._register(new n["a"]),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e,this._scheduleAtNextAnimationFrame=t,this._state=new o(0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){const i=this._state.withScrollDimensions(e,t);this._setState(i,Boolean(this._smoothScrolling)),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:"undefined"===typeof e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:"undefined"===typeof e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};const i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;n=t?new c(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const t=this._state.withScrollPosition(e);this._smoothScrolling=c.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);return this._setState(t,!0),this._smoothScrolling?e.isDone?(this._smoothScrolling.dispose(),void(this._smoothScrolling=null)):void(this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})):void 0}_setState(e,t){const i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}}class a{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function l(e,t){const i=t-e;return function(t){return e+i*u(t)}}function h(e,t,i){return function(n){return n<i?e(n/i):t((n-i)/(1-i))}}class c{constructor(e,t,i,n){this.from=e,this.to=t,this.duration=n,this.startTime=i,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){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)}_initAnimation(e,t,i){const n=Math.abs(e-t);if(n>2.5*i){let n,s;return e<t?(n=e+.75*i,s=t-.75*i):(n=e-.75*i,s=t+.75*i),h(l(e,n),l(s,t),.33)}return l(e,t)}dispose(){null!==this.animationFrameDisposable&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(e){this.to=e.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(e){const t=(e-this.startTime)/this.duration;if(t<1){const e=this.scrollLeft(t),i=this.scrollTop(t);return new a(e,i,!1)}return new a(this.to.scrollLeft,this.to.scrollTop,!0)}combine(e,t,i){return c.start(e,t,i)}static start(e,t,i){i+=10;const n=Date.now()-10;return new c(e,t,n,i)}}function d(e){return Math.pow(e,3)}function u(e){return 1-d(1-e)}},"438a":function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var n=i("1e93"),s=i("6d8e");function o(e){let t=JSON.parse(e);return t=r(t),t}function r(e,t=0){if(!e||t>200)return e;if("object"===typeof e){switch(e.$mid){case 1:return s["a"].revive(e);case 2:return new RegExp(e.source,e.flags)}if(e instanceof n["a"]||e instanceof Uint8Array)return e;if(Array.isArray(e))for(let i=0;i<e.length;++i)e[i]=r(e[i],t+1);else for(const i in e)Object.hasOwnProperty.call(e,i)&&(e[i]=r(e[i],t+1))}return e}},4779:function(e,t,i){"use strict";i.d(t,"b",(function(){return o})),i.d(t,"a",(function(){return r}));var n=i("0a0f"),s=i("4fc3");const o=Object(n["c"])("accessibilityService"),r=new s["c"]("accessibilityModeEnabled",!1)},"47cb":function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var n=i("0a0f");const s=Object(n["c"])("labelService")},"49d9":function(e,t,i){"use strict";function n(e,t,i){return Math.min(Math.max(e,t),i)}i.d(t,"b",(function(){return n})),i.d(t,"a",(function(){return s}));class s{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this}get value(){return this._val}}},"4acc":function(e,t,i){(function(t,i){e.exports=i()})(0,(function(){"use strict";function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function t(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}function i(e,t){if(e){if("string"===typeof e)return n(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function s(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=i(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var s=0;return function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return n=e[Symbol.iterator](),n.next.bind(n)}function o(e){var t={exports:{}};return e(t,t.exports),t.exports}var r=o((function(e){function t(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function i(t){e.exports.defaults=t}e.exports={defaults:t(),getDefaults:t,changeDefaults:i}})),a=/[&<>"']/,l=/[&<>"']/g,h=/[<>"']|&(?!#?\w+;)/,c=/[<>"']|&(?!#?\w+;)/g,d={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},u=function(e){return d[e]};function g(e,t){if(t){if(a.test(e))return e.replace(l,u)}else if(h.test(e))return e.replace(c,u);return e}var p=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function m(e){return e.replace(p,(function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var f=/(^|[^\[])\^/g;function _(e,t){e=e.source||e,t=t||"";var i={replace:function(t,n){return n=n.source||n,n=n.replace(f,"$1"),e=e.replace(t,n),i},getRegex:function(){return new RegExp(e,t)}};return i}var b=/[^\w:]/g,v=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function C(e,t,i){if(e){var n;try{n=decodeURIComponent(m(i)).replace(b,"").toLowerCase()}catch(s){return null}if(0===n.indexOf("javascript:")||0===n.indexOf("vbscript:")||0===n.indexOf("data:"))return null}t&&!v.test(i)&&(i=L(t,i));try{i=encodeURI(i).replace(/%25/g,"%")}catch(s){return null}return i}var w={},S=/^[^:]+:\/*[^/]*$/,y=/^([^:]+:)[\s\S]*$/,D=/^([^:]+:\/*[^/]*)[\s\S]*$/;function L(e,t){w[" "+e]||(S.test(e)?w[" "+e]=e+"/":w[" "+e]=N(e,"/",!0)),e=w[" "+e];var i=-1===e.indexOf(":");return"//"===t.substring(0,2)?i?t:e.replace(y,"$1")+t:"/"===t.charAt(0)?i?t:e.replace(D,"$1")+t:e+t}var x={exec:function(){}};function k(e){for(var t,i,n=1;n<arguments.length;n++)for(i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}function E(e,t){var i=e.replace(/\|/g,(function(e,t,i){var n=!1,s=t;while(--s>=0&&"\\"===i[s])n=!n;return n?"|":" |"})),n=i.split(/ \|/),s=0;if(n.length>t)n.splice(t);else while(n.length<t)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace(/\\\|/g,"|");return n}function N(e,t,i){var n=e.length;if(0===n)return"";var s=0;while(s<n){var o=e.charAt(n-s-1);if(o!==t||i){if(o===t||!i)break;s++}else s++}return e.substr(0,n-s)}function O(e,t){if(-1===e.indexOf(t[1]))return-1;for(var i=e.length,n=0,s=0;s<i;s++)if("\\"===e[s])s++;else if(e[s]===t[0])n++;else if(e[s]===t[1]&&(n--,n<0))return s;return-1}function I(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function T(e,t){if(t<1)return"";var i="";while(t>1)1&t&&(i+=e),t>>=1,e+=e;return i+e}var M={escape:g,unescape:m,edit:_,cleanUrl:C,resolveUrl:L,noopTest:x,merge:k,splitCells:E,rtrim:N,findClosingBracket:O,checkSanitizeDeprecation:I,repeatString:T},A=r.defaults,R=M.rtrim,F=M.splitCells,P=M.escape,B=M.findClosingBracket;function W(e,t,i){var n=t.href,s=t.title?P(t.title):null,o=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:i,href:n,title:s,text:o}:{type:"image",raw:i,href:n,title:s,text:P(o)}}function V(e,t){var i=e.match(/^(\s+)(?:```)/);if(null===i)return t;var n=i[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);if(null===t)return e;var i=t[0];return i.length>=n.length?e.slice(n.length):e})).join("\n")}var j=function(){function e(e){this.options=e||A}var t=e.prototype;return t.space=function(e){var t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e){var t=this.rules.block.code.exec(e);if(t){var i=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?i:R(i,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var i=t[0],n=V(i,t[3]||"");return{type:"code",raw:i,lang:t[2]?t[2].trim():t[2],text:n}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var i=t[2].trim();if(/#$/.test(i)){var n=R(i,"#");this.options.pedantic?i=n.trim():n&&!/ $/.test(n)||(i=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:i}}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var i={type:"table",header:F(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(i.header.length===i.align.length){var n,s=i.align.length;for(n=0;n<s;n++)/^ *-+: *$/.test(i.align[n])?i.align[n]="right":/^ *:-+: *$/.test(i.align[n])?i.align[n]="center":/^ *:-+ *$/.test(i.align[n])?i.align[n]="left":i.align[n]=null;for(s=i.cells.length,n=0;n<s;n++)i.cells[n]=F(i.cells[n],i.header.length);return i}}},t.hr=function(e){var t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}},t.blockquote=function(e){var t=this.rules.block.blockquote.exec(e);if(t){var i=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],text:i}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){var i,n,s,o,r,a,l,h,c=t[0],d=t[2],u=d.length>1,g={type:"list",raw:c,ordered:u,start:u?+d.slice(0,-1):"",loose:!1,items:[]},p=t[0].match(this.rules.block.item),m=!1,f=p.length;s=this.rules.block.listItemStart.exec(p[0]);for(var _=0;_<f;_++){if(i=p[_],c=i,_!==f-1){if(o=this.rules.block.listItemStart.exec(p[_+1]),this.options.pedantic?o[1].length>s[1].length:o[1].length>s[0].length||o[1].length>3){p.splice(_,2,p[_]+"\n"+p[_+1]),_--,f--;continue}(!this.options.pedantic||this.options.smartLists?o[2][o[2].length-1]!==d[d.length-1]:u===(1===o[2].length))&&(r=p.slice(_+1).join("\n"),g.raw=g.raw.substring(0,g.raw.length-r.length),_=f-1),s=o}n=i.length,i=i.replace(/^ *([*+-]|\d+[.)]) ?/,""),~i.indexOf("\n ")&&(n-=i.length,i=this.options.pedantic?i.replace(/^ {1,4}/gm,""):i.replace(new RegExp("^ {1,"+n+"}","gm"),"")),a=m||/\n\n(?!\s*$)/.test(i),_!==f-1&&(m="\n"===i.charAt(i.length-1),a||(a=m)),a&&(g.loose=!0),this.options.gfm&&(l=/^\[[ xX]\] /.test(i),h=void 0,l&&(h=" "!==i[1],i=i.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:c,task:l,checked:h,loose:a,text:i})}return g}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):P(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t){t[3]&&(t[3]=t[3].substring(1,t[3].length-1));var i=t[1].toLowerCase().replace(/\s+/g," ");return{tag:i,raw:t[0],href:t[2],title:t[3]}}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var i={type:"table",header:F(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(i.header.length===i.align.length){i.raw=t[0];var n,s=i.align.length;for(n=0;n<s;n++)/^ *-+: *$/.test(i.align[n])?i.align[n]="right":/^ *:-+: *$/.test(i.align[n])?i.align[n]="center":/^ *:-+ *$/.test(i.align[n])?i.align[n]="left":i.align[n]=null;for(s=i.cells.length,n=0;n<s;n++)i.cells[n]=F(i.cells[n].replace(/^ *\| *| *\| *$/g,""),i.header.length);return i}}},t.lheading=function(e){var t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1]}},t.paragraph=function(e){var t=this.rules.block.paragraph.exec(e);if(t)return{type:"paragraph",raw:t[0],text:"\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1]}},t.text=function(e){var t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0]}},t.escape=function(e){var t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:P(t[1])}},t.tag=function(e,t,i){var n=this.rules.inline.tag.exec(e);if(n)return!t&&/^<a /i.test(n[0])?t=!0:t&&/^<\/a>/i.test(n[0])&&(t=!1),!i&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?i=!0:i&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(i=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:t,inRawBlock:i,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):P(n[0]):n[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var i=t[2].trim();if(!this.options.pedantic&&/^</.test(i)){if(!/>$/.test(i))return;var n=R(i.slice(0,-1),"\\");if((i.length-n.length)%2===0)return}else{var s=B(t[2],"()");if(s>-1){var o=0===t[0].indexOf("!")?5:4,r=o+t[1].length+s;t[2]=t[2].substring(0,s),t[0]=t[0].substring(0,r).trim(),t[3]=""}}var a=t[2],l="";if(this.options.pedantic){var h=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);h&&(a=h[1],l=h[3])}else l=t[3]?t[3].slice(1,-1):"";return a=a.trim(),/^</.test(a)&&(a=this.options.pedantic&&!/>$/.test(i)?a.slice(1):a.slice(1,-1)),W(t,{href:a?a.replace(this.rules.inline._escapes,"$1"):a,title:l?l.replace(this.rules.inline._escapes,"$1"):l},t[0])}},t.reflink=function(e,t){var i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){var n=(i[2]||i[1]).replace(/\s+/g," ");if(n=t[n.toLowerCase()],!n||!n.href){var s=i[0].charAt(0);return{type:"text",raw:s,text:s}}return W(i,n,i[0])}},t.emStrong=function(e,t,i){void 0===i&&(i="");var n=this.rules.inline.emStrong.lDelim.exec(e);if(n&&(!n[3]||!i.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var s=n[1]||n[2]||"";if(!s||s&&(""===i||this.rules.inline.punctuation.exec(i))){var o,r,a=n[0].length-1,l=a,h=0,c="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;c.lastIndex=0,t=t.slice(-1*e.length+a);while(null!=(n=c.exec(t)))if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],o)if(r=o.length,n[3]||n[4])l+=r;else if(!((n[5]||n[6])&&a%3)||(a+r)%3){if(l-=r,!(l>0)){if(l+h-r<=0&&!t.slice(c.lastIndex).match(c)&&(r=Math.min(r,r+l+h)),Math.min(a,r)%2)return{type:"em",raw:e.slice(0,a+n.index+r+1),text:e.slice(1,a+n.index+r)};if(Math.min(a,r)%2===0)return{type:"strong",raw:e.slice(0,a+n.index+r+1),text:e.slice(2,a+n.index+r-1)}}}else h+=r}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var i=t[2].replace(/\n/g," "),n=/[^ ]/.test(i),s=/^ /.test(i)&&/ $/.test(i);return n&&s&&(i=i.substring(1,i.length-1)),i=P(i,!0),{type:"codespan",raw:t[0],text:i}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2]}},t.autolink=function(e,t){var i,n,s=this.rules.inline.autolink.exec(e);if(s)return"@"===s[2]?(i=P(this.options.mangle?t(s[1]):s[1]),n="mailto:"+i):(i=P(s[1]),n=i),{type:"link",raw:s[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}},t.url=function(e,t){var i;if(i=this.rules.inline.url.exec(e)){var n,s;if("@"===i[2])n=P(this.options.mangle?t(i[0]):i[0]),s="mailto:"+n;else{var o;do{o=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(o!==i[0]);n=P(i[0]),s="www."===i[1]?"http://"+n:n}return{type:"link",raw:i[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}},t.inlineText=function(e,t,i){var n,s=this.rules.inline.text.exec(e);if(s)return n=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(s[0]):P(s[0]):s[0]:P(this.options.smartypants?i(s[0]):s[0]),{type:"text",raw:s[0],text:n}},e}(),H=M.noopTest,z=M.edit,U=M.merge,K={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:H,table:H,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};K.def=z(K.def).replace("label",K._label).replace("title",K._title).getRegex(),K.bullet=/(?:[*+-]|\d{1,9}[.)])/,K.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,K.item=z(K.item,"gm").replace(/bull/g,K.bullet).getRegex(),K.listItemStart=z(/^( *)(bull)/).replace("bull",K.bullet).getRegex(),K.list=z(K.list).replace(/bull/g,K.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+K.def.source+")").getRegex(),K._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",K._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,K.html=z(K.html,"i").replace("comment",K._comment).replace("tag",K._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),K.paragraph=z(K._paragraph).replace("hr",K.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",K._tag).getRegex(),K.blockquote=z(K.blockquote).replace("paragraph",K.paragraph).getRegex(),K.normal=U({},K),K.gfm=U({},K.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),K.gfm.nptable=z(K.gfm.nptable).replace("hr",K.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",K._tag).getRegex(),K.gfm.table=z(K.gfm.table).replace("hr",K.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",K._tag).getRegex(),K.pedantic=U({},K.normal,{html:z("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",K._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:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:H,paragraph:z(K.normal._paragraph).replace("hr",K.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",K.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var $={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:H,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/\_\_[^_]*?\*[^_]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/\*\*[^*]*?\_[^*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:H,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/,_punctuation:"!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~"};$.punctuation=z($.punctuation).replace(/punctuation/g,$._punctuation).getRegex(),$.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,$.escapedEmSt=/\\\*|\\_/g,$._comment=z(K._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),$.emStrong.lDelim=z($.emStrong.lDelim).replace(/punct/g,$._punctuation).getRegex(),$.emStrong.rDelimAst=z($.emStrong.rDelimAst,"g").replace(/punct/g,$._punctuation).getRegex(),$.emStrong.rDelimUnd=z($.emStrong.rDelimUnd,"g").replace(/punct/g,$._punctuation).getRegex(),$._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,$._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,$._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])?)+(?![-_])/,$.autolink=z($.autolink).replace("scheme",$._scheme).replace("email",$._email).getRegex(),$._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,$.tag=z($.tag).replace("comment",$._comment).replace("attribute",$._attribute).getRegex(),$._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,$._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,$._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,$.link=z($.link).replace("label",$._label).replace("href",$._href).replace("title",$._title).getRegex(),$.reflink=z($.reflink).replace("label",$._label).getRegex(),$.reflinkSearch=z($.reflinkSearch,"g").replace("reflink",$.reflink).replace("nolink",$.nolink).getRegex(),$.normal=U({},$),$.pedantic=U({},$.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:z(/^!?\[(label)\]\((.*?)\)/).replace("label",$._label).getRegex(),reflink:z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$._label).getRegex()}),$.gfm=U({},$.normal,{escape:z($.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),$.gfm.url=z($.gfm.url,"i").replace("email",$.gfm._extended_email).getRegex(),$.breaks=U({},$.gfm,{br:z($.br).replace("{2,}","*").getRegex(),text:z($.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var q={block:K,inline:$},G=r.defaults,Y=q.block,Z=q.inline,X=M.repeatString;function Q(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function J(e){var t,i,n="",s=e.length;for(t=0;t<s;t++)i=e.charCodeAt(t),Math.random()>.5&&(i="x"+i.toString(16)),n+="&#"+i+";";return n}var ee=function(){function e(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||G,this.options.tokenizer=this.options.tokenizer||new j,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:Y.normal,inline:Z.normal};this.options.pedantic?(t.block=Y.pedantic,t.inline=Z.pedantic):this.options.gfm&&(t.block=Y.gfm,this.options.breaks?t.inline=Z.breaks:t.inline=Z.gfm),this.tokenizer.rules=t}e.lex=function(t,i){var n=new e(i);return n.lex(t)},e.lexInline=function(t,i){var n=new e(i);return n.inlineTokens(t)};var i=e.prototype;return i.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g,"    "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},i.blockTokens=function(e,t,i){var n,s,o,r;void 0===t&&(t=[]),void 0===i&&(i=!0),this.options.pedantic&&(e=e.replace(/^ +$/gm,""));while(e)if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),n.type&&t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text):t.push(n);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.nptable(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),n.tokens=this.blockTokens(n.text,[],i),t.push(n);else if(n=this.tokenizer.list(e)){for(e=e.substring(n.raw.length),o=n.items.length,s=0;s<o;s++)n.items[s].tokens=this.blockTokens(n.items[s].text,[],!1);t.push(n)}else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(i&&(n=this.tokenizer.def(e)))e=e.substring(n.raw.length),this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else if(i&&(n=this.tokenizer.paragraph(e)))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text):t.push(n);else if(e){var a="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(a);break}throw new Error(a)}return t},i.inline=function(e){var t,i,n,s,o,r,a=e.length;for(t=0;t<a;t++)switch(r=e[t],r.type){case"paragraph":case"text":case"heading":r.tokens=[],this.inlineTokens(r.text,r.tokens);break;case"table":for(r.tokens={header:[],cells:[]},s=r.header.length,i=0;i<s;i++)r.tokens.header[i]=[],this.inlineTokens(r.header[i],r.tokens.header[i]);for(s=r.cells.length,i=0;i<s;i++)for(o=r.cells[i],r.tokens.cells[i]=[],n=0;n<o.length;n++)r.tokens.cells[i][n]=[],this.inlineTokens(o[n],r.tokens.cells[i][n]);break;case"blockquote":this.inline(r.tokens);break;case"list":for(s=r.items.length,i=0;i<s;i++)this.inline(r.items[i].tokens);break}return e},i.inlineTokens=function(e,t,i,n){var s,o;void 0===t&&(t=[]),void 0===i&&(i=!1),void 0===n&&(n=!1);var r,a,l,h=e;if(this.tokens.links){var c=Object.keys(this.tokens.links);if(c.length>0)while(null!=(r=this.tokenizer.rules.inline.reflinkSearch.exec(h)))c.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(h=h.slice(0,r.index)+"["+X("a",r[0].length-2)+"]"+h.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}while(null!=(r=this.tokenizer.rules.inline.blockSkip.exec(h)))h=h.slice(0,r.index)+"["+X("a",r[0].length-2)+"]"+h.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);while(null!=(r=this.tokenizer.rules.inline.escapedEmSt.exec(h)))h=h.slice(0,r.index)+"++"+h.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);while(e)if(a||(l=""),a=!1,s=this.tokenizer.escape(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.tag(e,i,n)){e=e.substring(s.raw.length),i=s.inLink,n=s.inRawBlock;var d=t[t.length-1];d&&"text"===s.type&&"text"===d.type?(d.raw+=s.raw,d.text+=s.text):t.push(s)}else if(s=this.tokenizer.link(e))e=e.substring(s.raw.length),"link"===s.type&&(s.tokens=this.inlineTokens(s.text,[],!0,n)),t.push(s);else if(s=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(s.raw.length);var u=t[t.length-1];"link"===s.type?(s.tokens=this.inlineTokens(s.text,[],!0,n),t.push(s)):u&&"text"===s.type&&"text"===u.type?(u.raw+=s.raw,u.text+=s.text):t.push(s)}else if(s=this.tokenizer.emStrong(e,h,l))e=e.substring(s.raw.length),s.tokens=this.inlineTokens(s.text,[],i,n),t.push(s);else if(s=this.tokenizer.codespan(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.br(e))e=e.substring(s.raw.length),t.push(s);else if(s=this.tokenizer.del(e))e=e.substring(s.raw.length),s.tokens=this.inlineTokens(s.text,[],i,n),t.push(s);else if(s=this.tokenizer.autolink(e,J))e=e.substring(s.raw.length),t.push(s);else if(i||!(s=this.tokenizer.url(e,J))){if(s=this.tokenizer.inlineText(e,n,Q))e=e.substring(s.raw.length),"_"!==s.raw.slice(-1)&&(l=s.raw.slice(-1)),a=!0,o=t[t.length-1],o&&"text"===o.type?(o.raw+=s.raw,o.text+=s.text):t.push(s);else if(e){var g="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(g);break}throw new Error(g)}}else e=e.substring(s.raw.length),t.push(s);return t},t(e,null,[{key:"rules",get:function(){return{block:Y,inline:Z}}}]),e}(),te=r.defaults,ie=M.cleanUrl,ne=M.escape,se=function(){function e(e){this.options=e||te}var t=e.prototype;return t.code=function(e,t,i){var n=(t||"").match(/\S*/)[0];if(this.options.highlight){var s=this.options.highlight(e,n);null!=s&&s!==e&&(i=!0,e=s)}return e=e.replace(/\n$/,"")+"\n",n?'<pre><code class="'+this.options.langPrefix+ne(n,!0)+'">'+(i?e:ne(e,!0))+"</code></pre>\n":"<pre><code>"+(i?e:ne(e,!0))+"</code></pre>\n"},t.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},t.html=function(e){return e},t.heading=function(e,t,i,n){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+n.slug(i)+'">'+e+"</h"+t+">\n":"<h"+t+">"+e+"</h"+t+">\n"},t.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},t.list=function(e,t,i){var n=t?"ol":"ul",s=t&&1!==i?' start="'+i+'"':"";return"<"+n+s+">\n"+e+"</"+n+">\n"},t.listitem=function(e){return"<li>"+e+"</li>\n"},t.checkbox=function(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},t.paragraph=function(e){return"<p>"+e+"</p>\n"},t.table=function(e,t){return t&&(t="<tbody>"+t+"</tbody>"),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"},t.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},t.tablecell=function(e,t){var i=t.header?"th":"td",n=t.align?"<"+i+' align="'+t.align+'">':"<"+i+">";return n+e+"</"+i+">\n"},t.strong=function(e){return"<strong>"+e+"</strong>"},t.em=function(e){return"<em>"+e+"</em>"},t.codespan=function(e){return"<code>"+e+"</code>"},t.br=function(){return this.options.xhtml?"<br/>":"<br>"},t.del=function(e){return"<del>"+e+"</del>"},t.link=function(e,t,i){if(e=ie(this.options.sanitize,this.options.baseUrl,e),null===e)return i;var n='<a href="'+ne(e)+'"';return t&&(n+=' title="'+t+'"'),n+=">"+i+"</a>",n},t.image=function(e,t,i){if(e=ie(this.options.sanitize,this.options.baseUrl,e),null===e)return i;var n='<img src="'+e+'" alt="'+i+'"';return t&&(n+=' title="'+t+'"'),n+=this.options.xhtml?"/>":">",n},t.text=function(e){return e},e}(),oe=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,i){return""+i},t.image=function(e,t,i){return""+i},t.br=function(){return""},e}(),re=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var i=e,n=0;if(this.seen.hasOwnProperty(i)){n=this.seen[e];do{n++,i=e+"-"+n}while(this.seen.hasOwnProperty(i))}return t||(this.seen[e]=n,this.seen[i]=0),i},t.slug=function(e,t){void 0===t&&(t={});var i=this.serialize(e);return this.getNextSafeSlug(i,t.dryrun)},e}(),ae=r.defaults,le=M.unescape,he=function(){function e(e){this.options=e||ae,this.options.renderer=this.options.renderer||new se,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new oe,this.slugger=new re}e.parse=function(t,i){var n=new e(i);return n.parse(t)},e.parseInline=function(t,i){var n=new e(i);return n.parseInline(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var i,n,s,o,r,a,l,h,c,d,u,g,p,m,f,_,b,v,C="",w=e.length;for(i=0;i<w;i++)switch(d=e[i],d.type){case"space":continue;case"hr":C+=this.renderer.hr();continue;case"heading":C+=this.renderer.heading(this.parseInline(d.tokens),d.depth,le(this.parseInline(d.tokens,this.textRenderer)),this.slugger);continue;case"code":C+=this.renderer.code(d.text,d.lang,d.escaped);continue;case"table":for(h="",l="",o=d.header.length,n=0;n<o;n++)l+=this.renderer.tablecell(this.parseInline(d.tokens.header[n]),{header:!0,align:d.align[n]});for(h+=this.renderer.tablerow(l),c="",o=d.cells.length,n=0;n<o;n++){for(a=d.tokens.cells[n],l="",r=a.length,s=0;s<r;s++)l+=this.renderer.tablecell(this.parseInline(a[s]),{header:!1,align:d.align[s]});c+=this.renderer.tablerow(l)}C+=this.renderer.table(h,c);continue;case"blockquote":c=this.parse(d.tokens),C+=this.renderer.blockquote(c);continue;case"list":for(u=d.ordered,g=d.start,p=d.loose,o=d.items.length,c="",n=0;n<o;n++)f=d.items[n],_=f.checked,b=f.task,m="",f.task&&(v=this.renderer.checkbox(_),p?f.tokens.length>0&&"text"===f.tokens[0].type?(f.tokens[0].text=v+" "+f.tokens[0].text,f.tokens[0].tokens&&f.tokens[0].tokens.length>0&&"text"===f.tokens[0].tokens[0].type&&(f.tokens[0].tokens[0].text=v+" "+f.tokens[0].tokens[0].text)):f.tokens.unshift({type:"text",text:v}):m+=v),m+=this.parse(f.tokens,p),c+=this.renderer.listitem(m,b,_);C+=this.renderer.list(c,u,g);continue;case"html":C+=this.renderer.html(d.text);continue;case"paragraph":C+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":c=d.tokens?this.parseInline(d.tokens):d.text;while(i+1<w&&"text"===e[i+1].type)d=e[++i],c+="\n"+(d.tokens?this.parseInline(d.tokens):d.text);C+=t?this.renderer.paragraph(c):c;continue;default:var S='Token with "'+d.type+'" type was not found.';if(this.options.silent)return void console.error(S);throw new Error(S)}return C},t.parseInline=function(e,t){t=t||this.renderer;var i,n,s="",o=e.length;for(i=0;i<o;i++)switch(n=e[i],n.type){case"escape":s+=t.text(n.text);break;case"html":s+=t.html(n.text);break;case"link":s+=t.link(n.href,n.title,this.parseInline(n.tokens,t));break;case"image":s+=t.image(n.href,n.title,n.text);break;case"strong":s+=t.strong(this.parseInline(n.tokens,t));break;case"em":s+=t.em(this.parseInline(n.tokens,t));break;case"codespan":s+=t.codespan(n.text);break;case"br":s+=t.br();break;case"del":s+=t.del(this.parseInline(n.tokens,t));break;case"text":s+=t.text(n.text);break;default:var r='Token with "'+n.type+'" type was not found.';if(this.options.silent)return void console.error(r);throw new Error(r)}return s},e}(),ce=M.merge,de=M.checkSanitizeDeprecation,ue=M.escape,ge=r.getDefaults,pe=r.changeDefaults,me=r.defaults;function fe(e,t,i){if("undefined"===typeof e||null===e)throw new Error("marked(): input parameter is undefined or null");if("string"!==typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"===typeof t&&(i=t,t=null),t=ce({},fe.defaults,t||{}),de(t),i){var n,s=t.highlight;try{n=ee.lex(e,t)}catch(l){return i(l)}var o=function(e){var o;if(!e)try{o=he.parse(n,t)}catch(l){e=l}return t.highlight=s,e?i(e):i(null,o)};if(!s||s.length<3)return o();if(delete t.highlight,!n.length)return o();var r=0;return fe.walkTokens(n,(function(e){"code"===e.type&&(r++,setTimeout((function(){s(e.text,e.lang,(function(t,i){if(t)return o(t);null!=i&&i!==e.text&&(e.text=i,e.escaped=!0),r--,0===r&&o()}))}),0))})),void(0===r&&o())}try{var a=ee.lex(e,t);return t.walkTokens&&fe.walkTokens(a,t.walkTokens),he.parse(a,t)}catch(l){if(l.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+ue(l.message+"",!0)+"</pre>";throw l}}fe.options=fe.setOptions=function(e){return ce(fe.defaults,e),pe(fe.defaults),fe},fe.getDefaults=ge,fe.defaults=me,fe.use=function(e){var t=ce({},e);if(e.renderer&&function(){var i=fe.defaults.renderer||new se,n=function(t){var n=i[t];i[t]=function(){for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];var a=e.renderer[t].apply(i,o);return!1===a&&(a=n.apply(i,o)),a}};for(var s in e.renderer)n(s);t.renderer=i}(),e.tokenizer&&function(){var i=fe.defaults.tokenizer||new j,n=function(t){var n=i[t];i[t]=function(){for(var s=arguments.length,o=new Array(s),r=0;r<s;r++)o[r]=arguments[r];var a=e.tokenizer[t].apply(i,o);return!1===a&&(a=n.apply(i,o)),a}};for(var s in e.tokenizer)n(s);t.tokenizer=i}(),e.walkTokens){var i=fe.defaults.walkTokens;t.walkTokens=function(t){e.walkTokens(t),i&&i(t)}}fe.setOptions(t)},fe.walkTokens=function(e,t){for(var i,n=s(e);!(i=n()).done;){var o=i.value;switch(t(o),o.type){case"table":for(var r,a=s(o.tokens.header);!(r=a()).done;){var l=r.value;fe.walkTokens(l,t)}for(var h,c=s(o.tokens.cells);!(h=c()).done;)for(var d,u=h.value,g=s(u);!(d=g()).done;){var p=d.value;fe.walkTokens(p,t)}break;case"list":fe.walkTokens(o.items,t);break;default:o.tokens&&fe.walkTokens(o.tokens,t)}}},fe.parseInline=function(e,t){if("undefined"===typeof e||null===e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!==typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=ce({},fe.defaults,t||{}),de(t);try{var i=ee.lexInline(e,t);return t.walkTokens&&fe.walkTokens(i,t.walkTokens),he.parseInline(i,t)}catch(n){if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+ue(n.message+"",!0)+"</pre>";throw n}},fe.Parser=he,fe.parser=he.parse,fe.Renderer=se,fe.TextRenderer=oe,fe.Lexer=ee,fe.lexer=ee.lex,fe.Tokenizer=j,fe.Slugger=re,fe.parse=fe;var _e=fe;return _e}))},"4b76":function(e,t,i){"use strict";var n,s=i("3742");(function(e){e[e["Ignore"]=0]="Ignore",e[e["Info"]=1]="Info",e[e["Warning"]=2]="Warning",e[e["Error"]=3]="Error"})(n||(n={})),function(e){const t="error",i="warning",n="warn",o="info";function r(r){return r?s["s"](t,r)?e.Error:s["s"](i,r)||s["s"](n,r)?e.Warning:s["s"](o,r)?e.Info:e.Ignore:e.Ignore}e.fromValue=r}(n||(n={})),t["a"]=n},"4d05":function(e,t,i){"use strict";i.d(t,"b",(function(){return a})),i.d(t,"a",(function(){return l}));var n=i("3742"),s=i("e1b5"),o=i("8bf1");const r={getInitialState:()=>o["c"],tokenize2:(e,t,i,n)=>Object(o["e"])(0,e,i,n)};function a(e,t=r){return h(e,t||r)}function l(e,t,i,n,s,o,r){let a="<div>",l=n,h=0;for(let c=0,d=t.getCount();c<d;c++){const d=t.getEndOffset(c);if(d<=n)continue;let u="";for(;l<d&&l<s;l++){const t=e.charCodeAt(l);switch(t){case 9:let e=o-(l+h)%o;h+=e-1;while(e>0)u+=r?"&#160;":" ",e--;break;case 60:u+="&lt;";break;case 62:u+="&gt;";break;case 38:u+="&amp;";break;case 0:u+="&#00;";break;case 65279:case 8232:case 8233:case 133:u+="�";break;case 13:u+="&#8203";break;case 32:u+=r?"&#160;":" ";break;default:u+=String.fromCharCode(t)}}if(a+=`<span style="${t.getInlineStyle(c,i)}">${u}</span>`,d>s||l>=s)break}return a+="</div>",a}function h(e,t){let i='<div class="monaco-tokenized-source">',o=n["Q"](e),r=t.getInitialState();for(let a=0,l=o.length;a<l;a++){let e=o[a];a>0&&(i+="<br/>");let l=t.tokenize2(e,!0,r,0);s["a"].convertToEndOffset(l.tokens,e.length);let h=new s["a"](l.tokens,e),c=h.inflate(),d=0;for(let t=0,s=c.getCount();t<s;t++){const s=c.getClassName(t),o=c.getEndOffset(t);i+=`<span class="${s}">${n["t"](e.substring(d,o))}</span>`,d=o}r=l.endState}return i+="</div>",i}},"4d3d":function(e,t,i){},"4dc7":function(e,t,i){"use strict";i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return s})),i.d(t,"c",(function(){return o}));class n{constructor(e,t,i){this.offset=0|e,this.type=t,this.language=i}toString(){return"("+this.offset+", "+this.type+")"}}class s{constructor(e,t){this.tokens=e,this.endState=t}}class o{constructor(e,t){this.tokens=e,this.endState=t}}},"4fc3":function(e,t,i){"use strict";i.d(t,"a",(function(){return h})),i.d(t,"c",(function(){return k})),i.d(t,"b",(function(){return E})),i.d(t,"d",(function(){return N}));var n=i("3742"),s=i("0a0f"),o=i("30db");let r=o["l"]||"";const a=new Map;a.set("false",!1),a.set("true",!0),a.set("isMac",o["f"]),a.set("isLinux",o["d"]),a.set("isWindows",o["j"]),a.set("isWeb",o["i"]),a.set("isMacNative",o["f"]&&!o["i"]),a.set("isEdge",r.indexOf("Edg/")>=0),a.set("isFirefox",r.indexOf("Firefox")>=0),a.set("isChrome",r.indexOf("Chrome")>=0),a.set("isSafari",r.indexOf("Safari")>=0),a.set("isIPad",r.indexOf("iPad")>=0);const l=Object.prototype.hasOwnProperty;class h{static has(e){return g.create(e)}static equals(e,t){return p.create(e,t)}static regex(e,t){return y.create(e,t)}static not(e){return b.create(e)}static and(...e){return L.create(e)}static or(...e){return x.create(e)}static deserialize(e,t=!1){if(e)return this._deserializeOrExpression(e,t)}static _deserializeOrExpression(e,t){let i=e.split("||");return x.create(i.map(e=>this._deserializeAndExpression(e,t)))}static _deserializeAndExpression(e,t){let i=e.split("&&");return L.create(i.map(e=>this._deserializeOne(e,t)))}static _deserializeOne(e,t){if(e=e.trim(),e.indexOf("!=")>=0){let i=e.split("!=");return _.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("==")>=0){let i=e.split("==");return p.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("=~")>=0){let i=e.split("=~");return y.create(i[0].trim(),this._deserializeRegexValue(i[1],t))}if(e.indexOf(" in ")>=0){let t=e.split(" in ");return m.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(e)){const t=e.split(">=");return C.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(e)){const t=e.split(">");return v.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(e)){const t=e.split("<=");return S.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(e)){const t=e.split("<");return w.create(t[0].trim(),t[1].trim())}return/^\!\s*/.test(e)?b.create(e.substr(1).trim()):g.create(e)}static _deserializeValue(e,t){if(e=e.trim(),"true"===e)return!0;if("false"===e)return!1;let i=/^'([^']*)'$/.exec(e);return i?i[1].trim():e}static _deserializeRegexValue(e,t){if(Object(n["C"])(e)){if(t)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let i=e.indexOf("/"),s=e.lastIndexOf("/");if(i===s||i<0){if(t)throw new Error(`bad regexp-value '${e}', missing /-enclosure`);return console.warn(`bad regexp-value '${e}', missing /-enclosure`),null}let o=e.slice(i+1,s),r="i"===e[s+1]?"i":"";try{return new RegExp(o,r)}catch(a){if(t)throw new Error(`bad regexp-value '${e}', parse error: ${a}`);return console.warn(`bad regexp-value '${e}', parse error: ${a}`),null}}}function c(e,t){return e.cmp(t)}class d{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return u.INSTANCE}}d.INSTANCE=new d;class u{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return d.INSTANCE}}u.INSTANCE=new u;class g{constructor(e){this.key=e,this.type=2}static create(e){const t=a.get(e);return"boolean"===typeof t?t?u.INSTANCE:d.INSTANCE:new g(e)}cmp(e){return e.type!==this.type?this.type-e.type:O(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return b.create(this.key)}}class p{constructor(e,t){this.key=e,this.value=t,this.type=4}static create(e,t){if("boolean"===typeof t)return t?g.create(e):b.create(e);const i=a.get(e);if("boolean"===typeof i){const e=i?"true":"false";return t===e?u.INSTANCE:d.INSTANCE}return new p(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:I(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return _.create(this.key,this.value)}}class m{constructor(e,t){this.key=e,this.valueKey=t,this.type=10}static create(e,t){return new m(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:I(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&(this.key===e.key&&this.valueKey===e.valueKey)}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.indexOf(i)>=0:"string"===typeof i&&"object"===typeof t&&null!==t&&l.call(t,i)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return f.create(this)}}class f{constructor(e){this._actual=e,this.type=11}static create(e){return new f(e)}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class _{constructor(e,t){this.key=e,this.value=t,this.type=5}static create(e,t){if("boolean"===typeof t)return t?b.create(e):g.create(e);const i=a.get(e);if("boolean"===typeof i){const e=i?"true":"false";return t===e?d.INSTANCE:u.INSTANCE}return new _(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:I(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return p.create(this.key,this.value)}}class b{constructor(e){this.key=e,this.type=3}static create(e){const t=a.get(e);return"boolean"===typeof t?t?d.INSTANCE:u.INSTANCE:new b(e)}cmp(e){return e.type!==this.type?this.type-e.type:O(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}evaluate(e){return!e.getValue(this.key)}serialize(){return"!"+this.key}keys(){return[this.key]}negate(){return g.create(this.key)}}class v{constructor(e,t){this.key=e,this.value=t,this.type=12}static create(e,t){return new v(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:I(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}evaluate(e){return parseFloat(e.getValue(this.key))>parseFloat(this.value)}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return S.create(this.key,this.value)}}class C{constructor(e,t){this.key=e,this.value=t,this.type=13}static create(e,t){return new C(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:I(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}evaluate(e){return parseFloat(e.getValue(this.key))>=parseFloat(this.value)}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return w.create(this.key,this.value)}}class w{constructor(e,t){this.key=e,this.value=t,this.type=14}static create(e,t){return new w(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:I(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}evaluate(e){return parseFloat(e.getValue(this.key))<parseFloat(this.value)}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return C.create(this.key,this.value)}}class S{constructor(e,t){this.key=e,this.value=t,this.type=15}static create(e,t){return new S(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:I(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&(this.key===e.key&&this.value===e.value)}evaluate(e){return parseFloat(e.getValue(this.key))<=parseFloat(this.value)}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return v.create(this.key,this.value)}}class y{constructor(e,t){this.key=e,this.regexp=t,this.type=7}static create(e,t){return new y(e,t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.key<e.key)return-1;if(this.key>e.key)return 1;const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return t<i?-1:t>i?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return this.key===e.key&&t===i}return!1}evaluate(e){let t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return D.create(this)}}class D{constructor(e){this._actual=e,this.type=8}static create(e){return new D(e)}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class L{constructor(e){this.expr=e,this.type=6}static create(e){return L._normalizeArr(e)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let t=0,i=this.expr.length;t<i;t++){const i=c(this.expr[t],e.expr[t]);if(0!==i)return i}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].equals(e.expr[t]))return!1;return!0}return!1}evaluate(e){for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].evaluate(e))return!1;return!0}static _normalizeArr(e){const t=[];let i=!1;for(const n of e)if(n)if(1!==n.type){if(0===n.type)return d.INSTANCE;6!==n.type?t.push(n):t.push(...n.expr)}else i=!0;if(0===t.length&&i)return u.INSTANCE;if(0!==t.length){if(1===t.length)return t[0];t.sort(c);while(t.length>1){const e=t[t.length-1];if(9!==e.type)break;t.pop();const i=t.pop(),n=x.create(e.expr.map(e=>L.create([e,i])));n&&(t.push(n),t.sort(c))}return 1===t.length?t[0]:new L(t)}}serialize(){return this.expr.map(e=>e.serialize()).join(" && ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){let e=[];for(let t of this.expr)e.push(t.negate());return x.create(e)}}class x{constructor(e){this.expr=e,this.type=9}static create(e){const t=x._normalizeArr(e);if(0!==t.length)return 1===t.length?t[0]:new x(t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let t=0,i=this.expr.length;t<i;t++){const i=c(this.expr[t],e.expr[t]);if(0!==i)return i}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].equals(e.expr[t]))return!1;return!0}return!1}evaluate(e){for(let t=0,i=this.expr.length;t<i;t++)if(this.expr[t].evaluate(e))return!0;return!1}static _normalizeArr(e){let t=[],i=!1;if(e){for(let n=0,s=e.length;n<s;n++){const s=e[n];if(s)if(0!==s.type){if(1===s.type)return[u.INSTANCE];9!==s.type?t.push(s):t=t.concat(s.expr)}else i=!0}if(0===t.length&&i)return[d.INSTANCE];t.sort(c)}return t}serialize(){return this.expr.map(e=>e.serialize()).join(" || ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){let e=[];for(let i of this.expr)e.push(i.negate());const t=e=>9===e.type?e.expr:[e];while(e.length>1){const i=e.shift(),n=e.shift(),s=[];for(const e of t(i))for(const i of t(n))s.push(h.and(e,i));e.unshift(h.or(...s))}return e[0]}}class k extends g{constructor(e,t,i){super(e),this.key=e,this._defaultValue=t,"object"===typeof i?k._info.push(Object.assign(Object.assign({},i),{key:e})):!0!==i&&k._info.push({key:e,description:i,type:null!==t&&void 0!==t?typeof t:void 0})}static all(){return k._info.values()}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return h.not(this.key)}isEqualTo(e){return h.equals(this.key,e)}}k._info=[];const E=Object(s["c"])("contextKeyService"),N="setContext";function O(e,t){return e<t?-1:e>t?1:0}function I(e,t,i,n){return e<i?-1:e>i?1:t<n?-1:t>n?1:0}},5029:function(e,t,i){},"533b":function(e,t,i){"use strict";i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return o}));var n=i("0a0f");const s=Object(n["c"])("contextViewService"),o=Object(n["c"])("contextMenuService")},"54f2":function(e,t,i){},"561a":function(e,t,i){"use strict";i.d(t,"c",(function(){return r})),i.d(t,"d",(function(){return a})),i.d(t,"b",(function(){return l})),i.d(t,"a",(function(){return h}));var n=i("308f");class s{constructor(){this._icons=new Map,this._onDidRegister=new n["a"]}add(e){const t=this._icons.get(e.id);t?e.description?t.description=e.description:console.error("Duplicate registration of codicon "+e.id):(this._icons.set(e.id,e),this._onDidRegister.fire(e))}get(e){return this._icons.get(e)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const o=new s,r=o;function a(e,t){return new l(e,t)}class l{constructor(e,t,i){this.id=e,this.definition=t,this.description=i,o.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var h;(function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9\\-]+",e.iconModifierExpression="~[A-Za-z]+";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function i(e){if(e instanceof l)return["codicon","codicon-"+e.id];const n=t.exec(e.id);if(!n)return i(l.error);let[,s,o]=n;const r=["codicon","codicon-"+s];return o&&r.push("codicon-modifier-"+o.substr(1)),r}function n(e){return i(e).join(" ")}function s(e){return"."+i(e).join(".")}e.asClassNameArray=i,e.asClassName=n,e.asCSSSelector=s})(h||(h={})),function(e){e.add=new e("add",{fontCharacter:"\\ea60"}),e.plus=new e("plus",{fontCharacter:"\\ea60"}),e.gistNew=new e("gist-new",{fontCharacter:"\\ea60"}),e.repoCreate=new e("repo-create",{fontCharacter:"\\ea60"}),e.lightbulb=new e("lightbulb",{fontCharacter:"\\ea61"}),e.lightBulb=new e("light-bulb",{fontCharacter:"\\ea61"}),e.repo=new e("repo",{fontCharacter:"\\ea62"}),e.repoDelete=new e("repo-delete",{fontCharacter:"\\ea62"}),e.gistFork=new e("gist-fork",{fontCharacter:"\\ea63"}),e.repoForked=new e("repo-forked",{fontCharacter:"\\ea63"}),e.gitPullRequest=new e("git-pull-request",{fontCharacter:"\\ea64"}),e.gitPullRequestAbandoned=new e("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),e.recordKeys=new e("record-keys",{fontCharacter:"\\ea65"}),e.keyboard=new e("keyboard",{fontCharacter:"\\ea65"}),e.tag=new e("tag",{fontCharacter:"\\ea66"}),e.tagAdd=new e("tag-add",{fontCharacter:"\\ea66"}),e.tagRemove=new e("tag-remove",{fontCharacter:"\\ea66"}),e.person=new e("person",{fontCharacter:"\\ea67"}),e.personAdd=new e("person-add",{fontCharacter:"\\ea67"}),e.personFollow=new e("person-follow",{fontCharacter:"\\ea67"}),e.personOutline=new e("person-outline",{fontCharacter:"\\ea67"}),e.personFilled=new e("person-filled",{fontCharacter:"\\ea67"}),e.gitBranch=new e("git-branch",{fontCharacter:"\\ea68"}),e.gitBranchCreate=new e("git-branch-create",{fontCharacter:"\\ea68"}),e.gitBranchDelete=new e("git-branch-delete",{fontCharacter:"\\ea68"}),e.sourceControl=new e("source-control",{fontCharacter:"\\ea68"}),e.mirror=new e("mirror",{fontCharacter:"\\ea69"}),e.mirrorPublic=new e("mirror-public",{fontCharacter:"\\ea69"}),e.star=new e("star",{fontCharacter:"\\ea6a"}),e.starAdd=new e("star-add",{fontCharacter:"\\ea6a"}),e.starDelete=new e("star-delete",{fontCharacter:"\\ea6a"}),e.starEmpty=new e("star-empty",{fontCharacter:"\\ea6a"}),e.comment=new e("comment",{fontCharacter:"\\ea6b"}),e.commentAdd=new e("comment-add",{fontCharacter:"\\ea6b"}),e.alert=new e("alert",{fontCharacter:"\\ea6c"}),e.warning=new e("warning",{fontCharacter:"\\ea6c"}),e.search=new e("search",{fontCharacter:"\\ea6d"}),e.searchSave=new e("search-save",{fontCharacter:"\\ea6d"}),e.logOut=new e("log-out",{fontCharacter:"\\ea6e"}),e.signOut=new e("sign-out",{fontCharacter:"\\ea6e"}),e.logIn=new e("log-in",{fontCharacter:"\\ea6f"}),e.signIn=new e("sign-in",{fontCharacter:"\\ea6f"}),e.eye=new e("eye",{fontCharacter:"\\ea70"}),e.eyeUnwatch=new e("eye-unwatch",{fontCharacter:"\\ea70"}),e.eyeWatch=new e("eye-watch",{fontCharacter:"\\ea70"}),e.circleFilled=new e("circle-filled",{fontCharacter:"\\ea71"}),e.primitiveDot=new e("primitive-dot",{fontCharacter:"\\ea71"}),e.closeDirty=new e("close-dirty",{fontCharacter:"\\ea71"}),e.debugBreakpoint=new e("debug-breakpoint",{fontCharacter:"\\ea71"}),e.debugBreakpointDisabled=new e("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),e.debugHint=new e("debug-hint",{fontCharacter:"\\ea71"}),e.primitiveSquare=new e("primitive-square",{fontCharacter:"\\ea72"}),e.edit=new e("edit",{fontCharacter:"\\ea73"}),e.pencil=new e("pencil",{fontCharacter:"\\ea73"}),e.info=new e("info",{fontCharacter:"\\ea74"}),e.issueOpened=new e("issue-opened",{fontCharacter:"\\ea74"}),e.gistPrivate=new e("gist-private",{fontCharacter:"\\ea75"}),e.gitForkPrivate=new e("git-fork-private",{fontCharacter:"\\ea75"}),e.lock=new e("lock",{fontCharacter:"\\ea75"}),e.mirrorPrivate=new e("mirror-private",{fontCharacter:"\\ea75"}),e.close=new e("close",{fontCharacter:"\\ea76"}),e.removeClose=new e("remove-close",{fontCharacter:"\\ea76"}),e.x=new e("x",{fontCharacter:"\\ea76"}),e.repoSync=new e("repo-sync",{fontCharacter:"\\ea77"}),e.sync=new e("sync",{fontCharacter:"\\ea77"}),e.clone=new e("clone",{fontCharacter:"\\ea78"}),e.desktopDownload=new e("desktop-download",{fontCharacter:"\\ea78"}),e.beaker=new e("beaker",{fontCharacter:"\\ea79"}),e.microscope=new e("microscope",{fontCharacter:"\\ea79"}),e.vm=new e("vm",{fontCharacter:"\\ea7a"}),e.deviceDesktop=new e("device-desktop",{fontCharacter:"\\ea7a"}),e.file=new e("file",{fontCharacter:"\\ea7b"}),e.fileText=new e("file-text",{fontCharacter:"\\ea7b"}),e.more=new e("more",{fontCharacter:"\\ea7c"}),e.ellipsis=new e("ellipsis",{fontCharacter:"\\ea7c"}),e.kebabHorizontal=new e("kebab-horizontal",{fontCharacter:"\\ea7c"}),e.mailReply=new e("mail-reply",{fontCharacter:"\\ea7d"}),e.reply=new e("reply",{fontCharacter:"\\ea7d"}),e.organization=new e("organization",{fontCharacter:"\\ea7e"}),e.organizationFilled=new e("organization-filled",{fontCharacter:"\\ea7e"}),e.organizationOutline=new e("organization-outline",{fontCharacter:"\\ea7e"}),e.newFile=new e("new-file",{fontCharacter:"\\ea7f"}),e.fileAdd=new e("file-add",{fontCharacter:"\\ea7f"}),e.newFolder=new e("new-folder",{fontCharacter:"\\ea80"}),e.fileDirectoryCreate=new e("file-directory-create",{fontCharacter:"\\ea80"}),e.trash=new e("trash",{fontCharacter:"\\ea81"}),e.trashcan=new e("trashcan",{fontCharacter:"\\ea81"}),e.history=new e("history",{fontCharacter:"\\ea82"}),e.clock=new e("clock",{fontCharacter:"\\ea82"}),e.folder=new e("folder",{fontCharacter:"\\ea83"}),e.fileDirectory=new e("file-directory",{fontCharacter:"\\ea83"}),e.symbolFolder=new e("symbol-folder",{fontCharacter:"\\ea83"}),e.logoGithub=new e("logo-github",{fontCharacter:"\\ea84"}),e.markGithub=new e("mark-github",{fontCharacter:"\\ea84"}),e.github=new e("github",{fontCharacter:"\\ea84"}),e.terminal=new e("terminal",{fontCharacter:"\\ea85"}),e.console=new e("console",{fontCharacter:"\\ea85"}),e.repl=new e("repl",{fontCharacter:"\\ea85"}),e.zap=new e("zap",{fontCharacter:"\\ea86"}),e.symbolEvent=new e("symbol-event",{fontCharacter:"\\ea86"}),e.error=new e("error",{fontCharacter:"\\ea87"}),e.stop=new e("stop",{fontCharacter:"\\ea87"}),e.variable=new e("variable",{fontCharacter:"\\ea88"}),e.symbolVariable=new e("symbol-variable",{fontCharacter:"\\ea88"}),e.array=new e("array",{fontCharacter:"\\ea8a"}),e.symbolArray=new e("symbol-array",{fontCharacter:"\\ea8a"}),e.symbolModule=new e("symbol-module",{fontCharacter:"\\ea8b"}),e.symbolPackage=new e("symbol-package",{fontCharacter:"\\ea8b"}),e.symbolNamespace=new e("symbol-namespace",{fontCharacter:"\\ea8b"}),e.symbolObject=new e("symbol-object",{fontCharacter:"\\ea8b"}),e.symbolMethod=new e("symbol-method",{fontCharacter:"\\ea8c"}),e.symbolFunction=new e("symbol-function",{fontCharacter:"\\ea8c"}),e.symbolConstructor=new e("symbol-constructor",{fontCharacter:"\\ea8c"}),e.symbolBoolean=new e("symbol-boolean",{fontCharacter:"\\ea8f"}),e.symbolNull=new e("symbol-null",{fontCharacter:"\\ea8f"}),e.symbolNumeric=new e("symbol-numeric",{fontCharacter:"\\ea90"}),e.symbolNumber=new e("symbol-number",{fontCharacter:"\\ea90"}),e.symbolStructure=new e("symbol-structure",{fontCharacter:"\\ea91"}),e.symbolStruct=new e("symbol-struct",{fontCharacter:"\\ea91"}),e.symbolParameter=new e("symbol-parameter",{fontCharacter:"\\ea92"}),e.symbolTypeParameter=new e("symbol-type-parameter",{fontCharacter:"\\ea92"}),e.symbolKey=new e("symbol-key",{fontCharacter:"\\ea93"}),e.symbolText=new e("symbol-text",{fontCharacter:"\\ea93"}),e.symbolReference=new e("symbol-reference",{fontCharacter:"\\ea94"}),e.goToFile=new e("go-to-file",{fontCharacter:"\\ea94"}),e.symbolEnum=new e("symbol-enum",{fontCharacter:"\\ea95"}),e.symbolValue=new e("symbol-value",{fontCharacter:"\\ea95"}),e.symbolRuler=new e("symbol-ruler",{fontCharacter:"\\ea96"}),e.symbolUnit=new e("symbol-unit",{fontCharacter:"\\ea96"}),e.activateBreakpoints=new e("activate-breakpoints",{fontCharacter:"\\ea97"}),e.archive=new e("archive",{fontCharacter:"\\ea98"}),e.arrowBoth=new e("arrow-both",{fontCharacter:"\\ea99"}),e.arrowDown=new e("arrow-down",{fontCharacter:"\\ea9a"}),e.arrowLeft=new e("arrow-left",{fontCharacter:"\\ea9b"}),e.arrowRight=new e("arrow-right",{fontCharacter:"\\ea9c"}),e.arrowSmallDown=new e("arrow-small-down",{fontCharacter:"\\ea9d"}),e.arrowSmallLeft=new e("arrow-small-left",{fontCharacter:"\\ea9e"}),e.arrowSmallRight=new e("arrow-small-right",{fontCharacter:"\\ea9f"}),e.arrowSmallUp=new e("arrow-small-up",{fontCharacter:"\\eaa0"}),e.arrowUp=new e("arrow-up",{fontCharacter:"\\eaa1"}),e.bell=new e("bell",{fontCharacter:"\\eaa2"}),e.bold=new e("bold",{fontCharacter:"\\eaa3"}),e.book=new e("book",{fontCharacter:"\\eaa4"}),e.bookmark=new e("bookmark",{fontCharacter:"\\eaa5"}),e.debugBreakpointConditionalUnverified=new e("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),e.debugBreakpointConditional=new e("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),e.debugBreakpointConditionalDisabled=new e("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),e.debugBreakpointDataUnverified=new e("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),e.debugBreakpointData=new e("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),e.debugBreakpointDataDisabled=new e("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),e.debugBreakpointLogUnverified=new e("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),e.debugBreakpointLog=new e("debug-breakpoint-log",{fontCharacter:"\\eaab"}),e.debugBreakpointLogDisabled=new e("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),e.briefcase=new e("briefcase",{fontCharacter:"\\eaac"}),e.broadcast=new e("broadcast",{fontCharacter:"\\eaad"}),e.browser=new e("browser",{fontCharacter:"\\eaae"}),e.bug=new e("bug",{fontCharacter:"\\eaaf"}),e.calendar=new e("calendar",{fontCharacter:"\\eab0"}),e.caseSensitive=new e("case-sensitive",{fontCharacter:"\\eab1"}),e.check=new e("check",{fontCharacter:"\\eab2"}),e.checklist=new e("checklist",{fontCharacter:"\\eab3"}),e.chevronDown=new e("chevron-down",{fontCharacter:"\\eab4"}),e.chevronLeft=new e("chevron-left",{fontCharacter:"\\eab5"}),e.chevronRight=new e("chevron-right",{fontCharacter:"\\eab6"}),e.chevronUp=new e("chevron-up",{fontCharacter:"\\eab7"}),e.chromeClose=new e("chrome-close",{fontCharacter:"\\eab8"}),e.chromeMaximize=new e("chrome-maximize",{fontCharacter:"\\eab9"}),e.chromeMinimize=new e("chrome-minimize",{fontCharacter:"\\eaba"}),e.chromeRestore=new e("chrome-restore",{fontCharacter:"\\eabb"}),e.circleOutline=new e("circle-outline",{fontCharacter:"\\eabc"}),e.debugBreakpointUnverified=new e("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),e.circleSlash=new e("circle-slash",{fontCharacter:"\\eabd"}),e.circuitBoard=new e("circuit-board",{fontCharacter:"\\eabe"}),e.clearAll=new e("clear-all",{fontCharacter:"\\eabf"}),e.clippy=new e("clippy",{fontCharacter:"\\eac0"}),e.closeAll=new e("close-all",{fontCharacter:"\\eac1"}),e.cloudDownload=new e("cloud-download",{fontCharacter:"\\eac2"}),e.cloudUpload=new e("cloud-upload",{fontCharacter:"\\eac3"}),e.code=new e("code",{fontCharacter:"\\eac4"}),e.collapseAll=new e("collapse-all",{fontCharacter:"\\eac5"}),e.colorMode=new e("color-mode",{fontCharacter:"\\eac6"}),e.commentDiscussion=new e("comment-discussion",{fontCharacter:"\\eac7"}),e.compareChanges=new e("compare-changes",{fontCharacter:"\\eafd"}),e.creditCard=new e("credit-card",{fontCharacter:"\\eac9"}),e.dash=new e("dash",{fontCharacter:"\\eacc"}),e.dashboard=new e("dashboard",{fontCharacter:"\\eacd"}),e.database=new e("database",{fontCharacter:"\\eace"}),e.debugContinue=new e("debug-continue",{fontCharacter:"\\eacf"}),e.debugDisconnect=new e("debug-disconnect",{fontCharacter:"\\ead0"}),e.debugPause=new e("debug-pause",{fontCharacter:"\\ead1"}),e.debugRestart=new e("debug-restart",{fontCharacter:"\\ead2"}),e.debugStart=new e("debug-start",{fontCharacter:"\\ead3"}),e.debugStepInto=new e("debug-step-into",{fontCharacter:"\\ead4"}),e.debugStepOut=new e("debug-step-out",{fontCharacter:"\\ead5"}),e.debugStepOver=new e("debug-step-over",{fontCharacter:"\\ead6"}),e.debugStop=new e("debug-stop",{fontCharacter:"\\ead7"}),e.debug=new e("debug",{fontCharacter:"\\ead8"}),e.deviceCameraVideo=new e("device-camera-video",{fontCharacter:"\\ead9"}),e.deviceCamera=new e("device-camera",{fontCharacter:"\\eada"}),e.deviceMobile=new e("device-mobile",{fontCharacter:"\\eadb"}),e.diffAdded=new e("diff-added",{fontCharacter:"\\eadc"}),e.diffIgnored=new e("diff-ignored",{fontCharacter:"\\eadd"}),e.diffModified=new e("diff-modified",{fontCharacter:"\\eade"}),e.diffRemoved=new e("diff-removed",{fontCharacter:"\\eadf"}),e.diffRenamed=new e("diff-renamed",{fontCharacter:"\\eae0"}),e.diff=new e("diff",{fontCharacter:"\\eae1"}),e.discard=new e("discard",{fontCharacter:"\\eae2"}),e.editorLayout=new e("editor-layout",{fontCharacter:"\\eae3"}),e.emptyWindow=new e("empty-window",{fontCharacter:"\\eae4"}),e.exclude=new e("exclude",{fontCharacter:"\\eae5"}),e.extensions=new e("extensions",{fontCharacter:"\\eae6"}),e.eyeClosed=new e("eye-closed",{fontCharacter:"\\eae7"}),e.fileBinary=new e("file-binary",{fontCharacter:"\\eae8"}),e.fileCode=new e("file-code",{fontCharacter:"\\eae9"}),e.fileMedia=new e("file-media",{fontCharacter:"\\eaea"}),e.filePdf=new e("file-pdf",{fontCharacter:"\\eaeb"}),e.fileSubmodule=new e("file-submodule",{fontCharacter:"\\eaec"}),e.fileSymlinkDirectory=new e("file-symlink-directory",{fontCharacter:"\\eaed"}),e.fileSymlinkFile=new e("file-symlink-file",{fontCharacter:"\\eaee"}),e.fileZip=new e("file-zip",{fontCharacter:"\\eaef"}),e.files=new e("files",{fontCharacter:"\\eaf0"}),e.filter=new e("filter",{fontCharacter:"\\eaf1"}),e.flame=new e("flame",{fontCharacter:"\\eaf2"}),e.foldDown=new e("fold-down",{fontCharacter:"\\eaf3"}),e.foldUp=new e("fold-up",{fontCharacter:"\\eaf4"}),e.fold=new e("fold",{fontCharacter:"\\eaf5"}),e.folderActive=new e("folder-active",{fontCharacter:"\\eaf6"}),e.folderOpened=new e("folder-opened",{fontCharacter:"\\eaf7"}),e.gear=new e("gear",{fontCharacter:"\\eaf8"}),e.gift=new e("gift",{fontCharacter:"\\eaf9"}),e.gistSecret=new e("gist-secret",{fontCharacter:"\\eafa"}),e.gist=new e("gist",{fontCharacter:"\\eafb"}),e.gitCommit=new e("git-commit",{fontCharacter:"\\eafc"}),e.gitCompare=new e("git-compare",{fontCharacter:"\\eafd"}),e.gitMerge=new e("git-merge",{fontCharacter:"\\eafe"}),e.githubAction=new e("github-action",{fontCharacter:"\\eaff"}),e.githubAlt=new e("github-alt",{fontCharacter:"\\eb00"}),e.globe=new e("globe",{fontCharacter:"\\eb01"}),e.grabber=new e("grabber",{fontCharacter:"\\eb02"}),e.graph=new e("graph",{fontCharacter:"\\eb03"}),e.gripper=new e("gripper",{fontCharacter:"\\eb04"}),e.heart=new e("heart",{fontCharacter:"\\eb05"}),e.home=new e("home",{fontCharacter:"\\eb06"}),e.horizontalRule=new e("horizontal-rule",{fontCharacter:"\\eb07"}),e.hubot=new e("hubot",{fontCharacter:"\\eb08"}),e.inbox=new e("inbox",{fontCharacter:"\\eb09"}),e.issueClosed=new e("issue-closed",{fontCharacter:"\\eb0a"}),e.issueReopened=new e("issue-reopened",{fontCharacter:"\\eb0b"}),e.issues=new e("issues",{fontCharacter:"\\eb0c"}),e.italic=new e("italic",{fontCharacter:"\\eb0d"}),e.jersey=new e("jersey",{fontCharacter:"\\eb0e"}),e.json=new e("json",{fontCharacter:"\\eb0f"}),e.kebabVertical=new e("kebab-vertical",{fontCharacter:"\\eb10"}),e.key=new e("key",{fontCharacter:"\\eb11"}),e.law=new e("law",{fontCharacter:"\\eb12"}),e.lightbulbAutofix=new e("lightbulb-autofix",{fontCharacter:"\\eb13"}),e.linkExternal=new e("link-external",{fontCharacter:"\\eb14"}),e.link=new e("link",{fontCharacter:"\\eb15"}),e.listOrdered=new e("list-ordered",{fontCharacter:"\\eb16"}),e.listUnordered=new e("list-unordered",{fontCharacter:"\\eb17"}),e.liveShare=new e("live-share",{fontCharacter:"\\eb18"}),e.loading=new e("loading",{fontCharacter:"\\eb19"}),e.location=new e("location",{fontCharacter:"\\eb1a"}),e.mailRead=new e("mail-read",{fontCharacter:"\\eb1b"}),e.mail=new e("mail",{fontCharacter:"\\eb1c"}),e.markdown=new e("markdown",{fontCharacter:"\\eb1d"}),e.megaphone=new e("megaphone",{fontCharacter:"\\eb1e"}),e.mention=new e("mention",{fontCharacter:"\\eb1f"}),e.milestone=new e("milestone",{fontCharacter:"\\eb20"}),e.mortarBoard=new e("mortar-board",{fontCharacter:"\\eb21"}),e.move=new e("move",{fontCharacter:"\\eb22"}),e.multipleWindows=new e("multiple-windows",{fontCharacter:"\\eb23"}),e.mute=new e("mute",{fontCharacter:"\\eb24"}),e.noNewline=new e("no-newline",{fontCharacter:"\\eb25"}),e.note=new e("note",{fontCharacter:"\\eb26"}),e.octoface=new e("octoface",{fontCharacter:"\\eb27"}),e.openPreview=new e("open-preview",{fontCharacter:"\\eb28"}),e.package_=new e("package",{fontCharacter:"\\eb29"}),e.paintcan=new e("paintcan",{fontCharacter:"\\eb2a"}),e.pin=new e("pin",{fontCharacter:"\\eb2b"}),e.play=new e("play",{fontCharacter:"\\eb2c"}),e.run=new e("run",{fontCharacter:"\\eb2c"}),e.plug=new e("plug",{fontCharacter:"\\eb2d"}),e.preserveCase=new e("preserve-case",{fontCharacter:"\\eb2e"}),e.preview=new e("preview",{fontCharacter:"\\eb2f"}),e.project=new e("project",{fontCharacter:"\\eb30"}),e.pulse=new e("pulse",{fontCharacter:"\\eb31"}),e.question=new e("question",{fontCharacter:"\\eb32"}),e.quote=new e("quote",{fontCharacter:"\\eb33"}),e.radioTower=new e("radio-tower",{fontCharacter:"\\eb34"}),e.reactions=new e("reactions",{fontCharacter:"\\eb35"}),e.references=new e("references",{fontCharacter:"\\eb36"}),e.refresh=new e("refresh",{fontCharacter:"\\eb37"}),e.regex=new e("regex",{fontCharacter:"\\eb38"}),e.remoteExplorer=new e("remote-explorer",{fontCharacter:"\\eb39"}),e.remote=new e("remote",{fontCharacter:"\\eb3a"}),e.remove=new e("remove",{fontCharacter:"\\eb3b"}),e.replaceAll=new e("replace-all",{fontCharacter:"\\eb3c"}),e.replace=new e("replace",{fontCharacter:"\\eb3d"}),e.repoClone=new e("repo-clone",{fontCharacter:"\\eb3e"}),e.repoForcePush=new e("repo-force-push",{fontCharacter:"\\eb3f"}),e.repoPull=new e("repo-pull",{fontCharacter:"\\eb40"}),e.repoPush=new e("repo-push",{fontCharacter:"\\eb41"}),e.report=new e("report",{fontCharacter:"\\eb42"}),e.requestChanges=new e("request-changes",{fontCharacter:"\\eb43"}),e.rocket=new e("rocket",{fontCharacter:"\\eb44"}),e.rootFolderOpened=new e("root-folder-opened",{fontCharacter:"\\eb45"}),e.rootFolder=new e("root-folder",{fontCharacter:"\\eb46"}),e.rss=new e("rss",{fontCharacter:"\\eb47"}),e.ruby=new e("ruby",{fontCharacter:"\\eb48"}),e.saveAll=new e("save-all",{fontCharacter:"\\eb49"}),e.saveAs=new e("save-as",{fontCharacter:"\\eb4a"}),e.save=new e("save",{fontCharacter:"\\eb4b"}),e.screenFull=new e("screen-full",{fontCharacter:"\\eb4c"}),e.screenNormal=new e("screen-normal",{fontCharacter:"\\eb4d"}),e.searchStop=new e("search-stop",{fontCharacter:"\\eb4e"}),e.server=new e("server",{fontCharacter:"\\eb50"}),e.settingsGear=new e("settings-gear",{fontCharacter:"\\eb51"}),e.settings=new e("settings",{fontCharacter:"\\eb52"}),e.shield=new e("shield",{fontCharacter:"\\eb53"}),e.smiley=new e("smiley",{fontCharacter:"\\eb54"}),e.sortPrecedence=new e("sort-precedence",{fontCharacter:"\\eb55"}),e.splitHorizontal=new e("split-horizontal",{fontCharacter:"\\eb56"}),e.splitVertical=new e("split-vertical",{fontCharacter:"\\eb57"}),e.squirrel=new e("squirrel",{fontCharacter:"\\eb58"}),e.starFull=new e("star-full",{fontCharacter:"\\eb59"}),e.starHalf=new e("star-half",{fontCharacter:"\\eb5a"}),e.symbolClass=new e("symbol-class",{fontCharacter:"\\eb5b"}),e.symbolColor=new e("symbol-color",{fontCharacter:"\\eb5c"}),e.symbolConstant=new e("symbol-constant",{fontCharacter:"\\eb5d"}),e.symbolEnumMember=new e("symbol-enum-member",{fontCharacter:"\\eb5e"}),e.symbolField=new e("symbol-field",{fontCharacter:"\\eb5f"}),e.symbolFile=new e("symbol-file",{fontCharacter:"\\eb60"}),e.symbolInterface=new e("symbol-interface",{fontCharacter:"\\eb61"}),e.symbolKeyword=new e("symbol-keyword",{fontCharacter:"\\eb62"}),e.symbolMisc=new e("symbol-misc",{fontCharacter:"\\eb63"}),e.symbolOperator=new e("symbol-operator",{fontCharacter:"\\eb64"}),e.symbolProperty=new e("symbol-property",{fontCharacter:"\\eb65"}),e.wrench=new e("wrench",{fontCharacter:"\\eb65"}),e.wrenchSubaction=new e("wrench-subaction",{fontCharacter:"\\eb65"}),e.symbolSnippet=new e("symbol-snippet",{fontCharacter:"\\eb66"}),e.tasklist=new e("tasklist",{fontCharacter:"\\eb67"}),e.telescope=new e("telescope",{fontCharacter:"\\eb68"}),e.textSize=new e("text-size",{fontCharacter:"\\eb69"}),e.threeBars=new e("three-bars",{fontCharacter:"\\eb6a"}),e.thumbsdown=new e("thumbsdown",{fontCharacter:"\\eb6b"}),e.thumbsup=new e("thumbsup",{fontCharacter:"\\eb6c"}),e.tools=new e("tools",{fontCharacter:"\\eb6d"}),e.triangleDown=new e("triangle-down",{fontCharacter:"\\eb6e"}),e.triangleLeft=new e("triangle-left",{fontCharacter:"\\eb6f"}),e.triangleRight=new e("triangle-right",{fontCharacter:"\\eb70"}),e.triangleUp=new e("triangle-up",{fontCharacter:"\\eb71"}),e.twitter=new e("twitter",{fontCharacter:"\\eb72"}),e.unfold=new e("unfold",{fontCharacter:"\\eb73"}),e.unlock=new e("unlock",{fontCharacter:"\\eb74"}),e.unmute=new e("unmute",{fontCharacter:"\\eb75"}),e.unverified=new e("unverified",{fontCharacter:"\\eb76"}),e.verified=new e("verified",{fontCharacter:"\\eb77"}),e.versions=new e("versions",{fontCharacter:"\\eb78"}),e.vmActive=new e("vm-active",{fontCharacter:"\\eb79"}),e.vmOutline=new e("vm-outline",{fontCharacter:"\\eb7a"}),e.vmRunning=new e("vm-running",{fontCharacter:"\\eb7b"}),e.watch=new e("watch",{fontCharacter:"\\eb7c"}),e.whitespace=new e("whitespace",{fontCharacter:"\\eb7d"}),e.wholeWord=new e("whole-word",{fontCharacter:"\\eb7e"}),e.window=new e("window",{fontCharacter:"\\eb7f"}),e.wordWrap=new e("word-wrap",{fontCharacter:"\\eb80"}),e.zoomIn=new e("zoom-in",{fontCharacter:"\\eb81"}),e.zoomOut=new e("zoom-out",{fontCharacter:"\\eb82"}),e.listFilter=new e("list-filter",{fontCharacter:"\\eb83"}),e.listFlat=new e("list-flat",{fontCharacter:"\\eb84"}),e.listSelection=new e("list-selection",{fontCharacter:"\\eb85"}),e.selection=new e("selection",{fontCharacter:"\\eb85"}),e.listTree=new e("list-tree",{fontCharacter:"\\eb86"}),e.debugBreakpointFunctionUnverified=new e("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),e.debugBreakpointFunction=new e("debug-breakpoint-function",{fontCharacter:"\\eb88"}),e.debugBreakpointFunctionDisabled=new e("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),e.debugStackframeActive=new e("debug-stackframe-active",{fontCharacter:"\\eb89"}),e.debugStackframeDot=new e("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),e.debugStackframe=new e("debug-stackframe",{fontCharacter:"\\eb8b"}),e.debugStackframeFocused=new e("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),e.debugBreakpointUnsupported=new e("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),e.symbolString=new e("symbol-string",{fontCharacter:"\\eb8d"}),e.debugReverseContinue=new e("debug-reverse-continue",{fontCharacter:"\\eb8e"}),e.debugStepBack=new e("debug-step-back",{fontCharacter:"\\eb8f"}),e.debugRestartFrame=new e("debug-restart-frame",{fontCharacter:"\\eb90"}),e.callIncoming=new e("call-incoming",{fontCharacter:"\\eb92"}),e.callOutgoing=new e("call-outgoing",{fontCharacter:"\\eb93"}),e.menu=new e("menu",{fontCharacter:"\\eb94"}),e.expandAll=new e("expand-all",{fontCharacter:"\\eb95"}),e.feedback=new e("feedback",{fontCharacter:"\\eb96"}),e.groupByRefType=new e("group-by-ref-type",{fontCharacter:"\\eb97"}),e.ungroupByRefType=new e("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),e.account=new e("account",{fontCharacter:"\\eb99"}),e.bellDot=new e("bell-dot",{fontCharacter:"\\eb9a"}),e.debugConsole=new e("debug-console",{fontCharacter:"\\eb9b"}),e.library=new e("library",{fontCharacter:"\\eb9c"}),e.output=new e("output",{fontCharacter:"\\eb9d"}),e.runAll=new e("run-all",{fontCharacter:"\\eb9e"}),e.syncIgnored=new e("sync-ignored",{fontCharacter:"\\eb9f"}),e.pinned=new e("pinned",{fontCharacter:"\\eba0"}),e.githubInverted=new e("github-inverted",{fontCharacter:"\\eba1"}),e.debugAlt=new e("debug-alt",{fontCharacter:"\\eb91"}),e.serverProcess=new e("server-process",{fontCharacter:"\\eba2"}),e.serverEnvironment=new e("server-environment",{fontCharacter:"\\eba3"}),e.pass=new e("pass",{fontCharacter:"\\eba4"}),e.stopCircle=new e("stop-circle",{fontCharacter:"\\eba5"}),e.playCircle=new e("play-circle",{fontCharacter:"\\eba6"}),e.record=new e("record",{fontCharacter:"\\eba7"}),e.debugAltSmall=new e("debug-alt-small",{fontCharacter:"\\eba8"}),e.vmConnect=new e("vm-connect",{fontCharacter:"\\eba9"}),e.cloud=new e("cloud",{fontCharacter:"\\ebaa"}),e.merge=new e("merge",{fontCharacter:"\\ebab"}),e.exportIcon=new e("export",{fontCharacter:"\\ebac"}),e.graphLeft=new e("graph-left",{fontCharacter:"\\ebad"}),e.magnet=new e("magnet",{fontCharacter:"\\ebae"}),e.notebook=new e("notebook",{fontCharacter:"\\ebaf"}),e.redo=new e("redo",{fontCharacter:"\\ebb0"}),e.checkAll=new e("check-all",{fontCharacter:"\\ebb1"}),e.pinnedDirty=new e("pinned-dirty",{fontCharacter:"\\ebb2"}),e.passFilled=new e("pass-filled",{fontCharacter:"\\ebb3"}),e.circleLargeFilled=new e("circle-large-filled",{fontCharacter:"\\ebb4"}),e.circleLargeOutline=new e("circle-large-outline",{fontCharacter:"\\ebb5"}),e.combine=new e("combine",{fontCharacter:"\\ebb6"}),e.gather=new e("gather",{fontCharacter:"\\ebb6"}),e.table=new e("table",{fontCharacter:"\\ebb7"}),e.variableGroup=new e("variable-group",{fontCharacter:"\\ebb8"}),e.typeHierarchy=new e("type-hierarchy",{fontCharacter:"\\ebb9"}),e.typeHierarchySub=new e("type-hierarchy-sub",{fontCharacter:"\\ebba"}),e.typeHierarchySuper=new e("type-hierarchy-super",{fontCharacter:"\\ebbb"}),e.gitPullRequestCreate=new e("git-pull-request-create",{fontCharacter:"\\ebbc"}),e.runAbove=new e("run-above",{fontCharacter:"\\ebbd"}),e.runBelow=new e("run-below",{fontCharacter:"\\ebbe"}),e.notebookTemplate=new e("notebook-template",{fontCharacter:"\\ebbf"}),e.debugRerun=new e("debug-rerun",{fontCharacter:"\\ebc0"}),e.dropDownButton=new e("drop-down-button",e.chevronDown.definition)}(l||(l={}))},"56dc":function(e,t,i){},"56f3":function(e,t,i){},"5717b":function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var n=i("0a0f");const s=Object(n["c"])("codeEditorService")},5818:function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var n=i("0a0f");const s=Object(n["c"])("modeService")},"5aa5":function(e,t,i){"use strict";i.d(t,"a",(function(){return c}));i("c84a");var n=i("a666"),s=i("f070"),o=i("11f7"),r=i("ef8e"),a=i("b835"),l=i("308f"),h=i("eff2");class c extends n["a"]{constructor(e,t={}){var i,n,r,c,d,u;let g,p;switch(super(),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new l["a"]),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new l["a"]({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new l["a"]),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new l["a"]),this.onBeforeRun=this._onBeforeRun.event,this.options=t,this._context=null!==(i=t.context)&&void 0!==i?i:null,this._orientation=null!==(n=this.options.orientation)&&void 0!==n?n:0,this._triggerKeys={keyDown:null!==(c=null===(r=this.options.triggerKeys)||void 0===r?void 0:r.keyDown)&&void 0!==c&&c,keys:null!==(u=null===(d=this.options.triggerKeys)||void 0===d?void 0:d.keys)&&void 0!==u?u:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new s["b"],this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun(e=>this._onDidRun.fire(e))),this._register(this._actionRunner.onBeforeRun(e=>this._onBeforeRun.fire(e))),this._actionIds=[],this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",!1!==t.animated&&this.domNode.classList.add("animated"),this._orientation){case 0:g=[15],p=[17];break;case 1:g=[17],p=[15],this.domNode.className+=" reverse";break;case 2:g=[16],p=[18],this.domNode.className+=" vertical";break;case 3:g=[18],p=[16],this.domNode.className+=" vertical reverse";break}this._register(o["g"](this.domNode,o["d"].KEY_DOWN,e=>{const t=new a["a"](e);let i=!0;const n="number"===typeof this.focusedItem?this.viewItems[this.focusedItem]:void 0;g&&(t.equals(g[0])||t.equals(g[1]))?i=this.focusPrevious():p&&(t.equals(p[0])||t.equals(p[1]))?i=this.focusNext():t.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():t.equals(2)&&n instanceof h["b"]&&n.trapsArrowNavigation?this.focusNext():this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown?this.doTrigger(t):this.triggerKeyDown=!0:i=!1,i&&(t.preventDefault(),t.stopPropagation())})),this._register(o["g"](this.domNode,o["d"].KEY_UP,e=>{const t=new a["a"](e);this.isTriggerKeyEvent(t)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(t)),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&this.updateFocusedItem()})),this.focusTracker=this._register(o["T"](this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{o["u"]()!==this.domNode&&o["H"](o["u"](),this.domNode)||(this._onDidBlur.fire(),this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.actionsList.setAttribute("role","toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach(i=>{t=t||e.equals(i)}),t}updateFocusedItem(){for(let e=0;e<this.actionsList.children.length;e++){const t=this.actionsList.children[e];if(o["H"](o["u"](),t)){this.focusedItem=e;break}}}get context(){return this._context}set context(e){this._context=e,this.viewItems.forEach(t=>t.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){e&&(this._actionRunner=e,this.viewItems.forEach(t=>t.actionRunner=e))}getContainer(){return this.domNode}push(e,t={}){const i=Array.isArray(e)?e:[e];let n=r["g"](t.index)?t.index:null;i.forEach(e=>{const i=document.createElement("li");let s;i.className="action-item",i.setAttribute("role","presentation"),this.options.allowContextMenu||this._register(o["g"](i,o["d"].CONTEXT_MENU,e=>{o["c"].stop(e,!0)})),this.options.actionViewItemProvider&&(s=this.options.actionViewItemProvider(e)),s||(s=new h["a"](this.context,e,t)),s.actionRunner=this._actionRunner,s.setActionContext(this.context),s.render(i),this.focusable&&s instanceof h["b"]&&0===this.viewItems.length&&s.setFocusable(!0),null===n||n<0||n>=this.actionsList.children.length?(this.actionsList.appendChild(i),this.viewItems.push(s),this._actionIds.push(e.id)):(this.actionsList.insertBefore(i,this.actionsList.children[n]),this.viewItems.splice(n,0,s),this._actionIds.splice(n,0,e.id),n++)}),"number"===typeof this.focusedItem&&this.focus(this.focusedItem)}clear(){Object(n["f"])(this.viewItems),this.viewItems=[],this._actionIds=[],o["p"](this.actionsList)}focus(e){let t=!1,i=void 0;if(void 0===e?t=!0:"number"===typeof e?i=e:"boolean"===typeof e&&(t=e),t&&"undefined"===typeof this.focusedItem){const e=this.viewItems.findIndex(e=>e.isEnabled());this.focusedItem=-1===e?void 0:e,this.updateFocus()}else void 0!==i&&(this.focusedItem=i),this.updateFocus()}focusNext(){"undefined"===typeof this.focusedItem&&(this.focusedItem=this.viewItems.length-1);const e=this.focusedItem;let t;do{if(this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=e,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,t=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&this.options.focusOnlyEnabledItems&&!t.isEnabled());return this.updateFocus(),!0}focusPrevious(){"undefined"===typeof this.focusedItem&&(this.focusedItem=0);const e=this.focusedItem;let t;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(this.options.preventLoopNavigation)return this.focusedItem=e,!1;this.focusedItem=this.viewItems.length-1}t=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&this.options.focusOnlyEnabledItems&&!t.isEnabled());return this.updateFocus(!0),!0}updateFocus(e,t){"undefined"===typeof this.focusedItem&&this.actionsList.focus({preventScroll:t});for(let i=0;i<this.viewItems.length;i++){const n=this.viewItems[i],s=n;if(i===this.focusedItem){let i=!0;r["f"](s.focus)||(i=!1),this.options.focusOnlyEnabledItems&&r["f"](n.isEnabled)&&!n.isEnabled()&&(i=!1),i?s.focus(e):this.actionsList.focus({preventScroll:t})}else r["f"](s.blur)&&s.blur()}}doTrigger(e){if("undefined"===typeof this.focusedItem)return;const t=this.viewItems[this.focusedItem];if(t instanceof h["b"]){const i=null===t._context||void 0===t._context?e:t._context;this.run(t._action,i)}}run(e,t){return this._actionRunner.run(e,t)}dispose(){Object(n["f"])(this.viewItems),this.viewItems=[],this._actionIds=[],this.getContainer().remove(),super.dispose()}}},"5bd7":function(e,t,i){"use strict";i.d(t,"a",(function(){return l})),i.d(t,"b",(function(){return h}));var n=i("a666"),s=i("3742"),o=i("6d8e"),r=i("0a0f"),a=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const l=Object(r["c"])("openerService");Object.freeze({_serviceBrand:void 0,registerOpener(){return n["a"].None},registerValidator(){return n["a"].None},registerExternalUriResolver(){return n["a"].None},setDefaultExternalOpener(){},registerExternalOpener(){return n["a"].None},open(){return a(this,void 0,void 0,(function*(){return!1}))},resolveExternalUri(e){return a(this,void 0,void 0,(function*(){return{resolved:e,dispose(){}}}))}});function h(e,t){return o["a"].isUri(e)?Object(s["s"])(e.scheme,t):Object(s["R"])(e,t+":")}},"5d28":function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return a}));var n=i("0f70"),s=i("e757"),o=i("30db");class r{constructor(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.buttons=e.buttons,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);let t=s["a"].getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class a{constructor(e,t=0,i=0){if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t,e){let t=e,i=e;if("undefined"!==typeof t.wheelDeltaY)this.deltaY=t.wheelDeltaY/120;else if("undefined"!==typeof i.VERTICAL_AXIS&&i.axis===i.VERTICAL_AXIS)this.deltaY=-i.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n["i"]&&!o["f"]?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if("undefined"!==typeof t.wheelDeltaX)n["j"]&&o["j"]?this.deltaX=-t.wheelDeltaX/120:this.deltaX=t.wheelDeltaX/120;else if("undefined"!==typeof i.HORIZONTAL_AXIS&&i.axis===i.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n["i"]&&!o["f"]?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}}},"5d70":function(e,t,i){},"5d75":function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var n=i("0a0f");const s=Object(n["c"])("telemetryService")},"5fe7":function(e,t,i){"use strict";i.d(t,"j",(function(){return a})),i.d(t,"h",(function(){return l})),i.d(t,"a",(function(){return c})),i.d(t,"f",(function(){return d})),i.d(t,"k",(function(){return u})),i.d(t,"i",(function(){return g})),i.d(t,"g",(function(){return p})),i.d(t,"c",(function(){return m})),i.d(t,"e",(function(){return f})),i.d(t,"b",(function(){return b})),i.d(t,"d",(function(){return v}));var n=i("2504"),s=i("fdcc"),o=i("a666"),r=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function a(e){return!!e&&"function"===typeof e.then}function l(e){const t=new n["b"],i=e(t.token),o=new Promise((e,n)=>{t.token.onCancellationRequested(()=>{n(Object(s["a"])())}),Promise.resolve(i).then(i=>{t.dispose(),e(i)},e=>{t.dispose(),n(e)})});return new class{cancel(){t.cancel()}then(e,t){return o.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return o.finally(e)}}}class h{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const e=()=>{this.queuedPromise=null;const e=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,e};this.queuedPromise=new Promise(t=>{this.activePromise.then(e,e).then(t)})}return new Promise((e,t)=>{this.queuedPromise.then(e,t)})}return this.activePromise=e(),new Promise((e,t)=>{this.activePromise.then(t=>{this.activePromise=null,e(t)},e=>{this.activePromise=null,t(e)})})}}class c{constructor(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){return this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((e,t)=>{this.doResolve=e,this.doReject=t}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const e=this.task;return this.task=null,e()}})),this.timeout=setTimeout(()=>{this.timeout=null,this.doResolve&&this.doResolve(null)},t),this.completionPromise}isTriggered(){return null!==this.timeout}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject(Object(s["a"])()),this.completionPromise=null)}cancelTimeout(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}dispose(){this.cancelTimeout()}}class d{constructor(e){this.delayer=new c(e),this.throttler=new h}trigger(e,t){return this.delayer.trigger(()=>this.throttler.queue(e),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose()}}function u(e,t){return t?new Promise((i,n)=>{const o=setTimeout(i,e);t.onCancellationRequested(()=>{clearTimeout(o),n(Object(s["a"])())})}):l(t=>u(e,t))}function g(e,t=0){const i=setTimeout(e,t);return Object(o["h"])(()=>clearTimeout(i))}class p{constructor(e,t){this._token=-1,"function"===typeof e&&"number"===typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){-1===this._token&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}}class m{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval(()=>{e()},t)}}class f{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}}let _;(function(){if("function"!==typeof requestIdleCallback||"function"!==typeof cancelIdleCallback){const e=Object.freeze({didTimeout:!0,timeRemaining(){return 15}});_=t=>{const i=setTimeout(()=>t(e));let n=!1;return{dispose(){n||(n=!0,clearTimeout(i))}}}}else _=(e,t)=>{const i=requestIdleCallback(e,"number"===typeof t?{timeout:t}:void 0);let n=!1;return{dispose(){n||(n=!0,cancelIdleCallback(i))}}}})();class b{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(t){this._error=t}finally{this._didRun=!0}},this._handle=_(()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}}var v;(function(e){function t(e){return r(this,void 0,void 0,(function*(){return"function"===typeof Promise.allSettled?i(e):n(e)}))}function i(e){return r(this,void 0,void 0,(function*(){return Promise.allSettled(e)}))}function n(e){return r(this,void 0,void 0,(function*(){return Promise.all(e.map(e=>e.then(e=>{const t={status:"fulfilled",value:e};return t},e=>{const t={status:"rejected",reason:e};return t})))}))}function s(e){return r(this,void 0,void 0,(function*(){let t=void 0;const i=yield Promise.all(e.map(e=>e.then(e=>e,e=>{t||(t=e)})));if("undefined"!==typeof t)throw t;return i}))}e.allSettled=t,e.settled=s})(v||(v={}))},"62bd":function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var n=i("308f");const s=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new n["a"],this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}},6424:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));let n=0;function s(){const e="$memoize"+n++;let t=void 0;const i=function(i,n,s){let o=null,r=null;if("function"===typeof s.value?(o="value",r=s.value,0!==r.length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"===typeof s.get&&(o="get",r=s.get),!r)throw new Error("not supported");const a=`${e}:${n}`;s[o]=function(...e){return t=this,this.hasOwnProperty(a)||Object.defineProperty(this,a,{configurable:!0,enumerable:!1,writable:!0,value:r.apply(this,e)}),this[a]}};return i.clear=()=>{"undefined"!==typeof t&&Object.getOwnPropertyNames(t).forEach(i=>{0===i.indexOf(e)&&delete t[i]})},i}function o(e,t,i){return s()(e,t,i)}},"650e":function(e,t,i){"use strict";i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return s})),i.d(t,"c",(function(){return o}));const n={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:"text/plain"};class s{constructor(e){this.data=e}update(){}getData(){return this.data}}const o={CurrentDragAndDropData:void 0}},6653:function(e,t,i){"use strict";i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return s}));class n{constructor(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._fontFeatureSettings="",this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.domNode.style.maxWidth=this._maxWidth+"px")}setWidth(e){this._width!==e&&(this._width=e,this.domNode.style.width=this._width+"px")}setHeight(e){this._height!==e&&(this._height=e,this.domNode.style.height=this._height+"px")}setTop(e){this._top!==e&&(this._top=e,this.domNode.style.top=this._top+"px")}unsetTop(){-1!==this._top&&(this._top=-1,this.domNode.style.top="")}setLeft(e){this._left!==e&&(this._left=e,this.domNode.style.left=this._left+"px")}setBottom(e){this._bottom!==e&&(this._bottom=e,this.domNode.style.bottom=this._bottom+"px")}setRight(e){this._right!==e&&(this._right=e,this.domNode.style.right=this._right+"px")}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){this._fontSize!==e&&(this._fontSize=e,this.domNode.style.fontSize=this._fontSize+"px")}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setLineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.domNode.style.lineHeight=this._lineHeight+"px")}setLetterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.domNode.style.letterSpacing=this._letterSpacing+"px")}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function s(e){return new n(e)}},"675a":function(e,t,i){},"6a89":function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var n=i("7061");class s{constructor(e,t,i,n){e>i||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i,this.endColumn=n)}isEmpty(){return s.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return s.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber)&&(!(t.lineNumber===e.startLineNumber&&t.column<e.startColumn)&&!(t.lineNumber===e.endLineNumber&&t.column>e.endColumn))}containsRange(e){return s.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber)&&(!(t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>e.endColumn)))}strictContainsRange(e){return s.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber)&&(!(t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber)&&(!(t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn)&&!(t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)))}plusRange(e){return s.plusRange(this,e)}static plusRange(e,t){let i,n,o,r;return t.startLineNumber<e.startLineNumber?(i=t.startLineNumber,n=t.startColumn):t.startLineNumber===e.startLineNumber?(i=t.startLineNumber,n=Math.min(t.startColumn,e.startColumn)):(i=e.startLineNumber,n=e.startColumn),t.endLineNumber>e.endLineNumber?(o=t.endLineNumber,r=t.endColumn):t.endLineNumber===e.endLineNumber?(o=t.endLineNumber,r=Math.max(t.endColumn,e.endColumn)):(o=e.endLineNumber,r=e.endColumn),new s(i,n,o,r)}intersectRanges(e){return s.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,r=e.endColumn,a=t.startLineNumber,l=t.startColumn,h=t.endLineNumber,c=t.endColumn;return i<a?(i=a,n=l):i===a&&(n=Math.max(n,l)),o>h?(o=h,r=c):o===h&&(r=Math.min(r,c)),i>o||i===o&&n>r?null:new s(i,n,o,r)}equalsRange(e){return s.equalsRange(this,e)}static equalsRange(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return s.getEndPosition(this)}static getEndPosition(e){return new n["a"](e.endLineNumber,e.endColumn)}getStartPosition(){return s.getStartPosition(this)}static getStartPosition(e){return new n["a"](e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new s(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new s(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return s.collapseToStart(this)}static collapseToStart(e){return new s(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}static fromPositions(e,t=e){return new s(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new s(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"===typeof e.startLineNumber&&"number"===typeof e.startColumn&&"number"===typeof e.endLineNumber&&"number"===typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<t.startColumn)&&!(t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<e.startColumn)}static areIntersecting(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<=t.startColumn)&&!(t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<=e.startColumn)}static compareRangesUsingStarts(e,t){if(e&&t){const i=0|e.startLineNumber,n=0|t.startLineNumber;if(i===n){const i=0|e.startColumn,n=0|t.startColumn;if(i===n){const i=0|e.endLineNumber,n=0|t.endLineNumber;if(i===n){const i=0|e.endColumn,n=0|t.endColumn;return i-n}return i-n}return i-n}return i-n}const i=e?1:0,n=t?1:0;return i-n}static compareRangesUsingEnds(e,t){return e.endLineNumber===t.endLineNumber?e.endColumn===t.endColumn?e.startLineNumber===t.startLineNumber?e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber:e.endColumn-t.endColumn:e.endLineNumber-t.endLineNumber}static spansMultipleLines(e){return e.endLineNumber>e.startLineNumber}}},"6d8e":function(e,t,i){"use strict";i.d(t,"a",(function(){return p})),i.d(t,"b",(function(){return C}));var n=i("30db"),s=i("32b8");const o=/^\w[\w\d+.-]*$/,r=/^\//,a=/^\/\//;function l(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!o.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!r.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}function h(e,t){return e||t?e:"file"}function c(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==u&&(t=u+t):t=u;break}return t}const d="",u="/",g=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class p{constructor(e,t,i,n,s,o=!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=h(e,o),this.authority=t||d,this.path=c(this.scheme,i||d),this.query=n||d,this.fragment=s||d,l(this,o))}static isUri(e){return e instanceof p||!!e&&("string"===typeof e.authority&&"string"===typeof e.fragment&&"string"===typeof e.path&&"string"===typeof e.query&&"string"===typeof e.scheme&&"string"===typeof e.fsPath&&"function"===typeof e.with&&"function"===typeof e.toString)}get fsPath(){return C(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:s,fragment:o}=e;return void 0===t?t=this.scheme:null===t&&(t=d),void 0===i?i=this.authority:null===i&&(i=d),void 0===n?n=this.path:null===n&&(n=d),void 0===s?s=this.query:null===s&&(s=d),void 0===o?o=this.fragment:null===o&&(o=d),t===this.scheme&&i===this.authority&&n===this.path&&s===this.query&&o===this.fragment?this:new f(t,i,n,s,o)}static parse(e,t=!1){const i=g.exec(e);return i?new f(i[2]||d,D(i[4]||d),D(i[5]||d),D(i[7]||d),D(i[9]||d),t):new f(d,d,d,d,d)}static file(e){let t=d;if(n["j"]&&(e=e.replace(/\\/g,u)),e[0]===u&&e[1]===u){const i=e.indexOf(u,2);-1===i?(t=e.substring(2),e=u):(t=e.substring(2,i),e=e.substring(i)||u)}return new f("file",t,e,d,d)}static from(e){return new f(e.scheme,e.authority,e.path,e.query,e.fragment)}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let i;return i=n["j"]&&"file"===e.scheme?p.file(s["i"].join(C(e,!0),...t)).path:s["e"].join(e.path,...t),e.with({path:i})}toString(e=!1){return w(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof p)return e;{const t=new f(e);return t._formatted=e.external,t._fsPath=e._sep===m?e.fsPath:null,t}}return e}}const m=n["j"]?1:void 0;class f extends p{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=C(this,!1)),this._fsPath}toString(e=!1){return e?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=m),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}}const _={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function b(e,t){let i=void 0,n=-1;for(let s=0;s<e.length;s++){const o=e.charCodeAt(s);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==n&&(i+=encodeURIComponent(e.substring(n,s)),n=-1),void 0!==i&&(i+=e.charAt(s));else{void 0===i&&(i=e.substr(0,s));const t=_[o];void 0!==t?(-1!==n&&(i+=encodeURIComponent(e.substring(n,s)),n=-1),i+=t):-1===n&&(n=s)}}return-1!==n&&(i+=encodeURIComponent(e.substring(n))),void 0!==i?i:e}function v(e){let t=void 0;for(let i=0;i<e.length;i++){const n=e.charCodeAt(i);35===n||63===n?(void 0===t&&(t=e.substr(0,i)),t+=_[n]):void 0!==t&&(t+=e[i])}return void 0!==t?t:e}function C(e,t){let i;return i=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,n["j"]&&(i=i.replace(/\//g,"\\")),i}function w(e,t){const i=t?v:b;let n="",{scheme:s,authority:o,path:r,query:a,fragment:l}=e;if(s&&(n+=s,n+=":"),(o||"file"===s)&&(n+=u,n+=u),o){let e=o.indexOf("@");if(-1!==e){const t=o.substr(0,e);o=o.substr(e+1),e=t.indexOf(":"),-1===e?n+=i(t,!1):(n+=i(t.substr(0,e),!1),n+=":",n+=i(t.substr(e+1),!1)),n+="@"}o=o.toLowerCase(),e=o.indexOf(":"),-1===e?n+=i(o,!1):(n+=i(o.substr(0,e),!1),n+=o.substr(e))}if(r){if(r.length>=3&&47===r.charCodeAt(0)&&58===r.charCodeAt(2)){const e=r.charCodeAt(1);e>=65&&e<=90&&(r=`/${String.fromCharCode(e+32)}:${r.substr(3)}`)}else if(r.length>=2&&58===r.charCodeAt(1)){const e=r.charCodeAt(0);e>=65&&e<=90&&(r=`${String.fromCharCode(e+32)}:${r.substr(2)}`)}n+=i(r,!0)}return a&&(n+="?",n+=i(a,!1)),l&&(n+="#",n+=t?l:b(l,!1)),n}function S(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+S(e.substr(3)):e}}const y=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function D(e){return e.match(y)?e.replace(y,e=>S(e)):e}},"6da2":function(e,t,i){"use strict";i.d(t,"b",(function(){return a})),i.d(t,"c",(function(){return l})),i.d(t,"a",(function(){return h})),i.d(t,"d",(function(){return d})),i.d(t,"e",(function(){return g}));var n=i("3742"),s=i("7ab3"),o=i("7416");class r{constructor(e,t,i){this.endIndex=e,this.type=t,this.metadata=i}isWhitespace(){return!!(1&this.metadata)}}class a{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class l{constructor(e,t,i,n,s,r,a,l,h,c,d,u,g,p,m,f,_,b,v){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=s,this.containsRTL=r,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=h.sort(o["a"].compare),this.tabSize=c,this.startVisibleColumn=d,this.spaceWidth=u,this.stopRenderingLineAfter=m,this.renderWhitespace="all"===f?4:"boundary"===f?1:"selection"===f?2:"trailing"===f?3:0,this.renderControlCharacters=_,this.fontLigatures=b,this.selectionsOnLine=v&&v.sort((e,t)=>e.startOffset<t.startOffset?-1:1);const C=Math.abs(p-u),w=Math.abs(g-u);C<w?(this.renderSpaceWidth=p,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=g,this.renderSpaceCharCode=183)}sameSelection(e){if(null===this.selectionsOnLine)return null===e;if(null===e)return!1;if(e.length!==this.selectionsOnLine.length)return!1;for(let t=0;t<this.selectionsOnLine.length;t++)if(!this.selectionsOnLine[t].equals(e[t]))return!1;return!0}equals(e){return this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineContent===e.lineContent&&this.continuesWithWrappedLine===e.continuesWithWrappedLine&&this.isBasicASCII===e.isBasicASCII&&this.containsRTL===e.containsRTL&&this.fauxIndentLength===e.fauxIndentLength&&this.tabSize===e.tabSize&&this.startVisibleColumn===e.startVisibleColumn&&this.spaceWidth===e.spaceWidth&&this.renderSpaceWidth===e.renderSpaceWidth&&this.renderSpaceCharCode===e.renderSpaceCharCode&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.fontLigatures===e.fontLigatures&&o["a"].equalsArr(this.lineDecorations,e.lineDecorations)&&this.lineTokens.equals(e.lineTokens)&&this.sameSelection(e.selectionsOnLine)}}class h{constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._absoluteOffsets=new Uint32Array(this.length)}static getPartIndex(e){return(4294901760&e)>>>16}static getCharIndex(e){return(65535&e)>>>0}setPartData(e,t,i,n){let s=(t<<16|i<<0)>>>0;this._data[e]=s,this._absoluteOffsets[e]=n+i}getAbsoluteOffsets(){return this._absoluteOffsets}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}partDataToCharOffset(e,t,i){if(0===this.length)return 0;let n=(e<<16|i<<0)>>>0,s=0,o=this.length-1;while(s+1<o){let e=s+o>>>1,t=this._data[e];if(t===n)return e;t>n?o=e:s=e}if(s===o)return s;let r=this._data[s],a=this._data[o];if(r===n)return s;if(a===n)return o;let l,c=h.getPartIndex(r),d=h.getCharIndex(r),u=h.getPartIndex(a);l=c!==u?t:h.getCharIndex(a);let g=i-d,p=l-i;return g<=p?s:o}}class c{constructor(e,t,i){this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function d(e,t){if(0===e.lineContent.length){let i=0,n="<span><span></span></span>";if(e.lineDecorations.length>0){const t=[],s=[];for(let n=0,o=e.lineDecorations.length;n<o;n++){const o=e.lineDecorations[n];1===o.type&&(t.push(e.lineDecorations[n].className),i|=1),2===o.type&&(s.push(e.lineDecorations[n].className),i|=2)}if(0!==i){const e=t.length>0?`<span class="${t.join(" ")}"></span>`:"",i=s.length>0?`<span class="${s.join(" ")}"></span>`:"";n=`<span>${e}${i}</span>`}}return t.appendASCIIString(n),new c(new h(0,0),!1,i)}return C(m(e),t)}class u{constructor(e,t,i,n){this.characterMapping=e,this.html=t,this.containsRTL=i,this.containsForeignElements=n}}function g(e){let t=Object(s["a"])(1e4),i=d(e,t);return new u(i.characterMapping,t.build(),i.containsRTL,i.containsForeignElements)}class p{constructor(e,t,i,n,s,o,r,a,l,h,c,d,u,g,p){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.len=n,this.isOverflowing=s,this.parts=o,this.containsForeignElements=r,this.fauxIndentLength=a,this.tabSize=l,this.startVisibleColumn=h,this.containsRTL=c,this.spaceWidth=d,this.renderSpaceCharCode=u,this.renderWhitespace=g,this.renderControlCharacters=p}}function m(e){const t=e.lineContent;let i,n;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter<t.length?(i=!0,n=e.stopRenderingLineAfter):(i=!1,n=t.length);let s=f(e.lineTokens,e.fauxIndentLength,n);(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace)&&(s=b(e,t,n,s));let o=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;t<i;t++){const i=e.lineDecorations[t];3===i.type||1===i.type?o|=1:2===i.type&&(o|=2)}s=v(t,n,s,e.lineDecorations)}return e.containsRTL||(s=_(t,s,!e.isBasicASCII||e.fontLigatures)),new p(e.useMonospaceOptimizations,e.canUseHalfwidthRightwardsArrow,t,n,i,s,o,e.fauxIndentLength,e.tabSize,e.startVisibleColumn,e.containsRTL,e.spaceWidth,e.renderSpaceCharCode,e.renderWhitespace,e.renderControlCharacters)}function f(e,t,i){let n=[],s=0;t>0&&(n[s++]=new r(t,"",0));for(let o=0,a=e.getCount();o<a;o++){const a=e.getEndOffset(o);if(a<=t)continue;const l=e.getClassName(o);if(a>=i){n[s++]=new r(i,l,0);break}n[s++]=new r(a,l,0)}return n}function _(e,t,i){let n=0,s=[],o=0;if(i)for(let a=0,l=t.length;a<l;a++){const i=t[a],l=i.endIndex;if(n+50<l){const t=i.type,a=i.metadata;let h=-1,c=n;for(let i=n;i<l;i++)32===e.charCodeAt(i)&&(h=i),-1!==h&&i-c>=50&&(s[o++]=new r(h+1,t,a),c=h+1,h=-1);c!==l&&(s[o++]=new r(l,t,a))}else s[o++]=i;n=l}else for(let a=0,l=t.length;a<l;a++){const e=t[a],i=e.endIndex;let l=i-n;if(l>50){const t=e.type,a=e.metadata,h=Math.ceil(l/50);for(let e=1;e<h;e++){let i=n+50*e;s[o++]=new r(i,t,a)}s[o++]=new r(i,t,a)}else s[o++]=e;n=i}return s}function b(e,t,i,s){const o=e.continuesWithWrappedLine,a=e.fauxIndentLength,l=e.tabSize,h=e.startVisibleColumn,c=e.useMonospaceOptimizations,d=e.selectionsOnLine,u=1===e.renderWhitespace,g=3===e.renderWhitespace,p=e.renderSpaceWidth!==e.spaceWidth;let m=[],f=0,_=0,b=s[_].type,v=s[_].endIndex;const C=s.length;let w,S=!1,y=n["v"](t);-1===y?(S=!0,y=i,w=i):w=n["I"](t);let D=!1,L=0,x=d&&d[L],k=h%l;for(let N=a;N<i;N++){const e=t.charCodeAt(N);let o;if(x&&N>=x.endOffset&&(L++,x=d&&d[L]),N<y||N>w)o=!0;else if(9===e)o=!0;else if(32===e)if(u)if(D)o=!0;else{const e=N+1<i?t.charCodeAt(N+1):0;o=32===e||9===e}else o=!0;else o=!1;if(o&&d&&(o=!!x&&x.startOffset<=N&&x.endOffset>N),o&&g&&(o=S||N>w),D){if(!o||!c&&k>=l){if(p){const e=f>0?m[f-1].endIndex:a;for(let t=e+1;t<=N;t++)m[f++]=new r(t,"mtkw",1)}else m[f++]=new r(N,"mtkw",1);k%=l}}else(N===v||o&&N>a)&&(m[f++]=new r(N,b,0),k%=l);9===e?k=l:n["D"](e)?k+=2:k++,D=o;while(N===v)_++,_<C&&(b=s[_].type,v=s[_].endIndex)}let E=!1;if(D)if(o&&u){let e=i>0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0,s=32===e&&32!==n&&9!==n;s||(E=!0)}else E=!0;if(E)if(p){const e=f>0?m[f-1].endIndex:a;for(let t=e+1;t<=i;t++)m[f++]=new r(t,"mtkw",1)}else m[f++]=new r(i,"mtkw",1);else m[f++]=new r(i,b,0);return m}function v(e,t,i,n){n.sort(o["a"].compare);const s=o["b"].normalize(e,n),a=s.length;let l=0,h=[],c=0,d=0;for(let o=0,g=i.length;o<g;o++){const e=i[o],t=e.endIndex,n=e.type,u=e.metadata;while(l<a&&s[l].startOffset<t){const e=s[l];if(e.startOffset>d&&(d=e.startOffset,h[c++]=new r(d,n,u)),!(e.endOffset+1<=t)){d=t,h[c++]=new r(d,n+" "+e.className,u|e.metadata);break}d=e.endOffset+1,h[c++]=new r(d,n+" "+e.className,u|e.metadata),l++}t>d&&(d=t,h[c++]=new r(d,n,u))}const u=i[i.length-1].endIndex;if(l<a&&s[l].startOffset===u){let e=[],t=0;while(l<a&&s[l].startOffset===u)e.push(s[l].className),t|=s[l].metadata,l++;h[c++]=new r(d,e.join(" "),t)}return h}function C(e,t){const i=e.fontIsMonospace,s=e.canUseHalfwidthRightwardsArrow,o=e.containsForeignElements,r=e.lineContent,a=e.len,l=e.isOverflowing,d=e.parts,u=e.fauxIndentLength,g=e.tabSize,p=e.startVisibleColumn,m=e.containsRTL,f=e.spaceWidth,_=e.renderSpaceCharCode,b=e.renderWhitespace,v=e.renderControlCharacters,C=new h(a+1,d.length);let w=0,S=p,y=0,D=0,L=0,x=0;m?t.appendASCIIString('<span dir="ltr">'):t.appendASCIIString("<span>");for(let h=0,c=d.length;h<c;h++){x+=L;const e=d[h],a=e.endIndex,l=e.type,c=0!==b&&e.isWhitespace(),p=c&&!i&&("mtkw"===l||!o),m=w===a&&4===e.metadata;if(y=0,t.appendASCIIString('<span class="'),t.appendASCIIString(p?"mtkz":l),t.appendASCII(34),c){let e=0;{let t=w,i=S;for(;t<a;t++){const n=r.charCodeAt(t),s=0|(9===n?g-i%g:1);e+=s,t>=u&&(i+=s)}}for(p&&(t.appendASCIIString(' style="width:'),t.appendASCIIString(String(f*e)),t.appendASCIIString('px"')),t.appendASCII(62);w<a;w++){C.setPartData(w,h-D,y,x),D=0;const e=r.charCodeAt(w);let i;if(9===e){i=g-S%g|0,!s||i>1?t.write1(8594):t.write1(65515);for(let e=2;e<=i;e++)t.write1(160)}else i=1,t.write1(_);y+=i,w>=u&&(S+=i)}L=e}else{let e=0;for(t.appendASCII(62);w<a;w++){C.setPartData(w,h-D,y,x),D=0;const i=r.charCodeAt(w);let s=1,o=1;switch(i){case 9:s=g-S%g,o=s;for(let e=1;e<=s;e++)t.write1(160);break;case 32:t.write1(160);break;case 60:t.appendASCIIString("&lt;");break;case 62:t.appendASCIIString("&gt;");break;case 38:t.appendASCIIString("&amp;");break;case 0:t.appendASCIIString("&#00;");break;case 65279:case 8232:case 8233:case 133:t.write1(65533);break;default:n["D"](i)&&o++,v&&i<32?t.write1(9216+i):t.write1(i)}y+=s,e+=s,w>=u&&(S+=o)}L=e}m?D++:D=0,t.appendASCIIString("</span>")}return C.setPartData(a,d.length-1,y,x),l&&t.appendASCIIString("<span>&hellip;</span>"),t.appendASCIIString("</span>"),new c(C,m,o)}},"6dec":function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var n=i("0a0f");const s=Object(n["c"])("keybindingService")},7061:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));class n{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new n(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return n.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return n.isBefore(this,e)}static isBefore(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<t.column}isBeforeOrEqual(e){return n.isBeforeOrEqual(this,e)}static isBeforeOrEqual(e,t){return e.lineNumber<t.lineNumber||!(t.lineNumber<e.lineNumber)&&e.column<=t.column}static compare(e,t){let i=0|e.lineNumber,n=0|t.lineNumber;if(i===n){let i=0|e.column,n=0|t.column;return i-n}return i-n}clone(){return new n(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(e){return new n(e.lineNumber,e.column)}static isIPosition(e){return e&&"number"===typeof e.lineNumber&&"number"===typeof e.column}}},"70c3":function(e,t,i){"use strict";i.d(t,"a",(function(){return g})),i.d(t,"b",(function(){return f}));i("ba77");var n=i("a666"),s=i("30db"),o=i("ef8e"),r=i("a60f"),a=i("5d28"),l=i("308f"),h=i("11f7"),c=i("e32d"),d=i("5fe7");let u=!1;var g;(function(e){e["North"]="north",e["South"]="south",e["East"]="east",e["West"]="west"})(g||(g={}));let p=4;const m=new l["a"];class f extends n["a"]{constructor(e,t,i){super(),this.hoverDelayer=this._register(new d["a"](300)),this._state=3,this._onDidEnablementChange=this._register(new l["a"]),this.onDidEnablementChange=this._onDidEnablementChange.event,this._onDidStart=this._register(new l["a"]),this.onDidStart=this._onDidStart.event,this._onDidChange=this._register(new l["a"]),this.onDidChange=this._onDidChange.event,this._onDidReset=this._register(new l["a"]),this.onDidReset=this._onDidReset.event,this._onDidEnd=this._register(new l["a"]),this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.orthogonalStartSashDisposables=this._register(new n["b"]),this.orthogonalStartDragHandleDisposables=this._register(new n["b"]),this.orthogonalEndSashDisposables=this._register(new n["b"]),this.orthogonalEndDragHandleDisposables=this._register(new n["b"]),this.el=Object(h["m"])(e,Object(h["a"])(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add("orthogonal-edge-"+i.orthogonalEdge),s["f"]&&this.el.classList.add("mac"),this._register(Object(c["a"])(this.el,"mousedown")(this.onMouseDown,this)),this._register(Object(c["a"])(this.el,"dblclick")(this.onMouseDoubleClick,this)),this._register(Object(c["a"])(this.el,"mouseenter")(()=>f.onMouseEnter(this))),this._register(Object(c["a"])(this.el,"mouseleave")(()=>f.onMouseLeave(this))),this._register(r["b"].addTarget(this.el)),this._register(Object(c["a"])(this.el,r["a"].Start)(this.onTouchStart,this)),"number"===typeof i.size?(this.size=i.size,0===i.orientation?this.el.style.width=this.size+"px":this.el.style.height=this.size+"px"):(this.size=p,this._register(m.event(e=>{this.size=e,this.layout()}))),this.hidden=!1,this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,1===this.orientation?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",u),this.layout()}get state(){return this._state}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",0===e),this.el.classList.toggle("minimum",1===e),this.el.classList.toggle("maximum",2===e),this._state=e,this._onDidEnablementChange.fire(e))}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=t=>{this.orthogonalStartDragHandleDisposables.clear(),0!==t&&(this._orthogonalStartDragHandle=Object(h["m"])(this.el,Object(h["a"])(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(Object(n["h"])(()=>this._orthogonalStartDragHandle.remove())),Object(c["a"])(this._orthogonalStartDragHandle,"mouseenter")(()=>f.onMouseEnter(e),void 0,this.orthogonalStartDragHandleDisposables),Object(c["a"])(this._orthogonalStartDragHandle,"mouseleave")(()=>f.onMouseLeave(e),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange(t,this)),t(e.state)}this._orthogonalStartSash=e}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=t=>{this.orthogonalEndDragHandleDisposables.clear(),0!==t&&(this._orthogonalEndDragHandle=Object(h["m"])(this.el,Object(h["a"])(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(Object(n["h"])(()=>this._orthogonalEndDragHandle.remove())),Object(c["a"])(this._orthogonalEndDragHandle,"mouseenter")(()=>f.onMouseEnter(e),void 0,this.orthogonalEndDragHandleDisposables),Object(c["a"])(this._orthogonalEndDragHandle,"mouseleave")(()=>f.onMouseLeave(e),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange(t,this)),t(e.state)}this._orthogonalEndSash=e}onMouseDown(e){h["c"].stop(e,!1);let t=!1;if(!e.__orthogonalSashEvent){const i=this.getOrthogonalSash(e);i&&(t=!0,e.__orthogonalSashEvent=!0,i.onMouseDown(e))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onMouseDown(e)),!this.state)return;const i=[...Object(h["A"])("iframe"),...Object(h["A"])("webview")];for(const n of i)n.style.pointerEvents="none";const o=new a["a"](e),r=o.posx,l=o.posy,d=o.altKey,u={startX:r,currentX:r,startY:l,currentY:l,altKey:d};this.el.classList.add("active"),this._onDidStart.fire(u);const g=Object(h["s"])(this.el),p=()=>{let e="";e=t?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":s["f"]?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":s["f"]?"col-resize":"ew-resize",g.textContent=`* { cursor: ${e} !important; }`},m=new n["b"];p(),t||this.onDidEnablementChange(p,null,m);const f=e=>{h["c"].stop(e,!1);const t=new a["a"](e),i={startX:r,currentX:t.posx,startY:l,currentY:t.posy,altKey:d};this._onDidChange.fire(i)},_=e=>{h["c"].stop(e,!1),this.el.removeChild(g),this.el.classList.remove("active"),this._onDidEnd.fire(),m.dispose();for(const t of i)t.style.pointerEvents="auto"};Object(c["a"])(window,"mousemove")(f,null,m),Object(c["a"])(window,"mouseup")(_,null,m)}onMouseDoubleClick(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}onTouchStart(e){h["c"].stop(e);const t=[],i=e.pageX,s=e.pageY,a=e.altKey;this._onDidStart.fire({startX:i,currentX:i,startY:s,currentY:s,altKey:a}),t.push(Object(h["g"])(this.el,r["a"].Change,e=>{o["g"](e.pageX)&&o["g"](e.pageY)&&this._onDidChange.fire({startX:i,currentX:e.pageX,startY:s,currentY:e.pageY,altKey:a})})),t.push(Object(h["g"])(this.el,r["a"].End,()=>{this._onDidEnd.fire(),Object(n["f"])(t)}))}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger(()=>e.el.classList.add("hover")),!t&&e.linkedSash&&f.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&f.onMouseLeave(e.linkedSash,!0)}layout(){if(0===this.orientation){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}hide(){this.hidden=!0,this.el.style.display="none",this.el.setAttribute("aria-hidden","true")}getOrthogonalSash(e){if(e.target&&e.target instanceof HTMLElement)return e.target.classList.contains("orthogonal-drag-handle")?e.target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash:void 0}dispose(){super.dispose(),this.el.remove()}}},"70cb":function(e,t,i){"use strict";i.d(t,"a",(function(){return w}));var n=i("308f"),s=i("a666"),o=i("3742"),r=i("d093"),a=i("2837"),l=i("045b");class h{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(e=>new a["c"](e)):e.brackets?this._autoClosingPairs=e.brackets.map(e=>new a["c"]({open:e[0],close:e[1]})):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new a["c"]({open:t.open,close:t.close||""}))}this._autoCloseBefore="string"===typeof e.autoCloseBefore?e.autoCloseBefore:h.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}static shouldAutoClosePair(e,t,i){if(0===t.getTokenCount())return!0;const n=t.findTokenIndexAtOffset(i-2),s=t.getStandardTokenType(n);return e.isOK(s)}getSurroundingPairs(){return this._surroundingPairs}}h.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=";:.,=}])> \n\t";var c=i("1080");class d{constructor(e){this._richEditBrackets=e}getElectricCharacters(){let e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const i of t.close){const t=i.charAt(i.length-1);e.push(t)}return e=e.filter((e,t,i)=>i.indexOf(e)===t),e}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const n=t.findTokenIndexAtOffset(i-1);if(Object(l["b"])(t.getStandardTokenType(n)))return null;const s=this._richEditBrackets.reversedRegex,o=t.getLineContent().substring(0,i-1)+e,r=c["a"].findPrevBracketInRange(s,1,o,0,o.length);if(!r)return null;const a=o.substring(r.startColumn-1,r.endColumn-1).toLowerCase(),h=this._richEditBrackets.textIsOpenBracket[a];if(h)return null;const d=t.getActualLineContentBefore(r.startColumn-1);return/^\s*$/.test(d)?{matchOpenBracket:a}:null}}function u(e){return e.global&&(e.lastIndex=0),!0}class g{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&u(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&u(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&u(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&u(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}var p=i("fdcc");class m{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(e=>{const t=m._createOpenBracketRegExp(e[0]),i=m._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let s=0,o=this._regExpRules.length;s<o;s++){let e=this._regExpRules[s];const o=[{reg:e.beforeText,text:i},{reg:e.afterText,text:n},{reg:e.previousLineText,text:t}].every(e=>!e.reg||e.reg.test(e.text));if(o)return e.action}if(e>=2&&i.length>0&&n.length>0)for(let s=0,o=this._brackets.length;s<o;s++){let e=this._brackets[s];if(e.openRegExp.test(i)&&e.closeRegExp.test(n))return{indentAction:a["b"].IndentOutdent}}if(e>=2&&i.length>0)for(let s=0,o=this._brackets.length;s<o;s++){let e=this._brackets[s];if(e.openRegExp.test(i))return{indentAction:a["b"].Indent}}return null}static _createOpenBracketRegExp(e){let t=o["u"](e);return/\B/.test(t.charAt(0))||(t="\\b"+t),t+="\\s*$",m._safeRegExp(t)}static _createCloseBracketRegExp(e){let t=o["u"](e);return/\B/.test(t.charAt(t.length-1))||(t+="\\b"),t="^\\s*"+t,m._safeRegExp(t)}static _safeRegExp(e){try{return new RegExp(e)}catch(t){return Object(p["e"])(t),null}}}class f{constructor(e,t){this._languageIdentifier=e,this._brackets=null,this._electricCharacter=null,this._conf=t,this._onEnterSupport=this._conf.brackets||this._conf.indentationRules||this._conf.onEnterRules?new m(this._conf):null,this.comments=f._handleComments(this._conf),this.characterPair=new h(this._conf),this.wordDefinition=this._conf.wordPattern||r["a"],this.indentationRules=this._conf.indentationRules,this._conf.indentationRules?this.indentRulesSupport=new g(this._conf.indentationRules):this.indentRulesSupport=null,this.foldingRules=this._conf.folding||{}}get brackets(){return!this._brackets&&this._conf.brackets&&(this._brackets=new c["b"](this._languageIdentifier,this._conf.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new d(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}static _handleComments(e){let t=e.comments;if(!t)return null;let i={};if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){let[e,n]=t.blockComment;i.blockCommentStartToken=e,i.blockCommentEndToken=n}return i}}class _{constructor(e){this.languageIdentifier=e}}class b{constructor(e,t,i){this.configuration=e,this.priority=t,this.order=i}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class v{constructor(e){this.languageIdentifier=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new b(e,t,++this._order);return this._entries.push(i),this._resolved=null,Object(s["h"])(()=>{for(let e=0;e<this._entries.length;e++)if(this._entries[e]===i){this._entries.splice(e,1),this._resolved=null;break}})}getRichEditSupport(){if(!this._resolved){const e=this._resolve();e&&(this._resolved=new f(this.languageIdentifier,e))}return this._resolved}_resolve(){if(0===this._entries.length)return null;this._entries.sort(b.cmp);const e={};for(const t of this._entries){const i=t.configuration;e.comments=i.comments||e.comments,e.brackets=i.brackets||e.brackets,e.wordPattern=i.wordPattern||e.wordPattern,e.indentationRules=i.indentationRules||e.indentationRules,e.onEnterRules=i.onEnterRules||e.onEnterRules,e.autoClosingPairs=i.autoClosingPairs||e.autoClosingPairs,e.surroundingPairs=i.surroundingPairs||e.surroundingPairs,e.autoCloseBefore=i.autoCloseBefore||e.autoCloseBefore,e.folding=i.folding||e.folding,e.__electricCharacterSupport=i.__electricCharacterSupport||e.__electricCharacterSupport}return e}}class C{constructor(){this._entries2=new Map,this._onDidChange=new n["a"],this.onDidChange=this._onDidChange.event}register(e,t,i=0){let n=this._entries2.get(e.id);n||(n=new v(e),this._entries2.set(e.id,n));const o=n.register(t,i);return this._onDidChange.fire(new _(e)),Object(s["h"])(()=>{o.dispose(),this._onDidChange.fire(new _(e))})}_getRichEditSupport(e){const t=this._entries2.get(e);return t?t.getRichEditSupport():null}getIndentationRules(e){const t=this._getRichEditSupport(e);return t&&t.indentationRules||null}_getElectricCharacterSupport(e){let t=this._getRichEditSupport(e);return t&&t.electricCharacter||null}getElectricCharacters(e){let t=this._getElectricCharacterSupport(e);return t?t.getElectricCharacters():[]}onElectricCharacter(e,t,i){let n=Object(l["a"])(t,i-1),s=this._getElectricCharacterSupport(n.languageId);return s?s.onElectricCharacter(e,n,i-n.firstCharOffset):null}getComments(e){let t=this._getRichEditSupport(e);return t&&t.comments||null}_getCharacterPairSupport(e){let t=this._getRichEditSupport(e);return t&&t.characterPair||null}getAutoClosingPairs(e){const t=this._getCharacterPairSupport(e);return new a["a"](t?t.getAutoClosingPairs():[])}getAutoCloseBeforeSet(e){let t=this._getCharacterPairSupport(e);return t?t.getAutoCloseBeforeSet():h.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED}getSurroundingPairs(e){let t=this._getCharacterPairSupport(e);return t?t.getSurroundingPairs():[]}shouldAutoClosePair(e,t,i){const n=Object(l["a"])(t,i-1);return h.shouldAutoClosePair(e,n,i-n.firstCharOffset)}getWordDefinition(e){let t=this._getRichEditSupport(e);return t?Object(r["c"])(t.wordDefinition||null):Object(r["c"])(null)}getFoldingRules(e){let t=this._getRichEditSupport(e);return t?t.foldingRules:{}}getIndentRulesSupport(e){let t=this._getRichEditSupport(e);return t&&t.indentRulesSupport||null}getPrecedingValidLine(e,t,i){let n=e.getLanguageIdAtPosition(t,0);if(t>1){let s,o=-1;for(s=t-1;s>=1;s--){if(e.getLanguageIdAtPosition(s,0)!==n)return o;let t=e.getLineContent(s);if(!i.shouldIgnore(t)&&!/^\s+$/.test(t)&&""!==t)return s;o=s}}return-1}getInheritIndentForLine(e,t,i,n=!0){if(e<4)return null;const s=this.getIndentRulesSupport(t.getLanguageIdentifier().id);if(!s)return null;if(i<=1)return{indentation:"",action:null};const r=this.getPrecedingValidLine(t,i,s);if(r<0)return null;if(r<1)return{indentation:"",action:null};const l=t.getLineContent(r);if(s.shouldIncrease(l)||s.shouldIndentNextLine(l))return{indentation:o["y"](l),action:a["b"].Indent,line:r};if(s.shouldDecrease(l))return{indentation:o["y"](l),action:null,line:r};{if(1===r)return{indentation:o["y"](t.getLineContent(r)),action:null,line:r};const e=r-1,i=s.getIndentMetadata(t.getLineContent(e));if(!(3&i)&&4&i){let i=0;for(let n=e-1;n>0;n--)if(!s.shouldIndentNextLine(t.getLineContent(n))){i=n;break}return{indentation:o["y"](t.getLineContent(i+1)),action:null,line:i+1}}if(n)return{indentation:o["y"](t.getLineContent(r)),action:null,line:r};for(let n=r;n>0;n--){const e=t.getLineContent(n);if(s.shouldIncrease(e))return{indentation:o["y"](e),action:a["b"].Indent,line:n};if(s.shouldIndentNextLine(e)){let e=0;for(let i=n-1;i>0;i--)if(!s.shouldIndentNextLine(t.getLineContent(n))){e=i;break}return{indentation:o["y"](t.getLineContent(e+1)),action:null,line:e+1}}if(s.shouldDecrease(e))return{indentation:o["y"](e),action:null,line:n}}return{indentation:o["y"](t.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(e,t,i,n,s){if(e<4)return null;const r=this._getRichEditSupport(i);if(!r)return null;const l=this.getIndentRulesSupport(i);if(!l)return null;const h=this.getInheritIndentForLine(e,t,n),c=t.getLineContent(n);if(h){const i=h.line;if(void 0!==i){const n=r.onEnter(e,"",t.getLineContent(i),"");if(n){let e=o["y"](t.getLineContent(i));return n.removeText&&(e=e.substring(0,e.length-n.removeText)),n.indentAction===a["b"].Indent||n.indentAction===a["b"].IndentOutdent?e=s.shiftIndent(e):n.indentAction===a["b"].Outdent&&(e=s.unshiftIndent(e)),l.shouldDecrease(c)&&(e=s.unshiftIndent(e)),n.appendText&&(e+=n.appendText),o["y"](e)}}return l.shouldDecrease(c)?h.action===a["b"].Indent?h.indentation:s.unshiftIndent(h.indentation):h.action===a["b"].Indent?s.shiftIndent(h.indentation):h.indentation}return null}getIndentForEnter(e,t,i,n){if(e<4)return null;t.forceTokenization(i.startLineNumber);const s=t.getLineTokens(i.startLineNumber),r=Object(l["a"])(s,i.startColumn-1),h=r.getLineContent();let c,d,u=!1;if(r.firstCharOffset>0&&s.getLanguageId(0)!==r.languageId?(u=!0,c=h.substr(0,i.startColumn-1-r.firstCharOffset)):c=s.getLineContent().substring(0,i.startColumn-1),i.isEmpty())d=h.substr(i.startColumn-1-r.firstCharOffset);else{const e=this.getScopedLineTokens(t,i.endLineNumber,i.endColumn);d=e.getLineContent().substr(i.endColumn-1-r.firstCharOffset)}const g=this.getIndentRulesSupport(r.languageId);if(!g)return null;const p=c,m=o["y"](c),f={getLineTokens:e=>t.getLineTokens(e),getLanguageIdentifier:()=>t.getLanguageIdentifier(),getLanguageIdAtPosition:(e,i)=>t.getLanguageIdAtPosition(e,i),getLineContent:e=>e===i.startLineNumber?p:t.getLineContent(e)},_=o["y"](s.getLineContent()),b=this.getInheritIndentForLine(e,f,i.startLineNumber+1);if(!b){const e=u?_:m;return{beforeEnter:e,afterEnter:e}}let v=u?_:b.indentation;return b.action===a["b"].Indent&&(v=n.shiftIndent(v)),g.shouldDecrease(d)&&(v=n.unshiftIndent(v)),{beforeEnter:u?_:m,afterEnter:v}}getIndentActionForType(e,t,i,n,s){if(e<4)return null;const o=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn);if(o.firstCharOffset)return null;const r=this.getIndentRulesSupport(o.languageId);if(!r)return null;const l=o.getLineContent(),h=l.substr(0,i.startColumn-1-o.firstCharOffset);let c;if(i.isEmpty())c=l.substr(i.startColumn-1-o.firstCharOffset);else{const e=this.getScopedLineTokens(t,i.endLineNumber,i.endColumn);c=e.getLineContent().substr(i.endColumn-1-o.firstCharOffset)}if(!r.shouldDecrease(h+c)&&r.shouldDecrease(h+n+c)){const n=this.getInheritIndentForLine(e,t,i.startLineNumber,!1);if(!n)return null;let o=n.indentation;return n.action!==a["b"].Indent&&(o=s.unshiftIndent(o)),o}return null}getIndentMetadata(e,t){const i=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return i?t<1||t>e.getLineCount()?null:i.getIndentMetadata(e.getLineContent(t)):null}getEnterAction(e,t,i){const n=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn),s=this._getRichEditSupport(n.languageId);if(!s)return null;const o=n.getLineContent(),r=o.substr(0,i.startColumn-1-n.firstCharOffset);let l;if(i.isEmpty())l=o.substr(i.startColumn-1-n.firstCharOffset);else{const e=this.getScopedLineTokens(t,i.endLineNumber,i.endColumn);l=e.getLineContent().substr(i.endColumn-1-n.firstCharOffset)}let h="";if(i.startLineNumber>1&&0===n.firstCharOffset){const e=this.getScopedLineTokens(t,i.startLineNumber-1);e.languageId===n.languageId&&(h=e.getLineContent())}const c=s.onEnter(e,h,r,l);if(!c)return null;const d=c.indentAction;let u=c.appendText;const g=c.removeText||0;u?d===a["b"].Indent&&(u="\t"+u):u=d===a["b"].Indent||d===a["b"].IndentOutdent?"\t":"";let p=this.getIndentationAtPosition(t,i.startLineNumber,i.startColumn);return g&&(p=p.substring(0,p.length-g)),{indentAction:d,appendText:u,removeText:g,indentation:p}}getIndentationAtPosition(e,t,i){const n=e.getLineContent(t);let s=o["y"](n);return s.length>i-1&&(s=s.substring(0,i-1)),s}getScopedLineTokens(e,t,i){e.forceTokenization(t);const n=e.getLineTokens(t),s="undefined"===typeof i?e.getLineMaxColumn(t)-1:i-1;return Object(l["a"])(n,s)}getBracketsSupport(e){const t=this._getRichEditSupport(e);return t&&t.brackets||null}}const w=new C},7257:function(e,t,i){"use strict";i.r(t);var n=i("fa12");Object(n["a"])({id:"javascript",extensions:[".js",".es6",".jsx",".mjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:function(){return i.e("chunk-7532b3ea").then(i.bind(null,"ed79"))}})},"725e":function(e,t,i){},"72a7":function(e,t,i){"use strict";i.d(t,"e",(function(){return k})),i.d(t,"f",(function(){return E})),i.d(t,"a",(function(){return O})),i.d(t,"h",(function(){return M})),i.d(t,"g",(function(){return A})),i.d(t,"d",(function(){return P})),i.d(t,"b",(function(){return B})),i.d(t,"c",(function(){return G}));i("e2b8");var n=i("a666"),s=i("ef8e"),o=i("e8e3"),r=i("6424"),a=i("30db"),l=i("a60f"),h=i("b835"),c=i("308f"),d=i("e32d");class u extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}var g=i("7de1"),p=i("ceb8"),m=i("aa3d");class f{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach(n=>n.splice(e,t,i))}}var _,b=i("49d9"),v=i("7e93"),C=i("3813"),w=i("11f7"),S=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};class y{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return"template:"+this.trait.trait}renderTemplate(e){return e}renderElement(e,t,i){const n=this.renderedElements.findIndex(e=>e.templateData===i);if(n>=0){const e=this.renderedElements[n];this.trait.unrender(i),e.index=t}else{const e={index:t,templateData:i};this.renderedElements.push(e)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const s of this.renderedElements)s.index<e?n.push(s):s.index>=e+t&&n.push({index:s.index+i-t,templateData:s.templateData});this.renderedElements=n}renderIndexes(e){for(const{index:t,templateData:i}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,i)}disposeTemplate(e){const t=this.renderedElements.findIndex(t=>t.templateData===e);t<0||this.renderedElements.splice(t,1)}}class D{constructor(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new c["a"],this.onChange=this._onChange.event}get trait(){return this._trait}get renderer(){return new y(this)}splice(e,t,i){const n=i.length-t,s=e+t,o=[...this.sortedIndexes.filter(t=>t<e),...i.map((t,i)=>t?i+e:-1).filter(e=>-1!==e),...this.sortedIndexes.filter(e=>e>=s).map(e=>e+n)];this.renderer.splice(e,t,i.length),this._set(o,o)}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(U),t)}_set(e,t,i){const n=this.indexes,s=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const o=H(s,e);return this.renderer.renderIndexes(o),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return Object(o["c"])(this.sortedIndexes,e,U)>=0}dispose(){Object(n["f"])(this._onChange)}}S([r["a"]],D.prototype,"renderer",null);class L extends D{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class x{constructor(e,t,i){this.trait=e,this.view=t,this.identityProvider=i}splice(e,t,i){if(!this.identityProvider)return this.trait.splice(e,t,i.map(()=>!1));const n=this.trait.get().map(e=>this.identityProvider.getId(this.view.element(e)).toString()),s=i.map(e=>n.indexOf(this.identityProvider.getId(e).toString())>-1);this.trait.splice(e,t,s)}}function k(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function E(e){return!!e.classList.contains("monaco-editor")||!e.classList.contains("monaco-list")&&(!!e.parentElement&&E(e.parentElement))}class N{constructor(e,t,i){this.list=e,this.view=t,this.disposables=new n["b"];const s=!1!==i.multipleSelectionSupport,o=c["b"].chain(Object(d["a"])(t.domNode,"keydown")).filter(e=>!k(e.target)).map(e=>new h["a"](e));o.filter(e=>3===e.keyCode).on(this.onEnter,this,this.disposables),o.filter(e=>16===e.keyCode).on(this.onUpArrow,this,this.disposables),o.filter(e=>18===e.keyCode).on(this.onDownArrow,this,this.disposables),o.filter(e=>11===e.keyCode).on(this.onPageUpArrow,this,this.disposables),o.filter(e=>12===e.keyCode).on(this.onPageDownArrow,this,this.disposables),o.filter(e=>9===e.keyCode).on(this.onEscape,this,this.disposables),s&&o.filter(e=>(a["f"]?e.metaKey:e.ctrlKey)&&31===e.keyCode).on(this.onCtrlA,this,this.disposables)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(Object(o["r"])(this.list.length),e.browserEvent),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.view.domNode.focus())}dispose(){this.disposables.dispose()}}(function(e){e[e["Idle"]=0]="Idle",e[e["Typing"]=1]="Typing"})(_||(_={}));const O=new class{mightProducePrintableCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30||e.keyCode>=93&&e.keyCode<=102||e.keyCode>=80&&e.keyCode<=90)}};class I{constructor(e,t,i,s){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.delegate=s,this.enabled=!1,this.state=_.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new n["b"],this.disposables=new n["b"],this.updateOptions(e.options)}updateOptions(e){const t="undefined"===typeof e.enableKeyboardNavigation||!!e.enableKeyboardNavigation;t?this.enable():this.disable(),"undefined"!==typeof e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation)}enable(){if(this.enabled)return;const e=c["b"].chain(Object(d["a"])(this.view.domNode,"keydown")).filter(e=>!k(e.target)).filter(()=>this.automaticKeyboardNavigation||this.triggered).map(e=>new h["a"](e)).filter(e=>this.delegate.mightProducePrintableCharacter(e)).forEach(e=>{e.stopPropagation(),e.preventDefault()}).map(e=>e.browserEvent.key).event,t=c["b"].debounce(e,()=>null,800),i=c["b"].reduce(c["b"].any(e,t),(e,t)=>null===t?null:(e||"")+t);i(this.onInput,this,this.enabledDisposables),t(this.onClear,this,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const i=null===(e=this.list.options.accessibilityProvider)||void 0===e?void 0:e.getAriaLabel(this.list.element(t[0]));i&&Object(C["a"])(i)}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=_.Idle,void(this.triggered=!1);const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===_.Idle?1:0;this.state=_.Typing;for(let s=0;s<this.list.length;s++){const t=(i+s+n)%this.list.length,o=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(t)),r=o&&o.toString();if("undefined"===typeof r||Object(v["g"])(e,r))return this.previouslyFocused=i,this.list.setFocus([t]),void this.list.reveal(t)}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class T{constructor(e,t){this.list=e,this.view=t,this.disposables=new n["b"];const i=c["b"].chain(Object(d["a"])(t.domNode,"keydown")).filter(e=>!k(e.target)).map(e=>new h["a"](e));i.filter(e=>2===e.keyCode&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey).on(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(0===t.length)return;const i=this.view.domElement(t[0]);if(!i)return;const n=i.querySelector("[tabIndex]");if(!n||!(n instanceof HTMLElement)||-1===n.tabIndex)return;const s=window.getComputedStyle(n);"hidden"!==s.visibility&&"none"!==s.display&&(e.preventDefault(),e.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}}function M(e){return a["f"]?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function A(e){return e.browserEvent.shiftKey}function R(e){return e instanceof MouseEvent&&2===e.button}const F={isSelectionSingleChangeEvent:M,isSelectionRangeChangeEvent:A};class P{constructor(e){this.list=e,this.disposables=new n["b"],this._onPointer=new c["a"],this.onPointer=this._onPointer.event,this.multipleSelectionSupport=!(!1===e.options.multipleSelectionSupport),this.multipleSelectionSupport&&(this.multipleSelectionController=e.options.multipleSelectionController||F),this.mouseSupport="undefined"===typeof e.options.mouseSupport||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(l["b"].addTarget(e.getHTMLElement()))),c["b"].any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):a["f"]?e.browserEvent.metaKey:e.browserEvent.ctrlKey}isSelectionRangeChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):e.browserEvent.shiftKey}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){E(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(E(e.browserEvent.target))return;const t="undefined"===typeof e.index?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport)return;if(k(e.browserEvent.target)||E(e.browserEvent.target))return;let t=this.list.getFocus()[0];const i=this.list.getSelection();t=void 0===t?i[0]:t;const n=e.index;return"undefined"===typeof n?(this.list.setFocus([],e.browserEvent),void this.list.setSelection([],e.browserEvent)):this.multipleSelectionSupport&&this.isSelectionRangeChangeEvent(e)||this.multipleSelectionSupport&&this.isSelectionChangeEvent(e)?this.changeSelection(e,t):(this.list.setFocus([n],e.browserEvent),R(e.browserEvent)||this.list.setSelection([n],e.browserEvent),void this._onPointer.fire(e))}onDoubleClick(e){if(k(e.browserEvent.target)||E(e.browserEvent.target))return;if(this.multipleSelectionSupport&&this.isSelectionChangeEvent(e))return;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e,t){const i=e.index;if(this.isSelectionRangeChangeEvent(e)&&void 0!==t){const n=Math.min(t,i),s=Math.max(t,i),r=Object(o["r"])(n,s+1),a=this.list.getSelection(),l=j(H(a,[t]),t);if(0===l.length)return;const h=H(r,z(a,l));this.list.setSelection(h,e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const t=this.list.getSelection(),n=t.filter(e=>e!==i);this.list.setFocus([i]),t.length===n.length?this.list.setSelection([...n,i],e.browserEvent):this.list.setSelection(n,e.browserEvent)}}dispose(){this.disposables.dispose()}}class B{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&"."+this.selectorSuffix,i=[];e.listBackground&&(e.listBackground.isOpaque()?i.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`):a["f"]||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),e.listFocusBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listFocusAndSelectionBackground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`),e.listFocusAndSelectionForeground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`),e.listInactiveFocusForeground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { color:  ${e.listInactiveFocusForeground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { color:  ${e.listInactiveFocusForeground}; }`)),e.listInactiveFocusBackground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { background-color:  ${e.listInactiveFocusBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color:  ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(i.push(`.monaco-list${t} .monaco-list-row.selected { background-color:  ${e.listInactiveSelectionBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color:  ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&i.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&i.push(`.monaco-list${t}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&i.push(`.monaco-list${t} .monaco-list-row:hover:not(.selected):not(.focused) { color:  ${e.listHoverForeground}; }`),e.listSelectionOutline&&i.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listFocusOutline&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`),e.listInactiveFocusOutline&&i.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&i.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&i.push(`\n\t\t\t\t.monaco-list${t}.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; }\n\t\t\t`),e.listFilterWidgetBackground&&i.push(`.monaco-list-type-filter { background-color: ${e.listFilterWidgetBackground} }`),e.listFilterWidgetOutline&&i.push(`.monaco-list-type-filter { border: 1px solid ${e.listFilterWidgetOutline}; }`),e.listFilterWidgetNoMatchesOutline&&i.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${e.listFilterWidgetNoMatchesOutline}; }`),e.listMatchesShadow&&i.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${e.listMatchesShadow}; }`),e.tableColumnsBorder&&i.push(`\n\t\t\t\t.monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${e.tableColumnsBorder};\n\t\t\t}`),this.styleElement.textContent=i.join("\n")}}const W={listFocusBackground:p["a"].fromHex("#7FB0D0"),listActiveSelectionBackground:p["a"].fromHex("#0E639C"),listActiveSelectionForeground:p["a"].fromHex("#FFFFFF"),listFocusAndSelectionBackground:p["a"].fromHex("#094771"),listFocusAndSelectionForeground:p["a"].fromHex("#FFFFFF"),listInactiveSelectionBackground:p["a"].fromHex("#3F3F46"),listHoverBackground:p["a"].fromHex("#2A2D2E"),listDropBackground:p["a"].fromHex("#383B3D"),treeIndentGuidesStroke:p["a"].fromHex("#a9a9a9"),tableColumnsBorder:p["a"].fromHex("#cccccc").transparent(.2)},V={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}}};function j(e,t){const i=e.indexOf(t);if(-1===i)return[];const n=[];let s=i-1;while(s>=0&&e[s]===t-(i-s))n.push(e[s--]);n.reverse(),s=i;while(s<e.length&&e[s]===t+(s-i))n.push(e[s++]);return n}function H(e,t){const i=[];let n=0,s=0;while(n<e.length||s<t.length)if(n>=e.length)i.push(t[s++]);else if(s>=t.length)i.push(e[n++]);else{if(e[n]===t[s]){i.push(e[n]),n++,s++;continue}e[n]<t[s]?i.push(e[n++]):i.push(t[s++])}return i}function z(e,t){const i=[];let n=0,s=0;while(n<e.length||s<t.length)if(n>=e.length)i.push(t[s++]);else if(s>=t.length)i.push(e[n++]);else{if(e[n]===t[s]){n++,s++;continue}e[n]<t[s]?i.push(e[n++]):s++}return i}const U=(e,t)=>e-t;class K{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map(t=>t.renderTemplate(e))}renderElement(e,t,i,n){let s=0;for(const o of this.renderers)o.renderElement(e,t,i[s++],n)}disposeElement(e,t,i,n){let s=0;for(const o of this.renderers)o.disposeElement&&o.disposeElement(e,t,i[s],n),s+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class ${constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e);n?i.setAttribute("aria-label",n):i.removeAttribute("aria-label");const s=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"===typeof s?i.setAttribute("aria-level",""+s):i.removeAttribute("aria-level")}disposeTemplate(e){}}class q{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements(),i=t.indexOf(e)>-1?t:[e];return i}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(e,t)}onDragOver(e,t,i,n){return this.dnd.onDragOver(e,t,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}drop(e,t,i,n){this.dnd.drop(e,t,i,n)}}class G{constructor(e,t,i,s,o=V){var r;this.user=e,this._options=o,this.eventBufferer=new c["c"],this._ariaLabel="",this.disposables=new n["b"],this._onDidDispose=new c["a"],this.onDidDispose=this._onDidDispose.event;const a=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?null===(r=this._options.accessibilityProvider)||void 0===r?void 0:r.getWidgetRole():"list";this.selection=new L("listbox"!==a),this.focus=new D("focused"),Object(m["f"])(o,W,!1);const l=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=o.accessibilityProvider,this.accessibilityProvider&&(l.push(new $(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),s=s.map(e=>new K(e.templateId,[...l,e]));const h=Object.assign(Object.assign({},o),{dnd:o.dnd&&new q(this,o.dnd)});if(this.view=new g["b"](t,i,s,h),this.view.domNode.setAttribute("role",a),o.styleController)this.styleController=o.styleController(this.view.domId);else{const e=Object(w["s"])(this.view.domNode);this.styleController=new B(e,this.view.domId)}if(this.spliceable=new f([new x(this.focus,this.view,o.identityProvider),new x(this.selection,this.view,o.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.onDidFocus=c["b"].map(Object(d["a"])(this.view.domNode,"focus",!0),()=>null),this.onDidBlur=c["b"].map(Object(d["a"])(this.view.domNode,"blur",!0),()=>null),this.disposables.add(new T(this,this.view)),"boolean"!==typeof o.keyboardSupport||o.keyboardSupport){const e=new N(this,this.view,o);this.disposables.add(e)}if(o.keyboardNavigationLabelProvider){const e=o.keyboardNavigationDelegate||O;this.typeLabelController=new I(this,this.view,o.keyboardNavigationLabelProvider,e),this.disposables.add(this.typeLabelController)}this.mouseController=this.createMouseController(o),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),o.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}get onDidChangeFocus(){return c["b"].map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e))}get onDidChangeSelection(){return c["b"].map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e))}get domId(){return this.view.domId}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=c["b"].chain(Object(d["a"])(this.view.domNode,"keydown")).map(e=>new h["a"](e)).filter(t=>e=58===t.keyCode||t.shiftKey&&68===t.keyCode).map(d["b"]).filter(()=>!1).event,i=c["b"].chain(Object(d["a"])(this.view.domNode,"keyup")).forEach(()=>e=!1).map(e=>new h["a"](e)).filter(e=>58===e.keyCode||e.shiftKey&&68===e.keyCode).map(d["b"]).map(({browserEvent:e})=>{const t=this.getFocus(),i=t.length?t[0]:void 0,n="undefined"!==typeof i?this.view.element(i):void 0,s="undefined"!==typeof i?this.view.domElement(i):this.view.domNode;return{index:i,element:n,anchor:s,browserEvent:e}}).event,n=c["b"].chain(this.view.onContextMenu).filter(t=>!e).map(({element:e,index:t,browserEvent:i})=>({element:e,index:t,anchor:{x:i.clientX+1,y:i.clientY},browserEvent:i})).event;return c["b"].any(t,i,n)}get onKeyDown(){return Object(d["a"])(this.view.domNode,"keydown")}createMouseController(e){return new P(this)}updateOptions(e={}){this._options=Object.assign(Object.assign({},this._options),e),this.typeLabelController&&this.typeLabelController.updateOptions(this._options),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new u(this.user,"Invalid start index: "+e);if(t<0)throw new u(this.user,"Invalid delete count: "+t);0===t&&0===i.length||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(e,t,i))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const i of e)if(i<0||i>=this.length)throw new u(this.user,"Invalid index "+i);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(e=>this.view.element(e))}setFocus(e,t){for(const i of e)if(i<0||i>=this.length)throw new u(this.user,"Invalid index "+i);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(0===this.length)return;const s=this.focus.get(),o=this.findNextIndex(s.length>0?s[0]+e:0,t,n);o>-1&&this.setFocus([o],i)}focusPrevious(e=1,t=!1,i,n){if(0===this.length)return;const s=this.focus.get(),o=this.findPreviousIndex(s.length>0?s[0]-e:0,t,n);o>-1&&this.setFocus([o],i)}focusNextPage(e,t){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;const n=this.view.element(i),s=this.getFocusedElements()[0];if(s!==n){const n=this.findPreviousIndex(i,!1,t);n>-1&&s!==this.view.element(n)?this.setFocus([n],e):this.setFocus([i],e)}else{const n=this.view.getScrollTop();this.view.setScrollTop(n+this.view.renderHeight-this.view.elementHeight(i)),this.view.getScrollTop()!==n&&(this.setFocus([]),setTimeout(()=>this.focusNextPage(e,t),0))}}focusPreviousPage(e,t){let i;const n=this.view.getScrollTop();i=0===n?this.view.indexAt(n):this.view.indexAfter(n-1);const s=this.view.element(i),o=this.getFocusedElements()[0];if(o!==s){const n=this.findNextIndex(i,!1,t);n>-1&&o!==this.view.element(n)?this.setFocus([n],e):this.setFocus([i],e)}else{const i=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==i&&(this.setFocus([]),setTimeout(()=>this.focusPreviousPage(e,t),0))}}focusLast(e,t){if(0===this.length)return;const i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(0===this.length)return;const n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n<this.length;n++){if(e>=this.length&&!t)return-1;if(e%=this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;n<this.length;n++){if(e<0&&!t)return-1;if(e=(this.length+e%this.length)%this.length,!i||i(this.element(e)))return e;e--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map(e=>this.view.element(e))}reveal(e,t){if(e<0||e>=this.length)throw new u(this.user,"Invalid index "+e);const i=this.view.getScrollTop(),n=this.view.elementTop(e),o=this.view.elementHeight(e);if(Object(s["g"])(t)){const e=o-this.view.renderHeight;this.view.setScrollTop(e*Object(b["b"])(t,0,1)+n)}else{const e=n+o,t=i+this.view.renderHeight;n<i&&e>=t||(n<i?this.view.setScrollTop(n):e>=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getRelativeTop(e){if(e<0||e>=this.length)throw new u(this.user,"Invalid index "+e);const t=this.view.getScrollTop(),i=this.view.elementTop(e),n=this.view.elementHeight(e);if(i<t||i+n>t+this.view.renderHeight)return null;const s=n-this.view.renderHeight;return Math.abs((t-i)/s)}getHTMLElement(){return this.view.domNode}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map(e=>this.view.element(e)),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const t=this.focus.get();if(t.length>0){let i;(null===(e=this.accessibilityProvider)||void 0===e?void 0:e.getActiveDescendantId)&&(i=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",i||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",0===e.length),this.view.domNode.classList.toggle("selection-single",1===e.length),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}S([r["a"]],G.prototype,"onDidChangeFocus",null),S([r["a"]],G.prototype,"onDidChangeSelection",null),S([r["a"]],G.prototype,"onContextMenu",null)},7367:function(e,t,i){"use strict";i.r(t),i.d(t,"htmlDefaults",(function(){return g})),i.d(t,"handlebarDefaults",(function(){return p})),i.d(t,"razorDefaults",(function(){return m}));i("33f9");var n=i("3502"),s=function(){function e(e,t,i){this._onDidChange=new n["Emitter"],this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),e.prototype.setOptions=function(e){this._options=e||Object.create(null),this._onDidChange.fire(this)},e.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},e}(),o={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:null,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},r={format:o,suggest:{html5:!0,angular1:!0,ionic:!0}},a={format:o,suggest:{html5:!0}},l={format:o,suggest:{html5:!0,razor:!0}};function h(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===c,documentFormattingEdits:e===c,documentRangeFormattingEdits:e===c}}var c="html",d="handlebars",u="razor",g=new s(c,r,h(c)),p=new s(d,a,h(d)),m=new s(u,l,h(u));function f(){return i.e("chunk-30597b4a").then(i.bind(null,"fa5b"))}n["languages"].html={htmlDefaults:g,razorDefaults:m,handlebarDefaults:p},n["languages"].onLanguage(c,(function(){f().then((function(e){return e.setupMode(g)}))})),n["languages"].onLanguage(d,(function(){f().then((function(e){return e.setupMode(p)}))})),n["languages"].onLanguage(u,(function(){f().then((function(e){return e.setupMode(m)}))}))},7416:function(e,t,i){"use strict";i.d(t,"a",(function(){return s})),i.d(t,"b",(function(){return a}));var n=i("3742");class s{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const i=e.length,n=t.length;if(i!==n)return!1;for(let o=0;o<i;o++)if(!s._equals(e[o],t[o]))return!1;return!0}static extractWrapped(e,t,i){if(0===e.length)return e;const n=t+1,o=i+1,r=i-t,a=[];let l=0;for(const h of e)h.endColumn<=n||h.startColumn>=o||(a[l++]=new s(Math.max(1,h.startColumn-n+1),Math.min(r+1,h.endColumn-n+1),h.className,h.type));return a}static filter(e,t,i,n){if(0===e.length)return[];let o=[],r=0;for(let a=0,l=e.length;a<l;a++){const l=e[a],h=l.range;if(h.endLineNumber<t||h.startLineNumber>t)continue;if(h.isEmpty()&&(0===l.type||3===l.type))continue;const c=h.startLineNumber===t?h.startColumn:i,d=h.endLineNumber===t?h.endColumn:n;o[r++]=new s(c,d,l.inlineClassName,l.type)}return o}static _typeCompare(e,t){const i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn===t.startColumn){if(e.endColumn===t.endColumn){const i=s._typeCompare(e.type,t.type);return 0===i?e.className<t.className?-1:e.className>t.className?1:0:i}return e.endColumn-t.endColumn}return e.startColumn-t.startColumn}}class o{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.className=i,this.metadata=n}}class r{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(e){let t=0;for(let i=0,n=e.length;i<n;i++)t|=e[i];return t}consumeLowerThan(e,t,i){while(this.count>0&&this.stopOffsets[0]<e){let e=0;while(e+1<this.count&&this.stopOffsets[e]===this.stopOffsets[e+1])e++;i.push(new o(t,this.stopOffsets[e],this.classNames.join(" "),r._metadata(this.metadata))),t=this.stopOffsets[e]+1,this.stopOffsets.splice(0,e+1),this.classNames.splice(0,e+1),this.metadata.splice(0,e+1),this.count-=e+1}return this.count>0&&t<e&&(i.push(new o(t,e-1,this.classNames.join(" "),r._metadata(this.metadata))),t=e),t}insert(e,t,i){if(0===this.count||this.stopOffsets[this.count-1]<=e)this.stopOffsets.push(e),this.classNames.push(t),this.metadata.push(i);else for(let n=0;n<this.count;n++)if(this.stopOffsets[n]>=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class a{static normalize(e,t){if(0===t.length)return[];let i=[];const s=new r;let o=0;for(let r=0,a=t.length;r<a;r++){const a=t[r];let l=a.startColumn,h=a.endColumn;const c=a.className,d=1===a.type?2:2===a.type?4:0;if(l>1){const t=e.charCodeAt(l-2);n["E"](t)&&l--}if(h>1){const t=e.charCodeAt(h-2);n["E"](t)&&h--}const u=l-1,g=h-2;o=s.consumeLowerThan(u,o,i),0===s.count&&(o=u),s.insert(g,c,d)}return s.consumeLowerThan(1073741824,o,i),i}}},7457:function(e,t,i){},"782d":function(e,t,i){},"7a2c":function(e,t,i){},"7a9e":function(e,t,i){"use strict";i.r(t),i.d(t,"SuggestController",(function(){return Kn})),i.d(t,"TriggerSuggestAction",(function(){return $n}));var n=i("3813"),s=i("e8e3"),o=i("fdcc"),r=i("fe45"),a=i("a666"),l=i("bc04"),h=i("b2cc"),c=i("d3f4"),d=i("6a89"),u=i("c101"),g=i("8025"),p=i("b707"),m=i("7061"),f=i("4fc3"),_=i("2504"),b=i("7e93"),v=i("7e32");class C{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let e,t=this.pos,i=0,n=this.value.charCodeAt(t);if(e=C._table[n],"number"===typeof e)return this.pos+=1,{type:e,pos:t,len:1};if(C.isDigitCharacter(n)){e=8;do{i+=1,n=this.value.charCodeAt(t+i)}while(C.isDigitCharacter(n));return this.pos+=i,{type:e,pos:t,len:i}}if(C.isVariableCharacter(n)){e=9;do{n=this.value.charCodeAt(t+ ++i)}while(C.isVariableCharacter(n)||C.isDigitCharacter(n));return this.pos+=i,{type:e,pos:t,len:i}}e=10;do{i+=1,n=this.value.charCodeAt(t+i)}while(!isNaN(n)&&"undefined"===typeof C._table[n]&&!C.isDigitCharacter(n)&&!C.isVariableCharacter(n));return this.pos+=i,{type:e,pos:t,len:i}}}C._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13};class w{constructor(){this._children=[]}appendChild(e){return e instanceof S&&this._children[this._children.length-1]instanceof S?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),s=i.children.slice(0);s.splice(n,1,...t),i._children=s,function e(t,i){for(const n of t)n.parent=i,e(n.children,n)}(t,i)}get children(){return this._children}get snippet(){let e=this;while(1){if(!e)return;if(e instanceof O)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}}class S extends w{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new S(this.value)}}class y extends w{}class D extends y{constructor(e){super(),this.index=e}static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.index<t.index?-1:e.index>t.index?1:0}get isFinalTabstop(){return 0===this.index}get choice(){return 1===this._children.length&&this._children[0]instanceof L?this._children[0]:void 0}clone(){let e=new D(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(e=>e.clone()),e}}class L extends w{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof S&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let e=new L;return this.options.forEach(e.appendChild,e),e}}class x extends w{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,(function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))}));return!i&&this._children.some(e=>e instanceof k&&Boolean(e.elseValue))&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof k){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){let e=new x;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(e=>e.clone()),e}}class k extends w{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":"pascalcase"===this.shorthandName?e?this._toPascalCase(e):"":Boolean(e)&&"string"===typeof this.ifValue?this.ifValue:Boolean(e)||"string"!==typeof this.elseValue?e||"":this.elseValue}_toPascalCase(e){const t=e.match(/[a-z]+/gi);return t?t.map((function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})).join(""):e}clone(){let e=new k(this.index,this.shorthandName,this.ifValue,this.elseValue);return e}}class E extends y{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new S(t)],!0)}clone(){const e=new E(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(e=>e.clone()),e}}function N(e,t){const i=[...e];while(i.length>0){const e=i.shift(),n=t(e);if(!n)break;i.unshift(...e.children)}}class O extends w{get placeholderInfo(){if(!this._placeholders){let e,t=[];this.walk((function(i){return i instanceof D&&(t.push(i),e=!e||e.index<i.index?i:e),!0})),this._placeholders={all:t,last:e}}return this._placeholders}get placeholders(){const{all:e}=this.placeholderInfo;return e}offset(e){let t=0,i=!1;return this.walk(n=>n===e?(i=!0,!1):(t+=n.len(),!0)),i?t:-1}fullLen(e){let t=0;return N([e],e=>(t+=e.len(),!0)),t}enclosingPlaceholders(e){let t=[],{parent:i}=e;while(i)i instanceof D&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof E&&t.resolve(e)&&(this._placeholders=void 0),!0)),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){let e=new O;return this._children=this.children.map(e=>e.clone()),e}walk(e){N(this.children,e)}}class I{constructor(){this._scanner=new C,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){this._scanner.text(e),this._token=this._scanner.next();const n=new O;while(this._parse(n));const s=new Map,o=[];let r=0;n.walk(e=>(e instanceof D&&(r+=1,e.isFinalTabstop?s.set(0,void 0):!s.has(e.index)&&e.children.length>0?s.set(e.index,e.children):o.push(e)),!0));for(const a of o){const e=s.get(a.index);if(e){const t=new D(a.index);t.transform=a.transform;for(const i of e)t.appendChild(i.clone());n.replace(a,[t])}}return i||(i=r>0&&t),!s.has(0)&&i&&n.appendChild(new D(0)),n}_accept(e,t){if(void 0===e||this._token.type===e){let e=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),e}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;while(this._token.type!==e){if(14===this._token.type)return!1;if(5===this._token.type){const e=this._scanner.next();if(0!==e.type&&4!==e.type&&5!==e.type)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return!!(t=this._accept(5,!0))&&(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new S(t)),!0)}_parseTabstopOrVariableName(e){let t;const i=this._token,n=this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0));return n?(e.appendChild(/^\d+$/.test(t)?new D(Number(t)):new E(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token,n=this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0));if(!n)return this._backTo(i);const s=new D(Number(t));if(this._accept(1))while(1){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new S("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else{if(!(s.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i);{const t=new L;while(1){if(this._parseChoiceElement(t)){if(this._accept(2))continue;if(this._accept(7)&&(s.appendChild(t),this._accept(4)))return e.appendChild(s),!0}return this._backTo(i),!1}}}}_parseChoiceElement(e){const t=this._token,i=[];while(1){if(2===this._token.type||7===this._token.type)break;let e;if(e=(e=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||e:this._accept(void 0,!0),!e)return this._backTo(t),!1;i.push(e)}return 0===i.length?(this._backTo(t),!1):(e.appendChild(new S(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token,n=this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0));if(!n)return this._backTo(i);const s=new E(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i);while(1){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new S("${"+t+":")),s.children.forEach(e.appendChild,e),!0}}_parseTransform(e){let t=new x,i="",n="";while(1){if(this._accept(6))break;let e;if(e=this._accept(5,!0))e=this._accept(6,!0)||e,i+=e;else{if(14===this._token.type)return!1;i+=this._accept(void 0,!0)}}while(1){if(this._accept(6))break;let e;if(e=this._accept(5,!0))e=this._accept(5,!0)||this._accept(6,!0)||e,t.appendChild(new S(e));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}while(1){if(this._accept(4))break;if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}try{t.regexp=new RegExp(i,n)}catch(s){return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);let n=this._accept(8,!0);if(!n)return this._backTo(t),!1;if(!i)return e.appendChild(new k(Number(n))),!0;if(this._accept(4))return e.appendChild(new k(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){let i=this._accept(9,!0);return i&&this._accept(4)?(e.appendChild(new k(Number(n),i)),!0):(this._backTo(t),!1)}if(this._accept(11)){let t=this._until(4);if(t)return e.appendChild(new k(Number(n),void 0,t,void 0)),!0}else if(this._accept(12)){let t=this._until(4);if(t)return e.appendChild(new k(Number(n),void 0,void 0,t)),!0}else if(this._accept(13)){let t=this._until(1);if(t){let i=this._until(4);if(i)return e.appendChild(new k(Number(n),void 0,t,i)),!0}}else{let t=this._until(4);if(t)return e.appendChild(new k(Number(n),void 0,void 0,t)),!0}return this._backTo(t),!1}_parseAnything(e){return 14!==this._token.type&&(e.appendChild(new S(this._scanner.tokenText(this._token))),this._accept(void 0),!0)}}var T=i("e58e"),M=i("9e74"),A=i("ef8e"),R=i("6d8e"),F=i("b78f"),P=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const B={Visible:new f["c"]("suggestWidgetVisible",!1),DetailsVisible:new f["c"]("suggestWidgetDetailsVisible",!1),MultipleSuggestions:new f["c"]("suggestWidgetMultipleSuggestions",!1),MakesTextEdit:new f["c"]("suggestionMakesTextEdit",!0),AcceptSuggestionsOnEnter:new f["c"]("acceptSuggestionOnEnter",!0),HasInsertAndReplaceRange:new f["c"]("suggestionHasInsertAndReplaceRange",!1),InsertMode:new f["c"]("suggestionInsertMode",void 0),CanResolve:new f["c"]("suggestionCanResolve",!1)},W=new v["b"]("suggestWidgetStatusBar");class V{constructor(e,t,i,n){this.position=e,this.completion=t,this.container=i,this.provider=n,this.isInvalid=!1,this.score=b["a"].Default,this.distance=0,this.textLabel="string"===typeof t.label?t.label:t.label.name,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),d["a"].isIRange(t.range)?(this.editStart=new m["a"](t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new m["a"](t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new m["a"](t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||d["a"].spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new m["a"](t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new m["a"](t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new m["a"](t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||d["a"].spansMultipleLines(t.range.insert)||d["a"].spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),"function"!==typeof n.resolveCompletionItem&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return P(this,void 0,void 0,(function*(){if(!this._resolveCache){const t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(e=>{Object.assign(this.completion,e),this._isResolved=!0,t.dispose()},e=>{Object(o["d"])(e)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache}))}}class j{constructor(e=2,t=new Set,i=new Set){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i}}let H;function z(){return H}j.default=new j;class U{constructor(e,t,i,n){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=n}}function K(e,t,i=j.default,n={triggerKind:0},s=_["a"].None){return P(this,void 0,void 0,(function*(){const r=new T["a"](!0);t=t.clone();const l=e.getWordAtPosition(t),h=l?new d["a"](t.lineNumber,l.startColumn,t.lineNumber,l.endColumn):d["a"].fromPositions(t),c={replace:h,insert:h.setEndPosition(t.lineNumber,t.column)},u=[],g=new a["b"],m=[];let f=!1;const _=(e,n,s)=>{var o,r;if(n){for(let s of n.suggestions)i.kindFilter.has(s.kind)||(s.range||(s.range=c),s.sortText||(s.sortText="string"===typeof s.label?s.label:s.label.name),!f&&s.insertTextRules&&4&s.insertTextRules&&(f=I.guessNeedsClipboard(s.insertText)),u.push(new V(t,s,n,e)));Object(a["g"])(n)&&g.add(n),m.push({providerName:null!==(o=e._debugDisplayName)&&void 0!==o?o:"unkown_provider",elapsedProvider:null!==(r=n.duration)&&void 0!==r?r:-1,elapsedOverall:s.elapsed()})}},b=(()=>P(this,void 0,void 0,(function*(){if(!H||i.kindFilter.has(27))return;if(i.providerFilter.size>0&&!i.providerFilter.has(H))return;const o=new T["a"](!0),r=yield H.provideCompletionItems(e,t,n,s);_(H,r,o)})))();for(let a of p["d"].orderedGroups(e)){let r=u.length;if(yield Promise.all(a.map(r=>P(this,void 0,void 0,(function*(){if(!(i.providerFilter.size>0)||i.providerFilter.has(r))try{const i=new T["a"](!0),o=yield r.provideCompletionItems(e,t,n,s);_(r,o,i)}catch(a){Object(o["f"])(a)}})))),r!==u.length||s.isCancellationRequested)break}return yield b,s.isCancellationRequested?(g.dispose(),Promise.reject(Object(o["a"])())):new U(u.sort(Z(i.snippetSortOrder)),f,{entries:m,elapsed:r.elapsed()},g)}))}function $(e,t){if(e.sortTextLow&&t.sortTextLow){if(e.sortTextLow<t.sortTextLow)return-1;if(e.sortTextLow>t.sortTextLow)return 1}return e.completion.label<t.completion.label?-1:e.completion.label>t.completion.label?1:e.completion.kind-t.completion.kind}function q(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return $(e,t)}function G(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return $(e,t)}const Y=new Map;function Z(e){return Y.get(e)}Y.set(0,q),Y.set(2,G),Y.set(1,$),M["a"].registerCommand("_executeCompletionItemProvider",(e,...t)=>P(void 0,void 0,void 0,(function*(){const[i,n,s,o]=t;Object(A["a"])(R["a"].isUri(i)),Object(A["a"])(m["a"].isIPosition(n)),Object(A["a"])("string"===typeof s||!s),Object(A["a"])("number"===typeof o||!o);const r=yield e.get(F["a"]).createModelReference(i);try{const e={incomplete:!1,suggestions:[]},t=[],i=yield K(r.object.textEditorModel,m["a"].lift(n),void 0,{triggerCharacter:s,triggerKind:s?1:0});for(const n of i.items)t.length<(null!==o&&void 0!==o?o:0)&&t.push(n.resolve(_["a"].None)),e.incomplete=e.incomplete||n.container.incomplete,e.suggestions.push(n.completion);try{return yield Promise.all(t),e}finally{setTimeout(()=>i.disposable.dispose(),100)}}finally{r.dispose()}})));const X=new class{constructor(){this.onlyOnceSuggestions=[]}provideCompletionItems(){let e=this.onlyOnceSuggestions.slice(0),t={suggestions:e};return this.onlyOnceSuggestions.length=0,t}};function Q(e,t){setTimeout(()=>{X.onlyOnceSuggestions.push(...t),e.getContribution("editor.contrib.suggestController").triggerSuggest((new Set).add(X))},0)}p["d"].register("*",X);var J=i("d3d7"),ee=i("3742"),te=(i("7457"),i("b57f")),ie=i("1165"),ne=i("0a0f"),se=i("dff7"),oe=i("32b8"),re=i("82c9"),ae=i("70cb");const le="code-workspace";function he(e){const t=e;return"string"===typeof(null===t||void 0===t?void 0:t.id)&&R["a"].isUri(t.uri)}function ce(e){return e.configuration?{id:e.id,configPath:e.configuration}:1===e.folders.length?{id:e.id,uri:e.folders[0].uri}:void 0}var de=i("b589"),ue=i("30db"),ge=i("3d37");function pe(e){return Object(ge["a"])(e)?e.charAt(0).toUpperCase()+e.slice(1):e}const me=new Uint8Array(16),fe=[];for(let Yn=0;Yn<256;Yn++)fe.push(Yn.toString(16).padStart(2,"0"));let _e;function be(){_e(me),me[6]=15&me[6]|64,me[8]=63&me[8]|128;let e=0,t="";return t+=fe[me[e++]],t+=fe[me[e++]],t+=fe[me[e++]],t+=fe[me[e++]],t+="-",t+=fe[me[e++]],t+=fe[me[e++]],t+="-",t+=fe[me[e++]],t+=fe[me[e++]],t+="-",t+=fe[me[e++]],t+=fe[me[e++]],t+="-",t+=fe[me[e++]],t+=fe[me[e++]],t+=fe[me[e++]],t+=fe[me[e++]],t+=fe[me[e++]],t+=fe[me[e++]],t}_e="object"===typeof crypto&&"function"===typeof crypto.getRandomValues?crypto.getRandomValues.bind(crypto):function(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(256*Math.random());return e};class ve{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){let i=t.resolve(e);if(void 0!==i)return i}}}class Ce{constructor(e,t,i,n){this._model=e,this._selection=t,this._selectionIdx=i,this._overtypingCapturer=n}resolve(e){const{name:t}=e;if("SELECTION"===t||"TM_SELECTED_TEXT"===t){let t=this._model.getValueInRange(this._selection)||void 0,i=this._selection.startLineNumber!==this._selection.endLineNumber;if(!t&&this._overtypingCapturer){const e=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);e&&(t=e.value,i=e.multiline)}if(t&&i&&e.snippet){const i=this._model.getLineContent(this._selection.startLineNumber),n=Object(ee["y"])(i,0,this._selection.startColumn-1);let s=n;e.snippet.walk(t=>t!==e&&(t instanceof S&&(s=Object(ee["y"])(Object(ee["Q"])(t.value).pop())),!0));const o=Object(ee["d"])(s,n);t=t.replace(/(\r\n|\r|\n)(.*)/g,(e,t,i)=>`${t}${s.substr(o)}${i}`)}return t}if("TM_CURRENT_LINE"===t)return this._model.getLineContent(this._selection.positionLineNumber);if("TM_CURRENT_WORD"===t){const e=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return e&&e.word||void 0}return"TM_LINE_INDEX"===t?String(this._selection.positionLineNumber-1):"TM_LINE_NUMBER"===t?String(this._selection.positionLineNumber):void 0}}class we{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if("TM_FILENAME"===t)return oe["a"](this._model.uri.fsPath);if("TM_FILENAME_BASE"===t){const e=oe["a"](this._model.uri.fsPath),t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}return"TM_DIRECTORY"===t&&this._labelService?"."===oe["b"](this._model.uri.fsPath)?"":this._labelService.getUriLabel(Object(re["d"])(this._model.uri)):"TM_FILEPATH"===t&&this._labelService?this._labelService.getUriLabel(this._model.uri):"RELATIVE_FILEPATH"===t&&this._labelService?this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0}):void 0}}class Se{constructor(e,t,i,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=n}resolve(e){if("CLIPBOARD"!==e.name)return;const t=this._readClipboardText();if(t){if(this._spread){const e=t.split(/\r\n|\n|\r/).filter(e=>!Object(ee["C"])(e));if(e.length===this._selectionCount)return e[this._selectionIdx]}return t}}}class ye{constructor(e,t){this._model=e,this._selection=t}resolve(e){const{name:t}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=ae["a"].getComments(i);if(n)return"LINE_COMMENT"===t?n.lineCommentToken||void 0:"BLOCK_COMMENT_START"===t?n.blockCommentStartToken||void 0:"BLOCK_COMMENT_END"===t&&n.blockCommentEndToken||void 0}}class De{resolve(e){const{name:t}=e;return"CURRENT_YEAR"===t?String((new Date).getFullYear()):"CURRENT_YEAR_SHORT"===t?String((new Date).getFullYear()).slice(-2):"CURRENT_MONTH"===t?String((new Date).getMonth().valueOf()+1).padStart(2,"0"):"CURRENT_DATE"===t?String((new Date).getDate().valueOf()).padStart(2,"0"):"CURRENT_HOUR"===t?String((new Date).getHours().valueOf()).padStart(2,"0"):"CURRENT_MINUTE"===t?String((new Date).getMinutes().valueOf()).padStart(2,"0"):"CURRENT_SECOND"===t?String((new Date).getSeconds().valueOf()).padStart(2,"0"):"CURRENT_DAY_NAME"===t?De.dayNames[(new Date).getDay()]:"CURRENT_DAY_NAME_SHORT"===t?De.dayNamesShort[(new Date).getDay()]:"CURRENT_MONTH_NAME"===t?De.monthNames[(new Date).getMonth()]:"CURRENT_MONTH_NAME_SHORT"===t?De.monthNamesShort[(new Date).getMonth()]:"CURRENT_SECONDS_UNIX"===t?String(Math.floor(Date.now()/1e3)):void 0}}De.dayNames=[se["a"]("Sunday","Sunday"),se["a"]("Monday","Monday"),se["a"]("Tuesday","Tuesday"),se["a"]("Wednesday","Wednesday"),se["a"]("Thursday","Thursday"),se["a"]("Friday","Friday"),se["a"]("Saturday","Saturday")],De.dayNamesShort=[se["a"]("SundayShort","Sun"),se["a"]("MondayShort","Mon"),se["a"]("TuesdayShort","Tue"),se["a"]("WednesdayShort","Wed"),se["a"]("ThursdayShort","Thu"),se["a"]("FridayShort","Fri"),se["a"]("SaturdayShort","Sat")],De.monthNames=[se["a"]("January","January"),se["a"]("February","February"),se["a"]("March","March"),se["a"]("April","April"),se["a"]("May","May"),se["a"]("June","June"),se["a"]("July","July"),se["a"]("August","August"),se["a"]("September","September"),se["a"]("October","October"),se["a"]("November","November"),se["a"]("December","December")],De.monthNamesShort=[se["a"]("JanuaryShort","Jan"),se["a"]("FebruaryShort","Feb"),se["a"]("MarchShort","Mar"),se["a"]("AprilShort","Apr"),se["a"]("MayShort","May"),se["a"]("JuneShort","Jun"),se["a"]("JulyShort","Jul"),se["a"]("AugustShort","Aug"),se["a"]("SeptemberShort","Sep"),se["a"]("OctoberShort","Oct"),se["a"]("NovemberShort","Nov"),se["a"]("DecemberShort","Dec")];class Le{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=ce(this._workspaceService.getWorkspace());return t?"WORKSPACE_NAME"===e.name?this._resolveWorkspaceName(t):"WORKSPACE_FOLDER"===e.name?this._resoveWorkspacePath(t):void 0:void 0}_resolveWorkspaceName(e){if(he(e))return oe["a"](e.uri.path);let t=oe["a"](e.configPath.path);return t.endsWith(le)&&(t=t.substr(0,t.length-le.length-1)),t}_resoveWorkspacePath(e){if(he(e))return pe(e.uri.fsPath);let t=oe["a"](e.configPath.path),i=e.configPath.fsPath;return i.endsWith(t)&&(i=i.substr(0,i.length-t.length-1)),i?pe(i):"/"}}class xe{resolve(e){const{name:t}=e;return"RANDOM"===t?Math.random().toString().slice(-6):"RANDOM_HEX"===t?Math.random().toString(16).slice(-6):"UUID"===t?be():void 0}}var ke=i("b7d0"),Ee=i("303e"),Ne=i("47cb");Object(ke["f"])((e,t)=>{function i(t){const i=e.getColor(t);return i?i.toString():"transparent"}t.addRule(`.monaco-editor .snippet-placeholder { background-color: ${i(Ee["ec"])}; outline-color: ${i(Ee["fc"])}; }`),t.addRule(`.monaco-editor .finish-snippet-placeholder { background-color: ${i(Ee["cc"])}; outline-color: ${i(Ee["dc"])}; }`)});class Oe{constructor(e,t,i,n){this._editor=e,this._snippet=t,this._offset=i,this._snippetLineLeadingWhitespace=n,this._nestingLevel=1,this._placeholderGroups=Object(s["k"])(t.placeholders,D.compareByIndex),this._placeholderGroupsIdx=-1}dispose(){this._placeholderDecorations&&this._editor.deltaDecorations([...this._placeholderDecorations.values()],[]),this._placeholderGroups.length=0}_initDecorations(){if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations(t=>{for(const i of this._snippet.placeholders){const n=this._snippet.offset(i),s=this._snippet.fullLen(i),o=d["a"].fromPositions(e.getPositionAt(this._offset+n),e.getPositionAt(this._offset+n+s)),r=i.isFinalTabstop?Oe._decor.inactiveFinal:Oe._decor.inactive,a=t.addDecoration(o,r);this._placeholderDecorations.set(i,a)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let e=[];for(const t of this._placeholderGroups[this._placeholderGroupsIdx])if(t.transform){const i=this._placeholderDecorations.get(t),n=this._editor.getModel().getDecorationRange(i),s=this._editor.getModel().getValueInRange(n),o=t.transform.resolve(s).split(/\r\n|\r|\n/);for(let e=1;e<o.length;e++)o[e]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+o[e]);e.push(c["a"].replace(n,o.join(this._editor.getModel().getEOL())))}e.length>0&&this._editor.executeEdits("snippet.placeholderTransform",e)}let t=!1;!0===e&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,t=!0):!1===e&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,t=!0);const i=this._editor.getModel().changeDecorations(e=>{const i=new Set,n=[];for(const s of this._placeholderGroups[this._placeholderGroupsIdx]){const o=this._placeholderDecorations.get(s),r=this._editor.getModel().getDecorationRange(o);n.push(new g["a"](r.startLineNumber,r.startColumn,r.endLineNumber,r.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(s),e.changeDecorationOptions(o,s.isFinalTabstop?Oe._decor.activeFinal:Oe._decor.active),i.add(s);for(const t of this._snippet.enclosingPlaceholders(s)){const n=this._placeholderDecorations.get(t);e.changeDecorationOptions(n,t.isFinalTabstop?Oe._decor.activeFinal:Oe._decor.active),i.add(t)}}for(const[t,s]of this._placeholderDecorations)i.has(t)||e.changeDecorationOptions(s,t.isFinalTabstop?Oe._decor.inactiveFinal:Oe._decor.inactive);return n});return t?this.move(e):null!==i&&void 0!==i?i:[]}_hasPlaceholderBeenCollapsed(e){let t=e;while(t){if(t instanceof D){const e=this._placeholderDecorations.get(t),i=this._editor.getModel().getDecorationRange(e);if(i.isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||0===this._placeholderGroups.length}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let i;for(const n of t){if(n.isFinalTabstop)break;i||(i=[],e.set(n.index,i));const t=this._placeholderDecorations.get(n),s=this._editor.getModel().getDecorationRange(t);if(!s){e.delete(n.index);break}i.push(s)}}return e}get choice(){return this._placeholderGroups[this._placeholderGroupsIdx][0].choice}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(i=>{for(const n of this._placeholderGroups[this._placeholderGroupsIdx]){const s=e.shift();console.assert(!s._placeholderDecorations);const o=s._snippet.placeholderInfo.last.index;for(const e of s._snippet.placeholderInfo.all)e.isFinalTabstop?e.index=n.index+(o+1)/this._nestingLevel:e.index=n.index+e.index/this._nestingLevel;this._snippet.replace(n,s._snippet.children);const r=this._placeholderDecorations.get(n);i.removeDecoration(r),this._placeholderDecorations.delete(n);for(const e of s._snippet.placeholders){const n=s._snippet.offset(e),o=s._snippet.fullLen(e),r=d["a"].fromPositions(t.getPositionAt(s._offset+n),t.getPositionAt(s._offset+n+o)),a=i.addDecoration(r,Oe._decor.inactive);this._placeholderDecorations.set(e,a)}}this._placeholderGroups=Object(s["k"])(this._snippet.placeholders,D.compareByIndex)})}}Oe._decor={active:te["a"].register({stickiness:0,className:"snippet-placeholder"}),inactive:te["a"].register({stickiness:1,className:"snippet-placeholder"}),activeFinal:te["a"].register({stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:te["a"].register({stickiness:1,className:"finish-snippet-placeholder"})};const Ie={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};class Te{constructor(e,t,i=Ie){this._templateMerges=[],this._snippets=[],this._editor=e,this._template=t,this._options=i}static adjustWhitespace(e,t,i,n,s){const o=e.getLineContent(t.lineNumber),r=Object(ee["y"])(o,0,t.column-1);let a;return i.walk(t=>{if(!(t instanceof S)||t.parent instanceof L)return!0;const s=t.value.split(/\r\n|\r|\n/);if(n){const n=i.offset(t);if(0===n)s[0]=e.normalizeIndentation(s[0]);else{a=null!==a&&void 0!==a?a:i.toString();let t=a.charCodeAt(n-1);10!==t&&13!==t||(s[0]=e.normalizeIndentation(r+s[0]))}for(let t=1;t<s.length;t++)s[t]=e.normalizeIndentation(r+s[t])}const o=s.join(e.getEOL());return o!==t.value&&(t.parent.replace(t,[new S(o)]),a=void 0),!0}),r}static adjustSelection(e,t,i,n){if(0!==i||0!==n){const{positionLineNumber:s,positionColumn:o}=t,r=o-i,a=o+n,l=e.validateRange({startLineNumber:s,startColumn:r,endLineNumber:s,endColumn:a});t=g["a"].createWithDirection(l.startLineNumber,l.startColumn,l.endLineNumber,l.endColumn,t.getDirection())}return t}static createEditsAndSnippets(e,t,i,n,s,o,r,a){const l=[],h=[];if(!e.hasModel())return{edits:l,snippets:h};const u=e.getModel(),g=e.invokeWithinContext(e=>e.get(ie["a"],ne["d"])),p=e.invokeWithinContext(e=>new we(e.get(Ne["a"],ne["d"]),u)),m=()=>r;let f=0,_=u.getValueInRange(Te.adjustSelection(u,e.getSelection(),i,0)),b=u.getValueInRange(Te.adjustSelection(u,e.getSelection(),0,n)),v=u.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber);const C=e.getSelections().map((e,t)=>({selection:e,idx:t})).sort((e,t)=>d["a"].compareRangesUsingStarts(e.selection,t.selection));for(const{selection:d,idx:w}of C){let r=Te.adjustSelection(u,d,i,0),S=Te.adjustSelection(u,d,0,n);_!==u.getValueInRange(r)&&(r=d),b!==u.getValueInRange(S)&&(S=d);const y=d.setStartPosition(r.startLineNumber,r.startColumn).setEndPosition(S.endLineNumber,S.endColumn),D=(new I).parse(t,!0,s),L=y.getStartPosition(),x=Te.adjustWhitespace(u,L,D,o||w>0&&v!==u.getLineFirstNonWhitespaceColumn(d.positionLineNumber),!0);D.resolveVariables(new ve([p,new Se(m,w,C.length,"spread"===e.getOption(65)),new Ce(u,d,w,a),new ye(u,d),new De,new Le(g),new xe]));const k=u.getOffsetAt(L)+f;f+=D.toString().length-u.getValueLengthInRange(y),l[w]=c["a"].replace(y,D.toString()),l[w].identifier={major:w,minor:0},h[w]=new Oe(e,D,k,x)}return{edits:l,snippets:h}}dispose(){Object(a["f"])(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}=Te.createEditsAndSnippets(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer);this._snippets=t,this._editor.executeEdits("snippet",e,e=>this._snippets[0].hasPlaceholder?this._move(!0):e.filter(e=>!!e.identifier).map(e=>g["a"].fromPositions(e.range.getEndPosition()))),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=Ie){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:i,snippets:n}=Te.createEditsAndSnippets(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer);this._editor.executeEdits("snippet",i,e=>{for(const t of this._snippets)t.merge(n);return console.assert(0===n.length),this._snippets[0].hasPlaceholder?this._move(void 0):e.filter(e=>!!e.identifier).map(e=>g["a"].fromPositions(e.range.getEndPosition()))})}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const t=[];for(const i of this._snippets){const n=i.move(e);t.push(...n)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get choice(){return this._snippets[0].choice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length<this._snippets.length)return!1;let t=new Map;for(const i of this._snippets){const n=i.computePossibleSelections();if(0===t.size)for(const[i,s]of n){s.sort(d["a"].compareRangesUsingStarts);for(const n of e)if(s[0].containsRange(n)){t.set(i,[]);break}}if(0===t.size)return!1;t.forEach((e,t)=>{e.push(...n.get(t))})}e.sort(d["a"].compareRangesUsingStarts);for(let[i,n]of t)if(n.length===e.length){n.sort(d["a"].compareRangesUsingStarts);for(let s=0;s<n.length;s++)n[s].containsRange(e[s])||t.delete(i)}else t.delete(i);return t.size>0}}var Me=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Ae=function(e,t){return function(i,n){t(i,n,e)}};const Re={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let Fe=class e{constructor(t,i,n){this._editor=t,this._logService=i,this._snippetListener=new a["b"],this._modelVersionId=-1,this._inSnippet=e.InSnippetMode.bindTo(n),this._hasNextTabstop=e.HasNextTabstop.bindTo(n),this._hasPrevTabstop=e.HasPrevTabstop.bindTo(n)}static get(t){return t.getContribution(e.ID)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),null===(e=this._session)||void 0===e||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,"undefined"===typeof t?Re:Object.assign(Object.assign({},Re),t))}catch(i){this.cancel(),this._logService.error(i),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}_doInsert(e,t){this._editor.hasModel()&&(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(e,t):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new Te(this._editor,e,t),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(e=>e.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState())))}_updateState(){if(this._session&&this._editor.hasModel()){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()}}_handleChoice(){if(!this._session||!this._editor.hasModel())return void(this._currentChoice=void 0);const{choice:e}=this._session;if(e){if(this._currentChoice!==e){this._currentChoice=e,this._editor.setSelections(this._editor.getSelections().map(e=>g["a"].fromPositions(e.getStartPosition())));const[t]=e.options;Q(this._editor,e.options.map((e,i)=>({kind:13,label:e.value,insertText:e.value,sortText:"a".repeat(i+1),range:d["a"].fromPositions(this._editor.getPosition(),this._editor.getPosition().delta(0,t.value.length))})))}}else this._currentChoice=void 0}finish(){while(this._inSnippet.get())this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),null===(t=this._session)||void 0===t||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session&&this._session.prev(),this._updateState()}next(){this._session&&this._session.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};Fe.ID="snippetController2",Fe.InSnippetMode=new f["c"]("inSnippetMode",!1),Fe.HasNextTabstop=new f["c"]("hasNextTabstop",!1),Fe.HasPrevTabstop=new f["c"]("hasPrevTabstop",!1),Fe=Me([Ae(1,J["b"]),Ae(2,f["b"])],Fe),Object(h["k"])(Fe.ID,Fe);const Pe=h["c"].bindToContribution(Fe.get);Object(h["j"])(new Pe({id:"jumpToNextSnippetPlaceholder",precondition:f["a"].and(Fe.InSnippetMode,Fe.HasNextTabstop),handler:e=>e.next(),kbOpts:{weight:130,kbExpr:u["a"].editorTextFocus,primary:2}})),Object(h["j"])(new Pe({id:"jumpToPrevSnippetPlaceholder",precondition:f["a"].and(Fe.InSnippetMode,Fe.HasPrevTabstop),handler:e=>e.prev(),kbOpts:{weight:130,kbExpr:u["a"].editorTextFocus,primary:1026}})),Object(h["j"])(new Pe({id:"leaveSnippet",precondition:Fe.InSnippetMode,handler:e=>e.cancel(!0),kbOpts:{weight:130,kbExpr:u["a"].editorTextFocus,primary:9,secondary:[1033]}})),Object(h["j"])(new Pe({id:"acceptSnippet",precondition:Fe.InSnippetMode,handler:e=>e.finish()}));var Be=i("4035"),We=i("03e8"),Ve=i("5fe7"),je=i("fbba"),He=i("f5f3"),ze=i("5818"),Ue=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Ke=function(e,t){return function(i,n){t(i,n,e)}};class $e{constructor(e){this.name=e}select(e,t,i){if(0===i.length)return 0;let n=i[0].score[0];for(let s=0;s<i.length;s++){const{score:e,completion:t}=i[s];if(e[0]!==n)break;if(t.preselect)return s}return 0}}class qe extends $e{constructor(){super("first")}memorize(e,t,i){}toJSON(){}fromJSON(){}}class Ge extends $e{constructor(){super("recentlyUsed"),this._cache=new Be["a"](300,.66),this._seq=0}memorize(e,t,i){const n=`${e.getLanguageIdentifier().language}/${i.textLabel}`;this._cache.set(n,{touch:this._seq++,type:i.completion.kind,insertText:i.completion.insertText})}select(e,t,i){if(0===i.length)return 0;const n=e.getLineContent(t.lineNumber).substr(t.column-10,t.column-1);if(/\s$/.test(n))return super.select(e,t,i);let s=i[0].score[0],o=-1,r=-1,a=-1;for(let l=0;l<i.length;l++){if(i[l].score[0]!==s)break;const t=`${e.getLanguageIdentifier().language}/${i[l].textLabel}`,n=this._cache.peek(t);if(n&&n.touch>a&&n.type===i[l].completion.kind&&n.insertText===i[l].completion.insertText&&(a=n.touch,r=l),i[l].completion.preselect&&-1===o)return l}return-1!==r?r:-1!==o?o:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();let t=0;for(const[i,n]of e)n.touch=t,n.type="number"===typeof n.type?n.type:Object(p["C"])(n.type),this._cache.set(i,n);this._seq=this._cache.size}}class Ye extends $e{constructor(){super("recentlyUsedByPrefix"),this._trie=Be["c"].forStrings(),this._seq=0}memorize(e,t,i){const{word:n}=e.getWordUntilPosition(t),s=`${e.getLanguageIdentifier().language}/${n}`;this._trie.set(s,{type:i.completion.kind,insertText:i.completion.insertText,touch:this._seq++})}select(e,t,i){let{word:n}=e.getWordUntilPosition(t);if(!n)return super.select(e,t,i);let s=`${e.getLanguageIdentifier().language}/${n}`,o=this._trie.get(s);if(o||(o=this._trie.findSubstr(s)),o)for(let r=0;r<i.length;r++){let{kind:e,insertText:t}=i[r].completion;if(e===o.type&&t===o.insertText)return r}return super.select(e,t,i)}toJSON(){let e=[];return this._trie.forEach((t,i)=>e.push([i,t])),e.sort((e,t)=>-(e[1].touch-t[1].touch)).forEach((e,t)=>e[1].touch=t),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,i]of e)i.type="number"===typeof i.type?i.type:Object(p["C"])(i.type),this._trie.set(t,i)}}}let Ze=class e{constructor(e,t,i){this._storageService=e,this._modeService=t,this._configService=i,this._disposables=new a["b"],this._persistSoon=new Ve["e"](()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(e=>{e.reason===We["c"].SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,i){this._withStrategy(e,t).memorize(e,t,i),this._persistSoon.schedule()}select(e,t,i){return this._withStrategy(e,t).select(e,t,i)}_withStrategy(t,i){var n,s;const o=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:null===(n=this._modeService.getLanguageIdentifier(t.getLanguageIdAtPosition(i.lineNumber,i.column)))||void 0===n?void 0:n.language,resource:t.uri});if((null===(s=this._strategy)||void 0===s?void 0:s.name)!==o){this._saveState();const t=e._strategyCtors.get(o)||qe;this._strategy=new t;try{const t=this._configService.getValue("editor.suggest.shareSuggestSelections"),i=t?0:1,n=this._storageService.get(`${e._storagePrefix}/${o}`,i);n&&this._strategy.fromJSON(JSON.parse(n))}catch(r){}}return this._strategy}_saveState(){if(this._strategy){const t=this._configService.getValue("editor.suggest.shareSuggestSelections"),i=t?0:1,n=JSON.stringify(this._strategy);this._storageService.store(`${e._storagePrefix}/${this._strategy.name}`,n,i,1)}}};Ze._strategyCtors=new Map([["recentlyUsedByPrefix",Ye],["recentlyUsed",Ge],["first",qe]]),Ze._storagePrefix="suggest/memories",Ze=Ue([Ke(0,We["a"]),Ke(1,ze["a"]),Ke(2,je["a"])],Ze);const Xe=Object(ne["c"])("ISuggestMemories");Object(He["b"])(Xe,Ze,!0);var Qe=i("9eb8"),Je=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},et=function(e,t){return function(i,n){t(i,n,e)}};let tt=class e{constructor(t,i){this._editor=t,this._index=0,this._ckOtherSuggestions=e.OtherSuggestions.bindTo(i)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),null===(e=this._listener)||void 0===e||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:t,index:i},n){if(0===t.items.length)return void this.reset();let s=e._moveIndex(!0,t,i);s!==i?(this._acceptNext=n,this._model=t,this._index=i,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)):this.reset()}static _moveIndex(e,t,i){let n=i;while(1){if(n=(n+t.items.length+(e?1:-1))%t.items.length,n===i)break;if(!t.items[n].completion.additionalTextEdits)break}return n}next(){this._move(!0)}prev(){this._move(!1)}_move(t){if(this._model)try{this._ignore=!0,this._index=e._moveIndex(t,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};tt.OtherSuggestions=new f["c"]("hasOtherSuggestions",!1),tt=Je([et(1,f["b"])],tt);var it=i("308f");class nt{constructor(e,t,i,n,s,o,r){this.clipboardText=r,this._snippetCompareFn=nt._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=n,this._options=s,this._refilterKind=1,this._lineContext=i,"top"===o?this._snippetCompareFn=nt._compareCompletionItemsSnippetsUp:"bottom"===o&&(this._snippetCompareFn=nt._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){this._lineContext.leadingLineContent===e.leadingLineContent&&this._lineContext.characterCountDelta===e.characterCountDelta||(this._refilterKind=this._lineContext.characterCountDelta<e.characterCountDelta&&this._filteredItems?2:1,this._lineContext=e)}get items(){return this._ensureCachedState(),this._filteredItems}get allProvider(){return this._ensureCachedState(),this._providerInfo.keys()}get incomplete(){this._ensureCachedState();const e=new Set;for(let[t,i]of this._providerInfo)i&&e.add(t);return e}adopt(e){let t=[];for(let i=0;i<this._items.length;)e.has(this._items[i].provider)?i++:(t.push(this._items[i]),this._items[i]=this._items[this._items.length-1],this._items.pop());return this._refilterKind=1,t}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){0!==this._refilterKind&&this._createCachedState()}_createCachedState(){this._providerInfo=new Map;const e=[],{leadingLineContent:t,characterCountDelta:i}=this._lineContext;let n="",o="";const r=1===this._refilterKind?this._items:this._filteredItems,a=[],l=!this._options.filterGraceful||r.length>2e3?b["d"]:b["e"];for(let s=0;s<r.length;s++){const h=r[s];if(h.isInvalid)continue;this._providerInfo.set(h.provider,Boolean(h.container.incomplete));const c=h.position.column-h.editStart.column,d=c+i-(h.position.column-this._column);n.length!==d&&(n=0===d?"":t.slice(-d),o=n.toLowerCase());const u="string"===typeof h.completion.label?h.completion.label:h.completion.label.name;if(h.word=n,0===d)h.score=b["a"].Default;else{let e=0;while(e<c){const t=n.charCodeAt(e);if(32!==t&&9!==t)break;e+=1}if(e>=d)h.score=b["a"].Default;else if("string"===typeof h.completion.filterText){let t=l(n,o,e,h.completion.filterText,h.filterTextLow,0,!1);if(!t)continue;0===Object(ee["g"])(h.completion.filterText,u)?h.score=t:(h.score=Object(b["b"])(n,o,e,u,h.labelLow,0),h.score[0]=t[0])}else{let t=l(n,o,e,u,h.labelLow,0,!1);if(!t)continue;h.score=t}}h.idx=s,h.distance=this._wordDistance.distance(h.position,h.completion),a.push(h),e.push(u.length)}this._filteredItems=a.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?Object(s["q"])(e.length-.85,e,(e,t)=>e-t):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]<t.score[0]?1:e.distance<t.distance?-1:e.distance>t.distance?1:e.idx<t.idx?-1:e.idx>t.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return nt._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return nt._compareCompletionItems(e,t)}}var st=i("a40b"),ot=i("db88"),rt=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class at{provideSelectionRanges(e,t){return rt(this,void 0,void 0,(function*(){const i=[];for(const n of t){const t=[];i.push(t);const s=new Map;yield new Promise(t=>at._bracketsRightYield(t,0,e,n,s)),yield new Promise(i=>at._bracketsLeftYield(i,0,e,n,s,t))}return i}))}static _bracketsRightYield(e,t,i,n,s){const o=new Map,r=Date.now();while(1){if(t>=at._maxRounds){e();break}if(!n){e();break}let a=i.findNextBracket(n);if(!a){e();break}let l=Date.now()-r;if(l>at._maxDuration){setTimeout(()=>at._bracketsRightYield(e,t+1,i,n,s));break}const h=a.close[0];if(a.isOpen){let e=o.has(h)?o.get(h):0;o.set(h,e+1)}else{let e=o.has(h)?o.get(h):0;if(e-=1,o.set(h,Math.max(0,e)),e<0){let e=s.get(h);e||(e=new ot["a"],s.set(h,e)),e.push(a.range)}}n=a.range.getEndPosition()}}static _bracketsLeftYield(e,t,i,n,s,o){const r=new Map,a=Date.now();while(1){if(t>=at._maxRounds&&0===s.size){e();break}if(!n){e();break}let l=i.findPrevBracket(n);if(!l){e();break}let h=Date.now()-a;if(h>at._maxDuration){setTimeout(()=>at._bracketsLeftYield(e,t+1,i,n,s,o));break}const c=l.close[0];if(l.isOpen){let e=r.has(c)?r.get(c):0;if(e-=1,r.set(c,Math.max(0,e)),e<0){let e=s.get(c);if(e){let t=e.shift();0===e.size&&s.delete(c);const n=d["a"].fromPositions(l.range.getEndPosition(),t.getStartPosition()),r=d["a"].fromPositions(l.range.getStartPosition(),t.getEndPosition());o.push({range:n}),o.push({range:r}),at._addBracketLeading(i,r,o)}}}else{let e=r.has(c)?r.get(c):0;r.set(c,e+1)}n=l.range.getStartPosition()}}static _addBracketLeading(e,t,i){if(t.startLineNumber===t.endLineNumber)return;const n=t.startLineNumber,s=e.getLineFirstNonWhitespaceColumn(n);0!==s&&s!==t.startColumn&&(i.push({range:d["a"].fromPositions(new m["a"](n,s),t.getEndPosition())}),i.push({range:d["a"].fromPositions(new m["a"](n,1),t.getEndPosition())}));const o=n-1;if(o>0){const n=e.getLineFirstNonWhitespaceColumn(o);n===t.startColumn&&n!==e.getLineLastNonWhitespaceColumn(o)&&(i.push({range:d["a"].fromPositions(new m["a"](o,n),t.getEndPosition())}),i.push({range:d["a"].fromPositions(new m["a"](o,1),t.getEndPosition())}))}}}at._maxDuration=30,at._maxRounds=2;var lt=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class ht{static create(e,t){return lt(this,void 0,void 0,(function*(){if(!t.getOption(101).localityBonus)return ht.None;if(!t.hasModel())return ht.None;const i=t.getModel(),n=t.getPosition();if(!e.canComputeWordRanges(i.uri))return ht.None;const[o]=yield(new at).provideSelectionRanges(i,[n]);if(0===o.length)return ht.None;const r=yield e.computeWordRanges(i.uri,o[0].range);if(!r)return ht.None;const a=i.getWordUntilPosition(n);return delete r[a.word],new class extends ht{distance(e,i){if(!n.equals(t.getPosition()))return 0;if(17===i.kind)return 2<<20;let a="string"===typeof i.label?i.label:i.label.name,l=r[a];if(Object(s["l"])(l))return 2<<20;let h=Object(s["c"])(l,d["a"].fromPositions(e),d["a"].compareRangesUsingStarts),c=h>=0?l[h]:l[Math.max(0,~h-1)],u=o.length;for(const t of o){if(!d["a"].containsRange(t.range,c))break;u-=1}return u}}}))}}ht.None=new class extends ht{distance(){return 0}};var ct=i("f577"),dt=i("5d75"),ut=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},gt=function(e,t){return function(i,n){t(i,n,e)}},pt=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class mt{constructor(e,t,i,n){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=i,this.shy=n}static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),i=e.getPosition();t.tokenizeIfCheap(i.lineNumber);const n=t.getWordAtPosition(i);return!!n&&(n.endColumn===i.column&&!!isNaN(Number(n.word)))}}let ft=class e{constructor(e,t,i,n,s){this._editor=e,this._editorWorkerService=t,this._clipboardService=i,this._telemetryService=n,this._logService=s,this._toDispose=new a["b"],this._quickSuggestDelay=10,this._triggerCharacterListener=new a["b"],this._triggerQuickSuggest=new Ve["g"],this._state=0,this._completionDisposables=new a["b"],this._onDidCancel=new it["a"],this._onDidTrigger=new it["a"],this._onDidSuggest=new it["a"],this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new g["a"](1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters(),this._updateQuickSuggest()})),this._toDispose.add(p["d"].onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(e=>{this._onCursorChange(e)}));let o=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{o=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{o=!1,this._refilterCompletionItems()})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{o||this._refilterCompletionItems()})),this._updateTriggerCharacters(),this._updateQuickSuggest()}dispose(){Object(a["f"])(this._triggerCharacterListener),Object(a["f"])([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateQuickSuggest(){this._quickSuggestDelay=this._editor.getOption(74),(isNaN(this._quickSuggestDelay)||!this._quickSuggestDelay&&0!==this._quickSuggestDelay||this._quickSuggestDelay<0)&&(this._quickSuggestDelay=10)}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(75)||!this._editor.hasModel()||!this._editor.getOption(104))return;const e=new Map;for(const i of p["d"].all(this._editor.getModel()))for(const t of i.triggerCharacters||[]){let n=e.get(t);n||(n=new Set,n.add(z()),e.set(t,n)),n.add(i)}const t=t=>{if(!t){const e=this._editor.getPosition(),i=this._editor.getModel();t=i.getLineContent(e.lineNumber).substr(0,e.column-1)}let i="";Object(ee["F"])(t.charCodeAt(t.length-1))?Object(ee["E"])(t.charCodeAt(t.length-2))&&(i=t.substr(t.length-2)):i=t.charAt(t.length-1);const n=e.get(i);if(n){const e=this._completionModel?{items:this._completionModel.adopt(n),clipboardText:this._completionModel.clipboardText}:void 0;this.trigger({auto:!0,shy:!1,triggerCharacter:i},Boolean(this._completionModel),n,e)}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(t))}get state(){return this._state}cancel(e=!1){var t;0!==this._state&&(this._triggerQuickSuggest.cancel(),null===(t=this._requestToken)||void 0===t||t.cancel(),this._requestToken=void 0,this._state=0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){0!==this._state&&(this._editor.hasModel()&&p["d"].has(this._editor.getModel())?this.trigger({auto:2===this._state,shy:!1},!0):this.cancel())}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||0!==e.reason&&3!==e.reason||"keyboard"!==e.source&&"deleteLeft"!==e.source)this.cancel();else if(p["d"].has(t))if(0===this._state&&0===e.reason){if(!1===this._editor.getOption(73))return;if(!i.containsRange(this._currentSelection)&&!i.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))return;if(this._editor.getOption(101).snippetsPreventQuickSuggestions&&Fe.get(this._editor).isInSnippet())return;this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(0!==this._state)return;if(!mt.shouldAutoTrigger(this._editor))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=this._editor.getOption(73);if(!1!==i){if(!0===i);else{e.tokenizeIfCheap(t.lineNumber);const n=e.getLineTokens(t.lineNumber),s=n.getStandardTokenType(n.findTokenIndexAtOffset(Math.max(t.column-1-1,0))),o=i.other&&0===s||i.comments&&1===s||i.strings&&2===s;if(!o)return}this.trigger({auto:!0,shy:!1})}},this._quickSuggestDelay)}else 0!==this._state&&3===e.reason&&this._refilterCompletionItems()}_refilterCompletionItems(){Promise.resolve().then(()=>{if(0===this._state)return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=new mt(e,t,2===this._state,!1);this._onNewContext(i)})}trigger(t,i=!1,n,s){var r;if(!this._editor.hasModel())return;const a=this._editor.getModel(),l=t.auto,h=new mt(a,this._editor.getPosition(),l,t.shy);this.cancel(i),this._state=l?2:1,this._onDidTrigger.fire({auto:l,shy:t.shy,position:this._editor.getPosition()}),this._context=h;let c={triggerKind:null!==(r=t.triggerKind)&&void 0!==r?r:0};t.triggerCharacter&&(c={triggerKind:1,triggerCharacter:t.triggerCharacter}),this._requestToken=new _["b"];const d=this._editor.getOption(96);let u=1;switch(d){case"top":u=0;break;case"bottom":u=2;break}const g=e._createItemKindFilter(this._editor),p=ht.create(this._editorWorkerService,this._editor),m=K(a,this._editor.getPosition(),new j(u,g,n),c,this._requestToken.token);Promise.all([m,p]).then(([e,i])=>pt(this,void 0,void 0,(function*(){var n;if(null===(n=this._requestToken)||void 0===n||n.dispose(),!this._editor.hasModel())return;let o=null===s||void 0===s?void 0:s.clipboardText;if(!o&&e.needsClipboard&&(o=yield this._clipboardService.readText()),0===this._state)return;const r=this._editor.getModel();let a=e.items;if(s){const e=Z(u);a=a.concat(s.items).sort(e)}const h=new mt(r,this._editor.getPosition(),l,t.shy);this._completionModel=new nt(a,this._context.column,{leadingLineContent:h.leadingLineContent,characterCountDelta:h.column-this._context.column},i,this._editor.getOption(101),this._editor.getOption(96),o),this._completionDisposables.add(e.disposable),this._onNewContext(h),this._reportDurationsTelemetry(e.durations)}))).catch(o["e"])}_reportDurationsTelemetry(e){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)})}static _createItemKindFilter(e){const t=new Set,i=e.getOption(96);"none"===i&&t.add(27);const n=e.getOption(101);return n.showMethods||t.add(0),n.showFunctions||t.add(1),n.showConstructors||t.add(2),n.showFields||t.add(3),n.showVariables||t.add(4),n.showClasses||t.add(5),n.showStructs||t.add(6),n.showInterfaces||t.add(7),n.showModules||t.add(8),n.showProperties||t.add(9),n.showEvents||t.add(10),n.showOperators||t.add(11),n.showUnits||t.add(12),n.showValues||t.add(13),n.showConstants||t.add(14),n.showEnums||t.add(15),n.showEnumMembers||t.add(16),n.showKeywords||t.add(17),n.showWords||t.add(18),n.showColors||t.add(19),n.showFiles||t.add(20),n.showReferences||t.add(21),n.showColors||t.add(22),n.showFolders||t.add(23),n.showTypeParameters||t.add(24),n.showSnippets||t.add(27),n.showUsers||t.add(25),n.showIssues||t.add(26),t}_onNewContext(e){if(this._context)if(e.lineNumber===this._context.lineNumber)if(Object(ee["y"])(e.leadingLineContent)===Object(ee["y"])(this._context.leadingLineContent)){if(e.column<this._context.column)e.leadingWord.word?this.trigger({auto:this._context.auto,shy:!1},!0):this.cancel();else if(this._completionModel)if(0!==e.leadingWord.word.length&&e.leadingWord.startColumn>this._context.leadingWord.startColumn){const e=new Set(p["d"].all(this._editor.getModel()));for(let i of this._completionModel.allProvider)e.delete(i);const t=this._completionModel.adopt(new Set);this.trigger({auto:this._context.auto,shy:!1},!0,e,{items:t,clipboardText:this._completionModel.clipboardText})}else if(e.column>this._context.column&&this._completionModel.incomplete.size>0&&0!==e.leadingWord.word.length){const{incomplete:e}=this._completionModel,t=this._completionModel.adopt(e);this.trigger({auto:2===this._state,shy:!1,triggerKind:2},!0,e,{items:t,clipboardText:this._completionModel.clipboardText})}else{let t=this._completionModel.lineContext,i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){if(mt.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn<e.leadingWord.startColumn)return void this.trigger({auto:this._context.auto,shy:!1},!0);if(this._context.auto)return void this.cancel();if(this._completionModel.lineContext=t,i=this._completionModel.items.length>0,i&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,shy:this._context.shy,isFrozen:i})}}else this.cancel();else this.cancel()}};ft=ut([gt(1,st["a"]),gt(2,ct["a"]),gt(3,dt["a"]),gt(4,J["b"])],ft);i("0829"),i("b9db");var _t=i("561a");const bt=Object(Ee["Wb"])("symbolIcon.arrayForeground",{dark:Ee["T"],light:Ee["T"],hc:Ee["T"]},Object(se["a"])("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),vt=Object(Ee["Wb"])("symbolIcon.booleanForeground",{dark:Ee["T"],light:Ee["T"],hc:Ee["T"]},Object(se["a"])("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ct=Object(Ee["Wb"])("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},Object(se["a"])("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),wt=Object(Ee["Wb"])("symbolIcon.colorForeground",{dark:Ee["T"],light:Ee["T"],hc:Ee["T"]},Object(se["a"])("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),St=Object(Ee["Wb"])("symbolIcon.constantForeground",{dark:Ee["T"],light:Ee["T"],hc:Ee["T"]},Object(se["a"])("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),yt=Object(Ee["Wb"])("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},Object(se["a"])("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Dt=Object(Ee["Wb"])("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},Object(se["a"])("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Lt=Object(Ee["Wb"])("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(se["a"])("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),xt=Object(Ee["Wb"])("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},Object(se["a"])("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),kt=Object(Ee["Wb"])("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(se["a"])("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Et=Object(Ee["Wb"])("symbolIcon.fileForeground",{dark:Ee["T"],light:Ee["T"],hc:Ee["T"]},Object(se["a"])("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Nt=Object(Ee["Wb"])("symbolIcon.folderForeground",{dark:Ee["T"],light:Ee["T"],hc:Ee["T"]},Object(se["a"])("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ot=Object(Ee["Wb"])("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},Object(se["a"])("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),It=Object(Ee["Wb"])("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(se["a"])("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tt=Object(Ee["Wb"])("symbolIcon.keyForeground",{dark:Ee["T"],light:Ee["T"],hc:Ee["T"]},Object(se["a"])("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Mt=Object(Ee["Wb"])("symbolIcon.keywordForeground",{dark:Ee["T"],light:Ee["T"],hc:Ee["T"]},Object(se["a"])("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),At=Object(Ee["Wb"])("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},Object(se["a"])("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Rt=Object(Ee["Wb"])("symbolIcon.moduleForeground",{dark:Ee["T"],light:Ee["T"],hc:Ee["T"]},Object(se["a"])("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ft=Object(Ee["Wb"])("symbolIcon.namespaceForeground",{dark:Ee["T"],light:Ee["T"],hc:Ee["T"]},Object(se["a"])("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Pt=Object(Ee["Wb"])("symbolIcon.nullForeground",{dark:Ee["T"],light:Ee["T"],hc:Ee["T"]},Object(se["a"])("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Bt=Object(Ee["Wb"])("symbolIcon.numberForeground",{dark:Ee["T"],light:Ee["T"],hc:Ee["T"]},Object(se["a"])("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Wt=Object(Ee["Wb"])("symbolIcon.objectForeground",{dark:Ee["T"],light:Ee["T"],hc:Ee["T"]},Object(se["a"])("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Vt=Object(Ee["Wb"])("symbolIcon.operatorForeground",{dark:Ee["T"],light:Ee["T"],hc:Ee["T"]},Object(se["a"])("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),jt=Object(Ee["Wb"])("symbolIcon.packageForeground",{dark:Ee["T"],light:Ee["T"],hc:Ee["T"]},Object(se["a"])("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ht=Object(Ee["Wb"])("symbolIcon.propertyForeground",{dark:Ee["T"],light:Ee["T"],hc:Ee["T"]},Object(se["a"])("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),zt=Object(Ee["Wb"])("symbolIcon.referenceForeground",{dark:Ee["T"],light:Ee["T"],hc:Ee["T"]},Object(se["a"])("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ut=Object(Ee["Wb"])("symbolIcon.snippetForeground",{dark:Ee["T"],light:Ee["T"],hc:Ee["T"]},Object(se["a"])("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Kt=Object(Ee["Wb"])("symbolIcon.stringForeground",{dark:Ee["T"],light:Ee["T"],hc:Ee["T"]},Object(se["a"])("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),$t=Object(Ee["Wb"])("symbolIcon.structForeground",{dark:Ee["T"],light:Ee["T"],hc:Ee["T"]},Object(se["a"])("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),qt=Object(Ee["Wb"])("symbolIcon.textForeground",{dark:Ee["T"],light:Ee["T"],hc:Ee["T"]},Object(se["a"])("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Gt=Object(Ee["Wb"])("symbolIcon.typeParameterForeground",{dark:Ee["T"],light:Ee["T"],hc:Ee["T"]},Object(se["a"])("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Yt=Object(Ee["Wb"])("symbolIcon.unitForeground",{dark:Ee["T"],light:Ee["T"],hc:Ee["T"]},Object(se["a"])("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Zt=Object(Ee["Wb"])("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},Object(se["a"])("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Object(ke["f"])((e,t)=>{const i=e.getColor(bt);i&&t.addRule(`${_t["b"].symbolArray.cssSelector} { color: ${i}; }`);const n=e.getColor(vt);n&&t.addRule(`${_t["b"].symbolBoolean.cssSelector} { color: ${n}; }`);const s=e.getColor(Ct);s&&t.addRule(`${_t["b"].symbolClass.cssSelector} { color: ${s}; }`);const o=e.getColor(At);o&&t.addRule(`${_t["b"].symbolMethod.cssSelector} { color: ${o}; }`);const r=e.getColor(wt);r&&t.addRule(`${_t["b"].symbolColor.cssSelector} { color: ${r}; }`);const a=e.getColor(St);a&&t.addRule(`${_t["b"].symbolConstant.cssSelector} { color: ${a}; }`);const l=e.getColor(yt);l&&t.addRule(`${_t["b"].symbolConstructor.cssSelector} { color: ${l}; }`);const h=e.getColor(Dt);h&&t.addRule(`\n\t\t\t${_t["b"].symbolValue.cssSelector},${_t["b"].symbolEnum.cssSelector} { color: ${h}; }`);const c=e.getColor(Lt);c&&t.addRule(`${_t["b"].symbolEnumMember.cssSelector} { color: ${c}; }`);const d=e.getColor(xt);d&&t.addRule(`${_t["b"].symbolEvent.cssSelector} { color: ${d}; }`);const u=e.getColor(kt);u&&t.addRule(`${_t["b"].symbolField.cssSelector} { color: ${u}; }`);const g=e.getColor(Et);g&&t.addRule(`${_t["b"].symbolFile.cssSelector} { color: ${g}; }`);const p=e.getColor(Nt);p&&t.addRule(`${_t["b"].symbolFolder.cssSelector} { color: ${p}; }`);const m=e.getColor(Ot);m&&t.addRule(`${_t["b"].symbolFunction.cssSelector} { color: ${m}; }`);const f=e.getColor(It);f&&t.addRule(`${_t["b"].symbolInterface.cssSelector} { color: ${f}; }`);const _=e.getColor(Tt);_&&t.addRule(`${_t["b"].symbolKey.cssSelector} { color: ${_}; }`);const b=e.getColor(Mt);b&&t.addRule(`${_t["b"].symbolKeyword.cssSelector} { color: ${b}; }`);const v=e.getColor(Rt);v&&t.addRule(`${_t["b"].symbolModule.cssSelector} { color: ${v}; }`);const C=e.getColor(Ft);C&&t.addRule(`${_t["b"].symbolNamespace.cssSelector} { color: ${C}; }`);const w=e.getColor(Pt);w&&t.addRule(`${_t["b"].symbolNull.cssSelector} { color: ${w}; }`);const S=e.getColor(Bt);S&&t.addRule(`${_t["b"].symbolNumber.cssSelector} { color: ${S}; }`);const y=e.getColor(Wt);y&&t.addRule(`${_t["b"].symbolObject.cssSelector} { color: ${y}; }`);const D=e.getColor(Vt);D&&t.addRule(`${_t["b"].symbolOperator.cssSelector} { color: ${D}; }`);const L=e.getColor(jt);L&&t.addRule(`${_t["b"].symbolPackage.cssSelector} { color: ${L}; }`);const x=e.getColor(Ht);x&&t.addRule(`${_t["b"].symbolProperty.cssSelector} { color: ${x}; }`);const k=e.getColor(zt);k&&t.addRule(`${_t["b"].symbolReference.cssSelector} { color: ${k}; }`);const E=e.getColor(Ut);E&&t.addRule(`${_t["b"].symbolSnippet.cssSelector} { color: ${E}; }`);const N=e.getColor(Kt);N&&t.addRule(`${_t["b"].symbolString.cssSelector} { color: ${N}; }`);const O=e.getColor($t);O&&t.addRule(`${_t["b"].symbolStruct.cssSelector} { color: ${O}; }`);const I=e.getColor(qt);I&&t.addRule(`${_t["b"].symbolText.cssSelector} { color: ${I}; }`);const T=e.getColor(Gt);T&&t.addRule(`${_t["b"].symbolTypeParameter.cssSelector} { color: ${T}; }`);const M=e.getColor(Yt);M&&t.addRule(`${_t["b"].symbolUnit.cssSelector} { color: ${M}; }`);const A=e.getColor(Zt);A&&t.addRule(`${_t["b"].symbolVariable.cssSelector} { color: ${A}; }`)});var Xt=i("11f7"),Qt=i("72a7"),Jt=i("a6d7"),ei=i("1898"),ti=i("31df"),ii=i("1097");class ni{constructor(e="",t=!1){var i,n;if(this.value=e,"string"!==typeof this.value)throw Object(o["b"])("value");"boolean"===typeof t?(this.isTrusted=t,this.supportThemeIcons=!1):(this.isTrusted=null!==(i=t.isTrusted)&&void 0!==i?i:void 0,this.supportThemeIcons=null!==(n=t.supportThemeIcons)&&void 0!==n&&n)}appendText(e,t=0){return this.value+=si(this.supportThemeIcons?Object(ii["a"])(e):e).replace(/([ \t]+)/g,(e,t)=>"&nbsp;".repeat(t.length)).replace(/^>/gm,"\\>").replace(/\n/g,1===t?"\\\n":"\n\n"),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+="\n```",this.value+=e,this.value+="\n",this.value+=t,this.value+="\n```\n",this}}function si(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function oi(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1"):e}function ri(e){const t=[],i=e.split("|").map(e=>e.trim());e=i[0];const n=i[1];if(n){const e=/height=(\d+)/.exec(n),i=/width=(\d+)/.exec(n),s=e?e[1]:"",o=i?i[1]:"",r=isFinite(parseInt(o)),a=isFinite(parseInt(s));r&&t.push(`width="${o}"`),a&&t.push(`height="${s}"`)}return{href:e,dimensions:t}}var ai,li=i("9c3e"),hi=i("4acc");let ci;(function(){function e(t,i,n){function s(r,a){if(!i[r]){if(!t[r]){var l="function"==typeof ai&&ai;if(!a&&l)return ai(r,!0);if(o)return o(r,!0);var h=new Error("Cannot find module '"+r+"'");throw h.code="MODULE_NOT_FOUND",h}var c=i[r]={exports:{}};t[r][0].call(c.exports,(function(e){var i=t[r][1][e];return s(i||e)}),c,c.exports,e,t,i,n)}return i[r].exports}for(var o="function"==typeof ai&&ai,r=0;r<n.length;r++)s(n[r]);return s}return e})()({1:[function(e,t,i){var n=e("./toMap"),s=["background","base","cite","href","longdesc","src","usemap"];t.exports={uris:n(s)}},{"./toMap":10}],2:[function(e,t,i){var n={allowedAttributes:{"*":["title","accesskey"],a:["href","name","target","aria-label"],iframe:["allowfullscreen","frameborder","src"],img:["src","alt","title","aria-label"]},allowedClasses:{},allowedSchemes:["http","https","mailto"],allowedTags:["a","abbr","article","b","blockquote","br","caption","code","del","details","div","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","main","mark","ol","p","pre","section","span","strike","strong","sub","summary","sup","table","tbody","td","th","thead","tr","u","ul"],filter:null};t.exports=n},{}],3:[function(e,t,i){var n=e("./toMap"),s=["area","br","col","hr","img","wbr","input","base","basefont","link","meta"];t.exports={voids:n(s)}},{"./toMap":10}],4:[function(e,t,i){e("he");var n=e("assignment"),s=e("./parser"),o=e("./sanitizer"),r=e("./defaults");function a(e,t,i){var a=[],l=!0===i?t:n({},r,t),h=o(a,l);return s(e,h),a.join("")}a.defaults=r,t.exports=a,ci=a},{"./defaults":2,"./parser":7,"./sanitizer":8,assignment:6,he:9}],5:[function(e,t,i){t.exports=function(e){return"string"===typeof e?e.toLowerCase():e}},{}],6:[function(e,t,i){function n(e){var t,i,s=Array.prototype.slice.call(arguments,1);while(s.length)for(i in t=s.shift(),t)t.hasOwnProperty(i)&&("[object Object]"===Object.prototype.toString.call(e[i])?e[i]=n(e[i],t[i]):e[i]=t[i]);return e}t.exports=n},{}],7:[function(e,t,i){var n=e("he"),s=e("./lowercase"),o=(e("./attributes"),e("./elements")),r=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,a=/^<\s*\/\s*([\w:-]+)[^>]*>/,l=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,h=/^</,c=/^<\s*\//;function d(){var e=[];return e.lastItem=function(){return e[e.length-1]},e}function u(e,t){var i,u=d(),g=e;while(e)p();function p(){i=!0,m();var t=e===g;g=e,t&&(e="")}function m(){"\x3c!--"===e.substr(0,4)?_():c.test(e)?f(a,C):h.test(e)&&f(r,v),b()}function f(t,n){var s=e.match(t);s&&(e=e.substring(s[0].length),s[0].replace(t,n),i=!1)}function _(){var n=e.indexOf("--\x3e");n>=0&&(t.comment&&t.comment(e.substring(4,n)),e=e.substring(n+3),i=!1)}function b(){if(i){var n,s=e.indexOf("<");s>=0?(n=e.substring(0,s),e=e.substring(s)):(n=e,e=""),t.chars&&t.chars(n)}}function v(e,i,r,a){var h={},c=s(i),d=o.voids[c]||!!a;function g(e,t,i,s,o){h[t]=void 0===i&&void 0===s&&void 0===o?void 0:n.decode(i||s||o||"")}r.replace(l,g),d||u.push(c),t.start&&t.start(c,h,d)}function C(e,i){var n,o=0,r=s(i);if(r)for(o=u.length-1;o>=0;o--)if(u[o]===r)break;if(o>=0){for(n=u.length-1;n>=o;n--)t.end&&t.end(u[n]);u.length=o}}C()}t.exports=u},{"./attributes":1,"./elements":3,"./lowercase":5,he:9}],8:[function(e,t,i){var n=e("he"),s=e("./lowercase"),o=e("./attributes"),r=e("./elements");function a(e,t){var i,a=t||{};return m(),{start:h,end:c,chars:u};function l(t){e.push(t)}function h(e,t,r){var h=s(e);function c(e){var i,r=t[e],c=(a.allowedClasses||{})[h]||[],u=(a.allowedAttributes||{})[h]||[];u=u.concat((a.allowedAttributes||{})["*"]||[]);var g=s(e);function p(e){return c&&-1!==c.indexOf(e)}"class"===g&&-1===u.indexOf(g)?(r=r.split(" ").filter(p).join(" ").trim(),i=r.length):i=-1!==u.indexOf(g)&&(!0!==o.uris[g]||d(r)),i&&(l(" "),l(e),"string"===typeof r&&(l('="'),l(n.encode(r)),l('"')))}i.ignoring?g(h):-1!==(a.allowedTags||[]).indexOf(h)&&(!a.filter||a.filter({tag:h,attrs:t}))?(l("<"),l(h),Object.keys(t).forEach(c),l(r?"/>":">")):g(h)}function c(e){var t=s(e),n=-1!==(a.allowedTags||[]).indexOf(t);n&&!1===i.ignoring?(l("</"),l(t),l(">")):p(t)}function d(e){var t=e[0];if("#"===t||"/"===t)return!0;var i=e.indexOf(":");if(-1===i)return!0;var n=e.indexOf("?");if(-1!==n&&i>n)return!0;var s=e.indexOf("#");return-1!==s&&i>s||a.allowedSchemes.some(o);function o(t){return 0===e.indexOf(t+":")}}function u(e){!1===i.ignoring&&l(a.transformText?a.transformText(e):e)}function g(e){r.voids[e]||(!1===i.ignoring?i={ignoring:e,depth:1}:i.ignoring===e&&i.depth++)}function p(e){i.ignoring===e&&--i.depth<=0&&m()}function m(){i={ignoring:!1,depth:0}}}t.exports=a},{"./attributes":1,"./elements":3,"./lowercase":5,he:9}],9:[function(e,t,i){var n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},s={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},o=/(&amp;|&lt;|&gt;|&quot;|&#39;)/g,r=/[&<>"']/g;function a(e){return n[e]}function l(e){return s[e]}function h(e){return null==e?"":String(e).replace(r,a)}function c(e){return null==e?"":String(e).replace(o,l)}h.options=c.options={},t.exports={encode:h,escape:h,decode:c,unescape:c,version:"1.0.0-browser"}},{}],10:[function(e,t,i){function n(e){return e.reduce(s,{})}function s(e,t){return e[t]=!0,e}t.exports=n},{}]},{},[4]);var di,ui=ci,gi=i("438a"),pi=i("aa3d"),mi=i("5d28"),fi=i("7ddc"),_i=i("e32d");const bi=null===(di=window.trustedTypes)||void 0===di?void 0:di.createPolicy("insane",{createHTML(e,t){return ui(e,t)}});function vi(e,t={},i={}){var n;const s=Object(ti["a"])(t),r=function(t){let i;try{i=Object(gi["a"])(decodeURIComponent(t))}catch(n){}return i?(i=Object(pi["a"])(i,t=>e.uris&&e.uris[t]?R["a"].revive(e.uris[t]):void 0),encodeURIComponent(JSON.stringify(i))):t},a=function(t,i){const n=e.uris&&e.uris[t];if(!n)return t;let s=R["a"].revive(n);return R["a"].parse(t).toString()===s.toString()?t:i?de["a"].asBrowserUri(s).toString(!0):(s.query&&(s=s.with({query:r(s.query)})),s.toString())};let l;const h=new Promise(e=>l=e),c=new hi["Renderer"];c.image=(e,i,n)=>{let s=[],o=[];if(e){({href:e,dimensions:s}=ri(e)),e=a(e,!0);try{const i=R["a"].parse(e);t.baseUrl&&i.scheme===de["c"].file&&(e=Object(re["f"])(t.baseUrl,e).toString())}catch(r){}o.push(`src="${e}"`)}return n&&o.push(`alt="${n}"`),i&&o.push(`title="${i}"`),s.length&&(o=o.concat(s)),"<img "+o.join(" ")+">"},c.link=(i,n,s)=>{if(i===s&&(s=oi(s)),i=a(i,!1),t.baseUrl){const e=/^\w[\w\d+.-]*:/.test(i);e||(i=Object(re["f"])(t.baseUrl,i).toString())}return n=oi(n),i=oi(i),!i||i.match(/^data:|javascript:/i)||i.match(/^command:/i)&&!e.isTrusted||i.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)?s:(i=i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),`<a href="#" data-href="${i}" title="${n||i}">${s}</a>`)},c.paragraph=t=>{if(e.supportThemeIcons){const e=Object(fi["a"])(t);t=e.map(e=>"string"===typeof e?e:e.outerHTML).join("")}return`<p>${t}</p>`},t.codeBlockRenderer&&(c.code=(e,i)=>{const n=t.codeBlockRenderer(i,e),o=li["b"].nextId(),r=Promise.all([n,h]).then(e=>{const t=s.querySelector(`div[data-code="${o}"]`);t&&Xt["M"](t,e[0])}).catch(e=>{});return t.asyncRenderCallback&&r.then(t.asyncRenderCallback),`<div class="code" data-code="${o}">${Object(ee["t"])(e)}</div>`}),t.actionHandler&&t.actionHandler.disposeables.add(it["b"].any(Object(_i["a"])(s,"click"),Object(_i["a"])(s,"auxclick"))(e=>{const i=new mi["a"](e);if(!i.leftButton&&!i.middleButton)return;let n=i.target;if("A"===n.tagName||(n=n.parentElement,n&&"A"===n.tagName))try{const e=n.dataset["href"];e&&t.actionHandler.callback(e,i)}catch(s){Object(o["e"])(s)}finally{i.preventDefault()}})),i.sanitizer=t=>{const i=e.isTrusted?t.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0;return i?t:""},i.sanitize=!0,i.silent=!0,i.renderer=c;let d=null!==(n=e.value)&&void 0!==n?n:"";d.length>1e5&&(d=d.substr(0,1e5)+"…"),e.supportThemeIcons&&(d=Object(ii["b"])(d));const u=hi["parse"](d,i);if(s.innerHTML=Ci(e,u),l(),t.asyncRenderCallback)for(const o of s.getElementsByTagName("img")){const e=Xt["g"](o,"load",()=>{e.dispose(),t.asyncRenderCallback()})}return s}function Ci(e,t){var i;const n=wi(e);return null!==(i=null===bi||void 0===bi?void 0:bi.createHTML(t,n))&&void 0!==i?i:ui(t,n)}function wi(e){const t=[de["c"].http,de["c"].https,de["c"].mailto,de["c"].data,de["c"].file,de["c"].vscodeRemote,de["c"].vscodeRemoteResource];return e.isTrusted&&t.push(de["c"].command),{allowedSchemes:t,allowedTags:["ul","li","p","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"],allowedAttributes:{a:["href","name","target","data-href"],img:["src","title","alt","width","height"],div:["class","data-code"],span:["class","style"],th:["align"],td:["align"]},filter(t){return"span"!==t.tag||!e.isTrusted||(t.attrs["style"]&&1===Object.keys(t.attrs).length?!!t.attrs["style"].match(/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/):!!t.attrs["class"]&&!!t.attrs["class"].match(/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/))}}}var Si,yi=i("5bd7"),Di=i("4d05"),Li=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},xi=function(e,t){return function(i,n){t(i,n,e)}},ki=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let Ei=class e{constructor(e,t,i){this._options=e,this._modeService=t,this._openerService=i,this._onDidRenderAsync=new it["a"],this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){const n=new a["b"];let s;return s=e?vi(e,Object.assign(Object.assign({},this._getRenderOptions(n)),t),i):document.createElement("span"),{element:s,dispose:()=>n.dispose()}}_getRenderOptions(t){return{baseUrl:this._options.baseUrl,codeBlockRenderer:(t,i)=>ki(this,void 0,void 0,(function*(){var n,s,o,r;let a;t?a=this._modeService.getModeIdForLanguageName(t):this._options.editor&&(a=null===(n=this._options.editor.getModel())||void 0===n?void 0:n.getLanguageIdentifier().language),a||(a="plaintext"),this._modeService.triggerMode(a);const l=null!==(s=yield p["A"].getPromise(a))&&void 0!==s?s:void 0,h=document.createElement("span");h.innerHTML=null!==(r=null===(o=e._ttpTokenizer)||void 0===o?void 0:o.createHTML(i,l))&&void 0!==r?r:Object(Di["b"])(i,l);let c=this._options.codeBlockFontFamily;return this._options.editor&&(c=this._options.editor.getOption(38).fontFamily),c&&(h.style.fontFamily=c),h})),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:e=>this._openerService.open(e,{fromUserGesture:!0,allowContributedOpeners:!0}).catch(o["e"]),disposeables:t}}}};Ei._ttpTokenizer=null===(Si=window.trustedTypes)||void 0===Si?void 0:Si.createPolicy("tokenizeToString",{createHTML(e,t){return Object(Di["b"])(e,t)}}),Ei=Li([xi(1,ze["a"]),xi(2,yi["a"])],Ei);var Ni=i("70c3");class Oi{constructor(){let e;this._onDidWillResize=new it["a"],this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new it["a"],this.onDidResize=this._onDidResize.event,this._sashListener=new a["b"],this._size=new Xt["b"](0,0),this._minSize=new Xt["b"](0,0),this._maxSize=new Xt["b"](Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new Ni["b"](this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new Ni["b"](this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new Ni["b"](this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:Ni["a"].North}),this._southSash=new Ni["b"](this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:Ni["a"].South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let t=0,i=0;this._sashListener.add(it["b"].any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{void 0===e&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)})),this._sashListener.add(it["b"].any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{void 0!==e&&(e=void 0,t=0,i=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(n=>{e&&(i=n.currentX-n.startX,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(n=>{e&&(i=-(n.currentX-n.startX),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(n=>{e&&(t=-(n.currentY-n.startY),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(n=>{e&&(t=n.currentY-n.startY,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(it["b"].any(this._eastSash.onDidReset,this._westSash.onDidReset)(e=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(it["b"].any(this._northSash.onDidReset,this._southSash.onDidReset)(e=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this.domNode.remove()}enableSashes(e,t,i,n){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=i?3:0,this._westSash.state=n?3:0}layout(e=this.size.height,t=this.size.width){const{height:i,width:n}=this._minSize,{height:s,width:o}=this._maxSize;e=Math.max(i,Math.min(s,e)),t=Math.max(n,Math.min(o,t));const r=new Xt["b"](t,e);Xt["b"].equals(r,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=r,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}var Ii=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Ti=function(e,t){return function(i,n){t(i,n,e)}};function Mi(e){return!!e&&Boolean(e.completion.documentation||e.completion.detail&&e.completion.detail!==e.completion.label)}let Ai=class{constructor(e,t){this._editor=e,this._onDidClose=new it["a"],this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new it["a"],this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new a["b"],this._renderDisposeable=new a["b"],this._borderWidth=1,this._size=new Xt["b"](330,0),this.domNode=Xt["a"](".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(Ei,{editor:e}),this._body=Xt["a"](".body"),this._scrollbar=new ei["a"](this._body,{}),Xt["m"](this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=Xt["m"](this._body,Xt["a"](".header")),this._close=Xt["m"](this._header,Xt["a"]("span"+_t["b"].close.cssSelector)),this._close.title=se["a"]("details.close","Close"),this._type=Xt["m"](this._header,Xt["a"]("p.type")),this._docs=Xt["m"](this._body,Xt["a"]("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(e=>{e.hasChanged(38)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(38),i=t.fontFamily,n=e.get(102)||t.fontSize,s=e.get(103)||t.lineHeight,o=t.fontWeight,r=n+"px",a=s+"px";this.domNode.style.fontSize=r,this.domNode.style.lineHeight=a,this.domNode.style.fontWeight=o,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=i,this._close.style.height=a,this._close.style.width=a}getLayoutInfo(){const e=this._editor.getOption(103)||this._editor.getOption(38).lineHeight,t=this._borderWidth,i=2*t;return{lineHeight:e,borderWidth:t,borderHeight:i,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=se["a"]("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,2*this.getLayoutInfo().lineHeight),this._onDidChangeContents.fire(this)}renderItem(e,t){var i;this._renderDisposeable.clear();let{detail:n,documentation:s}=e.completion;if(t){let t="";t+=`score: ${e.score[0]}${e.word?`, compared '${e.completion.filterText&&(e.completion.filterText,1)||"string"===typeof e.completion.label?e.completion.label:e.completion.label.name}' with '${e.word}'`:" (no prefix)"}\n`,t+=`distance: ${e.distance}, see localityBonus-setting\n`,t+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}\n`,t+=`commit characters: ${null===(i=e.completion.commitCharacters)||void 0===i?void 0:i.join("")}\n`,s=(new ni).appendCodeblock("empty",t),n="Provider: "+e.provider._debugDisplayName}if(t||Mi(e)){if(this.domNode.classList.remove("no-docs","no-type"),n){const e=n.length>1e5?n.substr(0,1e5)+"…":n;this._type.textContent=e,this._type.title=e,Xt["R"](this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gim.test(e))}else Xt["p"](this._type),this._type.title="",Xt["G"](this._type),this.domNode.classList.add("no-type");if(Xt["p"](this._docs),"string"===typeof s)this._docs.classList.remove("markdown-docs"),this._docs.textContent=s;else if(s){this._docs.classList.add("markdown-docs"),Xt["p"](this._docs);const e=this._markdownRenderer.render(s);this._docs.appendChild(e.element),this._renderDisposeable.add(e),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=e=>{e.preventDefault(),e.stopPropagation()},this._close.onclick=e=>{e.preventDefault(),e.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}else this.clearContents()}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(e,t){const i=new Xt["b"](e,t);Xt["b"].equals(i,this._size)||(this._size=i,Xt["S"](this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};Ai=Ii([Ti(1,ne["a"])],Ai);class Ri{constructor(e,t){let i,n;this.widget=e,this._editor=t,this._disposables=new a["b"],this._added=!1,this._resizable=new Oi,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let s=0,o=0;this._disposables.add(this._resizable.onDidWillResize(()=>{i=this._topLeft,n=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(e=>{if(i&&n){this.widget.layout(e.dimension.width,e.dimension.height);let t=!1;e.west&&(o=n.width-e.dimension.width,t=!0),e.north&&(s=n.height-e.dimension.height,t=!0),t&&this._applyTopLeft({top:i.top+s,left:i.left+o})}e.done&&(i=void 0,n=void 0,s=0,o=0,this._userSize=e.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var e;this._anchorBox&&this._placeAtAnchor(this._anchorBox,null!==(e=this._userSize)&&void 0!==e?e:this.widget.size)}))}dispose(){this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(e=!1){this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e){var t;const i=Xt["z"](e);this._anchorBox=i,this._placeAtAnchor(this._anchorBox,null!==(t=this._userSize)&&void 0!==t?t:this.widget.size)}_placeAtAnchor(e,t){const i=Xt["v"](document.body),n=this.widget.getLayoutInfo();let s,o,r,a,l=new Xt["b"](220,2*n.lineHeight),h=0,c=e.top,d=e.top+e.height-n.borderHeight,u=i.width-(e.left+e.width+n.borderWidth+n.horizontalPadding);h=-n.borderWidth+e.left+e.width,a=!0,s=new Xt["b"](u,i.height-e.top-n.borderHeight-n.verticalPadding),o=s.with(void 0,e.top+e.height-n.borderHeight-n.verticalPadding),t.width>u&&(e.left>u&&(u=e.left-n.borderWidth-n.horizontalPadding,a=!1,h=Math.max(n.horizontalPadding,e.left-t.width-n.borderWidth),s=s.with(u),o=s.with(void 0,o.height)),e.width>1.3*u&&i.height-(e.top+e.height)>e.height&&(u=e.width,h=e.left,c=-n.borderWidth+e.top+e.height,s=new Xt["b"](e.width-n.borderHeight,i.height-e.top-e.height-n.verticalPadding),o=s.with(void 0,e.top-n.verticalPadding),l=l.with(s.width)));let g,p=t.height,m=Math.max(s.height,o.height);p>m&&(p=m),p<=s.height?(r=!0,g=s):(r=!1,g=o),this._applyTopLeft({left:h,top:r?c:d-p}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!r,a,r,!a),this._resizable.minSize=l,this._resizable.maxSize=g,this._resizable.layout(p,Math.min(g.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this.getDomNode().style.left=this._topLeft.left+"px",this.getDomNode().style.top=this._topLeft.top+"px"}}var Fi=i("5aa5"),Pi=(i("afa2"),i("f070")),Bi=i("533b"),Wi=i("6dec"),Vi=i("b0cd"),ji=i("eff2"),Hi=(i("40c2"),i("a60f")),zi=i("b835");class Ui extends Pi["b"]{constructor(e,t){super(),this._onDidChangeVisibility=new it["a"],this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=Object(Xt["m"])(e,Object(Xt["a"])(".monaco-dropdown")),this._label=Object(Xt["m"])(this._element,Object(Xt["a"])(".dropdown-label"));let i=t.labelRenderer;i||(i=e=>(e.textContent=t.label||"",null));for(const s of[Xt["d"].CLICK,Xt["d"].MOUSE_DOWN,Hi["a"].Tap])this._register(Object(Xt["g"])(this.element,s,e=>Xt["c"].stop(e,!0)));for(const s of[Xt["d"].MOUSE_DOWN,Hi["a"].Tap])this._register(Object(Xt["g"])(this._label,s,e=>{e instanceof MouseEvent&&e.detail>1||(this.visible?this.hide():this.show())}));this._register(Object(Xt["g"])(this._label,Xt["d"].KEY_UP,e=>{const t=new zi["a"](e);(t.equals(3)||t.equals(10))&&(Xt["c"].stop(e,!0),this.visible?this.hide():this.show())}));const n=i(this._label);n&&this._register(n),this._register(Hi["b"].addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class Ki extends Ui{constructor(e,t){super(e,t),this._actions=[],this._contextMenuProvider=t.contextMenuProvider,this.actions=t.actions||[],this.actionProvider=t.actionProvider,this.menuClassName=t.menuClassName||"",this.menuAsChild=!!t.menuAsChild}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:e=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this.menuClassName,onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class $i extends ji["b"]{constructor(e,t,i,n={}){super(null,e,n),this.options=n,this.actionItem=null,this._onDidChangeVisibility=this._register(new it["a"]),this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=e=>{this.element=Object(Xt["m"])(e,Object(Xt["a"])("a.action-label"));let t=[];return"string"===typeof this.options.classNames?t=this.options.classNames.split(/\s+/g).filter(e=>!!e):this.options.classNames&&(t=this.options.classNames),t.find(e=>"icon"===e)||t.push("codicon"),this.element.classList.add(...t),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",null},i=Array.isArray(this.menuActionsOrProvider),n={contextMenuProvider:this.contextMenuProvider,labelRenderer:t,menuAsChild:this.options.menuAsChild,actions:i?this.menuActionsOrProvider:void 0,actionProvider:i?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new Ki(e,n)),this._register(this.dropdownMenu.onDidChangeVisibility(e=>{var t;null===(t=this.element)||void 0===t||t.setAttribute("aria-expanded",""+e),this._onDidChangeVisibility.fire(e)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const e=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return e.options.anchorAlignmentProvider()}})}this.updateEnabled()}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}updateEnabled(){var e,t;const i=!this.getAction().enabled;null===(e=this.actionItem)||void 0===e||e.classList.toggle("disabled",i),null===(t=this.element)||void 0===t||t.classList.toggle("disabled",i)}}var qi=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Gi=function(e,t){return function(i,n){t(i,n,e)}};let Yi=class extends ji["a"]{constructor(e,t,i){super(void 0,e,{icon:!(!e.class&&!e.item.icon),label:!e.class&&!e.item.icon}),this._action=e,this._keybindingService=t,this._notificationService=i,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new a["d"]),this._altKey=Xt["e"].getInstance()}get _commandAction(){return this._wantsAltCommand&&this._action.alt||this._action}onClick(e){e.preventDefault(),e.stopPropagation(),this.actionRunner.run(this._commandAction,this._context).catch(e=>this._notificationService.error(e))}render(e){super.render(e),e.classList.add("menu-entry"),this._updateItemClass(this._action.item);let t=!1,i=this._altKey.keyStatus.altKey||(ue["j"]||ue["d"])&&this._altKey.keyStatus.shiftKey;const n=()=>{const e=t&&i;e!==this._wantsAltCommand&&(this._wantsAltCommand=e,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._action.alt&&this._register(this._altKey.event(e=>{i=e.altKey||(ue["j"]||ue["d"])&&e.shiftKey,n()})),this._register(Object(_i["a"])(e,"mouseleave")(e=>{t=!1,n()})),this._register(Object(_i["a"])(e,"mouseenter")(e=>{t=!0,n()}))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}updateTooltip(){if(this.label){const e=this._keybindingService.lookupKeybinding(this._commandAction.id),t=e&&e.getLabel(),i=this._commandAction.tooltip||this._commandAction.label;this.label.title=t?Object(se["a"])("titleAndKb","{0} ({1})",i,t):i}}updateClass(){this.options.icon&&(this._commandAction!==this._action?this._action.alt&&this._updateItemClass(this._action.alt.item):this._action.alt&&this._updateItemClass(this._action.item))}_updateItemClass(e){var t;this._itemClassDispose.value=void 0;const{element:i,label:n}=this;if(!i||!n)return;const s=this._commandAction.checked&&(null===(t=e.toggled)||void 0===t?void 0:t.icon)?e.toggled.icon:e.icon;if(s)if(ke["d"].isThemeIcon(s)){const e=ke["d"].asClassName(s);n.classList.add(...e.split(" ")),this._itemClassDispose.value=Object(a["h"])(()=>{n.classList.remove(...e.split(" "))})}else s.light&&n.style.setProperty("--menu-entry-icon-light",Object(Xt["o"])(s.light)),s.dark&&n.style.setProperty("--menu-entry-icon-dark",Object(Xt["o"])(s.dark)),n.classList.add("icon"),this._itemClassDispose.value=Object(a["h"])(()=>{n.classList.remove("icon"),n.style.removeProperty("--menu-entry-icon-light"),n.style.removeProperty("--menu-entry-icon-dark")})}};Yi=qi([Gi(1,Wi["a"]),Gi(2,Vi["a"])],Yi);let Zi=class extends $i{constructor(e,t){super(e,{getActions:()=>e.actions},t,{menuAsChild:!0,classNames:ke["d"].isThemeIcon(e.item.icon)?ke["d"].asClassName(e.item.icon):void 0})}render(e){if(super.render(e),this.element){e.classList.add("menu-entry");const{icon:t}=this._action.item;t&&!ke["d"].isThemeIcon(t)&&(this.element.classList.add("icon"),t.light&&this.element.style.setProperty("--menu-entry-icon-light",Object(Xt["o"])(t.light)),t.dark&&this.element.style.setProperty("--menu-entry-icon-dark",Object(Xt["o"])(t.dark)))}}};Zi=qi([Gi(1,Bi["a"])],Zi);var Xi=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Qi=function(e,t){return function(i,n){t(i,n,e)}};class Ji extends Yi{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id);if(!e)return super.updateLabel();this.label&&(this.label.textContent=Object(se["a"])("ddd","{0} ({1})",this._action.label,Ji.symbolPrintEnter(e)))}static symbolPrintEnter(e){var t;return null===(t=e.getLabel())||void 0===t?void 0:t.replace(/\benter\b/gi,"⏎")}}let en=class{constructor(e,t,i,n){this._menuService=i,this._contextKeyService=n,this._menuDisposables=new a["b"],this.element=Xt["m"](e,Xt["a"](".suggest-status-bar"));const s=e=>e instanceof v["c"]?t.createInstance(Ji,e):void 0;this._leftActions=new Fi["a"](this.element,{actionViewItemProvider:s}),this._rightActions=new Fi["a"](this.element,{actionViewItemProvider:s}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(W,this._contextKeyService),t=()=>{const t=[],i=[];for(let[n,s]of e.getActions())"left"===n?t.push(...s):i.push(...s);this._leftActions.clear(),this._leftActions.push(t),this._rightActions.clear(),this._rightActions.push(i)};this._menuDisposables.add(e.onDidChange(()=>t())),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};en=Xi([Qi(1,ne["a"]),Qi(2,v["a"]),Qi(3,f["b"])],en);var tn,nn=i("c4e3"),sn=i("32a4");function on(e,t,i,n){const s=n===tn.ROOT_FOLDER?["rootfolder-icon"]:n===tn.FOLDER?["folder-icon"]:["file-icon"];if(i){let o;if(i.scheme===de["c"].data){const e=re["a"].parseMetaData(i);o=e.get(re["a"].META_DATA_LABEL)}else o=an(Object(re["c"])(i).toLowerCase());if(n===tn.FOLDER)s.push(o+"-name-folder-icon");else{if(o){if(s.push(o+"-name-file-icon"),o.length<=255){const e=o.split(".");for(let t=1;t<e.length;t++)s.push(e.slice(t).join(".")+"-ext-file-icon")}s.push("ext-file-icon")}const n=rn(e,t,i);n&&s.push(an(n)+"-lang-file-icon")}}return s}function rn(e,t,i){if(!i)return null;let n=null;if(i.scheme===de["c"].data){const e=re["a"].parseMetaData(i),s=e.get(re["a"].META_DATA_MIME);s&&(n=t.getModeId(s))}else{const t=e.getModel(i);t&&(n=t.getModeId())}return n&&n!==sn["c"]?n:t.getModeIdByFilepathOrFirstLine(i)}function an(e){return e.replace(/[\11\12\14\15\40]/g,"/")}(function(e){e[e["FILE"]=0]="FILE",e[e["FOLDER"]=1]="FOLDER",e[e["ROOT_FOLDER"]=2]="ROOT_FOLDER"})(tn||(tn={}));var ln,hn=i("1b69"),cn=i("bf5b"),dn=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},un=function(e,t){return function(i,n){t(i,n,e)}};function gn(e){return"suggest-aria-id:"+e}const pn=Object(cn["b"])("suggest-more-info",_t["b"].chevronRight,se["a"]("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),mn=new(ln=class e{extract(t,i){if(t.textLabel.match(e._regexStrict))return i[0]=t.textLabel,!0;if(t.completion.detail&&t.completion.detail.match(e._regexStrict))return i[0]=t.completion.detail,!0;if("string"===typeof t.completion.documentation){const n=e._regexRelaxed.exec(t.completion.documentation);if(n&&(0===n.index||n.index+n[0].length===t.completion.documentation.length))return i[0]=n[0],!0}return!1}},ln._regexRelaxed=/(#([\da-fA-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*\))/,ln._regexStrict=new RegExp(`^${ln._regexRelaxed.source}$`,"i"),ln);let fn=class{constructor(e,t,i,n){this._editor=e,this._modelService=t,this._modeService=i,this._themeService=n,this._onDidToggleDetails=new it["a"],this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const t=Object.create(null);t.disposables=new a["b"],t.root=e,t.root.classList.add("show-file-icons"),t.icon=Object(Xt["m"])(e,Object(Xt["a"])(".icon")),t.colorspan=Object(Xt["m"])(t.icon,Object(Xt["a"])("span.colorspan"));const i=Object(Xt["m"])(e,Object(Xt["a"])(".contents")),n=Object(Xt["m"])(i,Object(Xt["a"])(".main"));t.iconContainer=Object(Xt["m"])(n,Object(Xt["a"])(".icon-label.codicon")),t.left=Object(Xt["m"])(n,Object(Xt["a"])("span.left")),t.right=Object(Xt["m"])(n,Object(Xt["a"])("span.right")),t.iconLabel=new nn["a"](t.left,{supportHighlights:!0,supportIcons:!0}),t.disposables.add(t.iconLabel),t.parametersLabel=Object(Xt["m"])(t.left,Object(Xt["a"])("span.signature-label")),t.qualifierLabel=Object(Xt["m"])(t.left,Object(Xt["a"])("span.qualifier-label")),t.detailsLabel=Object(Xt["m"])(t.right,Object(Xt["a"])("span.details-label")),t.readMore=Object(Xt["m"])(t.right,Object(Xt["a"])("span.readMore"+ke["d"].asCSSSelector(pn))),t.readMore.title=se["a"]("readMore","Read More");const s=()=>{const e=this._editor.getOptions(),i=e.get(38),s=i.fontFamily,o=i.fontFeatureSettings,r=e.get(102)||i.fontSize,a=e.get(103)||i.lineHeight,l=i.fontWeight,h=r+"px",c=a+"px";t.root.style.fontSize=h,t.root.style.fontWeight=l,n.style.fontFamily=s,n.style.fontFeatureSettings=o,n.style.lineHeight=c,t.icon.style.height=c,t.icon.style.width=c,t.readMore.style.height=c,t.readMore.style.width=c};return s(),t.disposables.add(this._editor.onDidChangeConfiguration(e=>{(e.hasChanged(38)||e.hasChanged(102)||e.hasChanged(103))&&s()})),t}renderElement(e,t,i){var n,o,r;const{completion:a}=e,l="string"===typeof a.label?a.label:a.label.name;i.root.id=gn(t),i.colorspan.style.backgroundColor="";const h={labelEscapeNewLines:!0,matches:Object(b["c"])(e.score)};let c=[];if(19===a.kind&&mn.extract(e,c))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=c[0];else if(20===a.kind&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const e=on(this._modelService,this._modeService,R["a"].from({scheme:"fake",path:l}),tn.FILE),t=on(this._modelService,this._modeService,R["a"].from({scheme:"fake",path:a.detail}),tn.FILE);h.extraClasses=e.length>t.length?e:t}else 23===a.kind&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",h.extraClasses=Object(s["j"])([on(this._modelService,this._modeService,R["a"].from({scheme:"fake",path:l}),tn.FOLDER),on(this._modelService,this._modeService,R["a"].from({scheme:"fake",path:a.detail}),tn.FOLDER)])):(i.icon.className="icon hide",i.iconContainer.className="",i.iconContainer.classList.add("suggest-icon",...Object(p["D"])(a.kind).split(" ")));a.tags&&a.tags.indexOf(1)>=0&&(h.extraClasses=(h.extraClasses||[]).concat(["deprecated"]),h.matches=[]),i.iconLabel.setLabel(l,void 0,h),"string"===typeof a.label?(i.parametersLabel.textContent="",i.qualifierLabel.textContent="",i.detailsLabel.textContent=(a.detail||"").replace(/\n.*$/m,""),i.root.classList.add("string-label"),i.root.title=""):(i.parametersLabel.textContent=(a.label.parameters||"").replace(/\n.*$/m,""),i.qualifierLabel.textContent=(a.label.qualifier||"").replace(/\n.*$/m,""),i.detailsLabel.textContent=(a.label.type||"").replace(/\n.*$/m,""),i.root.classList.remove("string-label"),i.root.title=`${l}${null!==(n=a.label.parameters)&&void 0!==n?n:""}  ${null!==(o=a.label.qualifier)&&void 0!==o?o:""}  ${null!==(r=a.label.type)&&void 0!==r?r:""}`),this._editor.getOption(101).showInlineDetails?Object(Xt["R"])(i.detailsLabel):Object(Xt["G"])(i.detailsLabel),Mi(e)?(i.right.classList.add("can-expand-details"),Object(Xt["R"])(i.readMore),i.readMore.onmousedown=e=>{e.stopPropagation(),e.preventDefault()},i.readMore.onclick=e=>{e.stopPropagation(),e.preventDefault(),this._onDidToggleDetails.fire()}):(i.right.classList.remove("can-expand-details"),Object(Xt["G"])(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};fn=dn([un(1,hn["a"]),un(2,ze["a"]),un(3,ke["b"])],fn);var _n=i("5717b"),bn=i("9c1d"),vn=i("4779"),Cn=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},wn=function(e,t){return function(i,n){t(i,n,e)}};let Sn=class extends bn["a"]{constructor(e,t,i,n,s,o,r,a,l,h){super(e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),{},n,s,o,r,a,l,h),this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(i.onDidChangeConfiguration(e=>this._onParentConfigurationChanged(e)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){pi["f"](this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};Sn=Cn([wn(3,ne["a"]),wn(4,_n["a"]),wn(5,M["b"]),wn(6,f["b"]),wn(7,ke["b"]),wn(8,Vi["a"]),wn(9,vn["b"])],Sn);var yn=i("49d9"),Dn=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Ln=function(e,t){return function(i,n){t(i,n,e)}},xn=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const kn=Object(Ee["Wb"])("editorSuggestWidget.background",{dark:Ee["N"],light:Ee["N"],hc:Ee["N"]},se["a"]("editorSuggestWidgetBackground","Background color of the suggest widget.")),En=Object(Ee["Wb"])("editorSuggestWidget.border",{dark:Ee["O"],light:Ee["O"],hc:Ee["O"]},se["a"]("editorSuggestWidgetBorder","Border color of the suggest widget.")),Nn=Object(Ee["Wb"])("editorSuggestWidget.foreground",{dark:Ee["A"],light:Ee["A"],hc:Ee["A"]},se["a"]("editorSuggestWidgetForeground","Foreground color of the suggest widget.")),On=Object(Ee["Wb"])("editorSuggestWidget.selectedBackground",{dark:Ee["Ub"],light:Ee["Ub"],hc:Ee["Ub"]},se["a"]("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget.")),In=Object(Ee["Wb"])("editorSuggestWidget.highlightForeground",{dark:Ee["sb"],light:Ee["sb"],hc:Ee["sb"]},se["a"]("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget."));class Tn{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof Sn}`}restore(){var e;const t=null!==(e=this._service.get(this._key,0))&&void 0!==e?e:"";try{const e=JSON.parse(t);if(Xt["b"].is(e))return Xt["b"].lift(e)}catch(i){}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let Mn=class e{constructor(e,t,i,n,s){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._ignoreFocusEvents=!1,this._explainMode=!1,this._showTimeout=new Ve["g"],this._disposables=new a["b"],this._onDidSelect=new it["a"],this._onDidFocus=new it["a"],this._onDidHide=new it["a"],this._onDidShow=new it["a"],this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new it["a"],this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new Oi,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new An(this,e),this._persistedSize=new Tn(t,e);class o{constructor(e,t,i=!1,n=!1){this.persistedSize=e,this.currentSize=t,this.persistHeight=i,this.persistWidth=n}}let r;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),r=new o(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(e=>{var t,i,n,s;if(this._resize(e.dimension.width,e.dimension.height),r&&(r.persistHeight=r.persistHeight||!!e.north||!!e.south,r.persistWidth=r.persistWidth||!!e.east||!!e.west),e.done){if(r){const{itemHeight:e,defaultSize:o}=this.getLayoutInfo(),a=Math.round(e/2);let{width:l,height:h}=this.element.size;(!r.persistHeight||Math.abs(r.currentSize.height-h)<=a)&&(h=null!==(i=null===(t=r.persistedSize)||void 0===t?void 0:t.height)&&void 0!==i?i:o.height),(!r.persistWidth||Math.abs(r.currentSize.width-l)<=a)&&(l=null!==(s=null===(n=r.persistedSize)||void 0===n?void 0:n.width)&&void 0!==s?s:o.width),this._persistedSize.store(new Xt["b"](l,h))}this._contentWidget.unlockPreference(),r=void 0}})),this._messageElement=Xt["m"](this.element.domNode,Xt["a"](".message")),this._listElement=Xt["m"](this.element.domNode,Xt["a"](".tree"));const l=s.createInstance(Ai,this.editor);l.onDidClose(this.toggleDetails,this,this._disposables),this._details=new Ri(l,this.editor);const h=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(101).showIcons);h();const c=s.createInstance(fn,this.editor);this._disposables.add(c),this._disposables.add(c.onDidToggleDetails(()=>this.toggleDetails())),this._list=new Qt["c"]("SuggestWidget",this._listElement,{getHeight:e=>this.getLayoutInfo().itemHeight,getTemplateId:e=>"suggestion"},[c],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,accessibilityProvider:{getRole:()=>"option",getAriaLabel:e=>{const t="string"===typeof e.completion.label?e.completion.label:e.completion.label.name;if(e.isResolved&&this._isDetailsVisible()){const{documentation:i,detail:n}=e.completion,s=ee["w"]("{0}{1}",n||"",i?"string"===typeof i?i:i.value:"");return se["a"]("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",t,s)}return t},getWidgetAriaLabel:()=>se["a"]("suggest","Suggest"),getWidgetRole:()=>"listbox"}}),this._status=s.createInstance(en,this.element.domNode);const d=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(101).showStatusBar);d(),this._disposables.add(Object(Jt["a"])(this._list,n,{listInactiveFocusBackground:On,listInactiveFocusOutline:Ee["b"]})),this._disposables.add(n.onDidColorThemeChange(e=>this._onThemeChange(e))),this._onThemeChange(n.getColorTheme()),this._disposables.add(this._list.onMouseDown(e=>this._onListMouseDownOrTap(e))),this._disposables.add(this._list.onTap(e=>this._onListMouseDownOrTap(e))),this._disposables.add(this._list.onDidChangeSelection(e=>this._onListSelection(e))),this._disposables.add(this._list.onDidChangeFocus(e=>this._onListFocus(e))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(e=>{e.hasChanged(101)&&(d(),h())})),this._ctxSuggestWidgetVisible=B.Visible.bindTo(i),this._ctxSuggestWidgetDetailsVisible=B.DetailsVisible.bindTo(i),this._ctxSuggestWidgetMultipleSuggestions=B.MultipleSuggestions.bindTo(i),this._disposables.add(Xt["k"](this._details.widget.domNode,"keydown",e=>{this._onDetailsKeydown.fire(e)})),this._disposables.add(this.editor.onMouseDown(e=>this._onEditorMouseDown(e)))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){0!==this._state&&this._contentWidget.layout()}_onListMouseDownOrTap(e){"undefined"!==typeof e.element&&"undefined"!==typeof e.index&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){const i=this._completionModel;i&&(this._onDidSelect.fire({item:e,index:t,model:i}),this.editor.focus())}_onThemeChange(e){const t=e.getColor(kn);t&&(this.element.domNode.style.backgroundColor=t.toString(),this._messageElement.style.backgroundColor=t.toString(),this._details.widget.domNode.style.backgroundColor=t.toString());const i=e.getColor(En);i&&(this.element.domNode.style.borderColor=i.toString(),this._messageElement.style.borderColor=i.toString(),this._status.element.style.borderTopColor=i.toString(),this._details.widget.domNode.style.borderColor=i.toString(),this._detailsBorderColor=i.toString());const n=e.getColor(Ee["S"]);n&&(this._detailsFocusBorderColor=n.toString()),this._details.widget.borderWidth="hc"===e.type?2:1}_onListFocus(e){var t;if(this._ignoreFocusEvents)return;if(!e.elements.length)return this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),void this.editor.setAriaOptions({activeDescendant:void 0});if(!this._completionModel)return;const i=e.elements[0],n=e.indexes[0];i!==this._focusedItem&&(null===(t=this._currentSuggestionDetails)||void 0===t||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=i,this._list.reveal(n),this._currentSuggestionDetails=Object(Ve["h"])(e=>xn(this,void 0,void 0,(function*(){const t=Object(Ve["i"])(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250);e.onCancellationRequested(()=>t.dispose());const n=yield i.resolve(e);return t.dispose(),n}))),this._currentSuggestionDetails.then(()=>{n>=this._list.length||i!==this._list.element(n)||(this._ignoreFocusEvents=!0,this._list.splice(n,1,[i]),this._list.setFocus([n]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:gn(n)}))}).catch(o["e"])),this._onDidFocus.fire({item:i,index:n,model:this._completionModel})}_setState(t){if(this._state!==t)switch(this._state=t,this.element.domNode.classList.toggle("frozen",4===t),this.element.domNode.classList.remove("message"),t){case 0:Xt["G"](this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=e.LOADING_MESSAGE,Xt["G"](this._listElement,this._status.element),Xt["R"](this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=e.NO_SUGGESTIONS_MESSAGE,Xt["G"](this._listElement,this._status.element),Xt["R"](this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:Xt["G"](this._messageElement),Xt["R"](this._listElement,this._status.element),this._show();break;case 4:Xt["G"](this._messageElement),Xt["R"](this._listElement,this._status.element),this._show();break;case 5:Xt["G"](this._messageElement),Xt["R"](this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(e,t){0===this._state&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=Object(Ve["i"])(()=>this._setState(1),t)))}showSuggestions(e,t,i,n){var s,o;if(this._contentWidget.setPosition(this.editor.getPosition()),null===(s=this._loadingTimeout)||void 0===s||s.dispose(),null===(o=this._currentSuggestionDetails)||void 0===o||o.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),i&&2!==this._state&&0!==this._state)return void this._setState(4);const r=this._completionModel.items.length,a=0===r;if(this._ctxSuggestWidgetMultipleSuggestions.set(r>1),a)return this._setState(n?0:2),void(this._completionModel=void 0);this._focusedItem=void 0,this._list.splice(0,this._list.length,this._completionModel.items),this._setState(i?4:3),this._list.reveal(t,0),this._list.setFocus([t]),this._layout(this.element.size),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(0!==this._state&&2!==this._state&&1!==this._state&&this._completionModel)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){5===this._state?(this._setState(3),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)):3===this._state&&this._isDetailsVisible()&&(this._setState(5),this._detailsFocusBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsFocusBorderColor))}toggleDetails(){this._isDetailsVisible()?(this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):!Mi(this._list.getFocusedElements()[0])||3!==this._state&&5!==this._state&&4!==this._state||(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")}toggleExplainMode(){this._list.getFocusedElements()[0]&&this._isDetailsVisible()&&(this._explainMode=!this._explainMode,this.showDetails(!1))}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var e;null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._setState(0),this._onDidHide.fire(this);const t=this._persistedSize.restore(),i=Math.ceil(4.3*this.getLayoutInfo().itemHeight);t&&t.height<i&&this._persistedSize.store(t.with(void 0,i))}isFrozen(){return 4===this._state}_afterRender(e){null!==e?2!==this._state&&1!==this._state&&(this._isDetailsVisible()&&this._details.show(),this._positionDetails()):this._isDetailsVisible()&&this._details.hide()}_layout(e){var t,i,n;if(!this.editor.hasModel())return;if(!this.editor.getDomNode())return;const s=Xt["v"](document.body),o=this.getLayoutInfo();e||(e=o.defaultSize);let r=e.height,a=e.width;if(this._status.element.style.lineHeight=o.itemHeight+"px",2===this._state||1===this._state)r=o.itemHeight+o.borderHeight,a=o.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new Xt["b"](a,r),this._contentWidget.setPreference(2);else{const l=s.width-o.borderHeight-2*o.horizontalPadding;a>l&&(a=l);const h=this._completionModel?this._completionModel.stats.pLabelLen*o.typicalHalfwidthCharacterWidth:a,c=o.statusBarHeight+this._list.contentHeight+o.borderHeight,d=o.itemHeight+o.statusBarHeight,u=Xt["z"](this.editor.getDomNode()),g=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),p=u.top+g.top+g.height,m=Math.min(s.height-p-o.verticalPadding,c),f=Math.min(u.top+g.top-o.verticalPadding,c);let _=Math.min(Math.max(f,m)+o.borderHeight,c);r===(null===(t=this._cappedHeight)||void 0===t?void 0:t.capped)&&(r=this._cappedHeight.wanted),r<d&&(r=d),r>_&&(r=_),r>m?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),_=f):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),_=m),this.element.preferredSize=new Xt["b"](h,o.defaultSize.height),this.element.maxSize=new Xt["b"](l,_),this.element.minSize=new Xt["b"](220,d),this._cappedHeight=r===c?{wanted:null!==(n=null===(i=this._cappedHeight)||void 0===i?void 0:i.wanted)&&void 0!==n?n:e.height,capped:r}:void 0}this._resize(a,r)}_resize(e,t){const{width:i,height:n}=this.element.maxSize;e=Math.min(i,e),t=Math.min(n,t);const{statusBarHeight:s}=this.getLayoutInfo();this._list.layout(t-s,e),this._listElement.style.height=t-s+"px",this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode)}getLayoutInfo(){const e=this.editor.getOption(38),t=Object(yn["b"])(this.editor.getOption(103)||e.lineHeight,8,1e3),i=this.editor.getOption(101).showStatusBar&&2!==this._state&&1!==this._state?t:0,n=this._details.widget.borderWidth,s=2*n;return{itemHeight:t,statusBarHeight:i,borderWidth:n,borderHeight:s,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new Xt["b"](430,i+12*t+s)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}};Mn.LOADING_MESSAGE=se["a"]("suggestWidget.loading","Loading..."),Mn.NO_SUGGESTIONS_MESSAGE=se["a"]("suggestWidget.noSuggestions","No suggestions."),Mn=Dn([Ln(1,We["a"]),Ln(2,f["b"]),Ln(3,ke["b"]),Ln(4,ne["a"])],Mn);class An{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return!this._hidden&&this._position&&this._preference?{position:this._position,preference:[this._preference]}:null}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:i,horizontalPadding:n}=this._widget.getLayoutInfo();return new Xt["b"](t+2*i+n,e+2*i)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}Object(ke["f"])((e,t)=>{const i=e.getColor(In);i&&t.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: ${i}; }`);const n=e.getColor(Nn);n&&t.addRule(`.monaco-editor .suggest-widget, .monaco-editor .suggest-details { color: ${n}; }`);const s=e.getColor(Ee["ic"]);s&&t.addRule(`.monaco-editor .suggest-details a { color: ${s}; }`);const o=e.getColor(Ee["hc"]);o&&t.addRule(`.monaco-editor .suggest-details code { background-color: ${o}; }`)});var Rn=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Fn=function(e,t){return function(i,n){t(i,n,e)}};let Pn=class e{constructor(t,i){this._editor=t,this._enabled=!1,this._ckAtEnd=e.AtEnd.bindTo(i),this._configListener=this._editor.onDidChangeConfiguration(e=>e.hasChanged(106)&&this._update()),this._update()}dispose(){var e;this._configListener.dispose(),null===(e=this._selectionListener)||void 0===e||e.dispose(),this._ckAtEnd.reset()}_update(){const e="on"===this._editor.getOption(106);if(this._enabled!==e)if(this._enabled=e,this._enabled){const e=()=>{if(!this._editor.hasModel())return void this._ckAtEnd.set(!1);const e=this._editor.getModel(),t=this._editor.getSelection(),i=e.getWordAtPosition(t.getStartPosition());i?this._ckAtEnd.set(i.endColumn===t.getStartPosition().column):this._ckAtEnd.set(!1)};this._selectionListener=this._editor.onDidChangeCursorSelection(e),e()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};Pn.AtEnd=new f["c"]("atEndOfWord",!1),Pn=Rn([Fn(1,f["b"])],Pn);var Bn=i("3170");class Wn{constructor(e,t,i){this._disposables=new a["b"],this._disposables.add(t.onDidShow(()=>this._onItem(t.getFocusedItem()))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType(n=>{if(this._active&&!t.isFrozen()){const t=n.charCodeAt(n.length-1);this._active.acceptCharacters.has(t)&&e.getOption(0)&&i(this._active.item)}}))}_onItem(e){if(!e||!Object(s["m"])(e.item.completion.commitCharacters))return void this.reset();if(this._active&&this._active.item.item===e.item)return;const t=new Bn["b"];for(const i of e.item.completion.commitCharacters)i.length>0&&t.add(i.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}class Vn{constructor(e,t){this._disposables=new a["b"],this._lastOvertyped=[],this._empty=!0,this._disposables.add(e.onWillType(()=>{if(!this._empty)return;if(!e.hasModel())return;const t=e.getSelections(),i=t.length;let n=!1;for(let e=0;e<i;e++)if(!t[e].isEmpty()){n=!0;break}if(!n)return;this._lastOvertyped=[];const s=e.getModel();for(let e=0;e<i;e++){const i=t[e];if(s.getValueLengthInRange(i)>Vn._maxSelectionLength)return;this._lastOvertyped[e]={value:s.getValueInRange(i),multiline:i.startLineNumber!==i.endLineNumber}}this._empty=!1})),this._disposables.add(t.onDidCancel(e=>{this._empty||e.retrigger||(this._empty=!0)}))}getLastOvertypedInfo(e){if(!this._empty&&e>=0&&e<this._lastOvertyped.length)return this._lastOvertyped[e]}dispose(){this._disposables.dispose()}}Vn._maxSelectionLength=51200;var jn=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Hn=function(e,t){return function(i,n){t(i,n,e)}};let zn=!1;class Un{constructor(e,t){this._model=e,this._position=t;const i=e.getLineMaxColumn(t.lineNumber);if(i!==t.column){const i=e.getOffsetAt(t),n=e.getPositionAt(i+1);this._marker=e.deltaDecorations([],[{range:d["a"].fromPositions(t,n),options:{stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(e){if(this._model.isDisposed()||this._position.lineNumber!==e.lineNumber)return 0;if(this._marker){const t=this._model.getDecorationRange(this._marker[0]),i=this._model.getOffsetAt(t.getStartPosition());return i-this._model.getOffsetAt(e)}return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let Kn=class e{constructor(e,t,i,n,s,o){this._memoryService=t,this._commandService=i,this._contextKeyService=n,this._instantiationService=s,this._logService=o,this._lineSuffix=new a["d"],this._toDispose=new a["b"],this.editor=e,this.model=s.createInstance(ft,this.editor);const l=B.InsertMode.bindTo(n);l.set(e.getOption(101).insertMode),this.model.onDidTrigger(()=>l.set(e.getOption(101).insertMode)),this.widget=this._toDispose.add(new Ve["b"](()=>{const e=this._instantiationService.createInstance(Mn,this.editor);this._toDispose.add(e),this._toDispose.add(e.onDidSelect(e=>this._insertSuggestion(e,0),this));const t=new Wn(this.editor,e,e=>this._insertSuggestion(e,2));this._toDispose.add(t),this._toDispose.add(this.model.onDidSuggest(e=>{0===e.completionModel.items.length&&t.reset()}));const i=B.MakesTextEdit.bindTo(this._contextKeyService),n=B.HasInsertAndReplaceRange.bindTo(this._contextKeyService),s=B.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(Object(a["h"])(()=>{i.reset(),n.reset(),s.reset()})),this._toDispose.add(e.onDidFocus(({item:e})=>{const t=this.editor.getPosition(),o=e.editStart.column,r=t.column;let a=!0;if("smart"===this.editor.getOption(1)&&2===this.model.state&&!e.completion.command&&!e.completion.additionalTextEdits&&!(4&e.completion.insertTextRules)&&r-o===e.completion.insertText.length){const i=this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:o,endLineNumber:t.lineNumber,endColumn:r});a=i!==e.completion.insertText}i.set(a),n.set(!m["a"].equals(e.editInsertEnd,e.editReplaceEnd)),s.set(Boolean(e.provider.resolveCompletionItem)||Boolean(e.completion.documentation)||e.completion.detail!==e.completion.label)})),this._toDispose.add(e.onDetailsKeyDown(e=>{e.toKeybinding().equals(new r["e"](!0,!1,!1,!1,33))||ue["f"]&&e.toKeybinding().equals(new r["e"](!1,!1,!1,!0,33))?e.stopPropagation():e.toKeybinding().isModifierKey()||this.editor.focus()})),e})),this._overtypingCapturer=this._toDispose.add(new Ve["b"](()=>this._toDispose.add(new Vn(this.editor,this.model)))),this._alternatives=this._toDispose.add(new Ve["b"](()=>this._toDispose.add(new tt(this.editor,this._contextKeyService)))),this._toDispose.add(s.createInstance(Pn,e)),this._toDispose.add(this.model.onDidTrigger(e=>{this.widget.value.showTriggered(e.auto,e.shy?250:50),this._lineSuffix.value=new Un(this.editor.getModel(),e.position)})),this._toDispose.add(this.model.onDidSuggest(e=>{if(!e.shy){let t=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.completionModel.items);this.widget.value.showSuggestions(e.completionModel,t,e.isFrozen,e.auto)}})),this._toDispose.add(this.model.onDidCancel(e=>{e.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{zn||(this.model.cancel(),this.model.clear())}));let h=B.AcceptSuggestionsOnEnter.bindTo(n),c=()=>{const e=this.editor.getOption(1);h.set("on"===e||"smart"===e)};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>c())),c()}static get(t){return t.getContribution(e.ID)}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(e,t){if(!e||!e.item)return this._alternatives.value.reset(),this.model.cancel(),void this.model.clear();if(!this.editor.hasModel())return;const i=this.editor.getModel(),n=i.getAlternativeVersionId(),{item:s}=e,r=[],a=new _["b"];1&t||this.editor.pushUndoStop();const h=this.getOverwriteInfo(s,Boolean(8&t));if(this._memoryService.memorize(i,this.editor.getPosition(),s),Array.isArray(s.completion.additionalTextEdits)){const e=l["b"].capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",s.completion.additionalTextEdits.map(e=>c["a"].replace(d["a"].lift(e.range),e.text))),e.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!s.isResolved){const e=new T["a"](!0);let n;const o=i.onDidChangeContent(e=>{if(e.isFlush)return a.cancel(),void o.dispose();for(let t of e.changes){const e=d["a"].getEndPosition(t.range);n&&!m["a"].isBefore(e,n)||(n=e)}});let h=t;t|=2;let u=!1,g=this.editor.onWillType(()=>{g.dispose(),u=!0,2&h||this.editor.pushUndoStop()});r.push(s.resolve(a.token).then(()=>{if(!s.completion.additionalTextEdits||a.token.isCancellationRequested)return!1;if(n&&s.completion.additionalTextEdits.some(e=>m["a"].isBefore(n,d["a"].getStartPosition(e.range))))return!1;u&&this.editor.pushUndoStop();const e=l["b"].capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",s.completion.additionalTextEdits.map(e=>c["a"].replace(d["a"].lift(e.range),e.text))),e.restoreRelativeVerticalPositionOfCursor(this.editor),!u&&2&h||this.editor.pushUndoStop(),!0}).then(t=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",e.elapsed(),t),o.dispose(),g.dispose()}))}let{insertText:u}=s.completion;4&s.completion.insertTextRules||(u=I.escape(u)),Fe.get(this.editor).insert(u,{overwriteBefore:h.overwriteBefore,overwriteAfter:h.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(1&s.completion.insertTextRules),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),2&t||this.editor.pushUndoStop(),s.completion.command?s.completion.command.id===$n.id?this.model.trigger({auto:!0,shy:!1},!0):(r.push(this._commandService.executeCommand(s.completion.command.id,...s.completion.command.arguments?[...s.completion.command.arguments]:[]).catch(o["e"])),this.model.cancel()):this.model.cancel(),4&t&&this._alternatives.value.set(e,e=>{a.cancel();while(i.canUndo()){n!==i.getAlternativeVersionId()&&i.undo(),this._insertSuggestion(e,3|(8&t?8:0));break}}),this._alertCompletionItem(s),Promise.all(r).finally(()=>{this.model.clear(),a.dispose()})}getOverwriteInfo(e,t){Object(A["a"])(this.editor.hasModel());let i="replace"===this.editor.getOption(101).insertMode;t&&(i=!i);const n=e.position.column-e.editStart.column,s=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column,o=this.editor.getPosition().column-e.position.column,r=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:n+o,overwriteAfter:s+r}}_alertCompletionItem({completion:e}){const t="string"===typeof e.label?e.label:e.label.name;if(Object(s["m"])(e.additionalTextEdits)){let i=se["a"]("aria.alert.snippet","Accepting '{0}' made {1} additional edits",t,e.additionalTextEdits.length);Object(n["a"])(i)}}triggerSuggest(e){this.editor.hasModel()&&(this.model.trigger({auto:!1,shy:!1},!1,e),this.editor.revealLine(this.editor.getPosition().lineNumber,0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),i=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},n=e=>{if(4&e.completion.insertTextRules||e.completion.additionalTextEdits)return!0;const t=this.editor.getPosition(),i=e.editStart.column,n=t.column;if(n-i!==e.completion.insertText.length)return!0;const s=this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:i,endLineNumber:t.lineNumber,endColumn:n});return s!==e.completion.insertText};it["b"].once(this.model.onDidTrigger)(e=>{let t=[];it["b"].any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{Object(a["f"])(t),i()},void 0,t),this.model.onDidSuggest(({completionModel:e})=>{if(Object(a["f"])(t),0===e.items.length)return void i();const s=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.items),o=e.items[s];n(o)?(this.editor.pushUndoStop(),this._insertSuggestion({index:s,item:o,model:e},7)):i()},void 0,t)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealLine(t.lineNumber,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const i=this.widget.value.getFocusedItem();let n=0;e&&(n|=4),t&&(n|=8),this._insertSuggestion(i,n)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}};Kn.ID="editor.contrib.suggestController",Kn=jn([Hn(1,Xe),Hn(2,M["b"]),Hn(3,f["b"]),Hn(4,ne["a"]),Hn(5,J["b"])],Kn);class $n extends h["b"]{constructor(){super({id:$n.id,label:se["a"]("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:f["a"].and(u["a"].writable,u["a"].hasCompletionItemProvider),kbOpts:{kbExpr:u["a"].textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t){const i=Kn.get(t);i&&i.triggerSuggest()}}$n.id="editor.action.triggerSuggest",Object(h["k"])(Kn.ID,Kn),Object(h["i"])($n);const qn=190,Gn=h["c"].bindToContribution(Kn.get);Object(h["j"])(new Gn({id:"acceptSelectedSuggestion",precondition:B.Visible,handler(e){e.acceptSelectedSuggestion(!0,!1)}})),Qe["a"].registerKeybindingRule({id:"acceptSelectedSuggestion",when:f["a"].and(B.Visible,u["a"].textInputFocus),primary:2,weight:qn}),Qe["a"].registerKeybindingRule({id:"acceptSelectedSuggestion",when:f["a"].and(B.Visible,u["a"].textInputFocus,B.AcceptSuggestionsOnEnter,B.MakesTextEdit),primary:3,weight:qn}),v["d"].appendMenuItem(W,{command:{id:"acceptSelectedSuggestion",title:se["a"]("accept.insert","Insert")},group:"left",order:1,when:B.HasInsertAndReplaceRange.toNegated()}),v["d"].appendMenuItem(W,{command:{id:"acceptSelectedSuggestion",title:se["a"]("accept.insert","Insert")},group:"left",order:1,when:f["a"].and(B.HasInsertAndReplaceRange,B.InsertMode.isEqualTo("insert"))}),v["d"].appendMenuItem(W,{command:{id:"acceptSelectedSuggestion",title:se["a"]("accept.replace","Replace")},group:"left",order:1,when:f["a"].and(B.HasInsertAndReplaceRange,B.InsertMode.isEqualTo("replace"))}),Object(h["j"])(new Gn({id:"acceptAlternativeSelectedSuggestion",precondition:f["a"].and(B.Visible,u["a"].textInputFocus),kbOpts:{weight:qn,kbExpr:u["a"].textInputFocus,primary:1027,secondary:[1026]},handler(e){e.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:W,group:"left",order:2,when:f["a"].and(B.HasInsertAndReplaceRange,B.InsertMode.isEqualTo("insert")),title:se["a"]("accept.replace","Replace")},{menuId:W,group:"left",order:2,when:f["a"].and(B.HasInsertAndReplaceRange,B.InsertMode.isEqualTo("replace")),title:se["a"]("accept.insert","Insert")}]})),M["a"].registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),Object(h["j"])(new Gn({id:"hideSuggestWidget",precondition:B.Visible,handler:e=>e.cancelSuggestWidget(),kbOpts:{weight:qn,kbExpr:u["a"].textInputFocus,primary:9,secondary:[1033]}})),Object(h["j"])(new Gn({id:"selectNextSuggestion",precondition:f["a"].and(B.Visible,B.MultipleSuggestions),handler:e=>e.selectNextSuggestion(),kbOpts:{weight:qn,kbExpr:u["a"].textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),Object(h["j"])(new Gn({id:"selectNextPageSuggestion",precondition:f["a"].and(B.Visible,B.MultipleSuggestions),handler:e=>e.selectNextPageSuggestion(),kbOpts:{weight:qn,kbExpr:u["a"].textInputFocus,primary:12,secondary:[2060]}})),Object(h["j"])(new Gn({id:"selectLastSuggestion",precondition:f["a"].and(B.Visible,B.MultipleSuggestions),handler:e=>e.selectLastSuggestion()})),Object(h["j"])(new Gn({id:"selectPrevSuggestion",precondition:f["a"].and(B.Visible,B.MultipleSuggestions),handler:e=>e.selectPrevSuggestion(),kbOpts:{weight:qn,kbExpr:u["a"].textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),Object(h["j"])(new Gn({id:"selectPrevPageSuggestion",precondition:f["a"].and(B.Visible,B.MultipleSuggestions),handler:e=>e.selectPrevPageSuggestion(),kbOpts:{weight:qn,kbExpr:u["a"].textInputFocus,primary:11,secondary:[2059]}})),Object(h["j"])(new Gn({id:"selectFirstSuggestion",precondition:f["a"].and(B.Visible,B.MultipleSuggestions),handler:e=>e.selectFirstSuggestion()})),Object(h["j"])(new Gn({id:"toggleSuggestionDetails",precondition:B.Visible,handler:e=>e.toggleSuggestionDetails(),kbOpts:{weight:qn,kbExpr:u["a"].textInputFocus,primary:2058,mac:{primary:266}},menuOpts:[{menuId:W,group:"right",order:1,when:f["a"].and(B.DetailsVisible,B.CanResolve),title:se["a"]("detail.more","show less")},{menuId:W,group:"right",order:1,when:f["a"].and(B.DetailsVisible.toNegated(),B.CanResolve),title:se["a"]("detail.less","show more")}]})),Object(h["j"])(new Gn({id:"toggleExplainMode",precondition:B.Visible,handler:e=>e.toggleExplainMode(),kbOpts:{weight:100,primary:2133}})),Object(h["j"])(new Gn({id:"toggleSuggestionFocus",precondition:B.Visible,handler:e=>e.toggleSuggestionFocus(),kbOpts:{weight:qn,kbExpr:u["a"].textInputFocus,primary:2570,mac:{primary:778}}})),Object(h["j"])(new Gn({id:"insertBestCompletion",precondition:f["a"].and(u["a"].textInputFocus,f["a"].equals("config.editor.tabCompletion","on"),Pn.AtEnd,B.Visible.toNegated(),tt.OtherSuggestions.toNegated(),Fe.InSnippetMode.toNegated()),handler:(e,t)=>{e.triggerSuggestAndAcceptBest(Object(A["h"])(t)?Object.assign({fallback:"tab"},t):{fallback:"tab"})},kbOpts:{weight:qn,primary:2}})),Object(h["j"])(new Gn({id:"insertNextSuggestion",precondition:f["a"].and(u["a"].textInputFocus,f["a"].equals("config.editor.tabCompletion","on"),tt.OtherSuggestions,B.Visible.toNegated(),Fe.InSnippetMode.toNegated()),handler:e=>e.acceptNextSuggestion(),kbOpts:{weight:qn,kbExpr:u["a"].textInputFocus,primary:2}})),Object(h["j"])(new Gn({id:"insertPrevSuggestion",precondition:f["a"].and(u["a"].textInputFocus,f["a"].equals("config.editor.tabCompletion","on"),tt.OtherSuggestions,B.Visible.toNegated(),Fe.InSnippetMode.toNegated()),handler:e=>e.acceptPrevSuggestion(),kbOpts:{weight:qn,kbExpr:u["a"].textInputFocus,primary:1026}})),Object(h["i"])(class extends h["b"]{constructor(){super({id:"editor.action.resetSuggestSize",label:se["a"]("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(e,t){Kn.get(t).resetWidgetSize()}})},"7aad":function(e,t,i){},"7ab3":function(e,t,i){"use strict";i.d(t,"c",(function(){return a})),i.d(t,"d",(function(){return l})),i.d(t,"a",(function(){return h})),i.d(t,"b",(function(){return c}));var n=i("3742"),s=i("30db"),o=i("1e93");let r;function a(){return r||(r=new TextDecoder(s["e"]()?"UTF-16LE":"UTF-16BE")),r}const l="undefined"!==typeof TextDecoder;let h,c;function d(e,t,i){const n=new Uint16Array(e.buffer,t,i);return a().decode(n)}function u(e,t,i){let n=[],s=0;for(let r=0;r<i;r++){const i=o["b"](e,t);t+=2,n[s++]=String.fromCharCode(i)}return n.join("")}l?(h=e=>new g(e),c=d):(h=e=>new p,c=u);class g{constructor(e){this._capacity=0|e,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(0===this._bufferLength)return"";const e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return a().decode(e)}_flushBuffer(){const e=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}write1(e){const t=this._capacity-this._bufferLength;t<=1&&(0===t||n["E"](e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCII(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIIString(e){const t=e.length;if(this._bufferLength+t>=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(let i=0;i<t;i++)this._buffer[this._bufferLength++]=e.charCodeAt(i)}}class p{constructor(){this._pieces=[],this._piecesLen=0}reset(){this._pieces=[],this._piecesLen=0}build(){return this._pieces.join("")}write1(e){this._pieces[this._piecesLen++]=String.fromCharCode(e)}appendASCII(e){this._pieces[this._piecesLen++]=String.fromCharCode(e)}appendASCIIString(e){this._pieces[this._piecesLen++]=e}}},"7ddc":function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i("11f7"),s=i("561a");const o=new RegExp(`(\\\\)?\\$\\((${s["a"].iconNameExpression}(?:${s["a"].iconModifierExpression})?)\\)`,"g");function r(e){const t=new Array;let i,n=0,s=0;while(null!==(i=o.exec(e))){s=i.index||0,t.push(e.substring(n,s)),n=(i.index||0)+i[0].length;const[,o,r]=i;t.push(o?`$(${r})`:a({id:r}))}return n<e.length&&t.push(e.substring(n)),t}function a(e){const t=n["a"]("span");return t.classList.add(...s["a"].asClassNameArray(e)),t}},"7de1":function(e,t,i){"use strict";i.d(t,"a",(function(){return x})),i.d(t,"b",(function(){return I}));var n=i("aa3d"),s=i("a666"),o=i("a60f"),r=i("308f"),a=i("e32d"),l=i("1898"),h=i("42e3"),c=i("9ee1");function d(e,t){const i=[];for(let n of t){if(e.start>=n.range.end)continue;if(e.end<n.range.start)break;const t=c["a"].intersect(e,n.range);c["a"].isEmpty(t)||i.push({range:t,size:n.size})}return i}function u({start:e,end:t},i){return{start:e+i,end:t+i}}function g(e){const t=[];let i=null;for(let n of e){const e=n.range.start,s=n.range.end,o=n.size;i&&o===i.size?i.range.end=s:(i={range:{start:e,end:s},size:o},t.push(i))}return t}function p(...e){return g(e.reduce((e,t)=>e.concat(t),[]))}class m{constructor(){this.groups=[],this._size=0}splice(e,t,i=[]){const n=i.length-t,s=d({start:0,end:e},this.groups),o=d({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(e=>({range:u(e.range,n),size:e.size})),r=i.map((t,i)=>({range:{start:e+i,end:e+i+1},size:t.size}));this.groups=p(s,r,o),this._size=this.groups.reduce((e,t)=>e+t.size*(t.range.end-t.range.start),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;let t=0,i=0;for(let n of this.groups){const s=n.range.end-n.range.start,o=i+s*n.size;if(e<o)return t+Math.floor((e-i)/n.size);t+=s,i=o}return t}indexAfter(e){return Math.min(this.indexAt(e)+1,this.count)}positionAt(e){if(e<0)return-1;let t=0,i=0;for(let n of this.groups){const s=n.range.end-n.range.start,o=i+s;if(e<o)return t+(e-i)*n.size;t+=s*n.size,i=o}return-1}}var f=i("11f7");function _(e){try{e.parentElement&&e.parentElement.removeChild(e)}catch(t){}}class b{constructor(e){this.renderers=e,this.cache=new Map}alloc(e){let t=this.getTemplateCache(e).pop();if(!t){const i=Object(f["a"])(".monaco-list-row"),n=this.getRenderer(e),s=n.renderTemplate(i);t={domNode:i,templateId:e,templateData:s}}return t}release(e){e&&this.releaseRow(e)}releaseRow(e){const{domNode:t,templateId:i}=e;t&&(t.classList.remove("scrolling"),_(t));const n=this.getTemplateCache(i);n.push(e)}getTemplateCache(e){let t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t}dispose(){this.cache.forEach((e,t)=>{for(const i of e){const e=this.getRenderer(t);e.disposeTemplate(i.templateData),i.templateData=null}}),this.cache.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error("No renderer found for "+e);return t}}var v=i("6424"),C=i("e8e3"),w=i("650e"),S=i("5fe7"),y=i("0f70"),D=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};const L={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(e){return[e]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class x{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class k{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class E{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;t<e.files.length;t++){const i=e.files.item(t);i&&(i.size||i.type)&&this.files.push(i)}}}getData(){return{types:this.types,files:this.files}}}function N(e,t){return Array.isArray(e)&&Array.isArray(t)?Object(C["g"])(e,t):e===t}class O{constructor(e){(null===e||void 0===e?void 0:e.getSetSize)?this.getSetSize=e.getSetSize.bind(e):this.getSetSize=(e,t,i)=>i,(null===e||void 0===e?void 0:e.getPosInSet)?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(e,t)=>t+1,(null===e||void 0===e?void 0:e.getRole)?this.getRole=e.getRole.bind(e):this.getRole=e=>"listitem",(null===e||void 0===e?void 0:e.isChecked)?this.isChecked=e.isChecked.bind(e):this.isChecked=e=>{}}}class I{constructor(e,t,i,c=L){if(this.virtualDelegate=t,this.domId="list_id_"+ ++I.InstanceCount,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new S["a"](50),this.splicing=!1,this.dragOverAnimationStopDisposable=s["a"].None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=s["a"].None,this.onDragLeaveTimeout=s["a"].None,this.disposables=new s["b"],this._onDidChangeContentHeight=new r["a"],this._horizontalScrolling=!1,c.horizontalScrolling&&c.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new m;for(const n of i)this.renderers.set(n.templateId,n);this.cache=this.disposables.add(new b(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support","boolean"!==typeof c.mouseSupport||c.mouseSupport),this._horizontalScrolling=Object(n["e"])(c,e=>e.horizontalScrolling,L.horizontalScrolling),this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight="undefined"===typeof c.additionalScrollHeight?0:c.additionalScrollHeight,this.accessibilityProvider=new O(c.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows";const d=Object(n["e"])(c,e=>e.transformOptimization,L.transformOptimization);d&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(o["b"].addTarget(this.rowsContainer)),this.scrollable=new h["a"](Object(n["e"])(c,e=>e.smoothScrolling,!1)?125:0,e=>Object(f["Q"])(e)),this.scrollableElement=this.disposables.add(new l["c"](this.rowsContainer,{alwaysConsumeMouseWheel:Object(n["e"])(c,e=>e.alwaysConsumeMouseWheel,L.alwaysConsumeMouseWheel),horizontal:1,vertical:Object(n["e"])(c,e=>e.verticalScrollMode,L.verticalScrollMode),useShadows:Object(n["e"])(c,e=>e.useShadows,L.useShadows)},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),Object(a["a"])(this.rowsContainer,o["a"].Change)(this.onTouchChange,this,this.disposables),Object(a["a"])(this.scrollableElement.getDomNode(),"scroll")(e=>e.target.scrollTop=0,null,this.disposables),r["b"].map(Object(a["a"])(this.domNode,"dragover"),e=>this.toDragEvent(e))(this.onDragOver,this,this.disposables),r["b"].map(Object(a["a"])(this.domNode,"drop"),e=>this.toDragEvent(e))(this.onDrop,this,this.disposables),Object(a["a"])(this.domNode,"dragleave")(this.onDragLeave,this,this.disposables),Object(a["a"])(window,"dragend")(this.onDragEnd,this,this.disposables),this.setRowLineHeight=Object(n["e"])(c,e=>e.setRowLineHeight,L.setRowLineHeight),this.setRowHeight=Object(n["e"])(c,e=>e.setRowHeight,L.setRowHeight),this.supportDynamicHeights=Object(n["e"])(c,e=>e.supportDynamicHeights,L.supportDynamicHeights),this.dnd=Object(n["e"])(c,e=>e.dnd,L.dnd),this.layout()}get contentHeight(){return this.rangeMap.size}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const e of this.items)this.measureItemWidth(e);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:Object(f["y"])(this.domNode)}),this.rowsContainer.style.width=Math.max(this.scrollWidth||0,this.renderWidth)+"px"}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}updateOptions(e){void 0!==e.additionalScrollHeight&&(this.additionalScrollHeight=e.additionalScrollHeight),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling)}splice(e,t,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),o={start:e,end:e+t},r=c["a"].intersect(n,o),a=new Map;for(let s=r.start;s<r.end;s++){const e=this.items[s];if(e.dragStartDisposable.dispose(),e.row){let t=a.get(e.templateId);t||(t=[],a.set(e.templateId,t));const i=this.renderers.get(e.templateId);i&&i.disposeElement&&i.disposeElement(e.element,s,e.row.templateData,e.size),t.push(e.row)}e.row=null}const l={start:e+t,end:this.items.length},h=c["a"].intersect(l,n),d=c["a"].relativeComplement(l,n),g=i.map(e=>({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:s["a"].None}));let p;0===e&&t>=this.items.length?(this.rangeMap=new m,this.rangeMap.splice(0,0,g),p=this.items,this.items=g):(this.rangeMap.splice(e,t,g),p=this.items.splice(e,t,...g));const f=i.length-t,_=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),b=u(h,f),v=c["a"].intersect(_,b);for(let s=v.start;s<v.end;s++)this.updateItemInDOM(this.items[s],s);const C=c["a"].relativeComplement(b,_);for(const s of C)for(let e=s.start;e<s.end;e++)this.removeItemFromDOM(e);const w=d.map(e=>u(e,f)),S={start:e,end:e+i.length},y=[S,...w].map(e=>c["a"].intersect(_,e)),D=this.getNextToLastElement(y);for(const s of y)for(let e=s.start;e<s.end;e++){const t=this.items[e],i=a.get(t.templateId),n=null===i||void 0===i?void 0:i.pop();this.insertItemInDOM(e,D,n)}for(const s of a.values())for(const e of s)this.cache.release(e);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),p.map(e=>e.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=this._scrollHeight+"px",this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=Object(f["Q"])(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){this.horizontalScrolling?this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth()):this.scrollableElementWidthDelayer.cancel()}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)"undefined"!==typeof t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?0:e+10})}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){const e=this.scrollableElement.getScrollDimensions();return e.height}element(e){return this.items[e].element}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){let i={height:"number"===typeof e?e:Object(f["x"])(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),"undefined"!==typeof t&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:"number"===typeof t?t:Object(f["y"])(this.domNode)}))}render(e,t,i,n,s,o=!1){const r=this.getRenderRange(t,i),a=c["a"].relativeComplement(r,e),l=c["a"].relativeComplement(e,r),h=this.getNextToLastElement(a);if(o){const t=c["a"].intersect(e,r);for(let e=t.start;e<t.end;e++)this.updateItemInDOM(this.items[e],e)}for(const c of a)for(let e=c.start;e<c.end;e++)this.insertItemInDOM(e,h);for(const c of l)for(let e=c.start;e<c.end;e++)this.removeItemFromDOM(e);void 0!==n&&(this.rowsContainer.style.left=`-${n}px`),this.rowsContainer.style.top=`-${t}px`,this.horizontalScrolling&&void 0!==s&&(this.rowsContainer.style.width=Math.max(s,this.renderWidth)+"px"),this.lastRenderTop=t,this.lastRenderHeight=i}insertItemInDOM(e,t,i){const n=this.items[e];n.row||(n.row=null!==i&&void 0!==i?i:this.cache.alloc(n.templateId));const s=this.accessibilityProvider.getRole(n.element)||"listitem";n.row.domNode.setAttribute("role",s);const o=this.accessibilityProvider.isChecked(n.element);"undefined"!==typeof o&&n.row.domNode.setAttribute("aria-checked",String(!!o)),n.row.domNode.parentElement||(t?this.rowsContainer.insertBefore(n.row.domNode,t):this.rowsContainer.appendChild(n.row.domNode)),this.updateItemInDOM(n,e);const r=this.renderers.get(n.templateId);if(!r)throw new Error("No renderer found for template id "+n.templateId);r&&r.renderElement(n.element,e,n.row.templateData,n.size);const l=this.dnd.getDragURI(n.element);if(n.dragStartDisposable.dispose(),n.row.domNode.draggable=!!l,l){const e=Object(a["a"])(n.row.domNode,"dragstart");n.dragStartDisposable=e(e=>this.onDragStart(n.element,l,e))}this.horizontalScrolling&&(this.measureItemWidth(n),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width=y["i"]?"-moz-fit-content":"fit-content",e.width=Object(f["y"])(e.row.domNode);const t=window.getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=this.elementTop(t)+"px",this.setRowHeight&&(e.row.domNode.style.height=e.size+"px"),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=e.size+"px"),e.row.domNode.setAttribute("data-index",""+t),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.row){const i=this.renderers.get(t.templateId);i&&i.disposeElement&&i.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){const e=this.scrollableElement.getScrollPosition();return e.scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return r["b"].map(Object(a["a"])(this.domNode,"click"),e=>this.toMouseEvent(e))}get onMouseDblClick(){return r["b"].map(Object(a["a"])(this.domNode,"dblclick"),e=>this.toMouseEvent(e))}get onMouseMiddleClick(){return r["b"].filter(r["b"].map(Object(a["a"])(this.domNode,"auxclick"),e=>this.toMouseEvent(e)),e=>1===e.browserEvent.button)}get onMouseDown(){return r["b"].map(Object(a["a"])(this.domNode,"mousedown"),e=>this.toMouseEvent(e))}get onContextMenu(){return r["b"].map(Object(a["a"])(this.domNode,"contextmenu"),e=>this.toMouseEvent(e))}get onTouchStart(){return r["b"].map(Object(a["a"])(this.domNode,"touchstart"),e=>this.toTouchEvent(e))}get onTap(){return r["b"].map(Object(a["a"])(this.rowsContainer,o["a"].Tap),e=>this.toGestureEvent(e))}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i="undefined"===typeof t?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i="undefined"===typeof t?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i="undefined"===typeof t?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i="undefined"===typeof t?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){if(!i.dataTransfer)return;const n=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(w["a"].RESOURCES,JSON.stringify([t])),i.dataTransfer.setDragImage){let e;this.dnd.getDragLabel&&(e=this.dnd.getDragLabel(n,i)),"undefined"===typeof e&&(e=String(n.length));const t=Object(f["a"])(".monaco-drag-image");t.textContent=e,document.body.appendChild(t),i.dataTransfer.setDragImage(t,-10,-10),setTimeout(()=>document.body.removeChild(t),0)}this.currentDragData=new x(n),w["c"].CurrentDragAndDropData=new k(n),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,i)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),w["c"].CurrentDragAndDropData&&"vscode-ui"===w["c"].CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(w["c"].CurrentDragAndDropData)this.currentDragData=w["c"].CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new E}const t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop="boolean"===typeof t?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;let i;if(e.browserEvent.dataTransfer.dropEffect="boolean"!==typeof t&&0===t.effect?"copy":"move",i="boolean"!==typeof t&&t.feedback?t.feedback:"undefined"===typeof e.index?[-1]:[e.index],i=Object(C["e"])(i).filter(e=>e>=-1&&e<this.length).sort((e,t)=>e-t),i=-1===i[0]?[-1]:i,N(this.currentDragFeedback,i))return!0;if(this.currentDragFeedback=i,this.currentDragFeedbackDisposable.dispose(),-1===i[0])this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=Object(s["h"])(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const e of i){const t=this.items[e];t.dropTarget=!0,t.row&&t.row.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=Object(s["h"])(()=>{for(const e of i){const t=this.items[e];t.dropTarget=!1,t.row&&t.row.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(){this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=Object(S["i"])(()=>this.clearDragOverFeedback(),100)}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,w["c"].CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,w["c"].CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=s["a"].None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=Object(f["C"])(this.domNode).top;this.dragOverAnimationDisposable=Object(f["l"])(this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=Object(S["i"])(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(void 0===this.dragOverMouseY)return;const t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;while(i instanceof HTMLElement&&i!==this.rowsContainer&&t.contains(i)){const e=i.getAttribute("data-index");if(e){const t=Number(e);if(!isNaN(t))return t}i=i.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,i){const n=this.getRenderRange(e,t);let s,o;e===this.elementTop(n.start)?(s=n.start,o=0):n.end-n.start>1&&(s=n.start+1,o=this.elementTop(s)-e);let r=0;while(1){const a=this.getRenderRange(e,t);let l=!1;for(let e=a.start;e<a.end;e++){const t=this.probeDynamicHeight(e);0!==t&&this.rangeMap.splice(e,1,[this.items[e]]),r+=t,l=l||0!==t}if(!l){0!==r&&this.eventuallyUpdateScrollDimensions();const t=c["a"].relativeComplement(n,a);for(const e of t)for(let t=e.start;t<e.end;t++)this.items[t].row&&this.removeItemFromDOM(t);const l=c["a"].relativeComplement(a,n);for(const e of l)for(let t=e.start;t<e.end;t++){const e=t+1,i=e<this.items.length?this.items[e].row:null,n=i?i.domNode:null;this.insertItemInDOM(t,n)}for(let e=a.start;e<a.end;e++)this.items[e].row&&this.updateItemInDOM(this.items[e],e);if("number"===typeof s){const t=this.scrollable.getFutureScrollPosition().scrollTop-e,n=this.elementTop(s)-o+t;this.setScrollTop(n,i)}return void this._onDidChangeContentHeight.fire(this.contentHeight)}}}probeDynamicHeight(e){const t=this.items[e];if(!t.hasDynamicHeight||t.lastDynamicHeightWidth===this.renderWidth)return 0;if(this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(t.element))return 0;const i=t.size;if(!this.setRowHeight&&t.row){let e=t.row.domNode.offsetHeight;return t.size=e,t.lastDynamicHeightWidth=this.renderWidth,e-i}const n=this.cache.alloc(t.templateId);n.domNode.style.height="",this.rowsContainer.appendChild(n.domNode);const s=this.renderers.get(t.templateId);return s&&(s.renderElement(t.element,e,n.templateData,void 0),s.disposeElement&&s.disposeElement(t.element,e,n.templateData,void 0)),t.size=n.domNode.offsetHeight,this.virtualDelegate.setDynamicHeight&&this.virtualDelegate.setDynamicHeight(t.element,t.size),t.lastDynamicHeightWidth=this.renderWidth,this.rowsContainer.removeChild(n.domNode),this.cache.release(n),t.size-i}getNextToLastElement(e){const t=e[e.length-1];if(!t)return null;const i=this.items[t.end];return i&&i.row?i.row.domNode:null}getElementDomId(e){return`${this.domId}_${e}`}dispose(){if(this.items){for(const e of this.items)if(e.row){const t=this.renderers.get(e.row.templateId);t&&(t.disposeElement&&t.disposeElement(e.element,-1,e.row.templateData,void 0),t.disposeTemplate(e.row.templateData))}this.items=[]}this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),Object(s["f"])(this.disposables)}}I.InstanceCount=0,D([v["a"]],I.prototype,"onMouseClick",null),D([v["a"]],I.prototype,"onMouseDblClick",null),D([v["a"]],I.prototype,"onMouseMiddleClick",null),D([v["a"]],I.prototype,"onMouseDown",null),D([v["a"]],I.prototype,"onContextMenu",null),D([v["a"]],I.prototype,"onTouchStart",null),D([v["a"]],I.prototype,"onTap",null)},"7e32":function(e,t,i){"use strict";i.d(t,"f",(function(){return m})),i.d(t,"b",(function(){return f})),i.d(t,"a",(function(){return _})),i.d(t,"d",(function(){return b})),i.d(t,"e",(function(){return v})),i.d(t,"c",(function(){return C}));var n=i("f070"),s=i("0a0f"),o=i("4fc3"),r=i("9e74"),a=i("a666"),l=i("308f"),h=i("b7d0"),c=i("258a"),d=i("db88"),u=i("561a"),g=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},p=function(e,t){return function(i,n){t(i,n,e)}};function m(e){return void 0!==e.command}class f{constructor(e){this.id=f._idPool++,this._debugName=e}}f._idPool=0,f.CommandPalette=new f("CommandPalette"),f.EditorContext=new f("EditorContext"),f.EditorContextPeek=new f("EditorContextPeek"),f.MenubarEditMenu=new f("MenubarEditMenu"),f.MenubarGoMenu=new f("MenubarGoMenu"),f.MenubarSelectionMenu=new f("MenubarSelectionMenu");const _=Object(s["c"])("menuService"),b=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new l["a"],this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:e=>e===f.CommandPalette}}addCommand(e){return this.addCommands(c["a"].single(e))}addCommands(e){for(const t of e)this._commands.set(t.id,t);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(a["h"])(()=>{let t=!1;for(const i of e)t=this._commands.delete(i.id)||t;t&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(e){return this._commands.get(e)}getCommands(){const e=new Map;return this._commands.forEach((t,i)=>e.set(i,t)),e}appendMenuItem(e,t){return this.appendMenuItems(c["a"].single({id:e,item:t}))}appendMenuItems(e){const t=new Set,i=new d["a"];for(const{id:n,item:s}of e){let e=this._menuItems.get(n);e||(e=new d["a"],this._menuItems.set(n,e)),i.push(e.push(s)),t.add(n)}return this._onDidChangeMenu.fire(t),Object(a["h"])(()=>{if(i.size>0){for(let e of i)e();this._onDidChangeMenu.fire(t),i.clear()}})}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===f.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){const t=new Set;for(const i of e)m(i)&&(t.add(i.command.id),i.alt&&t.add(i.alt.id));this._commands.forEach((i,n)=>{t.has(n)||e.push({command:i})})}};class v extends n["e"]{constructor(e,t,i,n){super("submenuitem."+e.submenu.id,"string"===typeof e.title?e.title:e.title.value,[],"submenu"),this.item=e,this._menuService=t,this._contextKeyService=i,this._options=n}get actions(){const e=[],t=this._menuService.createMenu(this.item.submenu,this._contextKeyService),i=t.getActions(this._options);t.dispose();for(const[,s]of i)s.length>0&&(e.push(...s),e.push(new n["d"]));return e.length&&e.pop(),e}}let C=class e{constructor(t,i,n,s,o){var r;if(this._commandService=o,this.id=t.id,this.label="string"===typeof t.title?t.title:t.title.value,this.tooltip=null!==(r=t.tooltip)&&void 0!==r?r:"",this.enabled=!t.precondition||s.contextMatchesRules(t.precondition),this.checked=!1,t.toggled){const e=t.toggled.condition?t.toggled:{condition:t.toggled};this.checked=s.contextMatchesRules(e.condition),this.checked&&e.tooltip&&(this.tooltip="string"===typeof e.tooltip?e.tooltip:e.tooltip.value)}this.item=t,this.alt=i?new e(i,void 0,n,s,o):void 0,this._options=n,h["d"].isThemeIcon(t.icon)&&(this.class=u["a"].asClassName(t.icon))}dispose(){}run(...e){var t,i;let n=[];return(null===(t=this._options)||void 0===t?void 0:t.arg)&&(n=[...n,this._options.arg]),(null===(i=this._options)||void 0===i?void 0:i.shouldForwardArgs)&&(n=[...n,...e]),this._commandService.executeCommand(this.id,...n)}};C=g([p(3,o["b"]),p(4,r["b"])],C)},"7e93":function(e,t,i){"use strict";i.d(t,"g",(function(){return r})),i.d(t,"f",(function(){return E})),i.d(t,"b",(function(){return N})),i.d(t,"c",(function(){return O})),i.d(t,"a",(function(){return $})),i.d(t,"d",(function(){return q})),i.d(t,"e",(function(){return Z}));var n=i("4035"),s=i("3742");function o(...e){return function(t,i){for(let n=0,s=e.length;n<s;n++){const s=e[n](t,i);if(s)return s}return null}}const r=a.bind(void 0,!0);function a(e,t,i){if(!i||i.length<t.length)return null;let n;return n=e?s["R"](i,t):0===i.indexOf(t),n?t.length>0?[{start:0,end:t.length}]:[]:null}function l(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1===i?null:[{start:i,end:i+e.length}]}function h(e,t){return c(e.toLowerCase(),t.toLowerCase(),0,0)}function c(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]===t[n]){let s=null;return(s=c(e,t,i+1,n+1))?_({start:n,end:n+1},s):null}return c(e,t,i,n+1)}function d(e){return 97<=e&&e<=122}function u(e){return 65<=e&&e<=90}function g(e){return 48<=e&&e<=57}function p(e){return 32===e||9===e||10===e||13===e}const m=new Set;function f(e){return d(e)||u(e)||g(e)}function _(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function b(e,t){for(let i=t;i<e.length;i++){const t=e.charCodeAt(i);if(u(t)||g(t)||i>0&&!f(e.charCodeAt(i-1)))return i}return e.length}function v(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]!==t[n].toLowerCase())return null;{let s=null,o=n+1;s=v(e,t,i+1,n+1);while(!s&&(o=b(t,o))<t.length)s=v(e,t,i+1,o),o++;return null===s?null:_({start:n,end:n+1},s)}}function C(e){let t=0,i=0,n=0,s=0,o=0;for(let c=0;c<e.length;c++)o=e.charCodeAt(c),u(o)&&t++,d(o)&&i++,f(o)&&n++,g(o)&&s++;const r=t/e.length,a=i/e.length,l=n/e.length,h=s/e.length;return{upperPercent:r,lowerPercent:a,alphaPercent:l,numericPercent:h}}function w(e){const{upperPercent:t,lowerPercent:i}=e;return 0===i&&t>.6}function S(e){const{upperPercent:t,lowerPercent:i,alphaPercent:n,numericPercent:s}=e;return i>.2&&t<.8&&n>.6&&s<.2}function y(e){let t=0,i=0,n=0,s=0;for(let o=0;o<e.length;o++)n=e.charCodeAt(o),u(n)&&t++,d(n)&&i++,p(n)&&s++;return 0!==t&&0!==i||0!==s?t<=5:e.length<=30}function D(e,t){if(!t)return null;if(t=t.trim(),0===t.length)return null;if(!y(e))return null;if(t.length>60)return null;const i=C(t);if(!S(i)){if(!w(i))return null;t=t.toLowerCase()}let n=null,s=0;e=e.toLowerCase();while(s<t.length&&null===(n=v(e,t,0,s)))s=b(t,s+1);return n}"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?".split("").forEach(e=>m.add(e.charCodeAt(0)));const L=o(r,D,l),x=o(r,D,h),k=new n["a"](1e4);function E(e,t,i=!1){if("string"!==typeof e||"string"!==typeof t)return null;let n=k.get(e);n||(n=new RegExp(s["p"](e),"i"),k.set(e,n));const o=n.exec(t);return o?[{start:o.index,end:o.index+o[0].length}]:i?x(e,t):L(e,t)}function N(e,t,i,n,s,o){const r=q(e,t,0,n,s,0,!0);if(r)return r;let a=[],l=0,h=o;for(let c=0;c<t.length&&c<I;++c){const e=s.indexOf(t.charAt(c),h);if(e>=0)l+=1,a.unshift(e),h=e+1;else if(a.length>0)break}return[l,o,...a]}function O(e){if("undefined"===typeof e)return[];const t=[],i=e[1];for(let n=e.length-1;n>1;n--){const s=e[n]+i,o=t[t.length-1];o&&o.end===s?o.end=s+1:t.push({start:s,end:s+1})}return t}const I=128;function T(){const e=[],t=[];for(let i=0;i<=I;i++)t[i]=0;for(let i=0;i<=I;i++)e.push(t.slice(0));return e}function M(e){const t=[];for(let i=0;i<=e;i++)t[i]=0;return t}const A=M(2*I),R=M(2*I),F=T(),P=T(),B=T(),W=!1;function V(e,t,i,n,s){function o(e,t,i=" "){while(e.length<t)e=i+e;return e}let r=` |   |${n.split("").map(e=>o(e,3)).join("|")}\n`;for(let a=0;a<=i;a++)r+=0===a?" |":t[a-1]+"|",r+=e[a].slice(0,s+1).map(e=>o(e.toString(),3)).join("|")+"\n";return r}function j(e,t,i,n){e=e.substr(t),i=i.substr(n),console.log(V(P,e,e.length,i,i.length)),console.log(V(B,e,e.length,i,i.length)),console.log(V(F,e,e.length,i,i.length))}function H(e,t){if(t<0||t>=e.length)return!1;const i=e.codePointAt(t);switch(i){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 40:case 91:return!0;case void 0:return!1;default:return!!s["B"](i)}}function z(e,t){if(t<0||t>=e.length)return!1;const i=e.charCodeAt(t);switch(i){case 32:case 9:return!0;default:return!1}}function U(e,t,i){return t[e]!==i[e]}function K(e,t,i,n,s,o,r=!1){while(t<i&&s<o)e[t]===n[s]&&(r&&(A[t]=s),t+=1),s+=1;return t===i}var $;function q(e,t,i,n,s,o,r){const a=e.length>I?I:e.length,l=n.length>I?I:n.length;if(i>=a||o>=l||a-i>l-o)return;if(!K(t,i,a,s,o,l,!0))return;G(a,l,i,o,t,s);let h=1,c=1,d=i,u=o;const g=[!1];for(h=1,d=i;d<a;h++,d++){const r=A[d],p=R[d],m=d+1<a?R[d+1]:l;for(c=r-o+1,u=r;u<m;c++,u++){let a=Number.MIN_SAFE_INTEGER,m=!1;u<=p&&(a=Y(e,t,d,i,n,s,u,l,o,0===F[h-1][c-1],g));let f=0;a!==Number.MAX_SAFE_INTEGER&&(m=!0,f=a+P[h-1][c-1]);const _=u>r,b=_?P[h][c-1]+(F[h][c-1]>0?-5:0):0,v=u>r+1&&F[h][c-1]>0,C=v?P[h][c-2]+(F[h][c-2]>0?-5:0):0;if(v&&(!_||C>=b)&&(!m||C>=f))P[h][c]=C,B[h][c]=3,F[h][c]=0;else if(_&&(!m||b>=f))P[h][c]=b,B[h][c]=2,F[h][c]=0;else{if(!m)throw new Error("not possible");P[h][c]=f,B[h][c]=1,F[h][c]=F[h-1][c-1]+1}}}if(W&&j(e,i,n,o),!g[0]&&!r)return;h--,c--;const p=[P[h][c],o];let m=0,f=0;while(h>=1){let e=c;do{const t=B[h][e];if(3===t)e-=2;else{if(2!==t)break;e-=1}}while(e>=1);m>1&&t[i+h-1]===s[o+c-1]&&!U(e+o-1,n,s)&&m+1>F[h][e]&&(e=c),e===c?m++:m=1,f||(f=e),h--,c=e-1,p.push(c)}l===a&&(p[0]+=2);const _=f-a;return p[0]-=_,p}function G(e,t,i,n,s,o){let r=e-1,a=t-1;while(r>=i&&a>=n)s[r]===o[a]&&(R[r]=a,r--),a--}function Y(e,t,i,n,s,o,r,a,l,h,c){if(t[i]!==o[r])return Number.MIN_SAFE_INTEGER;let d=1,u=!1;return r===i-n?d=e[i]===s[r]?7:5:!U(r,s,o)||0!==r&&U(r-1,s,o)?!H(o,r)||0!==r&&H(o,r-1)?(H(o,r-1)||z(o,r-1))&&(d=5,u=!0):d=5:(d=e[i]===s[r]?7:5,u=!0),d>1&&i===n&&(c[0]=!0),u||(u=U(r,s,o)||H(o,r-1)||z(o,r-1)),i===n?r>l&&(d-=u?3:5):d+=h?u?2:0:u?0:1,r+1===a&&(d-=u?3:5),d}function Z(e,t,i,n,s,o,r){return X(e,t,i,n,s,o,!0,r)}function X(e,t,i,n,s,o,r,a){let l=q(e,t,i,n,s,o,a);if(l&&!r)return l;if(e.length>=3){const t=Math.min(7,e.length-1);for(let r=i+1;r<t;r++){const t=Q(e,r);if(t){const e=q(t,t.toLowerCase(),i,n,s,o,a);e&&(e[0]-=3,(!l||e[0]>l[0])&&(l=e))}}}return l}function Q(e,t){if(t+1>=e.length)return;const i=e[t],n=e[t+1];return i!==n?e.slice(0,t)+n+i+e.slice(t+2):void 0}(function(e){function t(e){return!e||2===e.length&&-100===e[0]&&0===e[1]}e.Default=[-100,0],e.isDefault=t})($||($={}))},8025:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var n=i("7061"),s=i("6a89");class o extends s["a"]{constructor(e,t,i,n){super(e,t,i,n),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=i,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return o.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new o(this.startLineNumber,this.startColumn,e,t):new o(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new n["a"](this.positionLineNumber,this.positionColumn)}setStartPosition(e,t){return 0===this.getDirection()?new o(e,t,this.endLineNumber,this.endColumn):new o(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new o(e.lineNumber,e.column,t.lineNumber,t.column)}static liftSelection(e){return new o(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;i<n;i++)if(!this.selectionsEqual(e[i],t[i]))return!1;return!0}static isISelection(e){return e&&"number"===typeof e.selectionStartLineNumber&&"number"===typeof e.selectionStartColumn&&"number"===typeof e.positionLineNumber&&"number"===typeof e.positionColumn}static createWithDirection(e,t,i,n,s){return 0===s?new o(e,t,i,n):new o(i,n,e,t)}}},"82c9":function(e,t,i){"use strict";i.d(t,"c",(function(){return d})),i.d(t,"b",(function(){return u})),i.d(t,"d",(function(){return g})),i.d(t,"e",(function(){return p})),i.d(t,"f",(function(){return m})),i.d(t,"a",(function(){return f}));var n=i("3d37"),s=i("32b8"),o=i("6d8e"),r=i("3742"),a=i("b589");function l(e){return Object(o["b"])(e,!0)}class h{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:Object(r["f"])(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,i)===this.getComparisonKey(t,i)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}joinPath(e,...t){return o["a"].joinPath(e,...t)}basenameOrAuthority(e){return u(e)||e.authority}basename(e){return s["e"].basename(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===a["c"].file?t=o["a"].file(s["b"](l(e))).path:(t=s["e"].dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===a["c"].file?o["a"].file(s["d"](l(e))).path:s["e"].normalize(e.path),e.with({path:t})}resolvePath(e,t){if(e.scheme===a["c"].file){const i=o["a"].file(s["g"](l(e),t));return e.with({authority:i.authority,path:i.path})}return-1===t.indexOf("/")&&(t=n["d"](t),/^[a-zA-Z]:(\/|$)/.test(t)&&(t="/"+t)),e.with({path:s["e"].resolve(e.path,t)})}}const c=new h(()=>!1),d=(c.isEqual.bind(c),c.basenameOrAuthority.bind(c)),u=c.basename.bind(c),g=c.dirname.bind(c),p=(c.joinPath.bind(c),c.normalizePath.bind(c)),m=c.resolvePath.bind(c);var f;(function(e){function t(t){const i=new Map,n=t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";"));n.split(";").forEach(e=>{const[t,n]=e.split(":");t&&n&&i.set(t,n)});const s=t.path.substring(0,t.path.indexOf(";"));return s&&i.set(e.META_DATA_MIME,s),i}e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=t})(f||(f={}))},8457:function(e,t,i){"use strict";i.r(t);var n=i("fa12");Object(n["a"])({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:function(){return i.e("chunk-2d20ff23").then(i.bind(null,"b692"))}})},8478:function(e,t,i){},8830:function(e,t,i){"use strict";i.d(t,"a",(function(){return w})),i.d(t,"c",(function(){return E})),i.d(t,"b",(function(){return N}));var n=i("dff7"),s=i("308f"),o=i("a666"),r=i("aa3d"),a=i("e8e3"),l=i("fd49"),h=i("62bd"),c=i("fb71"),d=i("0910"),u=i("89cd"),g=i("be5f");const p=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new s["a"],this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus!==e&&(this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus))}},m=Object.hasOwnProperty;class f{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class _{constructor(){this._values=[]}_read(e){return this._values[e]}_write(e,t){this._values[e]=t}}class b{static readOptions(e){const t=e,i=new _;for(const n of l["l"]){const e="_never_"===n.name?void 0:t[n.name];i._write(n.id,e)}return i}static validateOptions(e){const t=new l["j"];for(const i of l["l"])t._write(i.id,i.validate(e._read(i.id)));return t}static computeOptions(e,t){const i=new f;for(const n of l["l"])i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if("object"!==typeof e||"object"!==typeof t)return e===t;if(Array.isArray(e)||Array.isArray(t))return!(!Array.isArray(e)||!Array.isArray(t))&&a["g"](e,t);for(let i in e)if(!b._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const s of l["l"]){const o=!b._deepEquals(e._read(s.id),t._read(s.id));i[s.id]=o,o&&(n=!0)}return n?new l["b"](i):null}}function v(e){const t=e.wordWrap;!0===t?e.wordWrap="on":!1===t&&(e.wordWrap="off");const i=e.lineNumbers;!0===i?e.lineNumbers="on":!1===i&&(e.lineNumbers="off");const n=e.autoClosingBrackets;!1===n&&(e.autoClosingBrackets="never",e.autoClosingQuotes="never",e.autoSurround="never");const s=e.cursorBlinking;"visible"===s&&(e.cursorBlinking="solid");const o=e.renderWhitespace;!0===o?e.renderWhitespace="boundary":!1===o&&(e.renderWhitespace="none");const r=e.renderLineHighlight;!0===r?e.renderLineHighlight="line":!1===r&&(e.renderLineHighlight="none");const a=e.acceptSuggestionOnEnter;!0===a?e.acceptSuggestionOnEnter="on":!1===a&&(e.acceptSuggestionOnEnter="off");const l=e.tabCompletion;!1===l?e.tabCompletion="off":!0===l&&(e.tabCompletion="onlySnippets");const h=e.suggest;if(h&&"object"===typeof h.filteredTypes&&h.filteredTypes){const e={method:"showMethods",function:"showFunctions",constructor:"showConstructors",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};Object(g["b"])(e,e=>{const t=h.filteredTypes[e.key];!1===t&&(h[e.value]=t)})}const c=e.hover;!0===c?e.hover={enabled:!0}:!1===c&&(e.hover={enabled:!1});const d=e.parameterHints;!0===d?e.parameterHints={enabled:!0}:!1===d&&(e.parameterHints={enabled:!1});const u=e.autoIndent;!0===u?e.autoIndent="full":!1===u&&(e.autoIndent="advanced");const p=e.matchBrackets;!0===p?e.matchBrackets="always":!1===p&&(e.matchBrackets="never")}function C(e){const t=r["b"](e);return v(t),t}class w extends o["a"]{constructor(e,t){super(),this._onDidChange=this._register(new s["a"]),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new s["a"]),this.onDidChangeFast=this._onDidChangeFast.event,this.isSimpleWidget=e,this._isDominatedByLongLines=!1,this._computeOptionsMemory=new l["a"],this._viewLineCount=1,this._lineNumbersDigitCount=1,this._rawOptions=C(t),this._readOptions=b.readOptions(this._rawOptions),this._validatedOptions=b.validateOptions(this._readOptions),this._register(h["a"].onDidChangeZoomLevel(e=>this._recomputeOptions())),this._register(p.onDidChangeTabFocus(e=>this._recomputeOptions()))}observeReferenceElement(e){}updatePixelRatio(){}_recomputeOptions(){const e=this.options,t=this._computeInternalOptions();if(e){const i=b.checkEquals(e,t);if(null===i)return;this.options=t,this._onDidChangeFast.fire(i),this._onDidChange.fire(i)}else this.options=t}getRawOptions(){return this._rawOptions}_computeInternalOptions(){const e=this._getEnvConfiguration(),t=c["a"].createFromValidatedSettings(this._validatedOptions,e.zoomLevel,e.pixelRatio,this.isSimpleWidget),i={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,fontInfo:this.readConfiguration(t),extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:p.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport};return b.computeOptions(this._validatedOptions,i)}static _subsetEquals(e,t){for(const i in t)if(m.call(t,i)){const n=t[i],s=e[i];if(s===n)continue;if(Array.isArray(s)&&Array.isArray(n)){if(!a["g"](s,n))return!1;continue}if(s&&"object"===typeof s&&n&&"object"===typeof n){if(!this._subsetEquals(s,n))return!1;continue}return!1}return!0}updateOptions(e){if("undefined"===typeof e)return;const t=C(e);w._subsetEquals(this._rawOptions,t)||(this._rawOptions=r["f"](this._rawOptions,t||{}),this._readOptions=b.readOptions(this._rawOptions),this._validatedOptions=b.validateOptions(this._readOptions),this._recomputeOptions())}setIsDominatedByLongLines(e){this._isDominatedByLongLines=e,this._recomputeOptions()}setMaxLineNumber(e){const t=w._digitCount(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}static _digitCount(e){let t=0;while(e)e=Math.floor(e/10),t++;return t||1}}const S=Object.freeze({id:"editor",order:5,type:"object",title:n["a"]("editorConfigurationTitle","Editor"),scope:5}),y=u["a"].as(d["a"].Configuration),D=Object.assign(Object.assign({},S),{properties:{"editor.tabSize":{type:"number",default:l["d"].tabSize,minimum:1,markdownDescription:n["a"]("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.insertSpaces":{type:"boolean",default:l["d"].insertSpaces,markdownDescription:n["a"]("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.detectIndentation":{type:"boolean",default:l["d"].detectIndentation,markdownDescription:n["a"]("detectIndentation","Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.")},"editor.trimAutoWhitespace":{type:"boolean",default:l["d"].trimAutoWhitespace,description:n["a"]("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:l["d"].largeFileOptimizations,description:n["a"]("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:n["a"]("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[n["a"]("wordBasedSuggestionsMode.currentDocument","Only suggest words from the active document."),n["a"]("wordBasedSuggestionsMode.matchingDocuments","Suggest words from all open documents of the same language."),n["a"]("wordBasedSuggestionsMode.allDocuments","Suggest words from all open documents.")],description:n["a"]("wordBasedSuggestionsMode","Controls from what documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[n["a"]("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),n["a"]("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),n["a"]("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:n["a"]("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:n["a"]("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:n["a"]("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:n["a"]("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:n["a"]("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:n["a"]("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:n["a"]("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:n["a"]("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[n["a"]("wordWrap.off","Lines will never wrap."),n["a"]("wordWrap.on","Lines will wrap at the viewport width."),n["a"]("wordWrap.inherit","Lines will wrap according to the `#editor.wordWrap#` setting.")]}}});function L(e){return"undefined"!==typeof e.type||"undefined"!==typeof e.anyOf}for(const O of l["l"]){const e=O.schema;if("undefined"!==typeof e)if(L(e))D.properties["editor."+O.name]=e;else for(let t in e)m.call(e,t)&&(D.properties[t]=e[t])}let x=null;function k(){return null===x&&(x=Object.create(null),Object.keys(D.properties).forEach(e=>{x[e]=!0})),x}function E(e){const t=k();return t["editor."+e]||!1}function N(e){const t=k();return t["diffEditor."+e]||!1}y.registerConfiguration(D)},8899:function(e,t,i){},"89cd":function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i("ef8e"),s=i("1569");class o{constructor(){this.data=new Map}add(e,t){s["a"](n["i"](e)),s["a"](n["h"](t)),s["a"](!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}const r=new o},"8ae8":function(e,t,i){"use strict";function n(e){return e&&"string"===typeof e.id}i.d(t,"b",(function(){return n})),i.d(t,"a",(function(){return s}));const s={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}},"8bf1":function(e,t,i){"use strict";i.d(t,"c",(function(){return r})),i.d(t,"b",(function(){return a})),i.d(t,"a",(function(){return l})),i.d(t,"d",(function(){return h})),i.d(t,"e",(function(){return c}));var n=i("4dc7"),s=i("b707");class o{clone(){return this}equals(e){return this===e}}const r=new o,a="vs.editor.nullMode",l=new s["r"](a,0);function h(e,t,i,s){return new n["b"]([new n["a"](s,"",e)],i)}function c(e,t,i,s){let o=new Uint32Array(2);return o[0]=s,o[1]=(16384|e<<0|2<<23)>>>0,new n["c"](o,null===i?r:i)}},"8bf4":function(e,t,i){},"8c02":function(e,t,i){"use strict";i.d(t,"a",(function(){return h})),i.d(t,"d",(function(){return u})),i.d(t,"c",(function(){return p})),i.d(t,"e",(function(){return _})),i.d(t,"b",(function(){return b}));var n=i("3742"),s=i("e6ff"),o=i("7061"),r=i("6a89"),a=i("3352");const l=999;class h{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){if(""===this.searchString)return null;let e;e=this.isRegex?c(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=n["q"](this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(o){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new d(t,this.wordSeparators?Object(s["a"])(this.wordSeparators):null,i?this.searchString:null)}}function c(e){if(!e||0===e.length)return!1;for(let t=0,i=e.length;t<i;t++){const n=e.charCodeAt(t);if(92===n){if(t++,t>=i)break;const n=e.charCodeAt(t);if(110===n||114===n||87===n||119===n)return!0}}return!1}class d{constructor(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}function u(e,t,i){if(!i)return new a["b"](e,null);let n=[];for(let s=0,o=t.length;s<o;s++)n[s]=t[s];return new a["b"](e,n)}class g{constructor(e){let t=[],i=0;for(let n=0,s=e.length;n<s;n++)10===e.charCodeAt(n)&&(t[i++]=n);this._lineFeedsOffsets=t}findLineFeedCountBeforeOffset(e){const t=this._lineFeedsOffsets;let i=0,n=t.length-1;if(-1===n)return 0;if(e<=t[0])return 0;while(i<n){const s=i+((n-i)/2>>0);t[s]>=e?n=s-1:t[s+1]>=e?(i=s,n=s):i=s+1}return i+1}}class p{static findMatches(e,t,i,n,s){const o=t.parseSearchRequest();return o?o.regex.multiline?this._doFindMatchesMultiline(e,i,new b(o.wordSeparators,o.regex),n,s):this._doFindMatchesLineByLine(e,i,o,n,s):[]}static _getMultilineMatchRange(e,t,i,n,s,o){let a,l,h=0;if(n?(h=n.findLineFeedCountBeforeOffset(s),a=t+s+h):a=t+s,n){let e=n.findLineFeedCountBeforeOffset(s+o.length),t=e-h;l=a+o.length+t}else l=a+o.length;const c=e.getPositionAt(a),d=e.getPositionAt(l);return new r["a"](c.lineNumber,c.column,d.lineNumber,d.column)}static _doFindMatchesMultiline(e,t,i,n,s){const o=e.getOffsetAt(t.getStartPosition()),r=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new g(r):null,l=[];let h,c=0;i.reset(0);while(h=i.next(r))if(l[c++]=u(this._getMultilineMatchRange(e,o,r,a,h.index,h[0]),h,n),c>=s)return l;return l}static _doFindMatchesLineByLine(e,t,i,n,s){const o=[];let r=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,o,n,s),o}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);r=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,r,o,n,s);for(let l=t.startLineNumber+1;l<t.endLineNumber&&r<s;l++)r=this._findMatchesInLine(i,e.getLineContent(l),l,0,r,o,n,s);if(r<s){const a=e.getLineContent(t.endLineNumber).substring(0,t.endColumn-1);r=this._findMatchesInLine(i,a,t.endLineNumber,0,r,o,n,s)}return o}static _findMatchesInLine(e,t,i,n,s,o,l,h){const c=e.wordSeparators;if(!l&&e.simpleSearch){const l=e.simpleSearch,d=l.length,u=t.length;let g=-d;while(-1!==(g=t.indexOf(l,g+d)))if((!c||_(c,t,u,g,d))&&(o[s++]=new a["b"](new r["a"](i,g+1+n,i,g+1+d+n),null),s>=h))return s;return s}const d=new b(e.wordSeparators,e.regex);let g;d.reset(0);do{if(g=d.next(t),g&&(o[s++]=u(new r["a"](i,g.index+1+n,i,g.index+1+g[0].length+n),g,l),s>=h))return s}while(g);return s}static findNextMatch(e,t,i,n){const s=t.parseSearchRequest();if(!s)return null;const o=new b(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindNextMatchMultiline(e,i,o,n):this._doFindNextMatchLineByLine(e,i,o,n)}static _doFindNextMatchMultiline(e,t,i,n){const s=new o["a"](t.lineNumber,1),a=e.getOffsetAt(s),l=e.getLineCount(),h=e.getValueInRange(new r["a"](s.lineNumber,s.column,l,e.getLineMaxColumn(l)),1),c="\r\n"===e.getEOL()?new g(h):null;i.reset(t.column-1);let d=i.next(h);return d?u(this._getMultilineMatchRange(e,a,h,c,d.index,d[0]),d,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new o["a"](1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const s=e.getLineCount(),o=t.lineNumber,r=e.getLineContent(o),a=this._findFirstMatchInLine(i,r,o,t.column,n);if(a)return a;for(let l=1;l<=s;l++){const t=(o+l-1)%s,r=e.getLineContent(t+1),a=this._findFirstMatchInLine(i,r,t+1,1,n);if(a)return a}return null}static _findFirstMatchInLine(e,t,i,n,s){e.reset(n-1);const o=e.next(t);return o?u(new r["a"](i,o.index+1,i,o.index+1+o[0].length),o,s):null}static findPreviousMatch(e,t,i,n){const s=t.parseSearchRequest();if(!s)return null;const o=new b(s.wordSeparators,s.regex);return s.regex.multiline?this._doFindPreviousMatchMultiline(e,i,o,n):this._doFindPreviousMatchLineByLine(e,i,o,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const s=this._doFindMatchesMultiline(e,new r["a"](1,1,t.lineNumber,t.column),i,n,10*l);if(s.length>0)return s[s.length-1];const a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new o["a"](a,e.getLineMaxColumn(a)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const s=e.getLineCount(),o=t.lineNumber,r=e.getLineContent(o).substring(0,t.column-1),a=this._findLastMatchInLine(i,r,o,n);if(a)return a;for(let l=1;l<=s;l++){const t=(s+o-l-1)%s,r=e.getLineContent(t+1),a=this._findLastMatchInLine(i,r,t+1,n);if(a)return a}return null}static _findLastMatchInLine(e,t,i,n){let s,o=null;e.reset(0);while(s=e.next(t))o=u(new r["a"](i,s.index+1,i,s.index+1+s[0].length),s,n);return o}}function m(e,t,i,n,s){if(0===n)return!0;const o=t.charCodeAt(n-1);if(0!==e.get(o))return!0;if(13===o||10===o)return!0;if(s>0){const i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}function f(e,t,i,n,s){if(n+s===i)return!0;const o=t.charCodeAt(n+s);if(0!==e.get(o))return!0;if(13===o||10===o)return!0;if(s>0){const i=t.charCodeAt(n+s-1);if(0!==e.get(i))return!0}return!1}function _(e,t,i,n,s){return m(e,t,i,n,s)&&f(e,t,i,n,s)}class b{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(i=this._searchRegex.exec(e),!i)return null;const s=i.index,o=i[0].length;if(s===this._prevMatchStartIndex&&o===this._prevMatchLength){if(0===o){n["z"](e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=s,this._prevMatchLength=o,!this._wordSeparators||_(this._wordSeparators,e,t,s,o))return i}while(i);return null}}},"918c":function(e,t,i){"use strict";i.d(t,"f",(function(){return a})),i.d(t,"g",(function(){return l})),i.d(t,"d",(function(){return g})),i.d(t,"c",(function(){return p})),i.d(t,"e",(function(){return f})),i.d(t,"a",(function(){return _})),i.d(t,"h",(function(){return b})),i.d(t,"b",(function(){return C})),i.d(t,"k",(function(){return w})),i.d(t,"j",(function(){return S})),i.d(t,"i",(function(){return y})),i.d(t,"l",(function(){return L})),i.d(t,"m",(function(){return x})),i.d(t,"n",(function(){return E})),i.d(t,"p",(function(){return N})),i.d(t,"o",(function(){return O}));var n=i("dff7"),s=i("ceb8"),o=i("303e"),r=i("b7d0");const a=Object(o["Wb"])("editor.lineHighlightBackground",{dark:null,light:null,hc:null},n["a"]("lineHighlight","Background color for the highlight of line at the cursor position.")),l=Object(o["Wb"])("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},n["a"]("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),h=Object(o["Wb"])("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 so as not to hide underlying decorations."),!0),c=Object(o["Wb"])("editor.rangeHighlightBorder",{dark:null,light:null,hc:o["b"]},n["a"]("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),d=Object(o["Wb"])("editor.symbolHighlightBackground",{dark:o["w"],light:o["w"],hc:null},n["a"]("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),u=Object(o["Wb"])("editor.symbolHighlightBorder",{dark:null,light:null,hc:o["b"]},n["a"]("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),g=Object(o["Wb"])("editorCursor.foreground",{dark:"#AEAFAD",light:s["a"].black,hc:s["a"].white},n["a"]("caret","Color of the editor cursor.")),p=Object(o["Wb"])("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.")),m=Object(o["Wb"])("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},n["a"]("editorWhitespaces","Color of whitespace characters in the editor.")),f=Object(o["Wb"])("editorIndentGuide.background",{dark:m,light:m,hc:m},n["a"]("editorIndentGuides","Color of the editor indentation guides.")),_=Object(o["Wb"])("editorIndentGuide.activeBackground",{dark:m,light:m,hc:m},n["a"]("editorActiveIndentGuide","Color of the active editor indentation guides.")),b=Object(o["Wb"])("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:s["a"].white},n["a"]("editorLineNumbers","Color of editor line numbers.")),v=Object(o["Wb"])("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:o["b"]},n["a"]("editorActiveLineNumber","Color of editor active line number"),!1,n["a"]("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),C=Object(o["Wb"])("editorLineNumber.activeForeground",{dark:v,light:v,hc:v},n["a"]("editorActiveLineNumber","Color of editor active line number")),w=Object(o["Wb"])("editorRuler.foreground",{dark:"#5A5A5A",light:s["a"].lightgrey,hc:s["a"].white},n["a"]("editorRuler","Color of the editor rulers.")),S=(Object(o["Wb"])("editorCodeLens.foreground",{dark:"#999999",light:"#999999",hc:"#999999"},n["a"]("editorCodeLensForeground","Foreground color of editor CodeLens")),Object(o["Wb"])("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},n["a"]("editorBracketMatchBackground","Background color behind matching brackets")),Object(o["Wb"])("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:o["h"]},n["a"]("editorBracketMatchBorder","Color for matching brackets boxes")),Object(o["Wb"])("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},n["a"]("editorOverviewRulerBorder","Color of the overview ruler border."))),y=Object(o["Wb"])("editorOverviewRuler.background",null,n["a"]("editorOverviewRulerBackground","Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.")),D=Object(o["Wb"])("editorGutter.background",{dark:o["q"],light:o["q"],hc:o["q"]},n["a"]("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),L=Object(o["Wb"])("editorUnnecessaryCode.border",{dark:null,light:null,hc:s["a"].fromHex("#fff").transparent(.8)},n["a"]("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),x=Object(o["Wb"])("editorUnnecessaryCode.opacity",{dark:s["a"].fromHex("#000a"),light:s["a"].fromHex("#0007"),hc:null},n["a"]("unnecessaryCodeOpacity","Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the  'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.")),k=new s["a"](new s["b"](0,122,204,.6)),E=(Object(o["Wb"])("editorOverviewRuler.rangeHighlightForeground",{dark:k,light:k,hc:k},n["a"]("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Object(o["Wb"])("editorOverviewRuler.errorForeground",{dark:new s["a"](new s["b"](255,18,18,.7)),light:new s["a"](new s["b"](255,18,18,.7)),hc:new s["a"](new s["b"](255,50,50,1))},n["a"]("overviewRuleError","Overview ruler marker color for errors."))),N=Object(o["Wb"])("editorOverviewRuler.warningForeground",{dark:o["M"],light:o["M"],hc:o["L"]},n["a"]("overviewRuleWarning","Overview ruler marker color for warnings.")),O=Object(o["Wb"])("editorOverviewRuler.infoForeground",{dark:o["G"],light:o["G"],hc:o["F"]},n["a"]("overviewRuleInfo","Overview ruler marker color for infos."));Object(r["f"])((e,t)=>{const i=e.getColor(o["q"]);i&&t.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${i}; }`);const n=e.getColor(o["A"]);n&&t.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${n}; }`);const s=e.getColor(D);s&&t.addRule(`.monaco-editor .margin { background-color: ${s}; }`);const r=e.getColor(h);r&&t.addRule(`.monaco-editor .rangeHighlight { background-color: ${r}; }`);const a=e.getColor(c);a&&t.addRule(`.monaco-editor .rangeHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${a}; }`);const l=e.getColor(d);l&&t.addRule(`.monaco-editor .symbolHighlight { background-color: ${l}; }`);const g=e.getColor(u);g&&t.addRule(`.monaco-editor .symbolHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${g}; }`);const p=e.getColor(m);p&&(t.addRule(`.monaco-editor .mtkw { color: ${p} !important; }`),t.addRule(`.monaco-editor .mtkz { color: ${p} !important; }`))})},"930f":function(e,t,i){},"94a7":function(e,t,i){},"96b9":function(e,t,i){},9768:function(e,t,i){"use strict";i.d(t,"a",(function(){return T}));var n=i("3742"),s=i("3d37"),o=i("32b8"),r=i("4035"),a=i("5fe7");const l="**",h="/",c="[/\\\\]",d="[^/\\\\]",u=/\//g;function g(e){switch(e){case 0:return"";case 1:return d+"*?";default:return`(?:${c}|${d}+${c}|${c}${d}+)*?`}}function p(e,t){if(!e)return[];const i=[];let n=!1,s=!1,o="";for(const r of e){switch(r){case t:if(!n&&!s){i.push(o),o="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":s=!0;break;case"]":s=!1;break}o+=r}return o&&i.push(o),i}function m(e){if(!e)return"";let t="";const i=p(e,h);if(i.every(e=>e===l))t=".*";else{let e=!1;i.forEach((s,o)=>{if(s===l)return void(e||(t+=g(2),e=!0));let r=!1,a="",u=!1,f="";for(const e of s)if("}"!==e&&r)a+=e;else if(!u||"]"===e&&f)switch(e){case"{":r=!0;continue;case"[":u=!0;continue;case"}":const i=p(a,","),s=`(?:${i.map(e=>m(e)).join("|")})`;t+=s,r=!1,a="";break;case"]":t+="["+f+"]",u=!1,f="";break;case"?":t+=d;continue;case"*":t+=g(1);continue;default:t+=n["u"](e)}else{let t;t="-"===e?e:"^"!==e&&"!"!==e||f?e===h?"":n["u"](e):"^",f+=t}o<i.length-1&&(i[o+1]!==l||o+2<i.length)&&(t+=c),e=!1})}return t}const f=/^\*\*\/\*\.[\w\.-]+$/,_=/^\*\*\/([\w\.-]+)\/?$/,b=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,v=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,C=/^\*\*((\/[\w\.-]+)+)\/?$/,w=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,S=new r["a"](1e4),y=function(){return!1},D=function(){return null};function L(e,t){if(!e)return D;let i;i="string"!==typeof e?e.pattern:e,i=i.trim();const n=`${i}_${!!t.trimForExclusions}`;let s,o=S.get(n);if(o)return x(o,e);if(f.test(i)){const e=i.substr(4);o=function(t,n){return"string"===typeof t&&t.endsWith(e)?i:null}}else o=(s=_.exec(k(i,t)))?E(s[1],i):(t.trimForExclusions?v:b).test(i)?N(i,t):(s=C.exec(k(i,t)))?O(s[1].substr(1),i,!0):(s=w.exec(k(i,t)))?O(s[1],i,!1):I(i);return S.set(n,o),x(o,e)}function x(e,t){return"string"===typeof t?e:function(i,n){return s["b"](i,t.base)?e(o["f"](t.base,i),n):null}}function k(e,t){return t.trimForExclusions&&e.endsWith("/**")?e.substr(0,e.length-2):e}function E(e,t){const i="/"+e,n="\\"+e,s=function(s,o){return"string"!==typeof s?null:o?o===e?t:null:s===e||s.endsWith(i)||s.endsWith(n)?t:null},o=[e];return s.basenames=o,s.patterns=[t],s.allBasenames=o,s}function N(e,t){const i=P(e.slice(1,-1).split(",").map(e=>L(e,t)).filter(e=>e!==D),e),n=i.length;if(!n)return D;if(1===n)return i[0];const s=function(t,n){for(let s=0,o=i.length;s<o;s++)if(i[s](t,n))return e;return null},o=i.find(e=>!!e.allBasenames);o&&(s.allBasenames=o.allBasenames);const r=i.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);return r.length&&(s.allPaths=r),s}function O(e,t,i){const n=o["h"]===o["e"].sep,s=n?e:e.replace(u,o["h"]),r=o["h"]+s,a=o["e"].sep+e,l=i?function(i,o){return"string"!==typeof i||i!==s&&!i.endsWith(r)&&(n||i!==e&&!i.endsWith(a))?null:t}:function(i,o){return"string"!==typeof i||i!==s&&(n||i!==e)?null:t};return l.allPaths=[(i?"*/":"./")+e],l}function I(e){try{const t=new RegExp(`^${m(e)}$`);return function(i){return t.lastIndex=0,"string"===typeof i&&t.test(i)?e:null}}catch(t){return D}}function T(e,t,i){return!(!e||"string"!==typeof t)&&M(e)(t,void 0,i)}function M(e,t={}){if(!e)return y;if("string"===typeof e||A(e)){const i=L(e,t);if(i===D)return y;const n=function(e,t){return!!i(e,t)};return i.allBasenames&&(n.allBasenames=i.allBasenames),i.allPaths&&(n.allPaths=i.allPaths),n}return R(e,t)}function A(e){const t=e;return t&&"string"===typeof t.base&&"string"===typeof t.pattern}function R(e,t){const i=P(Object.getOwnPropertyNames(e).map(i=>F(i,e[i],t)).filter(e=>e!==D)),n=i.length;if(!n)return D;if(!i.some(e=>!!e.requiresSiblings)){if(1===n)return i[0];const e=function(e,t){for(let n=0,s=i.length;n<s;n++){const s=i[n](e,t);if(s)return s}return null},t=i.find(e=>!!e.allBasenames);t&&(e.allBasenames=t.allBasenames);const s=i.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);return s.length&&(e.allPaths=s),e}const s=function(e,t,n){let s=void 0;for(let r=0,a=i.length;r<a;r++){const a=i[r];a.requiresSiblings&&n&&(t||(t=o["a"](e)),s||(s=t.substr(0,t.length-o["c"](e).length)));const l=a(e,t,s,n);if(l)return l}return null},r=i.find(e=>!!e.allBasenames);r&&(s.allBasenames=r.allBasenames);const a=i.reduce((e,t)=>t.allPaths?e.concat(t.allPaths):e,[]);return a.length&&(s.allPaths=a),s}function F(e,t,i){if(!1===t)return D;const n=L(e,i);if(n===D)return D;if("boolean"===typeof t)return n;if(t){const i=t.when;if("string"===typeof i){const t=(t,s,o,r)=>{if(!r||!n(t,s))return null;const l=i.replace("$(basename)",o),h=r(l);return Object(a["j"])(h)?h.then(t=>t?e:null):h?e:null};return t.requiresSiblings=!0,t}}return n}function P(e,t){const i=e.filter(e=>!!e.basenames);if(i.length<2)return e;const n=i.reduce((e,t)=>{const i=t.basenames;return i?e.concat(i):e},[]);let s;if(t){s=[];for(let e=0,i=n.length;e<i;e++)s.push(t)}else s=i.reduce((e,t)=>{const i=t.patterns;return i?e.concat(i):e},[]);const o=function(e,t){if("string"!==typeof e)return null;if(!t){let i;for(i=e.length;i>0;i--){const t=e.charCodeAt(i-1);if(47===t||92===t)break}t=e.substr(i)}const i=n.indexOf(t);return-1!==i?s[i]:null};o.basenames=n,o.patterns=s,o.allBasenames=n;const r=e.filter(e=>!e.basenames);return r.push(o),r}},"9c1d":function(e,t,i){"use strict";i.d(t,"a",(function(){return Qs}));var n=i("efdb"),s=i("b2cc"),o=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},r=function(e,t){return function(i,n){t(i,n,e)}};let a=class{constructor(e,t){}dispose(){}};a.ID="editor.contrib.markerDecorations",a=o([r(1,n["a"])],a),Object(s["k"])(a.ID,a);i("96b9");var l=i("dff7"),h=i("11f7"),c=i("fdcc"),d=i("308f"),u=i("a666"),g=i("b589"),p=i("1ddc"),m=i("5717b"),f=i("0f70"),_=i("8025"),b=i("6653"),v=i("30db"),C=i("a60f"),w=i("5d28"),S=i("5fe7"),y=i("00a3");class D{constructor(e,t){this.x=e,this.y=t}toClientCoordinates(){return new L(this.x-h["f"].scrollX,this.y-h["f"].scrollY)}}class L{constructor(e,t){this.clientX=e,this.clientY=t}toPageCoordinates(){return new D(this.clientX+h["f"].scrollX,this.clientY+h["f"].scrollY)}}class x{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n}}function k(e){const t=h["z"](e);return new x(t.left,t.top,t.width,t.height)}class E extends w["a"]{constructor(e,t){super(e),this.pos=new D(this.posx,this.posy),this.editorPos=k(t)}}class N{constructor(e){this._editorViewDomNode=e}_create(e){return new E(e,this._editorViewDomNode)}onContextMenu(e,t){return h["g"](e,"contextmenu",e=>{t(this._create(e))})}onMouseUp(e,t){return h["g"](e,"mouseup",e=>{t(this._create(e))})}onMouseDown(e,t){return h["g"](e,"mousedown",e=>{t(this._create(e))})}onMouseLeave(e,t){return h["h"](e,e=>{t(this._create(e))})}onMouseMoveThrottled(e,t,i,n){const s=(e,t)=>i(e,this._create(t));return h["j"](e,"mousemove",t,s,n)}}class O{constructor(e){this._editorViewDomNode=e}_create(e){return new E(e,this._editorViewDomNode)}onPointerUp(e,t){return h["g"](e,"pointerup",e=>{t(this._create(e))})}onPointerDown(e,t){return h["g"](e,"pointerdown",e=>{t(this._create(e))})}onPointerLeave(e,t){return h["i"](e,e=>{t(this._create(e))})}onPointerMoveThrottled(e,t,i,n){const s=(e,t)=>i(e,this._create(t));return h["j"](e,"pointermove",t,s,n)}}class I extends u["a"]{constructor(e){super(),this._editorViewDomNode=e,this._globalMouseMoveMonitor=this._register(new y["a"]),this._keydownListener=null}startMonitoring(e,t,i,n,s){this._keydownListener=h["k"](document,"keydown",e=>{const t=e.toKeybinding();t.isModifierKey()||this._globalMouseMoveMonitor.stopMonitoring(!0,e.browserEvent)},!0);const o=(e,t)=>i(e,new E(t,this._editorViewDomNode));this._globalMouseMoveMonitor.startMonitoring(e,t,o,n,e=>{this._keydownListener.dispose(),s(e)})}stopMonitoring(){this._globalMouseMoveMonitor.stopMonitoring(!0)}}class T extends u["a"]{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i<n;i++){let n=e[i];switch(n.type){case 0:this.onCompositionStart(n)&&(t=!0);break;case 1:this.onCompositionEnd(n)&&(t=!0);break;case 2:this.onConfigurationChanged(n)&&(t=!0);break;case 3:this.onCursorStateChanged(n)&&(t=!0);break;case 4:this.onDecorationsChanged(n)&&(t=!0);break;case 5:this.onFlushed(n)&&(t=!0);break;case 6:this.onFocusChanged(n)&&(t=!0);break;case 7:this.onLanguageConfigurationChanged(n)&&(t=!0);break;case 8:this.onLineMappingChanged(n)&&(t=!0);break;case 9:this.onLinesChanged(n)&&(t=!0);break;case 10:this.onLinesDeleted(n)&&(t=!0);break;case 11:this.onLinesInserted(n)&&(t=!0);break;case 12:this.onRevealRangeRequest(n)&&(t=!0);break;case 13:this.onScrollChanged(n)&&(t=!0);break;case 15:this.onTokensChanged(n)&&(t=!0);break;case 14:this.onThemeChanged(n)&&(t=!0);break;case 16:this.onTokensColorsChanged(n)&&(t=!0);break;case 17:this.onZonesChanged(n)&&(t=!0);break;default:console.info("View received unknown event: "),console.info(n)}}t&&(this._shouldRender=!0)}}class M extends T{constructor(e){super(),this._context=e,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}class A{static write(e,t){b["a"],e.setAttribute("data-mprt",String(t))}static read(e){const t=e.getAttribute("data-mprt");return null===t?0:parseInt(t,10)}static collect(e,t){let i=[],n=0;while(e&&e!==document.body){if(e===t)break;e.nodeType===e.ELEMENT_NODE&&(i[n++]=this.read(e)),e=e.parentElement}const s=new Uint8Array(n);for(let o=0;o<n;o++)s[o]=i[n-o-1];return s}}class R{constructor(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;const i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e){return this._viewLayout.getVerticalOffsetForLineNumber(e)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class F extends R{constructor(e,t,i){super(e,t),this._viewLines=i}linesVisibleRangesForRange(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)}}class P{constructor(e,t,i){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=i}}class B{constructor(e,t){this.left=Math.round(e),this.width=Math.round(t)}toString(){return`[${this.left},${this.width}]`}}class W{constructor(e,t){this.outsideRenderedLine=e,this.left=Math.round(t)}}class V{constructor(e,t){this.outsideRenderedLine=e,this.ranges=t}}class j{constructor(e,t){this.left=e,this.width=t}toString(){return`[${this.left},${this.width}]`}static compare(e,t){return e.left-t.left}}class H{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(e,t){e.selectNodeContents(t)}static _readClientRects(e,t,i,n,s){const o=this._createRange();try{return o.setStart(e,t),o.setEnd(i,n),o.getClientRects()}catch(r){return null}finally{this._detachRange(o,s)}}static _mergeAdjacentRanges(e){if(1===e.length)return[new B(e[0].left,e[0].width)];e.sort(j.compare);let t=[],i=0,n=e[0].left,s=e[0].width;for(let o=1,r=e.length;o<r;o++){const r=e[o],a=r.left,l=r.width;n+s+.9>=a?s=Math.max(s,a+l-n):(t[i++]=new B(n,s),n=a,s=l)}return t[i++]=new B(n,s),t}static _createHorizontalRangesFromClientRects(e,t){if(!e||0===e.length)return null;const i=[];for(let n=0,s=e.length;n<s;n++){const s=e[n];i[n]=new j(Math.max(0,s.left-t),s.width)}return this._mergeAdjacentRanges(i)}static readHorizontalRanges(e,t,i,n,s,o,r){const a=0,l=e.children.length-1;if(a>l)return null;if(t=Math.min(l,Math.max(a,t)),n=Math.min(l,Math.max(a,n)),t===n&&i===s&&0===i){const i=e.children[t].getClientRects();return this._createHorizontalRangesFromClientRects(i,o)}t!==n&&n>0&&0===s&&(n--,s=1073741824);let h=e.children[t].firstChild,c=e.children[n].firstChild;if(h&&c||(!h&&0===i&&t>0&&(h=e.children[t-1].firstChild,i=1073741824),!c&&0===s&&n>0&&(c=e.children[n-1].firstChild,s=1073741824)),!h||!c)return null;i=Math.min(h.textContent.length,Math.max(0,i)),s=Math.min(c.textContent.length,Math.max(0,s));const d=this._readClientRects(h,i,c,s,r);return this._createHorizontalRangesFromClientRects(d,o)}}var z=i("7416"),U=i("6da2"),K=i("9c41"),$=i("fd49");const q=function(){return!!v["g"]||!(v["d"]||f["i"]||f["j"])}();let G=!0;class Y{constructor(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=t}get clientRectDeltaLeft(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft}}class Z{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(38);this.renderWhitespace=i.get(83),this.renderControlCharacters=i.get(77),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(26),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(53),this.stopRenderingLineAfter=i.get(100),this.fontLigatures=i.get(39)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class X{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=Object(b["b"])(e)}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return(this._options.themeType===K["a"].HIGH_CONTRAST||"selection"===this._options.renderWhitespace)&&(this._isMaybeInvalid=!0,!0)}renderLine(e,t,i,n){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;const s=i.getViewLineRenderingData(e),o=this._options,r=z["a"].filter(s.inlineDecorations,e,s.minColumn,s.maxColumn);let a=null;if(o.themeType===K["a"].HIGH_CONTRAST||"selection"===this._options.renderWhitespace){const t=i.selections;for(const i of t){if(i.endLineNumber<e||i.startLineNumber>e)continue;const t=i.startLineNumber===e?i.startColumn:s.minColumn,n=i.endLineNumber===e?i.endColumn:s.maxColumn;t<n&&(o.themeType===K["a"].HIGH_CONTRAST||"selection"!==this._options.renderWhitespace?r.push(new z["a"](t,n,"inline-selected-text",0)):(a||(a=[]),a.push(new U["b"](t-1,n-1))))}}const l=new U["c"](o.useMonospaceOptimizations,o.canUseHalfwidthRightwardsArrow,s.content,s.continuesWithWrappedLine,s.isBasicASCII,s.containsRTL,s.minColumn-1,s.tokens,r,s.tabSize,s.startVisibleColumn,o.spaceWidth,o.middotWidth,o.wsmiddotWidth,o.stopRenderingLineAfter,o.renderWhitespace,o.renderControlCharacters,o.fontLigatures!==$["e"].OFF,a);if(this._renderedViewLine&&this._renderedViewLine.input.equals(l))return!1;n.appendASCIIString('<div style="top:'),n.appendASCIIString(String(t)),n.appendASCIIString("px;height:"),n.appendASCIIString(String(this._options.lineHeight)),n.appendASCIIString('px;" class="'),n.appendASCIIString(X.CLASS_NAME),n.appendASCIIString('">');const h=Object(U["d"])(l,n);n.appendASCIIString("</div>");let c=null;return G&&q&&s.isBasicASCII&&o.useMonospaceOptimizations&&0===h.containsForeignElements&&s.content.length<300&&l.lineTokens.getCount()<100&&(c=new Q(this._renderedViewLine?this._renderedViewLine.domNode:null,l,h.characterMapping)),c||(c=te(this._renderedViewLine?this._renderedViewLine.domNode:null,l,h.characterMapping,h.containsRTL,h.containsForeignElements)),this._renderedViewLine=c,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof Q}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof Q?this._renderedViewLine.monospaceAssumptionsAreValid():G}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof Q&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,i){if(!this._renderedViewLine)return null;e|=0,t|=0,e=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,e)),t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t));const n=0|this._renderedViewLine.input.stopRenderingLineAfter;let s=!1;-1!==n&&e>n+1&&t>n+1&&(s=!0),-1!==n&&e>n+1&&(e=n+1),-1!==n&&t>n+1&&(t=n+1);const o=this._renderedViewLine.getVisibleRangesForRange(e,t,i);return o&&o.length>0?new V(s,o):null}getColumnOfNodeOffset(e,t,i){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,i):1}}X.CLASS_NAME="view-line";class Q{constructor(e,t,i){this.domNode=e,this.input=t,this._characterMapping=i,this._charWidth=t.spaceWidth}getWidth(){return this._getCharPosition(this._characterMapping.length)}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return G;const e=this.getWidth(),t=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(e-t)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),G=!1),G}toSlowRenderedLine(){return te(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i){const n=this._getCharPosition(e),s=this._getCharPosition(t);return[new B(n,s-n)]}_getCharPosition(e){const t=this._characterMapping.getAbsoluteOffsets();return 0===t.length?0:Math.round(this._charWidth*t[e-1])}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let s=-1;while(t)t=t.previousSibling,s++;const o=this._characterMapping.partDataToCharOffset(s,n,i);return o+1}}class J{constructor(e,t,i,n,s){if(this.domNode=e,this.input=t,this._characterMapping=i,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=s,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||0===this._characterMapping.length){this._pixelOffsetCache=new Int32Array(Math.max(2,this._characterMapping.length+1));for(let e=0,t=this._characterMapping.length;e<=t;e++)this._pixelOffsetCache[e]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}getWidthIsFast(){return-1!==this._cachedWidth}getVisibleRangesForRange(e,t,i){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){const n=this._readPixelOffset(this.domNode,e,i);if(-1===n)return null;const s=this._readPixelOffset(this.domNode,t,i);return-1===s?null:[new B(n,s-n)]}return this._readVisibleRangesForRange(this.domNode,e,t,i)}_readVisibleRangesForRange(e,t,i,n){if(t===i){const i=this._readPixelOffset(e,t,n);return-1===i?null:[new B(i,0)]}return this._readRawVisibleRangesForRange(e,t,i,n)}_readPixelOffset(e,t,i){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth();const t=this._getReadingTarget(e);return t.firstChild?t.firstChild.offsetWidth:0}if(null!==this._pixelOffsetCache){const n=this._pixelOffsetCache[t];if(-1!==n)return n;const s=this._actualReadPixelOffset(e,t,i);return this._pixelOffsetCache[t]=s,s}return this._actualReadPixelOffset(e,t,i)}_actualReadPixelOffset(e,t,i){if(0===this._characterMapping.length){const t=H.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,i.clientRectDeltaLeft,i.endNode);return t&&0!==t.length?t[0].left:-1}if(t===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();const n=this._characterMapping.charOffsetToPartData(t-1),s=U["a"].getPartIndex(n),o=U["a"].getCharIndex(n),r=H.readHorizontalRanges(this._getReadingTarget(e),s,o,s,o,i.clientRectDeltaLeft,i.endNode);if(!r||0===r.length)return-1;const a=r[0].left;if(this.input.isBasicASCII){const e=this._characterMapping.getAbsoluteOffsets(),i=Math.round(this.input.spaceWidth*e[t-1]);if(Math.abs(i-a)<=1)return i}return a}_readRawVisibleRangesForRange(e,t,i,n){if(1===t&&i===this._characterMapping.length)return[new B(0,this.getWidth())];const s=this._characterMapping.charOffsetToPartData(t-1),o=U["a"].getPartIndex(s),r=U["a"].getCharIndex(s),a=this._characterMapping.charOffsetToPartData(i-1),l=U["a"].getPartIndex(a),h=U["a"].getCharIndex(a);return H.readHorizontalRanges(this._getReadingTarget(e),o,r,l,h,n.clientRectDeltaLeft,n.endNode)}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let s=-1;while(t)t=t.previousSibling,s++;const o=this._characterMapping.partDataToCharOffset(s,n,i);return o+1}}class ee extends J{_readVisibleRangesForRange(e,t,i,n){const s=super._readVisibleRangesForRange(e,t,i,n);if(!s||0===s.length||t===i||1===t&&i===this._characterMapping.length)return s;if(!this.input.containsRTL){const t=this._readPixelOffset(e,i,n);if(-1!==t){const e=s[s.length-1];e.left<t&&(e.width=t-e.left)}}return s}}const te=function(){return f["l"]?ie:ne}();function ie(e,t,i,n,s){return new ee(e,t,i,n,s)}function ne(e,t,i,n,s){return new J(e,t,i,n,s)}var se=i("7061"),oe=i("6a89"),re=i("3742"),ae=i("b57f"),le=i("70cb");const he=()=>!0,ce=()=>!1,de=e=>" "===e||"\t"===e;class ue{constructor(e,t,i){this._languageIdentifier=e;const n=i.options,s=n.get(124);this.readOnly=n.get(75),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=n.get(99),this.lineHeight=n.get(53),this.pageSize=Math.max(1,Math.floor(s.height/this.lineHeight)-2),this.useTabStops=n.get(109),this.wordSeparators=n.get(110),this.emptySelectionClipboard=n.get(28),this.copyWithSyntaxHighlighting=n.get(18),this.multiCursorMergeOverlapping=n.get(63),this.multiCursorPaste=n.get(65),this.autoClosingBrackets=n.get(5),this.autoClosingQuotes=n.get(7),this.autoClosingOvertype=n.get(6),this.autoSurround=n.get(10),this.autoIndent=n.get(8),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:ue._getShouldAutoClose(e,this.autoClosingQuotes),bracket:ue._getShouldAutoClose(e,this.autoClosingBrackets)},this.autoClosingPairs=le["a"].getAutoClosingPairs(e.id);let o=ue._getSurroundingPairs(e);if(o)for(const r of o)this.surroundingPairs[r.open]=r.close}static shouldRecreate(e){return e.hasChanged(124)||e.hasChanged(110)||e.hasChanged(28)||e.hasChanged(63)||e.hasChanged(65)||e.hasChanged(5)||e.hasChanged(7)||e.hasChanged(6)||e.hasChanged(10)||e.hasChanged(109)||e.hasChanged(53)||e.hasChanged(75)}get electricChars(){if(!this._electricChars){this._electricChars={};let e=ue._getElectricCharacters(this._languageIdentifier);if(e)for(const t of e)this._electricChars[t]=!0}return this._electricChars}normalizeIndentation(e){return ae["b"].normalizeIndentation(e,this.indentSize,this.insertSpaces)}static _getElectricCharacters(e){try{return le["a"].getElectricCharacters(e.id)}catch(t){return Object(c["e"])(t),null}}static _getShouldAutoClose(e,t){switch(t){case"beforeWhitespace":return de;case"languageDefined":return ue._getLanguageDefinedShouldAutoClose(e);case"always":return he;case"never":return ce}}static _getLanguageDefinedShouldAutoClose(e){try{const t=le["a"].getAutoCloseBeforeSet(e.id);return e=>-1!==t.indexOf(e)}catch(t){return Object(c["e"])(t),ce}}static _getSurroundingPairs(e){try{return le["a"].getSurroundingPairs(e.id)}catch(t){return Object(c["e"])(t),null}}}class ge{constructor(e,t,i,n){this.selectionStart=e,this.selectionStartLeftoverVisibleColumns=t,this.position=i,this.leftoverVisibleColumns=n,this.selection=ge._computeSelection(this.selectionStart,this.position)}equals(e){return this.selectionStartLeftoverVisibleColumns===e.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===e.leftoverVisibleColumns&&this.position.equals(e.position)&&this.selectionStart.equalsRange(e.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(e,t,i,n){return e?new ge(this.selectionStart,this.selectionStartLeftoverVisibleColumns,new se["a"](t,i),n):new ge(new oe["a"](t,i,t,i),n,new se["a"](t,i),n)}static _computeSelection(e,t){let i,n,s,o;return e.isEmpty()?(i=e.startLineNumber,n=e.startColumn,s=t.lineNumber,o=t.column):t.isBeforeOrEqual(e.getStartPosition())?(i=e.endLineNumber,n=e.endColumn,s=t.lineNumber,o=t.column):(i=e.startLineNumber,n=e.startColumn,s=t.lineNumber,o=t.column),new _["a"](i,n,s,o)}}class pe{constructor(e,t,i){this.model=e,this.coordinatesConverter=t,this.cursorConfig=i}}class me{constructor(e){this.modelState=e,this.viewState=null}}class fe{constructor(e){this.modelState=null,this.viewState=e}}class _e{constructor(e,t){this.modelState=e,this.viewState=t}static fromModelState(e){return new me(e)}static fromViewState(e){return new fe(e)}static fromModelSelection(e){const t=e.selectionStartLineNumber,i=e.selectionStartColumn,n=e.positionLineNumber,s=e.positionColumn,o=new ge(new oe["a"](t,i,t,i),0,new se["a"](n,s),0);return _e.fromModelState(o)}static fromModelSelections(e){let t=[];for(let i=0,n=e.length;i<n;i++)t[i]=this.fromModelSelection(e[i]);return t}equals(e){return this.viewState.equals(e.viewState)&&this.modelState.equals(e.modelState)}}class be{constructor(e,t,i){this.type=e,this.commands=t,this.shouldPushStackElementBefore=i.shouldPushStackElementBefore,this.shouldPushStackElementAfter=i.shouldPushStackElementAfter}}class ve{static visibleColumnFromColumn(e,t,i){const n=e.length,s=t-1<n?t-1:n;let o=0,r=0;while(r<s){const t=re["z"](e,s,r);if(r+=t>=65536?2:1,9===t)o=ve.nextRenderTabStop(o,i);else{let i=re["x"](t);while(r<s){const t=re["z"](e,s,r),n=re["x"](t);if(re["c"](i,n))break;r+=t>=65536?2:1,i=n}re["D"](t)||re["B"](t)?o+=2:o+=1}}return o}static visibleColumnFromColumn2(e,t,i){return this.visibleColumnFromColumn(t.getLineContent(i.lineNumber),i.column,e.tabSize)}static columnFromVisibleColumn(e,t,i){if(t<=0)return 1;const n=e.length;let s=0,o=1,r=0;while(r<n){const a=re["z"](e,n,r);let l;if(r+=a>=65536?2:1,9===a)l=ve.nextRenderTabStop(s,i);else{let t=re["x"](a);while(r<n){const i=re["z"](e,n,r),s=re["x"](i);if(re["c"](t,s))break;r+=i>=65536?2:1,t=s}l=re["D"](a)||re["B"](a)?s+2:s+1}const h=r+1;if(l>=t){const e=t-s,i=l-t;return i<e?h:o}s=l,o=h}return n+1}static columnFromVisibleColumn2(e,t,i,n){let s=this.columnFromVisibleColumn(t.getLineContent(i),n,e.tabSize),o=t.getLineMinColumn(i);if(s<o)return o;let r=t.getLineMaxColumn(i);return s>r?r:s}static nextRenderTabStop(e,t){return e+t-e%t}static nextIndentTabStop(e,t){return e+t-e%t}static prevRenderTabStop(e,t){return e-1-(e-1)%t}static prevIndentTabStop(e,t){return e-1-(e-1)%t}}function Ce(e){return"'"===e||'"'===e||"`"===e}class we{static whitespaceVisibleColumn(e,t,i){const n=e.length;let s=0,o=-1,r=-1;for(let a=0;a<n;a++){if(a===t)return[o,r,s];s%i===0&&(o=a,r=s);const n=e.charCodeAt(a);switch(n){case 32:s+=1;break;case 9:s=ve.nextRenderTabStop(s,i);break;default:return[-1,-1,-1]}}return t===n?[o,r,s]:[-1,-1,-1]}static atomicPosition(e,t,i,n){const s=e.length,[o,r,a]=we.whitespaceVisibleColumn(e,t,i);if(-1===a)return-1;let l;switch(n){case 0:l=!0;break;case 1:l=!1;break;case 2:if(a%i===0)return t;l=a%i<=i/2;break}if(l){if(-1===o)return-1;let t=r;for(let n=o;n<s;++n){if(t===r+i)return o;const s=e.charCodeAt(n);switch(s){case 32:t+=1;break;case 9:t=ve.nextRenderTabStop(t,i);break;default:return-1}}return t===r+i?o:-1}const h=ve.nextRenderTabStop(a,i);let c=a;for(let d=t;d<s;d++){if(c===h)return d;const t=e.charCodeAt(d);switch(t){case 32:c+=1;break;case 9:c=ve.nextRenderTabStop(c,i);break;default:return-1}}return c===h?s:-1}}class Se{constructor(e,t){this.lastViewCursorsRenderData=e,this.lastTextareaPosition=t}}class ye{constructor(e,t,i=0,n=null,s=null,o=null){this.element=e,this.type=t,this.mouseColumn=i,this.position=n,!s&&n&&(s=new oe["a"](n.lineNumber,n.column,n.lineNumber,n.column)),this.range=s,this.detail=o}static _typeToString(e){return 1===e?"TEXTAREA":2===e?"GUTTER_GLYPH_MARGIN":3===e?"GUTTER_LINE_NUMBERS":4===e?"GUTTER_LINE_DECORATIONS":5===e?"GUTTER_VIEW_ZONE":6===e?"CONTENT_TEXT":7===e?"CONTENT_EMPTY":8===e?"CONTENT_VIEW_ZONE":9===e?"CONTENT_WIDGET":10===e?"OVERVIEW_RULER":11===e?"SCROLLBAR":12===e?"OVERLAY_WIDGET":"UNKNOWN"}static toString(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+e.detail}toString(){return ye.toString(this)}}class De{static isTextArea(e){return 2===e.length&&3===e[0]&&6===e[1]}static isChildOfViewLines(e){return e.length>=4&&3===e[0]&&7===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&7===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&5===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&8===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}}class Le{constructor(e,t,i){this.model=e.model;const n=e.configuration.options;this.layoutInfo=n.get(124),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(53),this.stickyTabStops=n.get(99),this.typicalHalfwidthCharacterWidth=n.get(38).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return Le.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){const n=i.verticalOffset+i.height/2,s=e.model.getLineCount();let o,r=null,a=null;return i.afterLineNumber!==s&&(a=new se["a"](i.afterLineNumber+1,1)),i.afterLineNumber>0&&(r=new se["a"](i.afterLineNumber,e.model.getLineMaxColumn(i.afterLineNumber))),o=null===a?r:null===r?a:t<n?r:a,{viewZoneId:i.id,afterLineNumber:i.afterLineNumber,positionBefore:r,positionAfter:a,position:o}}return null}getFullLineRangeAtCoord(e){if(this._context.viewLayout.isAfterLines(e)){const e=this._context.model.getLineCount(),t=this._context.model.getLineMaxColumn(e);return{range:new oe["a"](e,t,e,t),isAfterLines:!0}}const t=this._context.viewLayout.getLineNumberAtVerticalOffset(e),i=this._context.model.getLineMaxColumn(t);return{range:new oe["a"](t,1,t,i),isAfterLines:!1}}getLineNumberAtVerticalOffset(e){return this._context.viewLayout.getLineNumberAtVerticalOffset(e)}isAfterLines(e){return this._context.viewLayout.isAfterLines(e)}isInTopPadding(e){return this._context.viewLayout.isInTopPadding(e)}isInBottomPadding(e){return this._context.viewLayout.isInBottomPadding(e)}getVerticalOffsetForLineNumber(e){return this._context.viewLayout.getVerticalOffsetForLineNumber(e)}findAttribute(e,t){return Le._findAttribute(e,t,this._viewHelper.viewDomNode)}static _findAttribute(e,t,i){while(e&&e!==document.body){if(e.hasAttribute&&e.hasAttribute(t))return e.getAttribute(t);if(e===i)return null;e=e.parentNode}return null}getLineWidth(e){return this._viewHelper.getLineWidth(e)}visibleRangeForPosition(e,t){return this._viewHelper.visibleRangeForPosition(e,t)}getPositionFromDOMInfo(e,t){return this._viewHelper.getPositionFromDOMInfo(e,t)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}class xe{constructor(e,t,i){this.editorPos=t,this.pos=i,this.mouseVerticalOffset=Math.max(0,e.getCurrentScrollTop()+i.y-t.y),this.mouseContentHorizontalOffset=e.getCurrentScrollLeft()+i.x-t.x-e.layoutInfo.contentLeft,this.isInMarginArea=i.x-t.x<e.layoutInfo.contentLeft&&i.x-t.x>=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,Oe._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class ke extends xe{constructor(e,t,i,n){super(e,t,i),this._ctx=e,n?(this.target=n,this.targetPath=A.collect(n,e.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}`}fulfill(e,t=null,i=null,n=null){let s=this.mouseColumn;return t&&t.column<this._ctx.model.getLineMaxColumn(t.lineNumber)&&(s=ve.visibleColumnFromColumn(this._ctx.model.getLineContent(t.lineNumber),t.column,this._ctx.model.getTextModelOptions().tabSize)+1),new ye(this.target,e,s,t,i,n)}withTarget(e){return new ke(this._ctx,this.editorPos,this.pos,e)}}const Ee={isAfterLines:!0};function Ne(e){return{isAfterLines:!1,horizontalDistanceToText:e}}class Oe{constructor(e,t){this._context=e,this._viewHelper=t}mouseTargetIsWidget(e){const t=e.target,i=A.collect(t,this._viewHelper.viewDomNode);return!(!De.isChildOfContentWidgets(i)&&!De.isChildOfOverflowingContentWidgets(i))||!!De.isChildOfOverlayWidgets(i)}createMouseTarget(e,t,i,n){const s=new Le(this._context,this._viewHelper,e),o=new ke(s,t,i,n);try{const e=Oe._createMouseTarget(s,o,!1);return e}catch(r){return o.fulfill(0)}}static _createMouseTarget(e,t,i){if(null===t.target){if(i)return t.fulfill(0);const n=Oe._doHitTest(e,t);return n.position?Oe.createMouseTargetFromHitTestPosition(e,t,n.position.lineNumber,n.position.column):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}const n=t;let s=null;return s=s||Oe._hitTestContentWidget(e,n),s=s||Oe._hitTestOverlayWidget(e,n),s=s||Oe._hitTestMinimap(e,n),s=s||Oe._hitTestScrollbarSlider(e,n),s=s||Oe._hitTestViewZone(e,n),s=s||Oe._hitTestMargin(e,n),s=s||Oe._hitTestViewCursor(e,n),s=s||Oe._hitTestTextArea(e,n),s=s||Oe._hitTestViewLines(e,n,i),s=s||Oe._hitTestScrollbar(e,n),s||t.fulfill(0)}static _hitTestContentWidget(e,t){if(De.isChildOfContentWidgets(t.targetPath)||De.isChildOfOverflowingContentWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfill(9,null,null,i):t.fulfill(0)}return null}static _hitTestOverlayWidget(e,t){if(De.isChildOfOverlayWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfill(12,null,null,i):t.fulfill(0)}return null}static _hitTestViewCursor(e,t){if(t.target){const i=e.lastRenderData.lastViewCursorsRenderData;for(const e of i)if(t.target===e.domNode)return t.fulfill(6,e.position)}if(t.isInContentArea){const i=e.lastRenderData.lastViewCursorsRenderData,n=t.mouseContentHorizontalOffset,s=t.mouseVerticalOffset;for(const o of i){if(n<o.contentLeft)continue;if(n>o.contentLeft+o.width)continue;const i=e.getVerticalOffsetForLineNumber(o.position.lineNumber);if(i<=s&&s<=i+o.height)return t.fulfill(6,o.position)}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const e=t.isInContentArea?8:5;return t.fulfill(e,i.position,null,i)}return null}static _hitTestTextArea(e,t){return De.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfill(6,e.lastRenderData.lastTextareaPosition):t.fulfill(1,e.lastRenderData.lastTextareaPosition):null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let s=Math.abs(t.pos.x-t.editorPos.x);const o={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:s};return s-=e.layoutInfo.glyphMarginLeft,s<=e.layoutInfo.glyphMarginWidth?t.fulfill(2,n,i.range,o):(s-=e.layoutInfo.glyphMarginWidth,s<=e.layoutInfo.lineNumbersWidth?t.fulfill(3,n,i.range,o):(s-=e.layoutInfo.lineNumbersWidth,t.fulfill(4,n,i.range,o)))}return null}static _hitTestViewLines(e,t,i){if(!De.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfill(7,new se["a"](1,1),void 0,Ee);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const i=e.model.getLineCount(),n=e.model.getLineMaxColumn(i);return t.fulfill(7,new se["a"](i,n),void 0,Ee)}if(i){if(De.isStrictChildOfViewLines(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.model.getLineLength(i)){const n=e.getLineWidth(i),s=Ne(t.mouseContentHorizontalOffset-n);return t.fulfill(7,new se["a"](i,1),void 0,s)}const n=e.getLineWidth(i);if(t.mouseContentHorizontalOffset>=n){const s=Ne(t.mouseContentHorizontalOffset-n),o=new se["a"](i,e.model.getLineMaxColumn(i));return t.fulfill(7,o,void 0,s)}}return t.fulfill(0)}const n=Oe._doHitTest(e,t);return n.position?Oe.createMouseTargetFromHitTestPosition(e,t,n.position.lineNumber,n.position.column):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}static _hitTestMinimap(e,t){if(De.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfill(11,new se["a"](i,n))}return null}static _hitTestScrollbarSlider(e,t){if(De.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){const i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfill(11,new se["a"](i,n))}}return null}static _hitTestScrollbar(e,t){if(De.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfill(11,new se["a"](i,n))}return null}getMouseColumn(e,t){const i=this._context.configuration.options,n=i.get(124),s=this._context.viewLayout.getCurrentScrollLeft()+t.x-e.x-n.contentLeft;return Oe._getMouseColumn(s,i.get(38).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){if(e<0)return 1;const i=Math.round(e/t);return i+1}static createMouseTargetFromHitTestPosition(e,t,i,n){const s=new se["a"](i,n),o=e.getLineWidth(i);if(t.mouseContentHorizontalOffset>o){const e=Ne(t.mouseContentHorizontalOffset-o);return t.fulfill(7,s,void 0,e)}const r=e.visibleRangeForPosition(i,n);if(!r)return t.fulfill(0,s);const a=r.left;if(t.mouseContentHorizontalOffset===a)return t.fulfill(6,s);const l=[];if(l.push({offset:r.left,column:n}),n>1){const t=e.visibleRangeForPosition(i,n-1);t&&l.push({offset:t.left,column:n-1})}const h=e.model.getLineMaxColumn(i);if(n<h){const t=e.visibleRangeForPosition(i,n+1);t&&l.push({offset:t.left,column:n+1})}l.sort((e,t)=>e.offset-t.offset);for(let c=1;c<l.length;c++){const e=l[c-1],n=l[c];if(e.offset<=t.mouseContentHorizontalOffset&&t.mouseContentHorizontalOffset<=n.offset){const o=new oe["a"](i,e.column,i,n.column);return t.fulfill(6,s,o)}}return t.fulfill(6,s)}static _doHitTestWithCaretRangeFromPoint(e,t){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.getVerticalOffsetForLineNumber(i),s=n+Math.floor(e.lineHeight/2);let o=t.pos.y+(s-t.mouseVerticalOffset);o<=t.editorPos.y&&(o=t.editorPos.y+1),o>=t.editorPos.y+e.layoutInfo.height&&(o=t.editorPos.y+e.layoutInfo.height-1);const r=new D(t.pos.x,o),a=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates());return a.position?a:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=h["B"](e.viewDomNode);let n;if(n=i?"undefined"===typeof i.caretRangeFromPoint?Ie(i,t.clientX,t.clientY):i.caretRangeFromPoint(t.clientX,t.clientY):document.caretRangeFromPoint(t.clientX,t.clientY),!n||!n.startContainer)return{position:null,hitTarget:null};const s=n.startContainer;let o=null;if(s.nodeType===s.TEXT_NODE){const t=s.parentNode,i=t?t.parentNode:null,r=i?i.parentNode:null,a=r&&r.nodeType===r.ELEMENT_NODE?r.className:null;if(a===X.CLASS_NAME){const i=e.getPositionFromDOMInfo(t,n.startOffset);return{position:i,hitTarget:null}}o=s.parentNode}else if(s.nodeType===s.ELEMENT_NODE){const t=s.parentNode,i=t?t.parentNode:null,n=i&&i.nodeType===i.ELEMENT_NODE?i.className:null;if(n===X.CLASS_NAME){const t=e.getPositionFromDOMInfo(s,s.textContent.length);return{position:t,hitTarget:null}}o=s}return{position:null,hitTarget:o}}static _doHitTestWithCaretPositionFromPoint(e,t){const i=document.caretPositionFromPoint(t.clientX,t.clientY);if(i.offsetNode.nodeType===i.offsetNode.TEXT_NODE){const t=i.offsetNode.parentNode,n=t?t.parentNode:null,s=n?n.parentNode:null,o=s&&s.nodeType===s.ELEMENT_NODE?s.className:null;if(o===X.CLASS_NAME){const t=e.getPositionFromDOMInfo(i.offsetNode.parentNode,i.offset);return{position:t,hitTarget:null}}return{position:null,hitTarget:i.offsetNode.parentNode}}if(i.offsetNode.nodeType===i.offsetNode.ELEMENT_NODE){const t=i.offsetNode.parentNode,n=t&&t.nodeType===t.ELEMENT_NODE?t.className:null,s=t?t.parentNode:null,o=s&&s.nodeType===s.ELEMENT_NODE?s.className:null;if(n===X.CLASS_NAME){const t=i.offsetNode.childNodes[Math.min(i.offset,i.offsetNode.childNodes.length-1)];if(t){const i=e.getPositionFromDOMInfo(t,0);return{position:i,hitTarget:null}}}else if(o===X.CLASS_NAME){const t=e.getPositionFromDOMInfo(i.offsetNode,0);return{position:t,hitTarget:null}}}return{position:null,hitTarget:i.offsetNode}}static _snapToSoftTabBoundary(e,t){const i=t.getLineContent(e.lineNumber),{tabSize:n}=t.getTextModelOptions(),s=we.atomicPosition(i,e.column-1,n,2);return-1!==s?new se["a"](e.lineNumber,s+1):e}static _doHitTest(e,t){let i;return i="function"===typeof document.caretRangeFromPoint?this._doHitTestWithCaretRangeFromPoint(e,t):document.caretPositionFromPoint?this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates()):{position:null,hitTarget:null},i.position&&e.stickyTabStops&&(i.position=this._snapToSoftTabBoundary(i.position,e.model)),i}}function Ie(e,t,i){const n=document.createRange();let s=e.elementFromPoint(t,i);if(null!==s){while(s&&s.firstChild&&s.firstChild.nodeType!==s.firstChild.TEXT_NODE&&s.lastChild&&s.lastChild.firstChild)s=s.lastChild;const e=s.getBoundingClientRect(),i=window.getComputedStyle(s,null).getPropertyValue("font"),o=s.innerText;let r,a=e.left,l=0;if(t>e.left+e.width)l=o.length;else{const e=Te.getInstance();for(let n=0;n<o.length+1;n++){if(r=e.getCharWidth(o.charAt(n),i)/2,a+=r,t<a){l=n;break}a+=r}}n.setStart(s.firstChild,l),n.setEnd(s.firstChild,l)}return n}class Te{constructor(){this._cache={},this._canvas=document.createElement("canvas")}static getInstance(){return Te._INSTANCE||(Te._INSTANCE=new Te),Te._INSTANCE}getCharWidth(e,t){const i=e+t;if(this._cache[i])return this._cache[i];const n=this._canvas.getContext("2d");n.font=t;const s=n.measureText(e),o=s.width;return this._cache[i]=o,o}}Te._INSTANCE=null;var Me=i("62bd");function Ae(e){return function(t,i){let n=!1;return e&&(n=e.mouseTargetIsWidget(i)),n||i.preventDefault(),i}}class Re extends T{constructor(e,t,i){super(),this._context=e,this.viewController=t,this.viewHelper=i,this.mouseTargetFactory=new Oe(this._context,i),this._mouseDownOperation=this._register(new Fe(this._context,this.viewController,this.viewHelper,(e,t)=>this._createMouseTarget(e,t),e=>this._getMouseColumn(e))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(124).height;const n=new N(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,e=>this._onContextMenu(e,!0))),this._register(n.onMouseMoveThrottled(this.viewHelper.viewDomNode,e=>this._onMouseMove(e),Ae(this.mouseTargetFactory),Re.MOUSE_MOVE_MINIMUM_TIME)),this._register(n.onMouseUp(this.viewHelper.viewDomNode,e=>this._onMouseUp(e))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,e=>this._onMouseLeave(e))),this._register(n.onMouseDown(this.viewHelper.viewDomNode,e=>this._onMouseDown(e)));const s=e=>{if(this.viewController.emitMouseWheel(e),!this._context.configuration.options.get(62))return;const t=new w["b"](e),i=v["f"]?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey;if(i){const e=Me["a"].getZoomLevel(),i=t.deltaY>0?1:-1;Me["a"].setZoomLevel(e+i),t.preventDefault(),t.stopPropagation()}};this._register(h["g"](this.viewHelper.viewDomNode,h["d"].MOUSE_WHEEL,s,{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(124)){const e=this._context.configuration.options.get(124).height;this._height!==e&&(this._height=e,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}onScrollChanged(e){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(e,t){const i=new L(e,t),n=i.toPageCoordinates(),s=k(this.viewHelper.viewDomNode);return n.y<s.y||n.y>s.y+s.height||n.x<s.x||n.x>s.x+s.width?null:this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),s,n,null)}_createMouseTarget(e,t){return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,t?e.target:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){if(this._mouseDownOperation.isActive())return;const t=e.timestamp;t<this.lastMouseLeaveTime||this.viewController.emitMouseMove({event:e,target:this._createMouseTarget(e,!0)})}_onMouseLeave(e){this.lastMouseLeaveTime=(new Date).getTime(),this.viewController.emitMouseLeave({event:e,target:null})}_onMouseUp(e){this.viewController.emitMouseUp({event:e,target:this._createMouseTarget(e,!0)})}_onMouseDown(e){const t=this._createMouseTarget(e,!0),i=6===t.type||7===t.type,n=2===t.type||3===t.type||4===t.type,s=3===t.type,o=this._context.configuration.options.get(93),r=8===t.type||5===t.type,a=9===t.type;let l=e.leftButton||e.middleButton;v["f"]&&e.leftButton&&e.ctrlKey&&(l=!1);const h=()=>{e.preventDefault(),this.viewHelper.focusTextArea()};if(l&&(i||s&&o))h(),this._mouseDownOperation.start(t.type,e);else if(n)e.preventDefault();else if(r){const i=t.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(i.viewZoneId)&&(h(),this._mouseDownOperation.start(t.type,e),e.preventDefault())}else a&&this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)&&(h(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:t})}}Re.MOUSE_MOVE_MINIMUM_TIME=100;class Fe extends u["a"]{constructor(e,t,i,n,s){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._createMouseTarget=n,this._getMouseColumn=s,this._mouseMoveMonitor=this._register(new I(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new S["g"]),this._mouseState=new Pe,this._currentSelection=new _["a"](1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!0);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):this._dispatchMouse(t,!0))}start(e,t){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const i=this._findMousePosition(t,!0);if(!i||!i.position)return;this._mouseState.trySetCount(t.detail,i.position),t.detail=this._mouseState.count;const n=this._context.configuration.options;if(!n.get(75)&&n.get(27)&&!n.get(15)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===i.type&&i.position&&this._currentSelection.containsPosition(i.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,Ae(null),e=>this._onMouseDownThenMove(e),e=>{const t=this._findMousePosition(this._lastMouseEvent,!0);e&&e instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:t?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});this._mouseState.isDragAndDrop=!1,this._dispatchMouse(i,t.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,Ae(null),e=>this._onMouseDownThenMove(e),()=>this._stop()))}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onScrollChanged(){this._isActive&&this._onScrollTimeout.setIfNotSet(()=>{if(!this._lastMouseEvent)return;const e=this._findMousePosition(this._lastMouseEvent,!1);e&&(this._mouseState.isDragAndDrop||this._dispatchMouse(e,!0))},10)}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,i=this._context.model,n=this._context.viewLayout,s=this._getMouseColumn(e);if(e.posy<t.y){const i=Math.max(n.getCurrentScrollTop()-(t.y-e.posy),0),o=Le.getZoneAtCoord(this._context,i);if(o){const e=this._helpPositionJumpOverViewZone(o);if(e)return new ye(null,13,s,e)}const r=n.getLineNumberAtVerticalOffset(i);return new ye(null,13,s,new se["a"](r,1))}if(e.posy>t.y+t.height){const o=n.getCurrentScrollTop()+(e.posy-t.y),r=Le.getZoneAtCoord(this._context,o);if(r){const e=this._helpPositionJumpOverViewZone(r);if(e)return new ye(null,13,s,e)}const a=n.getLineNumberAtVerticalOffset(o);return new ye(null,13,s,new se["a"](a,i.getLineMaxColumn(a)))}const o=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+(e.posy-t.y));return e.posx<t.x?new ye(null,13,s,new se["a"](o,1)):e.posx>t.x+t.width?new ye(null,13,s,new se["a"](o,i.getLineMaxColumn(o))):null}_findMousePosition(e,t){const i=this._getPositionOutsideEditor(e);if(i)return i;const n=this._createMouseTarget(e,t),s=n.position;if(!s)return null;if(8===n.type||5===n.type){const e=this._helpPositionJumpOverViewZone(n.detail);if(e)return new ye(n.element,n.type,n.mouseColumn,e,null,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new se["a"](this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton})}}class Pe{constructor(){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}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const i=(new Date).getTime();i-this._lastSetMouseDownCountTime>Pe.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}Pe.CLEAR_MOUSE_DOWN_COUNT_TIME=400;var Be=i("0a31");const We=!1;class Ve{constructor(e,t,i,n,s){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selectionStartPosition=n,this.selectionEndPosition=s}toString(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"}static readFromTextArea(e){return new Ve(e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),null,null)}collapseSelection(){return new Ve(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(e,t,i){We&&console.log("writeToTextArea "+e+": "+this.toString()),t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){const t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(e>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,t,1)}const t=this.value.substring(this.selectionStart,e);if(-1===t.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,t,1);const i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,i,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,s=-1;while(-1!==(s=t.indexOf("\n",s+1)))n++;return[e,i*t.length,n]}static selectedText(e){return new Ve(e,0,e.length,null,null)}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};We&&(console.log("------------------------deduceInput"),console.log("PREVIOUS STATE: "+e.toString()),console.log("CURRENT STATE: "+t.toString()));let n=e.value,s=e.selectionStart,o=e.selectionEnd,r=t.value,a=t.selectionStart,l=t.selectionEnd;const h=n.substring(o),c=r.substring(l),d=re["e"](h,c);r=r.substring(0,r.length-d),n=n.substring(0,n.length-d);const u=n.substring(0,s),g=r.substring(0,a),p=re["d"](u,g);if(r=r.substring(p),n=n.substring(p),a-=p,s-=p,l-=p,o-=p,We&&(console.log("AFTER DIFFING PREVIOUS STATE: <"+n+">, selectionStart: "+s+", selectionEnd: "+o),console.log("AFTER DIFFING CURRENT STATE: <"+r+">, selectionStart: "+a+", selectionEnd: "+l)),i&&a===l&&n.length>0){let e=null;if(a===r.length?r.startsWith(n)&&(e=r.substring(n.length)):r.endsWith(n)&&(e=r.substring(0,r.length-n.length)),null!==e&&e.length>0&&(/\uFE0F/.test(e)||re["k"](e)))return{text:e,replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0}}if(a===l){if(n===r&&0===s&&o===n.length&&a===r.length&&-1===r.indexOf("\n")&&re["l"](r))return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const e=u.length-p;return We&&console.log("REMOVE PREVIOUS: "+(u.length-p)+" chars"),{text:r,replacePrevCharCnt:e,replaceNextCharCnt:0,positionDelta:0}}const m=o-s;return{text:r,replacePrevCharCnt:m,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(We&&(console.log("------------------------deduceAndroidCompositionInput"),console.log("PREVIOUS STATE: "+e.toString()),console.log("CURRENT STATE: "+t.toString())),e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min(re["d"](e.value,t.value),e.selectionEnd),n=Math.min(re["e"](e.value,t.value),e.value.length-e.selectionEnd),s=e.value.substring(i,e.value.length-n),o=t.value.substring(i,t.value.length-n),r=e.selectionStart-i,a=e.selectionEnd-i,l=t.selectionStart-i,h=t.selectionEnd-i;return We&&(console.log("AFTER DIFFING PREVIOUS STATE: <"+s+">, selectionStart: "+r+", selectionEnd: "+a),console.log("AFTER DIFFING CURRENT STATE: <"+o+">, selectionStart: "+l+", selectionEnd: "+h)),{text:o,replacePrevCharCnt:a,replaceNextCharCnt:s.length-a,positionDelta:h-o.length}}}Ve.EMPTY=new Ve("",0,0,null,null);class je{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t,n=i+1,s=i+t;return new oe["a"](n,1,s+1,1)}static fromEditorSelection(e,t,i,n,s){const o=je._getPageOfLine(i.startLineNumber,n),r=je._getRangeForPage(o,n),a=je._getPageOfLine(i.endLineNumber,n),l=je._getRangeForPage(a,n),h=r.intersectRanges(new oe["a"](1,1,i.startLineNumber,i.startColumn));let c=t.getValueInRange(h,1);const d=t.getLineCount(),u=t.getLineMaxColumn(d),g=l.intersectRanges(new oe["a"](i.endLineNumber,i.endColumn,d,u));let p,m=t.getValueInRange(g,1);if(o===a||o+1===a)p=t.getValueInRange(i,1);else{const e=r.intersectRanges(i),n=l.intersectRanges(i);p=t.getValueInRange(e,1)+String.fromCharCode(8230)+t.getValueInRange(n,1)}if(s){const e=500;c.length>e&&(c=c.substring(c.length-e,c.length)),m.length>e&&(m=m.substring(0,e)),p.length>2*e&&(p=p.substring(0,e)+String.fromCharCode(8230)+p.substring(p.length-e,p.length))}return new Ve(c+p+m,c.length,c.length+p.length,new se["a"](i.startLineNumber,i.startColumn),new se["a"](i.endLineNumber,i.endColumn))}}var He;(function(e){e.Tap="-monaco-textarea-synthetic-tap"})(He||(He={}));const ze={forceCopyWithSyntaxHighlighting:!1};class Ue{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}Ue.INSTANCE=new Ue;class Ke extends u["a"]{constructor(e,t){super(),this.textArea=t,this._onFocus=this._register(new d["a"]),this.onFocus=this._onFocus.event,this._onBlur=this._register(new d["a"]),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new d["a"]),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new d["a"]),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new d["a"]),this.onCut=this._onCut.event,this._onPaste=this._register(new d["a"]),this.onPaste=this._onPaste.event,this._onType=this._register(new d["a"]),this.onType=this._onType.event,this._onCompositionStart=this._register(new d["a"]),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new d["a"]),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new d["a"]),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new d["a"]),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._host=e,this._textArea=this._register(new qe(t)),this._asyncTriggerCut=this._register(new S["e"](()=>this._onCut.fire(),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new S["e"](()=>this.writeScreenReaderContent("asyncFocusGain"),0)),this._textAreaState=Ve.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._isDoingComposition=!1,this._nextCommand=0;let i=null;this._register(h["k"](t.domNode,"keydown",e=>{(109===e.keyCode||this._isDoingComposition&&1===e.keyCode)&&e.stopPropagation(),e.equals(9)&&e.preventDefault(),i=e,this._onKeyDown.fire(e)})),this._register(h["k"](t.domNode,"keyup",e=>{this._onKeyUp.fire(e)})),this._register(h["g"](t.domNode,"compositionstart",e=>{if(We&&console.log("[compositionstart]",e),!this._isDoingComposition){if(this._isDoingComposition=!0,v["f"]&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data){const t=i&&i.equals(109)&&("ArrowRight"===i.code||"ArrowLeft"===i.code);if(t||f["i"])return We&&console.log("[compositionstart] Handling long press case on macOS + arrow key or Firefox",e),this._textAreaState=new Ve(this._textAreaState.value,this._textAreaState.selectionStart-1,this._textAreaState.selectionEnd,this._textAreaState.selectionStartPosition?new se["a"](this._textAreaState.selectionStartPosition.lineNumber,this._textAreaState.selectionStartPosition.column-1):null,this._textAreaState.selectionEndPosition),void this._onCompositionStart.fire({revealDeltaColumns:-1})}f["e"]?this._onCompositionStart.fire({revealDeltaColumns:-this._textAreaState.selectionStart}):(this._setAndWriteTextAreaState("compositionstart",Ve.EMPTY),this._onCompositionStart.fire({revealDeltaColumns:0}))}}));const n=e=>{const t=this._textAreaState,i=Ve.readFromTextArea(this._textArea);return[i,Ve.deduceInput(t,i,e)]},s=()=>{const e=this._textAreaState,t=Ve.readFromTextArea(this._textArea);return[t,Ve.deduceAndroidCompositionInput(e,t)]},o=e=>{const t=this._textAreaState,i=Ve.selectedText(e),n={text:i.value,replacePrevCharCnt:t.selectionEnd-t.selectionStart,replaceNextCharCnt:0,positionDelta:0};return[i,n]};this._register(h["g"](t.domNode,"compositionupdate",e=>{if(We&&console.log("[compositionupdate]",e),f["e"]){const[t,i]=s();return this._textAreaState=t,this._onType.fire(i),void this._onCompositionUpdate.fire(e)}const[t,i]=o(e.data||"");this._textAreaState=t,this._onType.fire(i),this._onCompositionUpdate.fire(e)})),this._register(h["g"](t.domNode,"compositionend",e=>{if(We&&console.log("[compositionend]",e),!this._isDoingComposition)return;if(this._isDoingComposition=!1,f["e"]){const[e,t]=s();return this._textAreaState=e,this._onType.fire(t),void this._onCompositionEnd.fire()}const[t,i]=o(e.data||"");this._textAreaState=t,this._onType.fire(i),(f["f"]||f["i"])&&(this._textAreaState=Ve.readFromTextArea(this._textArea)),this._onCompositionEnd.fire()})),this._register(h["g"](t.domNode,"input",()=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._isDoingComposition)return;const[e,t]=n(v["f"]);0===t.replacePrevCharCnt&&1===t.text.length&&re["E"](t.text.charCodeAt(0))||(this._textAreaState=e,0===this._nextCommand?""===t.text&&0===t.replacePrevCharCnt||this._onType.fire(t):(""===t.text&&0===t.replacePrevCharCnt||this._firePaste(t.text,null),this._nextCommand=0))})),this._register(h["g"](t.domNode,"cut",e=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()})),this._register(h["g"](t.domNode,"copy",e=>{this._ensureClipboardGetsEditorSelection(e)})),this._register(h["g"](t.domNode,"paste",e=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),$e.canUseTextData(e)){const[t,i]=$e.getTextData(e);""!==t&&this._firePaste(t,i)}else this._textArea.getSelectionStart()!==this._textArea.getSelectionEnd()&&this._setAndWriteTextAreaState("paste",Ve.EMPTY),this._nextCommand=1})),this._register(h["g"](t.domNode,"focus",()=>{const e=this._hasFocus;this._setHasFocus(!0),f["j"]&&!e&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()})),this._register(h["g"](t.domNode,"blur",()=>{this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(h["g"](t.domNode,He.Tap,()=>{f["e"]&&this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let e=0;return h["g"](document,"selectionchange",t=>{if(!this._hasFocus)return;if(this._isDoingComposition)return;if(!f["f"])return;const i=Date.now(),n=i-e;if(e=i,n<5)return;const s=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),s<100)return;if(!this._textAreaState.selectionStartPosition||!this._textAreaState.selectionEndPosition)return;const o=this._textArea.getValue();if(this._textAreaState.value!==o)return;const r=this._textArea.getSelectionStart(),a=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===r&&this._textAreaState.selectionEnd===a)return;const l=this._textAreaState.deduceEditorPosition(r),h=this._host.deduceModelPosition(l[0],l[1],l[2]),c=this._textAreaState.deduceEditorPosition(a),d=this._host.deduceModelPosition(c[0],c[1],c[2]),u=new _["a"](h.lineNumber,h.column,d.lineNumber,d.column);this._onSelectionChangeRequest.fire(u)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){const e=h["B"](this.textArea.domNode);e?this._setHasFocus(e.activeElement===this.textArea.domNode):h["J"](this.textArea.domNode)?this._setHasFocus(document.activeElement===this.textArea.domNode):this._setHasFocus(!1)}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeScreenReaderContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeScreenReaderContent(e){this._isDoingComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy($e.canUseTextData(e)),i={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};Ue.INSTANCE.set(f["i"]?t.text.replace(/\r\n/g,"\n"):t.text,i),$e.canUseTextData(e)?$e.setTextData(e,t.text,t.html,i):this._setAndWriteTextAreaState("copy or cut",Ve.selectedText(t.text))}_firePaste(e,t){t||(t=Ue.INSTANCE.get(e)),this._onPaste.fire({text:e,metadata:t})}}class $e{static canUseTextData(e){return!!e.clipboardData||!!window.clipboardData}static getTextData(e){if(e.clipboardData){e.preventDefault();const i=e.clipboardData.getData("text/plain");let n=null;const s=e.clipboardData.getData("vscode-editor-data");if("string"===typeof s)try{n=JSON.parse(s),1!==n.version&&(n=null)}catch(t){}return[i,n]}if(window.clipboardData){e.preventDefault();const t=window.clipboardData.getData("Text");return[t,null]}throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")}static setTextData(e,t,i,n){if(e.clipboardData)return e.clipboardData.setData("text/plain",t),"string"===typeof i&&e.clipboardData.setData("text/html",i),e.clipboardData.setData("vscode-editor-data",JSON.stringify(n)),void e.preventDefault();if(window.clipboardData)return window.clipboardData.setData("Text",t),void e.preventDefault();throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")}}class qe extends u["a"]{constructor(e){super(),this._actual=e,this._ignoreSelectionChangeTime=0}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.domNode.value}setValue(e,t){const i=this._actual.domNode;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return"backward"===this._actual.domNode.selectionDirection?this._actual.domNode.selectionEnd:this._actual.domNode.selectionStart}getSelectionEnd(){return"backward"===this._actual.domNode.selectionDirection?this._actual.domNode.selectionStart:this._actual.domNode.selectionEnd}setSelectionRange(e,t,i){const n=this._actual.domNode;let s=null;const o=h["B"](n);s=o?o.activeElement:document.activeElement;const r=s===n,a=n.selectionStart,l=n.selectionEnd;if(r&&a===t&&l===i)f["i"]&&window.parent!==window&&n.focus();else{if(r)return this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),void(f["i"]&&window.parent!==window&&n.focus());try{const e=h["P"](n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),h["N"](n,e)}catch(c){}}}}class Ge extends Re{constructor(e,t,i){super(e,t,i),this._register(C["b"].addTarget(this.viewHelper.linesContentDomNode)),this._register(h["g"](this.viewHelper.linesContentDomNode,C["a"].Tap,e=>this.onTap(e))),this._register(h["g"](this.viewHelper.linesContentDomNode,C["a"].Change,e=>this.onChange(e))),this._register(h["g"](this.viewHelper.linesContentDomNode,C["a"].Contextmenu,e=>this._onContextMenu(new E(e,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(h["g"](this.viewHelper.linesContentDomNode,"pointerdown",e=>{const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"}));const n=new O(this.viewHelper.viewDomNode);this._register(n.onPointerMoveThrottled(this.viewHelper.viewDomNode,e=>this._onMouseMove(e),Ae(this.mouseTargetFactory),Re.MOUSE_MOVE_MINIMUM_TIME)),this._register(n.onPointerUp(this.viewHelper.viewDomNode,e=>this._onMouseUp(e))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,e=>this._onMouseLeave(e))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,e=>this._onMouseDown(e)))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new E(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1})}onChange(e){"touch"===this._lastPointerType&&this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e){"touch"!==e.browserEvent.pointerType&&super._onMouseDown(e)}}class Ye extends Re{constructor(e,t,i){super(e,t,i),this._register(C["b"].addTarget(this.viewHelper.linesContentDomNode)),this._register(h["g"](this.viewHelper.linesContentDomNode,C["a"].Tap,e=>this.onTap(e))),this._register(h["g"](this.viewHelper.linesContentDomNode,C["a"].Change,e=>this.onChange(e))),this._register(h["g"](this.viewHelper.linesContentDomNode,C["a"].Contextmenu,e=>this._onContextMenu(new E(e,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new E(e,this.viewHelper.viewDomNode),!1);if(t.position){const e=document.createEvent("CustomEvent");e.initEvent(He.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position)}}onChange(e){this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}}class Ze extends u["a"]{constructor(e,t,i){super(),v["c"]&&Be["a"].pointerEvents?this.handler=this._register(new Ge(e,t,i)):window.TouchEvent?this.handler=this._register(new Ye(e,t,i)):this.handler=this._register(new Re(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}i("56f3"),i("2ab7");class Xe extends T{}var Qe=i("918c"),Je=i("b7d0");class et extends Xe{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new se["a"](1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(53);const t=e.get(54);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(79);const i=e.get(124);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,i=!0),2!==this._renderLineNumbers&&3!==this._renderLineNumbers||(i=!0),i}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getLineRenderLineNumber(e){const t=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new se["a"](e,1));if(1!==t.column)return"";const i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(2===this._renderLineNumbers){const e=Math.abs(this._lastCursorModelPosition.lineNumber-i);return 0===e?'<span class="relative-current-line-number">'+i+"</span>":String(e)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===i||i%10===0?String(i):"":String(i)}prepareRender(e){if(0===this._renderLineNumbers)return void(this._renderResult=null);const t=v["d"]?this._lineHeight%2===0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s='<div class="'+et.CLASS_NAME+t+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">',o=this._context.model.getLineCount(),r=[];for(let a=i;a<=n;a++){const e=a-i;if(!this._renderFinalNewline&&a===o&&0===this._context.model.getLineLength(a)){r[e]="";continue}const n=this._getLineRenderLineNumber(a);n?a===this._activeLineNumber?r[e]='<div class="active-line-number '+et.CLASS_NAME+t+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">'+n+"</div>":r[e]=s+n+"</div>":r[e]=""}this._renderResult=r}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}et.CLASS_NAME="line-numbers",Object(Je["f"])((e,t)=>{const i=e.getColor(Qe["h"]);i&&t.addRule(`.monaco-editor .line-numbers { color: ${i}; }`);const n=e.getColor(Qe["b"]);n&&t.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${n}; }`)});class tt extends M{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(124);this._canUseLayerHinting=!t.get(25),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=Object(b["b"])(document.createElement("div")),this._domNode.setClassName(tt.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=Object(b["b"])(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(tt.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(124);return this._canUseLayerHinting=!t.get(25),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}}tt.CLASS_NAME="glyph-margin",tt.OUTER_CLASS_NAME="margin";var it=i("e6ff"),nt=i("e75b");class st{constructor(e,t,i){this.top=e,this.left=t,this.width=i}setWidth(e){return new st(this.top,this.left,e)}}const ot=f["i"];class rt extends M{constructor(e,t,i){super(e),this._primaryCursorPosition=new se["a"](1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._viewHelper=i,this._scrollLeft=0,this._scrollTop=0;const n=this._context.configuration.options,s=n.get(124);this._setAccessibilityOptions(n),this._contentLeft=s.contentLeft,this._contentWidth=s.contentWidth,this._contentHeight=s.height,this._fontInfo=n.get(38),this._lineHeight=n.get(53),this._emptySelectionClipboard=n.get(28),this._copyWithSyntaxHighlighting=n.get(18),this._visibleTextArea=null,this._selections=[new _["a"](1,1,1,1)],this._modelSelections=[new _["a"](1,1,1,1)],this._lastRenderPosition=null,this.textArea=Object(b["b"])(document.createElement("textarea")),A.write(this.textArea,6),this.textArea.setClassName("inputarea "+nt["a"]),this.textArea.setAttribute("wrap","off"),this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(n)),this.textArea.setAttribute("tabindex",String(n.get(107))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",l["a"]("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),v["i"]&&n.get(75)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=Object(b["b"])(document.createElement("div")),this.textAreaCover.setPosition("absolute");const o={getLineCount:()=>this._context.model.getLineCount(),getLineMaxColumn:e=>this._context.model.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.model.getValueInRange(e,t)},r={getDataToCopy:e=>{const t=this._context.model.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,v["j"]),i=this._context.model.getEOL(),n=this._emptySelectionClipboard&&1===this._modelSelections.length&&this._modelSelections[0].isEmpty(),s=Array.isArray(t)?t:null,o=Array.isArray(t)?t.join(i):t;let r=void 0,a=null;if(e&&(ze.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&o.length<65536)){const e=this._context.model.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);e&&(r=e.html,a=e.mode)}return{isFromEmptySelection:n,multicursorText:s,text:o,html:r,mode:a}},getScreenReaderContent:e=>{if(1===this._accessibilitySupport){if(v["f"]){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition();let i=this._getWordBeforePosition(t);if(0===i.length&&(i=this._getCharacterBeforePosition(t)),i.length>0)return new Ve(i,i.length,i.length,t,t)}}return Ve.EMPTY}if(f["e"]){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition(),[i,n]=this._getAndroidWordAtPosition(t);if(i.length>0)return new Ve(i,n,n,t,t)}return Ve.EMPTY}return je.fromEditorSelection(e,o,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,i)=>this._context.model.deduceModelPositionRelativeToViewPosition(e,t,i)};this._textAreaInput=this._register(new Ke(r,this.textArea)),this._register(this._textAreaInput.onKeyDown(e=>{this._viewController.emitKeyDown(e)})),this._register(this._textAreaInput.onKeyUp(e=>{this._viewController.emitKeyUp(e)})),this._register(this._textAreaInput.onPaste(e=>{let t=!1,i=null,n=null;e.metadata&&(t=this._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,i="undefined"!==typeof e.metadata.multicursorText?e.metadata.multicursorText:null,n=e.metadata.mode),this._viewController.paste(e.text,t,i,n)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(e=>{e.replacePrevCharCnt||e.replaceNextCharCnt||e.positionDelta?(We&&console.log(` => compositionType: <<${e.text}>>, ${e.replacePrevCharCnt}, ${e.replaceNextCharCnt}, ${e.positionDelta}`),this._viewController.compositionType(e.text,e.replacePrevCharCnt,e.replaceNextCharCnt,e.positionDelta)):(We&&console.log(` => type: <<${e.text}>>`),this._viewController.type(e.text))})),this._register(this._textAreaInput.onSelectionChangeRequest(e=>{this._viewController.setSelection(e)})),this._register(this._textAreaInput.onCompositionStart(e=>{const t=this._selections[0].startLineNumber,i=this._selections[0].startColumn+e.revealDeltaColumns;this._context.model.revealRange("keyboard",!0,new oe["a"](t,i,t,i),0,1);const n=this._viewHelper.visibleRangeForPositionRelativeToEditor(t,i);n&&(this._visibleTextArea=new st(this._context.viewLayout.getVerticalOffsetForLineNumber(t),n.left,ot?0:1),this._render()),this.textArea.setClassName(`inputarea ${nt["a"]} ime-input`),this._viewController.compositionStart(),this._context.model.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(e=>{this._visibleTextArea&&(this._visibleTextArea=this._visibleTextArea.setWidth(at(e.data,this._fontInfo)),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName("inputarea "+nt["a"]),this._viewController.compositionEnd(),this._context.model.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.model.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.model.setHasFocus(!1)}))}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',i=this._context.model.getLineContent(e.lineNumber),n=Object(it["a"])(t);let s=!0,o=e.column,r=!0,a=e.column,l=0;while(l<50&&(s||r)){if(s&&o<=1&&(s=!1),s){const e=i.charCodeAt(o-2),t=n.get(e);0!==t?s=!1:o--}if(r&&a>i.length&&(r=!1),r){const e=i.charCodeAt(a-1),t=n.get(e);0!==t?r=!1:a++}l++}return[i.substring(o-1,a-1),e.column-o]}_getWordBeforePosition(e){const t=this._context.model.getLineContent(e.lineNumber),i=Object(it["a"])(this._context.configuration.options.get(110));let n=e.column,s=0;while(n>1){const o=t.charCodeAt(n-2),r=i.get(o);if(0!==r||s>50)return t.substring(n-1,e.column-1);s++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const t=this._context.model.getLineContent(e.lineNumber),i=t.charAt(e.column-2);if(!re["E"](i.charCodeAt(0)))return i}return""}_getAriaLabel(e){const t=e.get(2);return 1===t?l["a"]("accessibilityOffAriaLabel","The editor is not accessible at this time. Press {0} for options.",v["d"]?"Shift+Alt+F1":"Alt+F1"):e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===$["g"].accessibilityPageSize.defaultValue?this._accessibilityPageSize=100:this._accessibilityPageSize=t}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(124);return this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(38),this._lineHeight=t.get(53),this._emptySelectionClipboard=t.get(28),this._copyWithSyntaxHighlighting=t.get(18),this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("tabindex",String(t.get(107))),v["i"]&&e.hasChanged(75)&&(t.get(75)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}prepareRender(e){this._primaryCursorPosition=new se["a"](this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition)}render(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea)return void this._renderInsideEditor(null,this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight);if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();const e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(e<this._contentLeft||e>this._contentLeft+this._contentWidth)return void this._renderAtTopLeft();const t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;t<0||t>this._contentHeight?this._renderAtTopLeft():v["f"]?this._renderInsideEditor(this._primaryCursorPosition,t,e,ot?0:1,this._lineHeight):this._renderInsideEditor(this._primaryCursorPosition,t,e,ot?0:1,ot?0:1)}_renderInsideEditor(e,t,i,n,s){this._lastRenderPosition=e;const o=this.textArea,r=this.textAreaCover;p["a"].applyFontInfo(o,this._fontInfo),o.setTop(t),o.setLeft(i),o.setWidth(n),o.setHeight(s),r.setTop(0),r.setLeft(0),r.setWidth(0),r.setHeight(0)}_renderAtTopLeft(){this._lastRenderPosition=null;const e=this.textArea,t=this.textAreaCover;if(p["a"].applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),ot)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);const i=this._context.configuration.options;i.get(44)?t.setClassName("monaco-editor-background textAreaCover "+tt.OUTER_CLASS_NAME):0!==i.get(54).renderType?t.setClassName("monaco-editor-background textAreaCover "+et.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")}}function at(e,t){const i=document.createElement("canvas"),n=i.getContext("2d");n.font=lt(t);const s=n.measureText(e);return f["i"]?s.width+2:s.width}function lt(e){return ht("normal",e.fontWeight,e.fontSize,e.lineHeight,e.fontFamily)}function ht(e,t,i,n,s){return`${e} normal ${t} ${i}px / ${n}px ${s}`}var ct=i("ef8e");class dt{static columnSelect(e,t,i,n,s,o){let r=Math.abs(s-i)+1,a=i>s,l=n>o,h=n<o,c=[];for(let d=0;d<r;d++){let s=i+(a?-d:d),r=ve.columnFromVisibleColumn2(e,t,s,n),u=ve.columnFromVisibleColumn2(e,t,s,o),g=ve.visibleColumnFromColumn2(e,t,new se["a"](s,r)),p=ve.visibleColumnFromColumn2(e,t,new se["a"](s,u));if(h){if(g>o)continue;if(p<n)continue}if(l){if(p>n)continue;if(g<o)continue}c.push(new ge(new oe["a"](s,r,s,r),0,new se["a"](s,u),0))}if(0===c.length)for(let d=0;d<r;d++){const e=i+(a?-d:d),n=t.getLineMaxColumn(e);c.push(new ge(new oe["a"](e,n,e,n),0,new se["a"](e,n),0))}return{viewStates:c,reversed:a,fromLineNumber:i,fromVisualColumn:n,toLineNumber:s,toVisualColumn:o}}static columnSelectLeft(e,t,i){let n=i.toViewVisualColumn;return n>1&&n--,dt.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0;const s=Math.min(i.fromViewLineNumber,i.toViewLineNumber),o=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let a=s;a<=o;a++){const i=t.getLineMaxColumn(a),s=ve.visibleColumnFromColumn2(e,t,new se["a"](a,i));n=Math.max(n,s)}let r=i.toViewVisualColumn;return r<n&&r++,this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,r)}static columnSelectUp(e,t,i,n){const s=n?e.pageSize:1,o=Math.max(1,i.toViewLineNumber-s);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,o,i.toViewVisualColumn)}static columnSelectDown(e,t,i,n){const s=n?e.pageSize:1,o=Math.min(t.getLineCount(),i.toViewLineNumber+s);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,o,i.toViewVisualColumn)}}var ut,gt=i("2c29");class pt{constructor(e,t,i){this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=i}}class mt{static leftPosition(e,t,i){return i>e.getLineMinColumn(t)?i-=re["L"](e.getLineContent(t),i-1):t>1&&(t-=1,i=e.getLineMaxColumn(t)),new se["a"](t,i)}static leftPositionAtomicSoftTabs(e,t,i,n){const s=e.getLineMinColumn(t),o=e.getLineContent(t),r=we.atomicPosition(o,i-1,n,0);return-1===r||r+1<s?this.leftPosition(e,t,i):new se["a"](t,r+1)}static left(e,t,i,n){const s=e.stickyTabStops?mt.leftPositionAtomicSoftTabs(t,i,n,e.tabSize):mt.leftPosition(t,i,n);return new pt(s.lineNumber,s.column,0)}static moveLeft(e,t,i,n,s){let o,r;if(i.hasSelection()&&!n)o=i.selection.startLineNumber,r=i.selection.startColumn;else{let n=mt.left(e,t,i.position.lineNumber,i.position.column-(s-1));o=n.lineNumber,r=n.column}return i.move(n,o,r,0)}static rightPosition(e,t,i){return i<e.getLineMaxColumn(t)?i+=re["K"](e.getLineContent(t),i-1):t<e.getLineCount()&&(t+=1,i=e.getLineMinColumn(t)),new se["a"](t,i)}static rightPositionAtomicSoftTabs(e,t,i,n,s){const o=e.getLineContent(t),r=we.atomicPosition(o,i-1,n,1);return-1===r?this.rightPosition(e,t,i):new se["a"](t,r+1)}static right(e,t,i,n){const s=e.stickyTabStops?mt.rightPositionAtomicSoftTabs(t,i,n,e.tabSize,e.indentSize):mt.rightPosition(t,i,n);return new pt(s.lineNumber,s.column,0)}static moveRight(e,t,i,n,s){let o,r;if(i.hasSelection()&&!n)o=i.selection.endLineNumber,r=i.selection.endColumn;else{let n=mt.right(e,t,i.position.lineNumber,i.position.column+(s-1));o=n.lineNumber,r=n.column}return i.move(n,o,r,0)}static down(e,t,i,n,s,o,r){const a=ve.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize)+s,l=t.getLineCount(),h=i===l&&n===t.getLineMaxColumn(i);return i+=o,i>l?(i=l,n=r?t.getLineMaxColumn(i):Math.min(t.getLineMaxColumn(i),n)):n=ve.columnFromVisibleColumn2(e,t,i,a),s=h?0:a-ve.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),new pt(i,n,s)}static moveDown(e,t,i,n,s){let o,r;i.hasSelection()&&!n?(o=i.selection.endLineNumber,r=i.selection.endColumn):(o=i.position.lineNumber,r=i.position.column);let a=mt.down(e,t,o,r,i.leftoverVisibleColumns,s,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateDown(e,t,i){let n=i.selection,s=mt.down(e,t,n.selectionStartLineNumber,n.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),o=mt.down(e,t,n.positionLineNumber,n.positionColumn,i.leftoverVisibleColumns,1,!1);return new ge(new oe["a"](s.lineNumber,s.column,s.lineNumber,s.column),s.leftoverVisibleColumns,new se["a"](o.lineNumber,o.column),o.leftoverVisibleColumns)}static up(e,t,i,n,s,o,r){const a=ve.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize)+s,l=1===i&&1===n;return i-=o,i<1?(i=1,n=r?t.getLineMinColumn(i):Math.min(t.getLineMaxColumn(i),n)):n=ve.columnFromVisibleColumn2(e,t,i,a),s=l?0:a-ve.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),new pt(i,n,s)}static moveUp(e,t,i,n,s){let o,r;i.hasSelection()&&!n?(o=i.selection.startLineNumber,r=i.selection.startColumn):(o=i.position.lineNumber,r=i.position.column);let a=mt.up(e,t,o,r,i.leftoverVisibleColumns,s,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateUp(e,t,i){let n=i.selection,s=mt.up(e,t,n.selectionStartLineNumber,n.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),o=mt.up(e,t,n.positionLineNumber,n.positionColumn,i.leftoverVisibleColumns,1,!1);return new ge(new oe["a"](s.lineNumber,s.column,s.lineNumber,s.column),s.leftoverVisibleColumns,new se["a"](o.lineNumber,o.column),o.leftoverVisibleColumns)}static _isBlankLine(e,t){return 0===e.getLineFirstNonWhitespaceColumn(t)}static moveToPrevBlankLine(e,t,i,n){let s=i.position.lineNumber;while(s>1&&this._isBlankLine(t,s))s--;while(s>1&&!this._isBlankLine(t,s))s--;return i.move(n,s,t.getLineMinColumn(s),0)}static moveToNextBlankLine(e,t,i,n){const s=t.getLineCount();let o=i.position.lineNumber;while(o<s&&this._isBlankLine(t,o))o++;while(o<s&&!this._isBlankLine(t,o))o++;return i.move(n,o,t.getLineMinColumn(o),0)}static moveToBeginningOfLine(e,t,i,n){let s,o=i.position.lineNumber,r=t.getLineMinColumn(o),a=t.getLineFirstNonWhitespaceColumn(o)||r,l=i.position.column;return s=l===a?r:a,i.move(n,o,s,0)}static moveToEndOfLine(e,t,i,n,s){let o=i.position.lineNumber,r=t.getLineMaxColumn(o);return i.move(n,o,r,s?1073741824-r:0)}static moveToBeginningOfBuffer(e,t,i,n){return i.move(n,1,1,0)}static moveToEndOfBuffer(e,t,i,n){let s=t.getLineCount(),o=t.getLineMaxColumn(s);return i.move(n,s,o,0)}}class ft{static deleteRight(e,t,i,n){let s=[],o=3!==e;for(let r=0,a=n.length;r<a;r++){const e=n[r];let a=e;if(a.isEmpty()){let n=e.getPosition(),s=mt.right(t,i,n.lineNumber,n.column);a=new oe["a"](s.lineNumber,s.column,n.lineNumber,n.column)}a.isEmpty()?s[r]=null:(a.startLineNumber!==a.endLineNumber&&(o=!0),s[r]=new gt["a"](a,""))}return[o,s]}static isAutoClosingPairDelete(e,t,i,n,s){if("never"===e&&"never"===t)return!1;for(let o=0,r=s.length;o<r;o++){const r=s[o],a=r.getPosition();if(!r.isEmpty())return!1;const l=n.getLineContent(a.lineNumber);if(a.column<2||a.column>=l.length+1)return!1;const h=l.charAt(a.column-2),c=i.get(h);if(!c)return!1;if(Ce(h)){if("never"===t)return!1}else if("never"===e)return!1;const d=l.charAt(a.column-1);let u=!1;for(const e of c)e.open===h&&e.close===d&&(u=!0);if(!u)return!1}return!0}static _runAutoClosingPairDelete(e,t,i){let n=[];for(let s=0,o=i.length;s<o;s++){const e=i[s].getPosition(),t=new oe["a"](e.lineNumber,e.column-1,e.lineNumber,e.column+1);n[s]=new gt["a"](t,"")}return[!0,n]}static deleteLeft(e,t,i,n){if(this.isAutoClosingPairDelete(t.autoClosingBrackets,t.autoClosingQuotes,t.autoClosingPairs.autoClosingPairsOpenByEnd,i,n))return this._runAutoClosingPairDelete(t,i,n);let s=[],o=2!==e;for(let r=0,a=n.length;r<a;r++){const e=n[r];let a=e;if(a.isEmpty()){let n=e.getPosition();if(t.useTabStops&&n.column>1){let e=i.getLineContent(n.lineNumber),s=re["v"](e),o=-1===s?e.length+1:s+1;if(n.column<=o){let e=ve.visibleColumnFromColumn2(t,i,n),s=ve.prevIndentTabStop(e,t.indentSize),o=ve.columnFromVisibleColumn2(t,i,n.lineNumber,s);a=new oe["a"](n.lineNumber,o,n.lineNumber,n.column)}else a=new oe["a"](n.lineNumber,n.column-1,n.lineNumber,n.column)}else{let e=mt.left(t,i,n.lineNumber,n.column);a=new oe["a"](e.lineNumber,e.column,n.lineNumber,n.column)}}a.isEmpty()?s[r]=null:(a.startLineNumber!==a.endLineNumber&&(o=!0),s[r]=new gt["a"](a,""))}return[o,s]}static cut(e,t,i){let n=[];for(let s=0,o=i.length;s<o;s++){const o=i[s];if(o.isEmpty())if(e.emptySelectionClipboard){let e,i,r,a,l=o.getPosition();l.lineNumber<t.getLineCount()?(e=l.lineNumber,i=1,r=l.lineNumber+1,a=1):l.lineNumber>1?(e=l.lineNumber-1,i=t.getLineMaxColumn(l.lineNumber-1),r=l.lineNumber,a=t.getLineMaxColumn(l.lineNumber)):(e=l.lineNumber,i=1,r=l.lineNumber,a=t.getLineMaxColumn(l.lineNumber));let h=new oe["a"](e,i,r,a);h.isEmpty()?n[s]=null:n[s]=new gt["a"](h,"")}else n[s]=null;else n[s]=new gt["a"](o,"")}return new be(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class _t{static _createWord(e,t,i,n,s){return{start:n,end:s,wordType:t,nextCharClass:i}}static _findPreviousWordOnLine(e,t,i){let n=t.getLineContent(i.lineNumber);return this._doFindPreviousWordOnLine(n,e,i)}static _doFindPreviousWordOnLine(e,t,i){let n=0;for(let s=i.column-2;s>=0;s--){let i=e.charCodeAt(s),o=t.get(i);if(0===o){if(2===n)return this._createWord(e,n,o,s+1,this._findEndOfWord(e,t,n,s+1));n=1}else if(2===o){if(1===n)return this._createWord(e,n,o,s+1,this._findEndOfWord(e,t,n,s+1));n=2}else if(1===o&&0!==n)return this._createWord(e,n,o,s+1,this._findEndOfWord(e,t,n,s+1))}return 0!==n?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){let s=e.length;for(let o=n;o<s;o++){let n=e.charCodeAt(o),s=t.get(n);if(1===s)return o;if(1===i&&2===s)return o;if(2===i&&0===s)return o}return s}static _findNextWordOnLine(e,t,i){let n=t.getLineContent(i.lineNumber);return this._doFindNextWordOnLine(n,e,i)}static _doFindNextWordOnLine(e,t,i){let n=0,s=e.length;for(let o=i.column-1;o<s;o++){let i=e.charCodeAt(o),s=t.get(i);if(0===s){if(2===n)return this._createWord(e,n,s,this._findStartOfWord(e,t,n,o-1),o);n=1}else if(2===s){if(1===n)return this._createWord(e,n,s,this._findStartOfWord(e,t,n,o-1),o);n=2}else if(1===s&&0!==n)return this._createWord(e,n,s,this._findStartOfWord(e,t,n,o-1),o)}return 0!==n?this._createWord(e,n,1,this._findStartOfWord(e,t,n,s-1),s):null}static _findStartOfWord(e,t,i,n){for(let s=n;s>=0;s--){let n=e.charCodeAt(s),o=t.get(n);if(1===o)return s+1;if(1===i&&2===o)return s+1;if(2===i&&0===o)return s+1}return 0}static moveWordLeft(e,t,i,n){let s=i.lineNumber,o=i.column;1===o&&s>1&&(s-=1,o=t.getLineMaxColumn(s));let r=_t._findPreviousWordOnLine(e,t,new se["a"](s,o));if(0===n)return new se["a"](s,r?r.start+1:1);if(1===n)return r&&2===r.wordType&&r.end-r.start===1&&0===r.nextCharClass&&(r=_t._findPreviousWordOnLine(e,t,new se["a"](s,r.start+1))),new se["a"](s,r?r.start+1:1);if(3===n){while(r&&2===r.wordType)r=_t._findPreviousWordOnLine(e,t,new se["a"](s,r.start+1));return new se["a"](s,r?r.start+1:1)}return r&&o<=r.end+1&&(r=_t._findPreviousWordOnLine(e,t,new se["a"](s,r.start+1))),new se["a"](s,r?r.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(1===t.column)return i>1?new se["a"](i-1,e.getLineMaxColumn(i-1)):t;const s=e.getLineContent(i);for(let o=t.column-1;o>1;o--){const e=s.charCodeAt(o-2),t=s.charCodeAt(o-1);if(95===e&&95!==t)return new se["a"](i,o);if(re["G"](e)&&re["H"](t))return new se["a"](i,o);if(re["H"](e)&&re["H"](t)&&o+1<n){const e=s.charCodeAt(o);if(re["G"](e))return new se["a"](i,o)}}return new se["a"](i,1)}static moveWordRight(e,t,i,n){let s=i.lineNumber,o=i.column,r=!1;o===t.getLineMaxColumn(s)&&s<t.getLineCount()&&(r=!0,s+=1,o=1);let a=_t._findNextWordOnLine(e,t,new se["a"](s,o));if(2===n)a&&2===a.wordType&&a.end-a.start===1&&0===a.nextCharClass&&(a=_t._findNextWordOnLine(e,t,new se["a"](s,a.end+1))),o=a?a.end+1:t.getLineMaxColumn(s);else if(3===n){r&&(o=0);while(a&&(2===a.wordType||a.start+1<=o))a=_t._findNextWordOnLine(e,t,new se["a"](s,a.end+1));o=a?a.start+1:t.getLineMaxColumn(s)}else a&&!r&&o>=a.start+1&&(a=_t._findNextWordOnLine(e,t,new se["a"](s,a.end+1))),o=a?a.start+1:t.getLineMaxColumn(s);return new se["a"](s,o)}static _moveWordPartRight(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(t.column===n)return i<e.getLineCount()?new se["a"](i+1,1):t;const s=e.getLineContent(i);for(let o=t.column+1;o<n;o++){const e=s.charCodeAt(o-2),t=s.charCodeAt(o-1);if(95!==e&&95===t)return new se["a"](i,o);if(re["G"](e)&&re["H"](t))return new se["a"](i,o);if(re["H"](e)&&re["H"](t)&&o+1<n){const e=s.charCodeAt(o);if(re["G"](e))return new se["a"](i,o)}}return new se["a"](i,n)}static _deleteWordLeftWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=t.column-2,s=re["I"](i,n);return s+1<n?new oe["a"](t.lineNumber,s+2,t.lineNumber,t.column):null}static deleteWordLeft(e,t){const i=e.wordSeparators,n=e.model,s=e.selection,o=e.whitespaceHeuristics;if(!s.isEmpty())return s;if(ft.isAutoClosingPairDelete(e.autoClosingBrackets,e.autoClosingQuotes,e.autoClosingPairs.autoClosingPairsOpenByEnd,e.model,[e.selection])){const t=e.selection.getPosition();return new oe["a"](t.lineNumber,t.column-1,t.lineNumber,t.column+1)}const r=new se["a"](s.positionLineNumber,s.positionColumn);let a=r.lineNumber,l=r.column;if(1===a&&1===l)return null;if(o){let e=this._deleteWordLeftWhitespace(n,r);if(e)return e}let h=_t._findPreviousWordOnLine(i,n,r);return 0===t?h?l=h.start+1:l>1?l=1:(a--,l=n.getLineMaxColumn(a)):(h&&l<=h.end+1&&(h=_t._findPreviousWordOnLine(i,n,new se["a"](a,h.start+1))),h?l=h.end+1:l>1?l=1:(a--,l=n.getLineMaxColumn(a))),new oe["a"](a,l,r.lineNumber,r.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;const n=new se["a"](i.positionLineNumber,i.positionColumn);let s=this._deleteInsideWordWhitespace(t,n);return s||this._deleteInsideWordDetermineDeleteRange(e,t,n)}static _charAtIsWhitespace(e,t){const i=e.charCodeAt(t);return 32===i||9===i}static _deleteInsideWordWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=i.length;if(0===n)return null;let s=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(i,s))return null;let o=Math.min(t.column-1,n-1);if(!this._charAtIsWhitespace(i,o))return null;while(s>0&&this._charAtIsWhitespace(i,s-1))s--;while(o+1<n&&this._charAtIsWhitespace(i,o+1))o++;return new oe["a"](t.lineNumber,s+1,t.lineNumber,o+2)}static _deleteInsideWordDetermineDeleteRange(e,t,i){const n=t.getLineContent(i.lineNumber),s=n.length;if(0===s)return i.lineNumber>1?new oe["a"](i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumber<t.getLineCount()?new oe["a"](i.lineNumber,1,i.lineNumber+1,1):new oe["a"](i.lineNumber,1,i.lineNumber,1);const o=e=>e.start+1<=i.column&&i.column<=e.end+1,r=(e,t)=>(e=Math.min(e,i.column),t=Math.max(t,i.column),new oe["a"](i.lineNumber,e,i.lineNumber,t)),a=e=>{let t=e.start+1,i=e.end+1,o=!1;while(i-1<s&&this._charAtIsWhitespace(n,i-1))o=!0,i++;if(!o)while(t>1&&this._charAtIsWhitespace(n,t-2))t--;return r(t,i)},l=_t._findPreviousWordOnLine(e,t,i);if(l&&o(l))return a(l);const h=_t._findNextWordOnLine(e,t,i);return h&&o(h)?a(h):l&&h?r(l.end+1,h.start+1):l?r(l.start+1,l.end+1):h?r(h.start+1,h.end+1):r(1,s+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=_t._moveWordPartLeft(e,i);return new oe["a"](i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){let i=e.length;for(let n=t;n<i;n++){let t=e.charAt(n);if(" "!==t&&"\t"!==t)return n}return i}static _deleteWordRightWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=t.column-1,s=this._findFirstNonWhitespaceChar(i,n);return n+1<s?new oe["a"](t.lineNumber,t.column,t.lineNumber,s+1):null}static deleteWordRight(e,t){const i=e.wordSeparators,n=e.model,s=e.selection,o=e.whitespaceHeuristics;if(!s.isEmpty())return s;const r=new se["a"](s.positionLineNumber,s.positionColumn);let a=r.lineNumber,l=r.column;const h=n.getLineCount(),c=n.getLineMaxColumn(a);if(a===h&&l===c)return null;if(o){let e=this._deleteWordRightWhitespace(n,r);if(e)return e}let d=_t._findNextWordOnLine(i,n,r);return 2===t?d?l=d.end+1:l<c||a===h?l=c:(a++,d=_t._findNextWordOnLine(i,n,new se["a"](a,1)),l=d?d.start+1:n.getLineMaxColumn(a)):(d&&l>=d.start+1&&(d=_t._findNextWordOnLine(i,n,new se["a"](a,d.end+1))),d?l=d.start+1:l<c||a===h?l=c:(a++,d=_t._findNextWordOnLine(i,n,new se["a"](a,1)),l=d?d.start+1:n.getLineMaxColumn(a))),new oe["a"](a,l,r.lineNumber,r.column)}static _deleteWordPartRight(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=_t._moveWordPartRight(e,i);return new oe["a"](i.lineNumber,i.column,n.lineNumber,n.column)}static _createWordAtPosition(e,t,i){const n=new oe["a"](t,i.start+1,t,i.end+1);return{word:e.getValueInRange(n),startColumn:n.startColumn,endColumn:n.endColumn}}static getWordAtPosition(e,t,i){const n=Object(it["a"])(t),s=_t._findPreviousWordOnLine(n,e,i);if(s&&1===s.wordType&&s.start<=i.column-1&&i.column-1<=s.end)return _t._createWordAtPosition(e,i.lineNumber,s);const o=_t._findNextWordOnLine(n,e,i);return o&&1===o.wordType&&o.start<=i.column-1&&i.column-1<=o.end?_t._createWordAtPosition(e,i.lineNumber,o):null}static word(e,t,i,n,s){const o=Object(it["a"])(e.wordSeparators);let r,a,l=_t._findPreviousWordOnLine(o,t,s),h=_t._findNextWordOnLine(o,t,s);if(!n){let e,i;return l&&1===l.wordType&&l.start<=s.column-1&&s.column-1<=l.end?(e=l.start+1,i=l.end+1):h&&1===h.wordType&&h.start<=s.column-1&&s.column-1<=h.end?(e=h.start+1,i=h.end+1):(e=l?l.end+1:1,i=h?h.start+1:t.getLineMaxColumn(s.lineNumber)),new ge(new oe["a"](s.lineNumber,e,s.lineNumber,i),0,new se["a"](s.lineNumber,i),0)}l&&1===l.wordType&&l.start<s.column-1&&s.column-1<l.end?(r=l.start+1,a=l.end+1):h&&1===h.wordType&&h.start<s.column-1&&s.column-1<h.end?(r=h.start+1,a=h.end+1):(r=s.column,a=s.column);let c,d=s.lineNumber;if(i.selectionStart.containsPosition(s))c=i.selectionStart.endColumn;else if(s.isBeforeOrEqual(i.selectionStart.getStartPosition())){c=r;let e=new se["a"](d,c);i.selectionStart.containsPosition(e)&&(c=i.selectionStart.endColumn)}else{c=a;let e=new se["a"](d,c);i.selectionStart.containsPosition(e)&&(c=i.selectionStart.startColumn)}return i.move(!0,d,c,0)}}class bt{static addCursorDown(e,t,i){let n=[],s=0;for(let o=0,r=t.length;o<r;o++){const r=t[o];n[s++]=new _e(r.modelState,r.viewState),n[s++]=i?_e.fromModelState(mt.translateDown(e.cursorConfig,e.model,r.modelState)):_e.fromViewState(mt.translateDown(e.cursorConfig,e,r.viewState))}return n}static addCursorUp(e,t,i){let n=[],s=0;for(let o=0,r=t.length;o<r;o++){const r=t[o];n[s++]=new _e(r.modelState,r.viewState),n[s++]=i?_e.fromModelState(mt.translateUp(e.cursorConfig,e.model,r.modelState)):_e.fromViewState(mt.translateUp(e.cursorConfig,e,r.viewState))}return n}static moveToBeginningOfLine(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const o=t[s];n[s]=this._moveToLineStart(e,o,i)}return n}static _moveToLineStart(e,t,i){const n=t.viewState.position.column,s=t.modelState.position.column,o=n===s,r=t.viewState.position.lineNumber,a=e.getLineFirstNonWhitespaceColumn(r),l=n===a;return o||l?this._moveToLineStartByModel(e,t,i):this._moveToLineStartByView(e,t,i)}static _moveToLineStartByView(e,t,i){return _e.fromViewState(mt.moveToBeginningOfLine(e.cursorConfig,e,t.viewState,i))}static _moveToLineStartByModel(e,t,i){return _e.fromModelState(mt.moveToBeginningOfLine(e.cursorConfig,e.model,t.modelState,i))}static moveToEndOfLine(e,t,i,n){let s=[];for(let o=0,r=t.length;o<r;o++){const r=t[o];s[o]=this._moveToLineEnd(e,r,i,n)}return s}static _moveToLineEnd(e,t,i,n){const s=t.viewState.position,o=e.getLineMaxColumn(s.lineNumber),r=s.column===o,a=t.modelState.position,l=e.model.getLineMaxColumn(a.lineNumber),h=o-s.column===l-a.column;return r||h?this._moveToLineEndByModel(e,t,i,n):this._moveToLineEndByView(e,t,i,n)}static _moveToLineEndByView(e,t,i,n){return _e.fromViewState(mt.moveToEndOfLine(e.cursorConfig,e,t.viewState,i,n))}static _moveToLineEndByModel(e,t,i,n){return _e.fromModelState(mt.moveToEndOfLine(e.cursorConfig,e.model,t.modelState,i,n))}static expandLineSelection(e,t){let i=[];for(let n=0,s=t.length;n<s;n++){const s=t[n],o=s.modelState.selection.startLineNumber,r=e.model.getLineCount();let a,l=s.modelState.selection.endLineNumber;l===r?a=e.model.getLineMaxColumn(r):(l++,a=1),i[n]=_e.fromModelState(new ge(new oe["a"](o,1,o,1),0,new se["a"](l,a),0))}return i}static moveToBeginningOfBuffer(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const o=t[s];n[s]=_e.fromModelState(mt.moveToBeginningOfBuffer(e.cursorConfig,e.model,o.modelState,i))}return n}static moveToEndOfBuffer(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const o=t[s];n[s]=_e.fromModelState(mt.moveToEndOfBuffer(e.cursorConfig,e.model,o.modelState,i))}return n}static selectAll(e,t){const i=e.model.getLineCount(),n=e.model.getLineMaxColumn(i);return _e.fromModelState(new ge(new oe["a"](1,1,1,1),0,new se["a"](i,n),0))}static line(e,t,i,n,s){const o=e.model.validatePosition(n),r=s?e.coordinatesConverter.validateViewPosition(new se["a"](s.lineNumber,s.column),o):e.coordinatesConverter.convertModelPositionToViewPosition(o);if(!i||!t.modelState.hasSelection()){const t=e.model.getLineCount();let i=o.lineNumber+1,n=1;return i>t&&(i=t,n=e.model.getLineMaxColumn(i)),_e.fromModelState(new ge(new oe["a"](o.lineNumber,1,i,n),0,new se["a"](i,n),0))}const a=t.modelState.selectionStart.getStartPosition().lineNumber;if(o.lineNumber<a)return _e.fromViewState(t.viewState.move(t.modelState.hasSelection(),r.lineNumber,1,0));if(o.lineNumber>a){const i=e.getLineCount();let n=r.lineNumber+1,s=1;return n>i&&(n=i,s=e.getLineMaxColumn(n)),_e.fromViewState(t.viewState.move(t.modelState.hasSelection(),n,s,0))}{const e=t.modelState.selectionStart.getEndPosition();return _e.fromModelState(t.modelState.move(t.modelState.hasSelection(),e.lineNumber,e.column,0))}}static word(e,t,i,n){const s=e.model.validatePosition(n);return _e.fromModelState(_t.word(e.cursorConfig,e.model,t.modelState,i,s))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new _e(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return _e.fromViewState(new ge(new oe["a"](i,n,i,n),0,new se["a"](i,n),0))}static moveTo(e,t,i,n,s){const o=e.model.validatePosition(n),r=s?e.coordinatesConverter.validateViewPosition(new se["a"](s.lineNumber,s.column),o):e.coordinatesConverter.convertModelPositionToViewPosition(o);return _e.fromViewState(t.viewState.move(i,r.lineNumber,r.column,0))}static simpleMove(e,t,i,n,s,o){switch(i){case 0:return 4===o?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,s);case 1:return 4===o?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,s);case 2:return 2===o?this._moveUpByViewLines(e,t,n,s):this._moveUpByModelLines(e,t,n,s);case 3:return 2===o?this._moveDownByViewLines(e,t,n,s):this._moveDownByModelLines(e,t,n,s);case 4:return 2===o?t.map(t=>_e.fromViewState(mt.moveToPrevBlankLine(e.cursorConfig,e,t.viewState,n))):t.map(t=>_e.fromModelState(mt.moveToPrevBlankLine(e.cursorConfig,e.model,t.modelState,n)));case 5:return 2===o?t.map(t=>_e.fromViewState(mt.moveToNextBlankLine(e.cursorConfig,e,t.viewState,n))):t.map(t=>_e.fromModelState(mt.moveToNextBlankLine(e.cursorConfig,e.model,t.modelState,n)));case 6:return this._moveToViewMinColumn(e,t,n);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 8:return this._moveToViewCenterColumn(e,t,n);case 9:return this._moveToViewMaxColumn(e,t,n);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,n);default:return null}}static viewportMove(e,t,i,n,s){const o=e.getCompletelyVisibleViewRange(),r=e.coordinatesConverter.convertViewRangeToModelRange(o);switch(i){case 11:{const i=this._firstLineNumberInRange(e.model,r,s),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 13:{const i=this._lastLineNumberInRange(e.model,r,s),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 12:{const i=Math.round((r.startLineNumber+r.endLineNumber)/2),s=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,s)]}case 14:{let i=[];for(let s=0,r=t.length;s<r;s++){const r=t[s];i[s]=this.findPositionInViewportIfOutside(e,r,o,n)}return i}default:return null}}static findPositionInViewportIfOutside(e,t,i,n){let s=t.viewState.position.lineNumber;if(i.startLineNumber<=s&&s<=i.endLineNumber-1)return new _e(t.modelState,t.viewState);{s>i.endLineNumber-1&&(s=i.endLineNumber-1),s<i.startLineNumber&&(s=i.startLineNumber);const o=e.getLineFirstNonWhitespaceColumn(s);return this._moveToViewPosition(e,t,n,s,o)}}static _firstLineNumberInRange(e,t,i){let n=t.startLineNumber;return t.startColumn!==e.getLineMinColumn(n)&&n++,Math.min(t.endLineNumber,n+i-1)}static _lastLineNumberInRange(e,t,i){let n=t.startLineNumber;return t.startColumn!==e.getLineMinColumn(n)&&n++,Math.max(n,t.endLineNumber-i+1)}static _moveLeft(e,t,i,n){const s=t.length>1;let o=[];for(let r=0,a=t.length;r<a;r++){const a=t[r],l=s||!a.viewState.hasSelection();let h=mt.moveLeft(e.cursorConfig,e,a.viewState,i,n);if(l&&1===n&&a.viewState.position.column===e.getLineMinColumn(a.viewState.position.lineNumber)&&h.position.lineNumber!==a.viewState.position.lineNumber){const t=e.coordinatesConverter.convertViewPositionToModelPosition(h.position);t.lineNumber===a.modelState.position.lineNumber&&(h=mt.moveLeft(e.cursorConfig,e,h,i,1))}o[r]=_e.fromViewState(h)}return o}static _moveHalfLineLeft(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const o=t[s],r=o.viewState.position.lineNumber,a=Math.round(e.getLineContent(r).length/2);n[s]=_e.fromViewState(mt.moveLeft(e.cursorConfig,e,o.viewState,i,a))}return n}static _moveRight(e,t,i,n){const s=t.length>1;let o=[];for(let r=0,a=t.length;r<a;r++){const a=t[r],l=s||!a.viewState.hasSelection();let h=mt.moveRight(e.cursorConfig,e,a.viewState,i,n);if(l&&1===n&&a.viewState.position.column===e.getLineMaxColumn(a.viewState.position.lineNumber)&&h.position.lineNumber!==a.viewState.position.lineNumber){const t=e.coordinatesConverter.convertViewPositionToModelPosition(h.position);t.lineNumber===a.modelState.position.lineNumber&&(h=mt.moveRight(e.cursorConfig,e,h,i,1))}o[r]=_e.fromViewState(h)}return o}static _moveHalfLineRight(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const o=t[s],r=o.viewState.position.lineNumber,a=Math.round(e.getLineContent(r).length/2);n[s]=_e.fromViewState(mt.moveRight(e.cursorConfig,e,o.viewState,i,a))}return n}static _moveDownByViewLines(e,t,i,n){let s=[];for(let o=0,r=t.length;o<r;o++){const r=t[o];s[o]=_e.fromViewState(mt.moveDown(e.cursorConfig,e,r.viewState,i,n))}return s}static _moveDownByModelLines(e,t,i,n){let s=[];for(let o=0,r=t.length;o<r;o++){const r=t[o];s[o]=_e.fromModelState(mt.moveDown(e.cursorConfig,e.model,r.modelState,i,n))}return s}static _moveUpByViewLines(e,t,i,n){let s=[];for(let o=0,r=t.length;o<r;o++){const r=t[o];s[o]=_e.fromViewState(mt.moveUp(e.cursorConfig,e,r.viewState,i,n))}return s}static _moveUpByModelLines(e,t,i,n){let s=[];for(let o=0,r=t.length;o<r;o++){const r=t[o];s[o]=_e.fromModelState(mt.moveUp(e.cursorConfig,e.model,r.modelState,i,n))}return s}static _moveToViewPosition(e,t,i,n,s){return _e.fromViewState(t.viewState.move(i,n,s,0))}static _moveToModelPosition(e,t,i,n,s){return _e.fromModelState(t.modelState.move(i,n,s,0))}static _moveToViewMinColumn(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const o=t[s],r=o.viewState.position.lineNumber,a=e.getLineMinColumn(r);n[s]=this._moveToViewPosition(e,o,i,r,a)}return n}static _moveToViewFirstNonWhitespaceColumn(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const o=t[s],r=o.viewState.position.lineNumber,a=e.getLineFirstNonWhitespaceColumn(r);n[s]=this._moveToViewPosition(e,o,i,r,a)}return n}static _moveToViewCenterColumn(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const o=t[s],r=o.viewState.position.lineNumber,a=Math.round((e.getLineMaxColumn(r)+e.getLineMinColumn(r))/2);n[s]=this._moveToViewPosition(e,o,i,r,a)}return n}static _moveToViewMaxColumn(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const o=t[s],r=o.viewState.position.lineNumber,a=e.getLineMaxColumn(r);n[s]=this._moveToViewPosition(e,o,i,r,a)}return n}static _moveToViewLastNonWhitespaceColumn(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const o=t[s],r=o.viewState.position.lineNumber,a=e.getLineLastNonWhitespaceColumn(r);n[s]=this._moveToViewPosition(e,o,i,r,a)}return n}}(function(e){const t=function(e){if(!ct["h"](e))return!1;let t=e;return!!ct["i"](t.to)&&(!(!ct["j"](t.select)&&!ct["e"](t.select))&&(!(!ct["j"](t.by)&&!ct["i"](t.by))&&!(!ct["j"](t.value)&&!ct["g"](t.value))))};function i(t){if(!t.to)return null;let i;switch(t.to){case e.RawDirection.Left:i=0;break;case e.RawDirection.Right:i=1;break;case e.RawDirection.Up:i=2;break;case e.RawDirection.Down:i=3;break;case e.RawDirection.PrevBlankLine:i=4;break;case e.RawDirection.NextBlankLine:i=5;break;case e.RawDirection.WrappedLineStart:i=6;break;case e.RawDirection.WrappedLineFirstNonWhitespaceCharacter:i=7;break;case e.RawDirection.WrappedLineColumnCenter:i=8;break;case e.RawDirection.WrappedLineEnd:i=9;break;case e.RawDirection.WrappedLineLastNonWhitespaceCharacter:i=10;break;case e.RawDirection.ViewPortTop:i=11;break;case e.RawDirection.ViewPortBottom:i=13;break;case e.RawDirection.ViewPortCenter:i=12;break;case e.RawDirection.ViewPortIfOutside:i=14;break;default:return null}let n=0;switch(t.by){case e.RawUnit.Line:n=1;break;case e.RawUnit.WrappedLine:n=2;break;case e.RawUnit.Character:n=3;break;case e.RawUnit.HalfLine:n=4;break}return{direction:i,unit:n,select:!!t.select,value:t.value||1}}e.description={description:"Move cursor to a logical position in the view",args:[{name:"Cursor move argument object",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t* 'to': A mandatory logical position value providing where to move the cursor.\n\t\t\t\t\t\t```\n\t\t\t\t\t\t'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine',\n\t\t\t\t\t\t'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter'\n\t\t\t\t\t\t'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter'\n\t\t\t\t\t\t'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside'\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', 'character', 'halfLine'\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* 'select': If 'true' makes the selection. Default is 'false'.\n\t\t\t\t",constraint:t,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["left","right","up","down","prevBlankLine","nextBlankLine","wrappedLineStart","wrappedLineEnd","wrappedLineColumnCenter","wrappedLineFirstNonWhitespaceCharacter","wrappedLineLastNonWhitespaceCharacter","viewPortTop","viewPortCenter","viewPortBottom","viewPortIfOutside"]},by:{type:"string",enum:["line","wrappedLine","character","halfLine"]},value:{type:"number",default:1},select:{type:"boolean",default:!1}}}}]},e.RawDirection={Left:"left",Right:"right",Up:"up",Down:"down",PrevBlankLine:"prevBlankLine",NextBlankLine:"nextBlankLine",WrappedLineStart:"wrappedLineStart",WrappedLineFirstNonWhitespaceCharacter:"wrappedLineFirstNonWhitespaceCharacter",WrappedLineColumnCenter:"wrappedLineColumnCenter",WrappedLineEnd:"wrappedLineEnd",WrappedLineLastNonWhitespaceCharacter:"wrappedLineLastNonWhitespaceCharacter",ViewPortTop:"viewPortTop",ViewPortCenter:"viewPortCenter",ViewPortBottom:"viewPortBottom",ViewPortIfOutside:"viewPortIfOutside"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"},e.parse=i})(ut||(ut={}));const vt=Object.create(null);function Ct(e,t){vt[e]||(vt[e]=["",e]);const i=vt[e];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+e;return i[t]}class wt{constructor(e,t){this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(e,t,i,n,s){const o=ve.visibleColumnFromColumn(e,t,i);if(s){const e=Ct(" ",n),t=ve.prevIndentTabStop(o,n),i=t/n;return Ct(e,i)}{const e="\t",t=ve.prevRenderTabStop(o,i),n=t/i;return Ct(e,n)}}static shiftIndent(e,t,i,n,s){const o=ve.visibleColumnFromColumn(e,t,i);if(s){const e=Ct(" ",n),t=ve.nextIndentTabStop(o,n),i=t/n;return Ct(e,i)}{const e="\t",t=ve.nextRenderTabStop(o,i),n=t/i;return Ct(e,n)}}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){const i=this._selection.startLineNumber;let n=this._selection.endLineNumber;1===this._selection.endColumn&&i!==n&&(n-=1);const{tabSize:s,indentSize:o,insertSpaces:r}=this._opts,a=i===n;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let l=0,h=0;for(let c=i;c<=n;c++,l=h){h=0;let n,d=e.getLineContent(c),u=re["v"](d);if((!this._opts.isUnshift||0!==d.length&&0!==u)&&(a||this._opts.isUnshift||0!==d.length)){if(-1===u&&(u=d.length),c>1){let t=ve.visibleColumnFromColumn(d,u+1,s);if(t%o!==0&&e.isCheapToTokenize(c-1)){let t=le["a"].getEnterAction(this._opts.autoIndent,e,new oe["a"](c-1,e.getLineMaxColumn(c-1),c-1,e.getLineMaxColumn(c-1)));if(t){if(h=l,t.appendText)for(let e=0,i=t.appendText.length;e<i&&h<o;e++){if(32!==t.appendText.charCodeAt(e))break;h++}t.removeText&&(h=Math.max(0,h-t.removeText));for(let e=0;e<h;e++){if(0===u||32!==d.charCodeAt(u-1))break;u--}}}}this._opts.isUnshift&&0===u||(n=this._opts.isUnshift?wt.unshiftIndent(d,u+1,s,o,r):wt.shiftIndent(d,u+1,s,o,r),this._addEditOperation(t,new oe["a"](c,1,c,u+1),n),c!==i||this._selection.isEmpty()||(this._selectionStartColumnStaysPut=this._selection.startColumn<=u+1))}}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&0===e.getLineLength(i)&&(this._useLastEditRangeForCursorEndPosition=!0);const s=r?Ct(" ",o):"\t";for(let r=i;r<=n;r++){const n=e.getLineContent(r);let l=re["v"](n);if((!this._opts.isUnshift||0!==n.length&&0!==l)&&((a||this._opts.isUnshift||0!==n.length)&&(-1===l&&(l=n.length),!this._opts.isUnshift||0!==l)))if(this._opts.isUnshift){l=Math.min(l,o);for(let e=0;e<l;e++){const t=n.charCodeAt(e);if(9===t){l=e+1;break}}this._addEditOperation(t,new oe["a"](r,1,r,l+1),"")}else this._addEditOperation(t,new oe["a"](r,1,r,1),s),r!==i||this._selection.isEmpty()||(this._selectionStartColumnStaysPut=1===this._selection.startColumn)}}this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){if(this._useLastEditRangeForCursorEndPosition){let e=t.getInverseEditOperations()[0];return new _["a"](e.range.endLineNumber,e.range.endColumn,e.range.endLineNumber,e.range.endColumn)}const i=t.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){let e=this._selection.startColumn,t=i.startColumn;return t<=e?i:0===i.getDirection()?new _["a"](i.startLineNumber,e,i.endLineNumber,i.endColumn):new _["a"](i.endLineNumber,i.endColumn,i.startLineNumber,e)}return i}}class St{constructor(e,t,i){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=i}getEditOperations(e,t){t.addTrackedEditOperation(new oe["a"](this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new oe["a"](this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){let i=t.getInverseEditOperations(),n=i[0].range,s=i[1].range;return new _["a"](n.endLineNumber,n.endColumn,s.endLineNumber,s.endColumn-this._charAfterSelection.length)}}var yt=i("2837");class Dt{static indent(e,t,i){if(null===t||null===i)return[];let n=[];for(let s=0,o=i.length;s<o;s++)n[s]=new wt(i[s],{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent});return n}static outdent(e,t,i){let n=[];for(let s=0,o=i.length;s<o;s++)n[s]=new wt(i[s],{isUnshift:!0,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent});return n}static shiftIndent(e,t,i){return i=i||1,wt.shiftIndent(t,t.length+i,e.tabSize,e.indentSize,e.insertSpaces)}static unshiftIndent(e,t,i){return i=i||1,wt.unshiftIndent(t,t.length+i,e.tabSize,e.indentSize,e.insertSpaces)}static _distributedPaste(e,t,i,n){let s=[];for(let o=0,r=i.length;o<r;o++)s[o]=new gt["a"](i[o],n[o]);return new be(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(e,t,i,n,s){let o=[];for(let r=0,a=i.length;r<a;r++){const e=i[r];let t=e.getPosition();if(s&&!e.isEmpty()&&(s=!1),s&&n.indexOf("\n")!==n.length-1&&(s=!1),s){let i=new oe["a"](t.lineNumber,1,t.lineNumber,1);o[r]=new gt["b"](i,n,e,!0)}else o[r]=new gt["a"](e,n)}return new be(0,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(e,t,i,n,s){if(n)return null;if(1===t.length)return null;if(s&&s.length===t.length)return s;if("spread"===e.multiCursorPaste){10===i.charCodeAt(i.length-1)&&(i=i.substr(0,i.length-1)),13===i.charCodeAt(i.length-1)&&(i=i.substr(0,i.length-1));let e=re["Q"](i);if(e.length===t.length)return e}return null}static paste(e,t,i,n,s,o){const r=this._distributePasteToCursors(e,i,n,s,o);return r?(i=i.sort(oe["a"].compareRangesUsingStarts),this._distributedPaste(e,t,i,r)):this._simplePaste(e,t,i,n,s)}static _goodIndentForLine(e,t,i){let n=null,s="";const o=le["a"].getInheritIndentForLine(e.autoIndent,t,i,!1);if(o)n=o.action,s=o.indentation;else if(i>1){let n;for(n=i-1;n>=1;n--){const e=t.getLineContent(n),i=re["I"](e);if(i>=0)break}if(n<1)return null;const o=t.getLineMaxColumn(n),r=le["a"].getEnterAction(e.autoIndent,t,new oe["a"](n,o,n,o));r&&(s=r.indentation+r.appendText)}return n&&(n===yt["b"].Indent&&(s=Dt.shiftIndent(e,s)),n===yt["b"].Outdent&&(s=Dt.unshiftIndent(e,s)),s=e.normalizeIndentation(s)),s||null}static _replaceJumpToNextIndent(e,t,i,n){let s="",o=i.getStartPosition();if(e.insertSpaces){let i=ve.visibleColumnFromColumn2(e,t,o),n=e.indentSize,r=n-i%n;for(let e=0;e<r;e++)s+=" "}else s="\t";return new gt["a"](i,s,n)}static tab(e,t,i){let n=[];for(let s=0,o=i.length;s<o;s++){const o=i[s];if(o.isEmpty()){let i=t.getLineContent(o.startLineNumber);if(/^\s*$/.test(i)&&t.isCheapToTokenize(o.startLineNumber)){let r=this._goodIndentForLine(e,t,o.startLineNumber);r=r||"\t";let a=e.normalizeIndentation(r);if(!i.startsWith(a)){n[s]=new gt["a"](new oe["a"](o.startLineNumber,1,o.startLineNumber,i.length+1),a,!0);continue}}n[s]=this._replaceJumpToNextIndent(e,t,o,!0)}else{if(o.startLineNumber===o.endLineNumber){let i=t.getLineMaxColumn(o.startLineNumber);if(1!==o.startColumn||o.endColumn!==i){n[s]=this._replaceJumpToNextIndent(e,t,o,!1);continue}}n[s]=new wt(o,{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent})}}return n}static compositionType(e,t,i,n,s,o,r,a){const l=n.map(e=>this._compositionType(i,e,s,o,r,a));return new be(1,l,{shouldPushStackElementBefore:1!==e,shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,s,o){if(!t.isEmpty())return null;const r=t.getPosition(),a=Math.max(1,r.column-n),l=Math.min(e.getLineMaxColumn(r.lineNumber),r.column+s),h=new oe["a"](r.lineNumber,a,r.lineNumber,l),c=e.getValueInRange(h);return c===i&&0===o?null:new gt["c"](h,i,0,o)}static _typeCommand(e,t,i){return i?new gt["d"](e,t,!0):new gt["a"](e,t,!0)}static _enter(e,t,i,n){if(0===e.autoIndent)return Dt._typeCommand(n,"\n",i);if(!t.isCheapToTokenize(n.getStartPosition().lineNumber)||1===e.autoIndent){let s=t.getLineContent(n.startLineNumber),o=re["y"](s).substring(0,n.startColumn-1);return Dt._typeCommand(n,"\n"+e.normalizeIndentation(o),i)}const s=le["a"].getEnterAction(e.autoIndent,t,n);if(s){if(s.indentAction===yt["b"].None)return Dt._typeCommand(n,"\n"+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===yt["b"].Indent)return Dt._typeCommand(n,"\n"+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===yt["b"].IndentOutdent){const t=e.normalizeIndentation(s.indentation),o=e.normalizeIndentation(s.indentation+s.appendText),r="\n"+o+"\n"+t;return i?new gt["d"](n,r,!0):new gt["c"](n,r,-1,o.length-t.length,!0)}if(s.indentAction===yt["b"].Outdent){const t=Dt.unshiftIndent(e,s.indentation);return Dt._typeCommand(n,"\n"+e.normalizeIndentation(t+s.appendText),i)}}const o=t.getLineContent(n.startLineNumber),r=re["y"](o).substring(0,n.startColumn-1);if(e.autoIndent>=4){const s=le["a"].getIndentForEnter(e.autoIndent,t,n,{unshiftIndent:t=>Dt.unshiftIndent(e,t),shiftIndent:t=>Dt.shiftIndent(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)});if(s){let o=ve.visibleColumnFromColumn2(e,t,n.getEndPosition());const r=n.endColumn,a=t.getLineContent(n.endLineNumber),l=re["v"](a);if(n=l>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,l+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new gt["d"](n,"\n"+e.normalizeIndentation(s.afterEnter),!0);{let t=0;return r<=l+1&&(e.insertSpaces||(o=Math.ceil(o/e.indentSize)),t=Math.min(o+1-e.normalizeIndentation(s.afterEnter).length-1,0)),new gt["c"](n,"\n"+e.normalizeIndentation(s.afterEnter),0,t,!0)}}}return Dt._typeCommand(n,"\n"+e.normalizeIndentation(r),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let n=0,s=i.length;n<s;n++)if(!t.isCheapToTokenize(i[n].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(e,t,i,n){const s=le["a"].getIndentationAtPosition(t,i.startLineNumber,i.startColumn),o=le["a"].getIndentActionForType(e.autoIndent,t,i,n,{shiftIndent:t=>Dt.shiftIndent(e,t),unshiftIndent:t=>Dt.unshiftIndent(e,t)});if(null===o)return null;if(o!==e.normalizeIndentation(s)){const s=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return 0===s?Dt._typeCommand(new oe["a"](i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(o)+n,!1):Dt._typeCommand(new oe["a"](i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(o)+t.getLineContent(i.startLineNumber).substring(s-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,s){if("never"===e.autoClosingOvertype)return!1;if(!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(s))return!1;for(let o=0,r=i.length;o<r;o++){const r=i[o];if(!r.isEmpty())return!1;const a=r.getPosition(),l=t.getLineContent(a.lineNumber),h=l.charAt(a.column-1);if(h!==s)return!1;const c=Ce(s),d=a.column>2?l.charCodeAt(a.column-2):0;if(92===d&&c)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;t<i;t++){const i=n[t];if(a.lineNumber===i.startLineNumber&&a.column===i.startColumn){e=!0;break}}if(!e)return!1}}return!0}static _runAutoClosingOvertype(e,t,i,n,s){let o=[];for(let r=0,a=n.length;r<a;r++){const e=n[r],t=e.getPosition(),i=new oe["a"](t.lineNumber,t.column,t.lineNumber,t.column+1);o[r]=new gt["a"](i,s)}return new be(1,o,{shouldPushStackElementBefore:1!==e,shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(e,t){const i=t.charAt(0),n=e.autoClosingPairs.autoClosingPairsOpenByStart.get(i)||[],s=e.autoClosingPairs.autoClosingPairsCloseByStart.get(i)||[],o=n.some(e=>t.startsWith(e.open)),r=s.some(e=>t.startsWith(e.close));return!o&&r}static _findAutoClosingPairOpen(e,t,i,n){const s=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!s)return null;let o=null;for(const r of s)if(null===o||r.open.length>o.open.length){let e=!0;for(const s of i){const i=t.getValueInRange(new oe["a"](s.lineNumber,s.column-r.open.length+1,s.lineNumber,s.column));if(i+n!==r.open){e=!1;break}}e&&(o=r)}return o}static _findSubAutoClosingPairClose(e,t){if(t.open.length<=1)return"";const i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[];let s=null;for(const o of n)o.open!==t.open&&t.open.includes(o.open)&&t.close.endsWith(o.close)&&(!s||o.open.length>s.open.length)&&(s=o);return s?s.close:""}static _getAutoClosingPairClose(e,t,i,n,s){const o=Ce(n),r=o?e.autoClosingQuotes:e.autoClosingBrackets;if("never"===r)return null;const a=this._findAutoClosingPairOpen(e,t,i.map(e=>e.getPosition()),n);if(!a)return null;const l=this._findSubAutoClosingPairClose(e,a);let h=!0;const d=o?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;for(let g=0,p=i.length;g<p;g++){const n=i[g];if(!n.isEmpty())return null;const p=n.getPosition(),m=t.getLineContent(p.lineNumber),f=m.substring(p.column-1);if(f.startsWith(l)||(h=!1),m.length>p.column-1){const t=m.charAt(p.column-1),i=Dt._isBeforeClosingBrace(e,f);if(!i&&!d(t))return null}if(!t.isCheapToTokenize(p.lineNumber))return null;if(1===a.open.length&&o&&"always"!==r){const t=Object(it["a"])(e.wordSeparators);if(s&&p.column>1&&0===t.get(m.charCodeAt(p.column-2)))return null;if(!s&&p.column>2&&0===t.get(m.charCodeAt(p.column-3)))return null}t.forceTokenization(p.lineNumber);const _=t.getLineTokens(p.lineNumber);let b=!1;try{b=le["a"].shouldAutoClosePair(a,_,s?p.column:p.column-1)}catch(u){Object(c["e"])(u)}if(!b)return null}return h?a.close.substring(0,a.close.length-l.length):a.close}static _runAutoClosingOpenCharType(e,t,i,n,s,o,r){let a=[];for(let l=0,h=n.length;l<h;l++){const e=n[l];a[l]=new Lt(e,s,o,r)}return new be(1,a,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(e,t){return Ce(t)?"quotes"===e.autoSurround||"languageDefined"===e.autoSurround:"brackets"===e.autoSurround||"languageDefined"===e.autoSurround}static _isSurroundSelectionType(e,t,i,n){if(!Dt._shouldSurroundChar(e,n)||!e.surroundingPairs.hasOwnProperty(n))return!1;const s=Ce(n);for(let o=0,r=i.length;o<r;o++){const e=i[o];if(e.isEmpty())return!1;let n=!0;for(let i=e.startLineNumber;i<=e.endLineNumber;i++){const s=t.getLineContent(i),o=i===e.startLineNumber?e.startColumn-1:0,r=i===e.endLineNumber?e.endColumn-1:s.length,a=s.substring(o,r);if(/[^ \t]/.test(a)){n=!1;break}}if(n)return!1;if(s&&e.startLineNumber===e.endLineNumber&&e.startColumn+1===e.endColumn){const i=t.getValueInRange(e);if(Ce(i))return!1}}return!0}static _runSurroundSelectionType(e,t,i,n,s){let o=[];for(let r=0,a=n.length;r<a;r++){const e=n[r],i=t.surroundingPairs[s];o[r]=new St(e,s,i)}return new be(0,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isTypeInterceptorElectricChar(e,t,i){return!(1!==i.length||!t.isCheapToTokenize(i[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(e,t,i,n,s){if(!t.electricChars.hasOwnProperty(s)||!n.isEmpty())return null;let o=n.getPosition();i.forceTokenization(o.lineNumber);let r,a=i.getLineTokens(o.lineNumber);try{r=le["a"].onElectricCharacter(s,a,o.column)}catch(l){return Object(c["e"])(l),null}if(!r)return null;if(r.matchOpenBracket){let e=(a.getLineContent()+s).lastIndexOf(r.matchOpenBracket)+1,n=i.findMatchingBracketUp(r.matchOpenBracket,{lineNumber:o.lineNumber,column:e});if(n){if(n.startLineNumber===o.lineNumber)return null;let e=i.getLineContent(n.startLineNumber),r=re["y"](e),a=t.normalizeIndentation(r),l=i.getLineContent(o.lineNumber),h=i.getLineFirstNonWhitespaceColumn(o.lineNumber)||o.column,c=l.substring(h-1,o.column-1),d=a+c+s,u=new oe["a"](o.lineNumber,1,o.lineNumber,o.column);const g=new gt["a"](u,d);return new be(1,[g],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}static compositionEndWithInterceptors(e,t,i,n,s,o){if(!n||_["a"].selectionsArrEqual(n,s))return null;let r=null;for(const l of s){if(!l.isEmpty())return null;const e=l.getPosition(),t=i.getValueInRange(new oe["a"](e.lineNumber,e.column-1,e.lineNumber,e.column));if(null===r)r=t;else if(r!==t)return null}if(!r)return null;if(this._isAutoClosingOvertype(t,i,s,o,r)){const e=s.map(e=>new gt["a"](new oe["a"](e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1));return new be(1,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const a=this._getAutoClosingPairClose(t,i,s,r,!1);return null!==a?this._runAutoClosingOpenCharType(e,t,i,s,r,!1,a):null}static typeWithInterceptors(e,t,i,n,s,o,r){if(!e&&"\n"===r){let e=[];for(let t=0,o=s.length;t<o;t++)e[t]=Dt._enter(i,n,!1,s[t]);return new be(1,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!e&&this._isAutoIndentType(i,n,s)){let e=[],t=!1;for(let o=0,a=s.length;o<a;o++)if(e[o]=this._runAutoIndentType(i,n,s[o],r),!e[o]){t=!0;break}if(!t)return new be(1,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!e&&this._isAutoClosingOvertype(i,n,s,o,r))return this._runAutoClosingOvertype(t,i,n,s,r);if(!e){const e=this._getAutoClosingPairClose(i,n,s,r,!0);if(e)return this._runAutoClosingOpenCharType(t,i,n,s,r,!0,e)}if(this._isSurroundSelectionType(i,n,s,r))return this._runSurroundSelectionType(t,i,n,s,r);if(!e&&this._isTypeInterceptorElectricChar(i,n,s)){const e=this._typeInterceptorElectricChar(t,i,n,s[0],r);if(e)return e}let a=[];for(let h=0,c=s.length;h<c;h++)a[h]=new gt["a"](s[h],r);let l=1!==t;return" "===r&&(l=!0),new be(1,a,{shouldPushStackElementBefore:l,shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(e,t,i,n,s){let o=[];for(let r=0,a=n.length;r<a;r++)o[r]=new gt["a"](n[r],s);return new be(1,o,{shouldPushStackElementBefore:1!==e,shouldPushStackElementAfter:!1})}static lineInsertBefore(e,t,i){if(null===t||null===i)return[];let n=[];for(let s=0,o=i.length;s<o;s++){let o=i[s].positionLineNumber;if(1===o)n[s]=new gt["d"](new oe["a"](1,1,1,1),"\n");else{o--;let i=t.getLineMaxColumn(o);n[s]=this._enter(e,t,!1,new oe["a"](o,i,o,i))}}return n}static lineInsertAfter(e,t,i){if(null===t||null===i)return[];let n=[];for(let s=0,o=i.length;s<o;s++){const o=i[s].positionLineNumber;let r=t.getLineMaxColumn(o);n[s]=this._enter(e,t,!1,new oe["a"](o,r,o,r))}return n}static lineBreakInsert(e,t,i){let n=[];for(let s=0,o=i.length;s<o;s++)n[s]=this._enter(e,t,!0,i[s]);return n}}class Lt extends gt["c"]{constructor(e,t,i,n){super(e,(i?t:"")+n,0,-n.length),this._openCharacter=t,this._closeCharacter=n,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(e,t){let i=t.getInverseEditOperations(),n=i[0].range;return this.closeCharacterRange=new oe["a"](n.startLineNumber,n.endColumn-this._closeCharacter.length,n.endLineNumber,n.endColumn),this.enclosingRange=new oe["a"](n.startLineNumber,n.endColumn-this._openCharacter.length-this._closeCharacter.length,n.endLineNumber,n.endColumn),super.computeCursorState(e,t)}}var xt=i("c101"),kt=i("4fc3"),Et=i("9eb8");const Nt=0;class Ot extends s["c"]{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i||{})}}var It,Tt,Mt;(function(e){const t=function(e){if(!ct["h"](e))return!1;const t=e;return!!ct["i"](t.to)&&(!(!ct["j"](t.by)&&!ct["i"](t.by))&&(!(!ct["j"](t.value)&&!ct["g"](t.value))&&!(!ct["j"](t.revealCursor)&&!ct["e"](t.revealCursor))))};function i(t){let i,n;switch(t.to){case e.RawDirection.Up:i=1;break;case e.RawDirection.Down:i=2;break;default:return null}switch(t.by){case e.RawUnit.Line:n=1;break;case e.RawUnit.WrappedLine:n=2;break;case e.RawUnit.Page:n=3;break;case e.RawUnit.HalfPage:n=4;break;default:n=2}const s=Math.floor(t.value||1),o=!!t.revealCursor;return{direction:i,unit:n,value:s,revealCursor:o,select:!!t.select}}e.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:t,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},e.RawDirection={Up:"up",Down:"down"},e.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"},e.parse=i})(It||(It={})),function(e){const t=function(e){if(!ct["h"](e))return!1;const t=e;return!(!ct["g"](t.lineNumber)&&!ct["i"](t.lineNumber))&&!(!ct["j"](t.at)&&!ct["i"](t.at))};e.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:t,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},e.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}}(Tt||(Tt={}));class At{constructor(e){e.addImplementation(1e4,(e,t)=>{const i=e.get(m["a"]).getFocusedCodeEditor();return!(!i||!i.hasTextFocus())&&this._runEditorCommand(e,i,t)}),e.addImplementation(1e3,(e,t)=>{const i=document.activeElement;return!!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)&&(this.runDOMCommand(),!0)}),e.addImplementation(0,(e,t)=>{const i=e.get(m["a"]).getActiveCodeEditor();return!!i&&(i.focus(),this._runEditorCommand(e,i,t))})}_runEditorCommand(e,t,i){const n=this.runEditorCommand(e,t,i);return n||!0}}(function(e){class t extends Ot{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[bt.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)]),e.revealPrimaryCursor(t.source,!0)}}e.MoveTo=Object(s["j"])(new t({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=Object(s["j"])(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class i extends Ot{runCoreEditorCommand(e,t){e.model.pushStackElement();const i=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);e.setCursorStates(t.source,3,i.viewStates.map(e=>_e.fromViewState(e))),e.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:i.fromLineNumber,fromViewVisualColumn:i.fromVisualColumn,toViewLineNumber:i.toLineNumber,toViewVisualColumn:i.toVisualColumn}),i.reversed?e.revealTopMostCursor(t.source):e.revealBottomMostCursor(t.source)}}e.ColumnSelect=Object(s["j"])(new class extends i{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,i,n){const s=e.model.validatePosition(n.position),o=e.coordinatesConverter.validateViewPosition(new se["a"](n.viewPosition.lineNumber,n.viewPosition.column),s);let r=n.doColumnSelect?i.fromViewLineNumber:o.lineNumber,a=n.doColumnSelect?i.fromViewVisualColumn:n.mouseColumn-1;return dt.columnSelect(e.cursorConfig,e,r,a,o.lineNumber,n.mouseColumn-1)}}),e.CursorColumnSelectLeft=Object(s["j"])(new class extends i{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return dt.columnSelectLeft(e.cursorConfig,e,i)}}),e.CursorColumnSelectRight=Object(s["j"])(new class extends i{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return dt.columnSelectRight(e.cursorConfig,e,i)}});class n extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return dt.columnSelectUp(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectUp=Object(s["j"])(new n({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=Object(s["j"])(new n({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:3595,linux:{primary:0}}}));class o extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return dt.columnSelectDown(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectDown=Object(s["j"])(new o({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=Object(s["j"])(new o({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:3596,linux:{primary:0}}}));class r extends Ot{constructor(){super({id:"cursorMove",precondition:void 0,description:ut.description})}runCoreEditorCommand(e,t){const i=ut.parse(t);i&&this._runCursorMove(e,t.source,i)}_runCursorMove(e,t,i){e.model.pushStackElement(),e.setCursorStates(t,3,r._move(e,e.getCursorStates(),i)),e.revealPrimaryCursor(t,!0)}static _move(e,t,i){const n=i.select,s=i.value;switch(i.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return bt.simpleMove(e,t,i.direction,n,s,i.unit);case 11:case 13:case 12:case 14:return bt.viewportMove(e,t,i.direction,n,s);default:return null}}}e.CursorMoveImpl=r,e.CursorMove=Object(s["j"])(new r);class a extends Ot{constructor(e){super(e),this._staticArgs=e.args}runCoreEditorCommand(e,t){let i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:e.cursorConfig.pageSize}),e.model.pushStackElement(),e.setCursorStates(t.source,3,bt.simpleMove(e,e.getCursorStates(),i.direction,i.select,i.value,i.unit)),e.revealPrimaryCursor(t.source,!0)}}e.CursorLeft=Object(s["j"])(new a({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=Object(s["j"])(new a({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:1039}})),e.CursorRight=Object(s["j"])(new a({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=Object(s["j"])(new a({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:1041}})),e.CursorUp=Object(s["j"])(new a({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=Object(s["j"])(new a({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=Object(s["j"])(new a({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:11}})),e.CursorPageUpSelect=Object(s["j"])(new a({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:1035}})),e.CursorDown=Object(s["j"])(new a({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=Object(s["j"])(new a({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=Object(s["j"])(new a({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:12}})),e.CursorPageDownSelect=Object(s["j"])(new a({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:1036}})),e.CreateCursor=Object(s["j"])(new class extends Ot{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){let i;i=t.wholeLine?bt.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):bt.moveTo(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition);const n=e.getCursorStates();if(n.length>1){const s=i.modelState?i.modelState.position:null,o=i.viewState?i.viewState.position:null;for(let i=0,r=n.length;i<r;i++){const r=n[i];if((!s||r.modelState.selection.containsPosition(s))&&(!o||r.viewState.selection.containsPosition(o)))return n.splice(i,1),e.model.pushStackElement(),void e.setCursorStates(t.source,3,n)}}n.push(i),e.model.pushStackElement(),e.setCursorStates(t.source,3,n)}}),e.LastCursorMoveToSelect=Object(s["j"])(new class extends Ot{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(e,t){const i=e.getLastAddedCursorIndex(),n=e.getCursorStates(),s=n.slice(0);s[i]=bt.moveTo(e,n[i],!0,t.position,t.viewPosition),e.model.pushStackElement(),e.setCursorStates(t.source,3,s)}});class h extends Ot{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,bt.moveToBeginningOfLine(e,e.getCursorStates(),this._inSelectionMode)),e.revealPrimaryCursor(t.source,!0)}}e.CursorHome=Object(s["j"])(new h({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:14,mac:{primary:14,secondary:[2063]}}})),e.CursorHomeSelect=Object(s["j"])(new h({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:1038,mac:{primary:1038,secondary:[3087]}}}));class c extends Ot{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,this._exec(e.getCursorStates())),e.revealPrimaryCursor(t.source,!0)}_exec(e){const t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i],s=n.modelState.position.lineNumber;t[i]=_e.fromModelState(n.modelState.move(this._inSelectionMode,s,1,0))}return t}}e.CursorLineStart=Object(s["j"])(new c({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:0,mac:{primary:287}}})),e.CursorLineStartSelect=Object(s["j"])(new c({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:0,mac:{primary:1311}}}));class d extends Ot{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,bt.moveToEndOfLine(e,e.getCursorStates(),this._inSelectionMode,t.sticky||!1)),e.revealPrimaryCursor(t.source,!0)}}e.CursorEnd=Object(s["j"])(new d({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:Nt,kbExpr:xt["a"].textInputFocus,primary:13,mac:{primary:13,secondary:[2065]}},description:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:l["a"]("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}})),e.CursorEndSelect=Object(s["j"])(new d({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:Nt,kbExpr:xt["a"].textInputFocus,primary:1037,mac:{primary:1037,secondary:[3089]}},description:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:l["a"]("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}}));class u extends Ot{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,this._exec(e,e.getCursorStates())),e.revealPrimaryCursor(t.source,!0)}_exec(e,t){const i=[];for(let n=0,s=t.length;n<s;n++){const s=t[n],o=s.modelState.position.lineNumber,r=e.model.getLineMaxColumn(o);i[n]=_e.fromModelState(s.modelState.move(this._inSelectionMode,o,r,0))}return i}}e.CursorLineEnd=Object(s["j"])(new u({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:0,mac:{primary:291}}})),e.CursorLineEndSelect=Object(s["j"])(new u({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:0,mac:{primary:1315}}}));class g extends Ot{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,bt.moveToBeginningOfBuffer(e,e.getCursorStates(),this._inSelectionMode)),e.revealPrimaryCursor(t.source,!0)}}e.CursorTop=Object(s["j"])(new g({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:2062,mac:{primary:2064}}})),e.CursorTopSelect=Object(s["j"])(new g({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:3086,mac:{primary:3088}}}));class p extends Ot{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,bt.moveToEndOfBuffer(e,e.getCursorStates(),this._inSelectionMode)),e.revealPrimaryCursor(t.source,!0)}}e.CursorBottom=Object(s["j"])(new p({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:2061,mac:{primary:2066}}})),e.CursorBottomSelect=Object(s["j"])(new p({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:3085,mac:{primary:3090}}}));class m extends Ot{constructor(){super({id:"editorScroll",precondition:void 0,description:It.description})}runCoreEditorCommand(e,t){const i=It.parse(t);i&&this._runEditorScroll(e,t.source,i)}_runEditorScroll(e,t,i){const n=this._computeDesiredScrollTop(e,i);if(i.revealCursor){const s=e.getCompletelyVisibleViewRangeAtScrollTop(n);e.setCursorStates(t,3,[bt.findPositionInViewportIfOutside(e,e.getPrimaryCursorState(),s,i.select)])}e.setScrollTop(n,0)}_computeDesiredScrollTop(e,t){if(1===t.unit){const i=e.getCompletelyVisibleViewRange(),n=e.coordinatesConverter.convertViewRangeToModelRange(i);let s;s=1===t.direction?Math.max(1,n.startLineNumber-t.value):Math.min(e.model.getLineCount(),n.startLineNumber+t.value);const o=e.coordinatesConverter.convertModelPositionToViewPosition(new se["a"](s,1));return e.getVerticalOffsetForLineNumber(o.lineNumber)}let i;i=3===t.unit?e.cursorConfig.pageSize*t.value:4===t.unit?Math.round(e.cursorConfig.pageSize/2)*t.value:t.value;const n=(1===t.direction?-1:1)*i;return e.getScrollTop()+n*e.cursorConfig.lineHeight}}e.EditorScrollImpl=m,e.EditorScroll=Object(s["j"])(new m),e.ScrollLineUp=Object(s["j"])(new class extends Ot{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:2064,mac:{primary:267}}})}runCoreEditorCommand(t,i){e.EditorScroll._runEditorScroll(t,i.source,{direction:1,unit:2,value:1,revealCursor:!1,select:!1})}}),e.ScrollPageUp=Object(s["j"])(new class extends Ot{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:2059,win:{primary:523},linux:{primary:523}}})}runCoreEditorCommand(t,i){e.EditorScroll._runEditorScroll(t,i.source,{direction:1,unit:3,value:1,revealCursor:!1,select:!1})}}),e.ScrollLineDown=Object(s["j"])(new class extends Ot{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:2066,mac:{primary:268}}})}runCoreEditorCommand(t,i){e.EditorScroll._runEditorScroll(t,i.source,{direction:2,unit:2,value:1,revealCursor:!1,select:!1})}}),e.ScrollPageDown=Object(s["j"])(new class extends Ot{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:2060,win:{primary:524},linux:{primary:524}}})}runCoreEditorCommand(t,i){e.EditorScroll._runEditorScroll(t,i.source,{direction:2,unit:3,value:1,revealCursor:!1,select:!1})}});class _ extends Ot{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[bt.word(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position)]),e.revealPrimaryCursor(t.source,!0)}}e.WordSelect=Object(s["j"])(new _({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),e.WordSelectDrag=Object(s["j"])(new _({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),e.LastCursorWordSelect=Object(s["j"])(new class extends Ot{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(e,t){const i=e.getLastAddedCursorIndex(),n=e.getCursorStates(),s=n.slice(0),o=n[i];s[i]=bt.word(e,o,o.modelState.hasSelection(),t.position),e.model.pushStackElement(),e.setCursorStates(t.source,3,s)}});class b extends Ot{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[bt.line(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)]),e.revealPrimaryCursor(t.source,!1)}}e.LineSelect=Object(s["j"])(new b({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),e.LineSelectDrag=Object(s["j"])(new b({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class v extends Ot{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){const i=e.getLastAddedCursorIndex(),n=e.getCursorStates(),s=n.slice(0);s[i]=bt.line(e,n[i],this._inSelectionMode,t.position,t.viewPosition),e.model.pushStackElement(),e.setCursorStates(t.source,3,s)}}e.LastCursorLineSelect=Object(s["j"])(new v({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),e.LastCursorLineSelectDrag=Object(s["j"])(new v({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),e.ExpandLineSelection=Object(s["j"])(new class extends Ot{constructor(){super({id:"expandLineSelection",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:2090}})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,bt.expandLineSelection(e,e.getCursorStates())),e.revealPrimaryCursor(t.source,!0)}}),e.CancelSelection=Object(s["j"])(new class extends Ot{constructor(){super({id:"cancelSelection",precondition:xt["a"].hasNonEmptySelection,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[bt.cancelSelection(e,e.getPrimaryCursorState())]),e.revealPrimaryCursor(t.source,!0)}}),e.RemoveSecondaryCursors=Object(s["j"])(new class extends Ot{constructor(){super({id:"removeSecondaryCursors",precondition:xt["a"].hasMultipleSelections,kbOpts:{weight:Nt+1,kbExpr:xt["a"].textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[e.getPrimaryCursorState()]),e.revealPrimaryCursor(t.source,!0)}}),e.RevealLine=Object(s["j"])(new class extends Ot{constructor(){super({id:"revealLine",precondition:void 0,description:Tt.description})}runCoreEditorCommand(e,t){const i=t,n=i.lineNumber||0;let s="number"===typeof n?n+1:parseInt(n)+1;s<1&&(s=1);const o=e.model.getLineCount();s>o&&(s=o);const r=new oe["a"](s,1,s,e.model.getLineMaxColumn(s));let a=0;if(i.at)switch(i.at){case Tt.RawAtArgument.Top:a=3;break;case Tt.RawAtArgument.Center:a=1;break;case Tt.RawAtArgument.Bottom:a=4;break;default:break}const l=e.coordinatesConverter.convertModelRangeToViewRange(r);e.revealRange(t.source,!1,l,a,0)}}),e.SelectAll=new class extends At{constructor(){super(s["g"])}runDOMCommand(){f["i"]&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i)}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates("keyboard",3,[bt.selectAll(e,e.getPrimaryCursorState())])}},e.SetSelection=Object(s["j"])(new class extends Ot{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[_e.fromModelSelection(t.selection)])}})})(Mt||(Mt={}));const Rt=kt["a"].and(xt["a"].textInputFocus,xt["a"].columnSelection);function Ft(e,t){Et["a"].registerKeybindingRule({id:e,primary:t,when:Rt,weight:Nt+1})}function Pt(e){return e.register(),e}var Bt;Ft(Mt.CursorColumnSelectLeft.id,1039),Ft(Mt.CursorColumnSelectRight.id,1041),Ft(Mt.CursorColumnSelectUp.id,1040),Ft(Mt.CursorColumnSelectPageUp.id,1035),Ft(Mt.CursorColumnSelectDown.id,1042),Ft(Mt.CursorColumnSelectPageDown.id,1036),function(e){class t extends s["c"]{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditingCommand(t,n,i||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=Object(s["j"])(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:xt["a"].writable,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,Dt.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection)))}}),e.Outdent=Object(s["j"])(new class extends t{constructor(){super({id:"outdent",precondition:xt["a"].writable,kbOpts:{weight:Nt,kbExpr:kt["a"].and(xt["a"].editorTextFocus,xt["a"].tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,Dt.outdent(t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection))),e.pushUndoStop()}}),e.Tab=Object(s["j"])(new class extends t{constructor(){super({id:"tab",precondition:xt["a"].writable,kbOpts:{weight:Nt,kbExpr:kt["a"].and(xt["a"].editorTextFocus,xt["a"].tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,Dt.tab(t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection))),e.pushUndoStop()}}),e.DeleteLeft=Object(s["j"])(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,i){const[n,s]=ft.deleteLeft(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection));n&&e.pushUndoStop(),e.executeCommands(this.id,s),t.setPrevEditOperationType(2)}}),e.DeleteRight=Object(s["j"])(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:Nt,kbExpr:xt["a"].textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,i){const[n,s]=ft.deleteRight(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map(e=>e.modelState.selection));n&&e.pushUndoStop(),e.executeCommands(this.id,s),t.setPrevEditOperationType(3)}}),e.Undo=new class extends At{constructor(){super(s["h"])}runDOMCommand(){document.execCommand("undo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(75))return t.getModel().undo()}},e.Redo=new class extends At{constructor(){super(s["f"])}runDOMCommand(){document.execCommand("redo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(75))return t.getModel().redo()}}}(Bt||(Bt={}));class Wt extends s["a"]{constructor(e,t,i){super({id:e,precondition:void 0,description:i}),this._handlerId=t}runCommand(e,t){const i=e.get(m["a"]).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}}function Vt(e,t){Pt(new Wt("default:"+e,e)),Pt(new Wt(e,e,t))}Vt("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),Vt("replacePreviousChar"),Vt("compositionType"),Vt("compositionStart"),Vt("compositionEnd"),Vt("paste"),Vt("cut");class jt{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){Mt.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column<t?new se["a"](e.lineNumber,t):e}_hasMulticursorModifier(e){switch(this.configuration.options.get(64)){case"altKey":return e.altKey;case"ctrlKey":return e.ctrlKey;case"metaKey":return e.metaKey;default:return!1}}_hasNonMulticursorModifier(e){switch(this.configuration.options.get(64)){case"altKey":return e.ctrlKey||e.metaKey;case"ctrlKey":return e.altKey||e.metaKey;case"metaKey":return e.ctrlKey||e.altKey;default:return!1}}dispatchMouse(e){const t=this.configuration.options,i=v["d"]&&t.get(91),n=t.get(15);e.middleButton&&!i?this._columnSelect(e.position,e.mouseColumn,e.inSelectionMode):e.startedOnLineNumbers?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelect(e.position):this._createCursor(e.position,!0):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):e.mouseDownCount>=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,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)}_usualArgs(e){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e}}moveTo(e){Mt.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_moveToSelect(e){Mt.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_columnSelect(e,t,i){e=this._validateViewColumn(e),Mt.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),Mt.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e){Mt.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelect(e){Mt.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelectDrag(e){Mt.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorWordSelect(e){Mt.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelect(e){Mt.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelectDrag(e){Mt.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelect(e){Mt.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelectDrag(e){Mt.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_selectAll(){Mt.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class Ht{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown&&this.onKeyDown(e)}emitKeyUp(e){this.onKeyUp&&this.onKeyUp(e)}emitContextMenu(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled&&this.onMouseDropCanceled()}emitMouseWheel(e){this.onMouseWheel&&this.onMouseWheel(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return Ht.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){return new zt(e.element,e.type,e.mouseColumn,e.position?t.convertViewPositionToModelPosition(e.position):null,e.range?t.convertViewRangeToModelRange(e.range):null,e.detail)}}class zt{constructor(e,t,i,n,s,o){this.element=e,this.type=t,this.mouseColumn=i,this.position=n,this.range=s,this.detail=o}toString(){return ye.toString(this)}}var Ut,Kt=i("7ab3");class $t{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(t<i){const i=t-e+1;return this._rendLineNumberStart-=i,null}if(e>n)return null;let s=0,o=0;for(let a=i;a<=n;a++){const i=a-this._rendLineNumberStart;e<=a&&a<=t&&(0===o?(s=i,o=1):o++)}if(e<i){let n=0;n=t<i?t-e+1:i-e,this._rendLineNumberStart-=n}const r=this._lines.splice(s,o);return r}onLinesChanged(e,t){if(0===this.getCount())return!1;const i=this.getStartLineNumber(),n=this.getEndLineNumber();let s=!1;for(let o=e;o<=t;o++)o>=i&&o<=n&&(this._lines[o-this._rendLineNumberStart].onContentChanged(),s=!0);return s}onLinesInserted(e,t){if(0===this.getCount())return null;const i=t-e+1,n=this.getStartLineNumber(),s=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>s)return null;if(i+e>s){const t=this._lines.splice(e-this._rendLineNumberStart,s-e+1);return t}const o=[];for(let c=0;c<i;c++)o[c]=this._createLine();const r=e-this._rendLineNumberStart,a=this._lines.slice(0,r),l=this._lines.slice(r,this._lines.length-i),h=this._lines.slice(this._lines.length-i,this._lines.length);return this._lines=a.concat(o).concat(l),h}onTokensChanged(e){if(0===this.getCount())return!1;const t=this.getStartLineNumber(),i=this.getEndLineNumber();let n=!1;for(let s=0,o=e.length;s<o;s++){const o=e[s];if(o.toLineNumber<t||o.fromLineNumber>i)continue;const r=Math.max(t,o.fromLineNumber),a=Math.min(i,o.toLineNumber);for(let e=r;e<=a;e++){const t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),n=!0}}return n}}class qt{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new $t(()=>this._host.createVisibleLine())}_createDomNode(){const e=Object(b["b"])(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(124)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let i=0,n=t.length;i<n;i++){const e=t[i].getDomNode();e&&this.domNode.domNode.removeChild(e)}return!0}onLinesInserted(e){const t=this._linesCollection.onLinesInserted(e.fromLineNumber,e.toLineNumber);if(t)for(let i=0,n=t.length;i<n;i++){const e=t[i].getDomNode();e&&this.domNode.domNode.removeChild(e)}return!0}onScrollChanged(e){return e.scrollTopChanged}onTokensChanged(e){return this._linesCollection.onTokensChanged(e.ranges)}onZonesChanged(e){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(e){return this._linesCollection.getLine(e)}renderLines(e){const t=this._linesCollection._get(),i=new Gt(this.domNode.domNode,this._host,e),n={rendLineNumberStart:t.rendLineNumberStart,lines:t.lines,linesLength:t.lines.length},s=i.render(n,e.startLineNumber,e.endLineNumber,e.relativeVerticalOffset);this._linesCollection._set(s.rendLineNumberStart,s.lines)}}class Gt{constructor(e,t,i){this.domNode=e,this.host=t,this.viewportData=i}render(e,t,i,n){const s={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(s.rendLineNumberStart+s.linesLength-1<t||i<s.rendLineNumberStart){s.rendLineNumberStart=t,s.linesLength=i-t+1,s.lines=[];for(let e=t;e<=i;e++)s.lines[e-t]=this.host.createVisibleLine();return this._finishRendering(s,!0,n),s}if(this._renderUntouchedLines(s,Math.max(t-s.rendLineNumberStart,0),Math.min(i-s.rendLineNumberStart,s.linesLength-1),n,t),s.rendLineNumberStart>t){const e=t,o=Math.min(i,s.rendLineNumberStart-1);e<=o&&(this._insertLinesBefore(s,e,o,n,t),s.linesLength+=o-e+1)}else if(s.rendLineNumberStart<t){const e=Math.min(s.linesLength,t-s.rendLineNumberStart);e>0&&(this._removeLinesBefore(s,e),s.linesLength-=e)}if(s.rendLineNumberStart=t,s.rendLineNumberStart+s.linesLength-1<i){const e=s.rendLineNumberStart+s.linesLength,o=i;e<=o&&(this._insertLinesAfter(s,e,o,n,t),s.linesLength+=o-e+1)}else if(s.rendLineNumberStart+s.linesLength-1>i){const e=Math.max(0,i-s.rendLineNumberStart+1),t=s.linesLength-1,n=t-e+1;n>0&&(this._removeLinesAfter(s,n),s.linesLength-=n)}return this._finishRendering(s,!1,n),s}_renderUntouchedLines(e,t,i,n,s){const o=e.rendLineNumberStart,r=e.lines;for(let a=t;a<=i;a++){const e=o+a;r[a].layoutLine(e,n[e-s])}}_insertLinesBefore(e,t,i,n,s){const o=[];let r=0;for(let a=t;a<=i;a++)o[r++]=this.host.createVisibleLine();e.lines=o.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i<t;i++){const t=e.lines[i].getDomNode();t&&this.domNode.removeChild(t)}e.lines.splice(0,t)}_insertLinesAfter(e,t,i,n,s){const o=[];let r=0;for(let a=t;a<=i;a++)o[r++]=this.host.createVisibleLine();e.lines=e.lines.concat(o)}_removeLinesAfter(e,t){const i=e.linesLength-t;for(let n=0;n<t;n++){const t=e.lines[i+n].getDomNode();t&&this.domNode.removeChild(t)}e.lines.splice(i,t)}_finishRenderingNewLines(e,t,i,n){Gt._ttPolicy&&(i=Gt._ttPolicy.createHTML(i));const s=this.domNode.lastChild;t||!s?this.domNode.innerHTML=i:s.insertAdjacentHTML("afterend",i);let o=this.domNode.lastChild;for(let r=e.linesLength-1;r>=0;r--){const t=e.lines[r];n[r]&&(t.setDomNode(o),o=o.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");Gt._ttPolicy&&(t=Gt._ttPolicy.createHTML(t)),n.innerHTML=t;for(let s=0;s<e.linesLength;s++){const t=e.lines[s];if(i[s]){const e=n.firstChild,i=t.getDomNode();i.parentNode.replaceChild(e,i),t.setDomNode(e)}}}_finishRendering(e,t,i){const n=Gt._sb,s=e.linesLength,o=e.lines,r=e.rendLineNumberStart,a=[];{n.reset();let l=!1;for(let e=0;e<s;e++){const t=o[e];a[e]=!1;const s=t.getDomNode();if(s)continue;const h=t.renderLine(e+r,i[e],this.viewportData,n);h&&(a[e]=!0,l=!0)}l&&this._finishRenderingNewLines(e,t,n.build(),a)}{n.reset();let t=!1;const l=[];for(let e=0;e<s;e++){const s=o[e];if(l[e]=!1,a[e])continue;const h=s.renderLine(e+r,i[e],this.viewportData,n);h&&(l[e]=!0,t=!0)}t&&this._finishRenderingInvalidLines(e,n.build(),l)}}}Gt._ttPolicy=null===(Ut=window.trustedTypes)||void 0===Ut?void 0:Ut.createPolicy("editorViewLayer",{createHTML:e=>e}),Gt._sb=Object(Kt["a"])(1e5);class Yt extends M{constructor(e){super(e),this._visibleLines=new qt(this),this.domNode=this._visibleLines.domNode,this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;e<t;e++){const t=this._dynamicOverlays[e];if(t.shouldRender())return!0}return!1}dispose(){super.dispose();for(let e=0,t=this._dynamicOverlays.length;e<t;e++){const t=this._dynamicOverlays[e];t.dispose()}this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new Zt(this._context.configuration,this._dynamicOverlays)}addDynamicOverlay(e){this._dynamicOverlays.push(e)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e);const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++){const t=this._visibleLines.getVisibleLine(n);t.onConfigurationChanged(e)}return!0}onFlushed(e){return this._visibleLines.onFlushed(e)}onFocusChanged(e){return this._isFocused=e.isFocused,!0}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onScrollChanged(e){return this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._visibleLines.onZonesChanged(e)}prepareRender(e){const t=this._dynamicOverlays.filter(e=>e.shouldRender());for(let i=0,n=t.length;i<n;i++){const n=t[i];n.prepareRender(e),n.onDidRender()}}render(e){this._viewOverlaysRender(e),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(e){this._visibleLines.renderLines(e.viewportData)}}class Zt{constructor(e,t){this._configuration=e,this._lineHeight=this._configuration.options.get(53),this._dynamicOverlays=t,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(e){this._domNode=Object(b["b"])(e)}onContentChanged(){}onTokensChanged(){}onConfigurationChanged(e){this._lineHeight=this._configuration.options.get(53)}renderLine(e,t,i,n){let s="";for(let o=0,r=this._dynamicOverlays.length;o<r;o++){const t=this._dynamicOverlays[o];s+=t.render(i.startLineNumber,e)}return this._renderedContent!==s&&(this._renderedContent=s,n.appendASCIIString('<div style="position:absolute;top:'),n.appendASCIIString(String(t)),n.appendASCIIString("px;width:100%;height:"),n.appendASCIIString(String(this._lineHeight)),n.appendASCIIString('px;">'),n.appendASCIIString(s),n.appendASCIIString("</div>"),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class Xt extends Yt{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(124);this._contentWidth=i.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(124);return this._contentWidth=i.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class Qt extends Yt{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(124);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),p["a"].applyFontInfo(this.domNode,t.get(38))}onConfigurationChanged(e){const t=this._context.configuration.options;p["a"].applyFontInfo(this.domNode,t.get(38));const i=t.get(124);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class Jt{constructor(e,t){this.top=e,this.left=t}}class ei extends M{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=Object(b["b"])(document.createElement("div")),A.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=Object(b["b"])(document.createElement("div")),A.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onLineMappingChanged(e);return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}addWidget(e){const t=new ti(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,i){const n=this._widgets[e.getId()];n.setPosition(t,i),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t];delete this._widgets[t];const i=e.domNode.domNode;i.parentNode.removeChild(i),i.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return!!this._widgets.hasOwnProperty(e)&&this._widgets[e].suppressMouseDown}onBeforeRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onBeforeRender(e)}prepareRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].prepareRender(e)}render(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].render(e)}}class ti{constructor(e,t,i){this._context=e,this._viewDomNode=t,this._actual=i,this.domNode=Object(b["b"])(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const n=this._context.configuration.options,s=n.get(124);this._fixedOverflowWidgets=n.get(32),this._contentWidth=s.contentWidth,this._contentLeft=s.contentLeft,this._lineHeight=n.get(53),this._range=null,this._viewRange=null,this._preference=[],this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const t=this._context.configuration.options;if(this._lineHeight=t.get(53),e.hasChanged(124)){const e=t.get(124);this._contentLeft=e.contentLeft,this._contentWidth=e.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(e){this._setPosition(this._range)}_setPosition(e){if(this._range=e,this._viewRange=null,this._range){const e=this._context.model.validateModelRange(this._range);(this._context.model.coordinatesConverter.modelPositionIsVisible(e.getStartPosition())||this._context.model.coordinatesConverter.modelPositionIsVisible(e.getEndPosition()))&&(this._viewRange=this._context.model.coordinatesConverter.convertModelRangeToViewRange(e))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth:this._contentWidth}setPosition(e,t){this._setPosition(e),this._preference=t,this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1}_layoutBoxInViewport(e,t,i,n,s){const o=e.top,r=o,a=t.top+this._lineHeight,l=s.viewportHeight-a,h=o-n,c=r>=n,d=a,u=l>=n;let g=e.left,p=t.left;return g+i>s.scrollLeft+s.viewportWidth&&(g=s.scrollLeft+s.viewportWidth-i),p+i>s.scrollLeft+s.viewportWidth&&(p=s.scrollLeft+s.viewportWidth-i),g<s.scrollLeft&&(g=s.scrollLeft),p<s.scrollLeft&&(p=s.scrollLeft),{fitsAbove:c,aboveTop:h,aboveLeft:g,fitsBelow:u,belowTop:d,belowLeft:p}}_layoutHorizontalSegmentInPage(e,t,i,n){const s=Math.max(0,t.left-n),o=Math.min(t.left+t.width+n,e.width);let r=t.left+i-h["f"].scrollX;if(r+n>o){const e=r-(o-n);r-=e,i-=e}if(r<s){const e=r-s;r-=e,i-=e}return[i,r]}_layoutBoxInPage(e,t,i,n,s){const o=e.top-n,r=t.top+this._lineHeight,a=h["z"](this._viewDomNode.domNode),l=a.top+o-h["f"].scrollY,c=a.top+r-h["f"].scrollY,d=h["v"](document.body),[u,g]=this._layoutHorizontalSegmentInPage(d,a,e.left-s.scrollLeft+this._contentLeft,i),[p,m]=this._layoutHorizontalSegmentInPage(d,a,t.left-s.scrollLeft+this._contentLeft,i),f=22,_=22,b=l>=f,v=c+n<=d.height-_;return this._fixedOverflowWidgets?{fitsAbove:b,aboveTop:Math.max(l,f),aboveLeft:g,fitsBelow:v,belowTop:c,belowLeft:m}:{fitsAbove:b,aboveTop:o,aboveLeft:u,fitsBelow:v,belowTop:r,belowLeft:p}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new Jt(e.top,e.left+this._contentLeft)}_getTopAndBottomLeft(e){if(!this._viewRange)return[null,null];const t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||0===t.length)return[null,null];let i=t[0],n=t[0];for(const c of t)c.lineNumber<i.lineNumber&&(i=c),c.lineNumber>n.lineNumber&&(n=c);let s=1073741824;for(const c of i.ranges)c.left<s&&(s=c.left);let o=1073741824;for(const c of n.ranges)c.left<o&&(o=c.left);const r=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.scrollTop,a=new Jt(r,s),l=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.scrollTop,h=new Jt(l,o);return[a,h]}_prepareRenderWidget(e){const[t,i]=this._getTopAndBottomLeft(e);if(!t||!i)return null;if(-1===this._cachedDomNodeClientWidth||-1===this._cachedDomNodeClientHeight){let e=null;if("function"===typeof this._actual.beforeRender&&(e=ii(this._actual.beforeRender,this._actual)),e)this._cachedDomNodeClientWidth=e.width,this._cachedDomNodeClientHeight=e.height;else{const e=this.domNode.domNode;this._cachedDomNodeClientWidth=e.clientWidth,this._cachedDomNodeClientHeight=e.clientHeight}}let n;if(n=this.allowEditorOverflow?this._layoutBoxInPage(t,i,this._cachedDomNodeClientWidth,this._cachedDomNodeClientHeight,e):this._layoutBoxInViewport(t,i,this._cachedDomNodeClientWidth,this._cachedDomNodeClientHeight,e),this._preference)for(let s=1;s<=2;s++)for(const e of this._preference)if(1===e){if(!n)return null;if(2===s||n.fitsAbove)return{coordinate:new Jt(n.aboveTop,n.aboveLeft),position:1}}else{if(2!==e)return this.allowEditorOverflow?{coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(t),position:0}:{coordinate:t,position:0};if(!n)return null;if(2===s||n.fitsBelow)return{coordinate:new Jt(n.belowTop,n.belowLeft),position:2}}return null}onBeforeRender(e){this._viewRange&&this._preference&&(this._viewRange.endLineNumber<e.startLineNumber||this._viewRange.startLineNumber>e.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData)return this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),void("function"===typeof this._actual.afterRender&&ii(this._actual.afterRender,this._actual,null));this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),"function"===typeof this._actual.afterRender&&ii(this._actual.afterRender,this._actual,this._renderData.position)}}function ii(e,t,...i){try{return e.call(t,...i)}catch(n){return null}}i("930f");var ni=i("e8e3");let si=!0;class oi extends Xe{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(124);this._lineHeight=t.get(53),this._renderLineHighlight=t.get(80),this._renderLineHighlightOnlyWhenFocus=t.get(81),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new _["a"](1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=si?this._selections.slice(0,1):this._selections,i=t.map(e=>e.positionLineNumber);i.sort((e,t)=>e-t),ni["g"](this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,e=!0);const n=t.every(e=>e.isEmpty());return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(124);return this._lineHeight=t.get(53),this._renderLineHighlight=t.get(80),this._renderLineHighlightOnlyWhenFocus=t.get(81),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return!!this._renderLineHighlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}prepareRender(e){if(!this._shouldRenderThis())return void(this._renderData=null);const t=this._renderOne(e),i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=this._cursorLineNumbers.length;let o=0;const r=[];for(let a=i;a<=n;a++){const e=a-i;while(o<s&&this._cursorLineNumbers[o]<a)o++;o<s&&this._cursorLineNumbers[o]===a?r[e]=t:r[e]=""}this._renderData=r}render(e,t){if(!this._renderData)return"";const i=t-e;return i>=this._renderData.length?"":this._renderData[i]}}class ri extends oi{_renderOne(e){const t="current-line"+(this._shouldRenderOther()?" current-line-both":"");return`<div class="${t}" style="width:${Math.max(e.scrollWidth,this._contentWidth)}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderOther(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class ai extends oi{_renderOne(e){const t="current-line"+(this._shouldRenderMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"");return`<div class="${t}" style="width:${this._contentLeft}px; height:${this._lineHeight}px;"></div>`}_shouldRenderMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderThis(){return!0}_shouldRenderOther(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}Object(Je["f"])((e,t)=>{si=!1;const i=e.getColor(Qe["f"]);if(i&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||e.defines(Qe["g"])){const i=e.getColor(Qe["g"]);i&&(si=!0,t.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),"hc"===e.type&&(t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}});i("56dc");class li extends Xe{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(53),this._typicalHalfwidthCharacterWidth=t.get(38).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(53),this._typicalHalfwidthCharacterWidth=t.get(38).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let a=0,l=t.length;a<l;a++){const e=t[a];e.options.className&&(i[n++]=e)}i=i.sort((e,t)=>{if(e.options.zIndex<t.options.zIndex)return-1;if(e.options.zIndex>t.options.zIndex)return 1;const i=e.options.className,n=t.options.className;return i<n?-1:i>n?1:oe["a"].compareRangesUsingStarts(e.range,t.range)});const s=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,r=[];for(let a=s;a<=o;a++){const e=a-s;r[e]=""}this._renderWholeLineDecorations(e,i,r),this._renderNormalDecorations(e,i,r),this._renderResult=r}_renderWholeLineDecorations(e,t,i){const n=String(this._lineHeight),s=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber;for(let r=0,a=t.length;r<a;r++){const e=t[r];if(!e.options.isWholeLine)continue;const a='<div class="cdr '+e.options.className+'" style="left:0;width:100%;height:'+n+'px;"></div>',l=Math.max(e.range.startLineNumber,s),h=Math.min(e.range.endLineNumber,o);for(let t=l;t<=h;t++){const e=t-s;i[e]+=a}}}_renderNormalDecorations(e,t,i){const n=String(this._lineHeight),s=e.visibleRange.startLineNumber;let o=null,r=!1,a=null;for(let l=0,h=t.length;l<h;l++){const h=t[l];if(h.options.isWholeLine)continue;const c=h.options.className,d=Boolean(h.options.showIfCollapsed);let u=h.range;d&&1===u.endColumn&&u.endLineNumber!==u.startLineNumber&&(u=new oe["a"](u.startLineNumber,u.startColumn,u.endLineNumber-1,this._context.model.getLineMaxColumn(u.endLineNumber-1))),o===c&&r===d&&oe["a"].areIntersectingOrTouching(a,u)?a=oe["a"].plusRange(a,u):(null!==o&&this._renderNormalDecoration(e,a,o,r,n,s,i),o=c,r=d,a=u)}null!==o&&this._renderNormalDecoration(e,a,o,r,n,s,i)}_renderNormalDecoration(e,t,i,n,s,o,r){const a=e.linesVisibleRangesForRange(t,"findMatch"===i);if(a)for(let l=0,h=a.length;l<h;l++){const e=a[l];if(e.outsideRenderedLine)continue;const t=e.lineNumber-o;if(n&&1===e.ranges.length){const t=e.ranges[0];0===t.width&&(e.ranges[0]=new B(t.left,this._typicalHalfwidthCharacterWidth))}for(let n=0,o=e.ranges.length;n<o;n++){const o=e.ranges[n],a='<div class="cdr '+i+'" style="left:'+String(o.left)+"px;width:"+String(o.width)+"px;height:"+s+'px;"></div>';r[t]+=a}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}var hi=i("1898");class ci extends M{constructor(e,t,i,n){super(e);const s=this._context.configuration.options,o=s.get(87),r=s.get(61),a=s.get(30),l=s.get(90),c={listenOnDomNode:i.domNode,className:"editor-scrollable "+Object(Je["e"])(e.theme.type),useShadows:!1,lazyRender:!0,vertical:o.vertical,horizontal:o.horizontal,verticalHasArrows:o.verticalHasArrows,horizontalHasArrows:o.horizontalHasArrows,verticalScrollbarSize:o.verticalScrollbarSize,verticalSliderSize:o.verticalSliderSize,horizontalScrollbarSize:o.horizontalScrollbarSize,horizontalSliderSize:o.horizontalSliderSize,handleMouseWheel:o.handleMouseWheel,alwaysConsumeMouseWheel:o.alwaysConsumeMouseWheel,arrowSize:o.arrowSize,mouseWheelScrollSensitivity:r,fastScrollSensitivity:a,scrollPredominantAxis:l,scrollByPage:o.scrollByPage};this.scrollbar=this._register(new hi["c"](t.domNode,c,this._context.viewLayout.getScrollable())),A.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=Object(b["b"])(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const d=(e,t,i)=>{const n={};if(t){const t=e.scrollTop;t&&(n.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(i){const t=e.scrollLeft;t&&(n.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)}this._context.model.setScrollPosition(n,1)};this._register(h["g"](i.domNode,"scroll",e=>d(i.domNode,!0,!0))),this._register(h["g"](t.domNode,"scroll",e=>d(t.domNode,!0,!1))),this._register(h["g"](n.domNode,"scroll",e=>d(n.domNode,!0,!1))),this._register(h["g"](this.scrollbarDomNode.domNode,"scroll",e=>d(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(124);this.scrollbarDomNode.setLeft(t.contentLeft);const i=e.get(59),n=i.side;"right"===n?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarMouseDown(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)}onConfigurationChanged(e){if(e.hasChanged(87)||e.hasChanged(61)||e.hasChanged(30)){const e=this._context.configuration.options,t=e.get(87),i=e.get(61),n=e.get(30),s=e.get(90),o={handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:s};this.scrollbar.updateOptions(o)}return e.hasChanged(124)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+Object(Je["e"])(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}i("8478");class di{constructor(e,t,i){this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i)}}class ui extends Xe{_render(e,t,i){const n=[];for(let r=e;r<=t;r++){const t=r-e;n[t]=[]}if(0===i.length)return n;i.sort((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className<t.className?-1:1);let s=null,o=0;for(let r=0,a=i.length;r<a;r++){const a=i[r],l=a.className;let h=Math.max(a.startLineNumber,e)-e;const c=Math.min(a.endLineNumber,t)-e;s===l?(h=Math.max(o+1,h),o=Math.max(o,c)):(s=l,o=c);for(let e=h;e<=o;e++)n[e].push(s)}return n}}class gi extends ui{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(124);this._lineHeight=t.get(53),this._glyphMargin=t.get(44),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(124);return this._lineHeight=t.get(53),this._glyphMargin=t.get(44),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let s=0,o=t.length;s<o;s++){const e=t[s],o=e.options.glyphMarginClassName;o&&(i[n++]=new di(e.range.startLineNumber,e.range.endLineNumber,o))}return i}prepareRender(e){if(!this._glyphMargin)return void(this._renderResult=null);const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),s=this._lineHeight.toString(),o=this._glyphMarginLeft.toString(),r=this._glyphMarginWidth.toString(),a='" style="left:'+o+"px;width:"+r+"px;height:"+s+'px;"></div>',l=[];for(let h=t;h<=i;h++){const e=h-t,i=n[e];0===i.length?l[e]="":l[e]='<div class="cgmr codicon '+i.join(" ")+a}this._renderResult=l}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}i("0baa");class pi extends Xe{constructor(e){super(),this._context=e,this._primaryLineNumber=0;const t=this._context.configuration.options,i=t.get(125),n=t.get(38);this._lineHeight=t.get(53),this._spaceWidth=n.spaceWidth,this._enabled=t.get(78),this._activeIndentEnabled=t.get(47),this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(125),n=t.get(38);return this._lineHeight=t.get(53),this._spaceWidth=n.spaceWidth,this._enabled=t.get(78),this._activeIndentEnabled=t.get(47),this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){const t=e.selections[0],i=t.isEmpty()?t.positionLineNumber:0;return this._primaryLineNumber!==i&&(this._primaryLineNumber=i,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){if(!this._enabled)return void(this._renderResult=null);const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,{indentSize:n}=this._context.model.getTextModelOptions(),s=n*this._spaceWidth,o=e.scrollWidth,r=this._lineHeight,a=this._context.model.getLinesIndentGuides(t,i);let l=0,h=0,c=0;if(this._activeIndentEnabled&&this._primaryLineNumber){const e=this._context.model.getActiveIndentGuide(this._primaryLineNumber,t,i);l=e.startLineNumber,h=e.endLineNumber,c=e.indent}const d=[];for(let u=t;u<=i;u++){const i=l<=u&&u<=h,n=u-t,g=a[n];let p="";if(g>=1){const t=e.visibleRangeForPosition(new se["a"](u,1));let n=t?t.left:0;for(let e=1;e<=g;e++){const t=i&&e===c?"cigra":"cigr";if(p+=`<div class="${t}" style="left:${n}px;height:${r}px;width:${s}px"></div>`,n+=s,n>o||this._maxIndentLeft>0&&n>this._maxIndentLeft)break}}d[n]=p}this._renderResult=d}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}Object(Je["f"])((e,t)=>{const i=e.getColor(Qe["e"]);i&&t.addRule(`.monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 ${i} inset; }`);const n=e.getColor(Qe["a"])||i;n&&t.addRule(`.monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 ${n} inset; }`)});i("38a2");class mi{constructor(){this._currentVisibleRange=new oe["a"](1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class fi{constructor(e,t,i,n,s,o){this.lineNumber=e,this.startColumn=t,this.endColumn=i,this.startScrollTop=n,this.stopScrollTop=s,this.scrollType=o,this.type="range",this.minLineNumber=e,this.maxLineNumber=e}}class _i{constructor(e,t,i,n){this.selections=e,this.startScrollTop=t,this.stopScrollTop=i,this.scrollType=n,this.type="selections";let s=e[0].startLineNumber,o=e[0].endLineNumber;for(let r=1,a=e.length;r<a;r++){const t=e[r];s=Math.min(s,t.startLineNumber),o=Math.max(o,t.endLineNumber)}this.minLineNumber=s,this.maxLineNumber=o}}class bi extends M{constructor(e,t){super(e),this._linesContent=t,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new qt(this),this.domNode=this._visibleLines.domNode;const i=this._context.configuration,n=this._context.configuration.options,s=n.get(38),o=n.get(125);this._lineHeight=n.get(53),this._typicalHalfwidthCharacterWidth=s.typicalHalfwidthCharacterWidth,this._isViewportWrapping=o.isViewportWrapping,this._revealHorizontalRightPadding=n.get(84),this._cursorSurroundingLines=n.get(22),this._cursorSurroundingLinesStyle=n.get(23),this._canUseLayerHinting=!n.get(25),this._viewLineOptions=new Z(i,this._context.theme.type),A.write(this.domNode,7),this.domNode.setClassName("view-lines "+nt["a"]),p["a"].applyFontInfo(this.domNode,s),this._maxLineWidth=0,this._asyncUpdateLineWidths=new S["e"](()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new S["e"](()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new mi,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new X(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(125)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(38),n=t.get(125);return this._lineHeight=t.get(53),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(84),this._cursorSurroundingLines=t.get(22),this._cursorSurroundingLinesStyle=t.get(23),this._canUseLayerHinting=!t.get(25),p["a"].applyFontInfo(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(124)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new Z(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const e=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let t=e;t<=i;t++){const e=this._visibleLines.getVisibleLine(t);e.onOptionsChanged(this._viewLineOptions)}return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=!1;for(let s=t;s<=i;s++)n=this._visibleLines.getVisibleLine(s).onSelectionChanged()||n;return n}onDecorationsChanged(e){{const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.range,e.selections,e.verticalType);if(-1===t)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new fi(e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new _i(e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop),s=n<=this._lineHeight?1:e.scrollType;return this._context.model.setScrollPosition(i,s),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTop<t||e.scrollTop>i)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.model.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(null===i)return null;const n=this._getLineNumberFor(i);if(-1===n)return null;if(n<1||n>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(n))return new se["a"](n,1);const s=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();if(n<s||n>o)return null;let r=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(n,e,t);const a=this._context.model.getLineMinColumn(n);return r<a&&(r=a),new se["a"](n,r)}_getViewLineDomNode(e){while(e&&1===e.nodeType){if(e.className===X.CLASS_NAME)return e;e=e.parentElement}return null}_getLineNumberFor(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++){const t=this._visibleLines.getVisibleLine(n);if(e===t.getDomNode())return n}return-1}getLineWidth(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();return e<t||e>i?-1:this._visibleLines.getVisibleLine(e).getWidth()}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=oe["a"].intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;let s=[],o=0;const r=new Y(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new se["a"](n.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),h=this._visibleLines.getEndLineNumber();for(let c=n.startLineNumber;c<=n.endLineNumber;c++){if(c<l||c>h)continue;const e=c===n.startLineNumber?n.startColumn:1,d=c===n.endLineNumber?n.endColumn:this._context.model.getLineMaxColumn(c),u=this._visibleLines.getVisibleLine(c).getVisibleRangesForRange(e,d,r);if(u){if(t&&c<i){const e=a;a=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new se["a"](c+1,1)).lineNumber,e!==a&&(u.ranges[u.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}s[o++]=new P(u.outsideRenderedLine,c,u.ranges)}}return 0===o?null:s}_visibleRangesForLineRange(e,t,i){return this.shouldRender()||e<this._visibleLines.getStartLineNumber()||e>this._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(t,i,new Y(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new W(t.outsideRenderedLine,t.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,s=!0;for(let o=t;o<=i;o++){const t=this._visibleLines.getVisibleLine(o);!e||t.getWidthIsFast()?n=Math.max(n,t.getWidth()):s=!1}return s&&1===t&&i===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),s}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++){const i=this._visibleLines.getVisibleLine(s);if(i.needsMonospaceFontCheck()){const n=i.getWidth();n>t&&(t=n,e=s)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let s=i;s<=n;s++){const e=this._visibleLines.getVisibleLine(s);e.onMonospaceAssumptionsInvalidated()}}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(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){const t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.model.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),v["d"]&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++){const e=this._visibleLines.getVisibleLine(i);if(e.needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth<t&&(this._maxLineWidth=t,this._context.model.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(e,t,i,n,s){const o=e.top,r=e.height,a=o+r;let l,h,c;if(n&&n.length>0){let e=n[0].startLineNumber,t=n[0].endLineNumber;for(let i=1,s=n.length;i<s;i++){const s=n[i];e=Math.min(e,s.startLineNumber),t=Math.max(t,s.endLineNumber)}l=!1,h=this._context.viewLayout.getVerticalOffsetForLineNumber(e),c=this._context.viewLayout.getVerticalOffsetForLineNumber(t)+this._lineHeight}else{if(!i)return-1;l=!0,h=this._context.viewLayout.getVerticalOffsetForLineNumber(i.startLineNumber),c=this._context.viewLayout.getVerticalOffsetForLineNumber(i.endLineNumber)+this._lineHeight}const d="mouse"===t&&"default"===this._cursorSurroundingLinesStyle;if(!d){const e=Math.min(r/this._lineHeight/2,this._cursorSurroundingLines);h-=e*this._lineHeight,c+=Math.max(0,e-1)*this._lineHeight}let u;if(0!==s&&4!==s||(c+=this._lineHeight),c-h>r){if(!l)return-1;u=h}else if(5===s||6===s)if(6===s&&o<=h&&c<=a)u=o;else{const e=Math.max(5*this._lineHeight,.2*r),t=h-e,i=c-r;u=Math.max(i,t)}else if(1===s||2===s)if(2===s&&o<=h&&c<=a)u=o;else{const e=(h+c)/2;u=Math.max(0,e-r/2)}else u=this._computeMinimumScrolling(o,a,h,c,3===s,4===s);return u}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=t.left,n=i+t.width;let s=1073741824,o=0;if("range"===e.type){const t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(const e of t.ranges)s=Math.min(s,e.left),o=Math.max(o,e.left+e.width)}else for(const a of e.selections){if(a.startLineNumber!==a.endLineNumber)return null;const e=this._visibleRangesForLineRange(a.startLineNumber,a.startColumn,a.endColumn);if(!e)return null;for(const t of e.ranges)s=Math.min(s,t.left),o=Math.max(o,t.left+t.width)}if(s=Math.max(0,s-bi.HORIZONTAL_EXTRA_PX),o+=this._revealHorizontalRightPadding,"selections"===e.type&&o-s>t.width)return null;const r=this._computeMinimumScrolling(i,n,s,o);return{scrollLeft:r,maxHorizontalOffset:o}}_computeMinimumScrolling(e,t,i,n,s,o){e|=0,t|=0,i|=0,n|=0,s=!!s,o=!!o;const r=t-e,a=n-i;return a<r?s?i:o?Math.max(0,n-r):i<e?i:n>t?Math.max(0,n-r):e:i}}bi.HORIZONTAL_EXTRA_PX=30;i("27e6");class vi extends ui{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(124);this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(124);return this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let s=0,o=t.length;s<o;s++){const e=t[s],o=e.options.linesDecorationsClassName;o&&(i[n++]=new di(e.range.startLineNumber,e.range.endLineNumber,o));const r=e.options.firstLineDecorationClassName;r&&(i[n++]=new di(e.range.startLineNumber,e.range.startLineNumber,r))}return i}prepareRender(e){const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),s=this._decorationsLeft.toString(),o=this._decorationsWidth.toString(),r='" style="left:'+s+"px;width:"+o+'px;"></div>',a=[];for(let l=t;l<=i;l++){const e=l-t,i=n[e];let s="";for(let t=0,n=i.length;t<n;t++)s+='<div class="cldr '+i[t]+r;a[e]=s}this._renderResult=a}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}i("5d70");class Ci extends ui{constructor(e){super(),this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let s=0,o=t.length;s<o;s++){const e=t[s],o=e.options.marginClassName;o&&(i[n++]=new di(e.range.startLineNumber,e.range.endLineNumber,o))}return i}prepareRender(e){const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),s=[];for(let o=t;o<=i;o++){const e=o-t,i=n[e];let r="";for(let t=0,n=i.length;t<n;t++)r+='<div class="cmdr '+i[t]+'" style=""></div>';s[e]=r}this._renderResult=s}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}i("f20b");class wi{constructor(e,t,i,n){this.r=wi._clamp(e),this.g=wi._clamp(t),this.b=wi._clamp(i),this.a=wi._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:0|e}}wi.Empty=new wi(0,0,0,0);var Si=i("b707");class yi{constructor(){this._onDidChange=new d["a"],this.onDidChange=this._onDidChange.event,this._updateColorMap(),Si["A"].onDidChange(e=>{e.changedColorMap&&this._updateColorMap()})}static getInstance(){return this._INSTANCE||(this._INSTANCE=new yi),this._INSTANCE}_updateColorMap(){const e=Si["A"].getColorMap();if(!e)return this._colors=[wi.Empty],void(this._backgroundIsLight=!0);this._colors=[wi.Empty];for(let i=1;i<e.length;i++){const t=e[i].rgba;this._colors[i]=new wi(t.r,t.g,t.b,Math.round(255*t.a))}let t=e[2].getRelativeLuminance();this._backgroundIsLight=t>=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}yi._INSTANCE=null;var Di=i("a8d0"),Li=i("303e");const xi=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})(),ki=(e,t)=>(e-=32,e<0||e>96?t<=2?(e+96)%96:95:e);var Ei=i("099d");class Ni{constructor(e,t){this.scale=t,this.charDataNormal=Ni.soften(e,.8),this.charDataLight=Ni.soften(e,50/60)}static soften(e,t){let i=new Uint8ClampedArray(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=Object(Ei["b"])(e[n]*t);return i}renderChar(e,t,i,n,s,o,r,a,l){const h=1*this.scale,c=2*this.scale,d=l?1:c;if(t+h>e.width||i+d>e.height)return void console.warn("bad render request outside image data");const u=a?this.charDataLight:this.charDataNormal,g=ki(n,r),p=4*e.width,m=o.r,f=o.g,_=o.b,b=s.r-m,v=s.g-f,C=s.b-_,w=e.data;let S=g*h*c,y=i*p+4*t;for(let D=0;D<d;D++){let e=y;for(let t=0;t<h;t++){const t=u[S++]/255;w[e++]=m+b*t,w[e++]=f+v*t,w[e++]=_+C*t,e++}y+=p}}blockRenderChar(e,t,i,n,s,o,r){const a=1*this.scale,l=2*this.scale,h=r?1:l;if(t+a>e.width||i+h>e.height)return void console.warn("bad render request outside image data");const c=4*e.width,d=.5,u=s.r,g=s.g,p=s.b,m=n.r-u,f=n.g-g,_=n.b-p,b=u+m*d,v=g+f*d,C=p+_*d,w=e.data;let S=i*c+4*t;for(let y=0;y<h;y++){let e=S;for(let t=0;t<a;t++)w[e++]=b,w[e++]=v,w[e++]=C,e++;S+=c}}}var Oi=i("0bfb");const Ii={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15},Ti=e=>{const t=new Uint8ClampedArray(e.length/2);for(let i=0;i<e.length;i+=2)t[i>>1]=Ii[e[i]]<<4|15&Ii[e[i+1]];return t},Mi={1:Object(Oi["a"])(()=>Ti("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:Object(Oi["a"])(()=>Ti("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class Ai{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return i=Mi[e]?new Ni(Mi[e](),e):Ai.createFromSampleData(Ai.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i}static createSampleData(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",i.fillStyle="#ffffff",i.font="bold 16px "+e,i.textBaseline="middle";let n=0;for(const s of xi)i.fillText(String.fromCharCode(s),n,8),n+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){const i=61440;if(e.length!==i)throw new Error("Unexpected source in MinimapCharRenderer");let n=Ai._downsample(e,t);return new Ni(n,t)}static _downsampleChar(e,t,i,n,s){const o=1*s,r=2*s;let a=n,l=0;for(let h=0;h<r;h++){const n=h/r*16,s=(h+1)/r*16;for(let r=0;r<o;r++){const h=r/o*10,c=(r+1)/o*10;let d=0,u=0;for(let i=n;i<s;i++){const n=t+3840*Math.floor(i),s=1-(i-Math.floor(i));for(let t=h;t<c;t++){const i=1-(t-Math.floor(t)),o=n+4*Math.floor(t),r=i*s;u+=r,d+=e[o]*e[o+3]/255*r}}const g=d/u;l=Math.max(l,g),i[a++]=Object(Ei["b"])(g)}}return l}static _downsample(e,t){const i=2*t*1*t,n=96*i,s=new Uint8ClampedArray(n);let o=0,r=0,a=0;for(let l=0;l<96;l++)a=Math.max(a,this._downsampleChar(e,r,s,o,t)),o+=i,r+=40;if(a>0){const e=255/a;for(let t=0;t<n;t++)s[t]*=e}return s}}var Ri=i("3352");const Fi=140,Pi=2;class Bi{constructor(e,t,i){const n=e.options,s=n.get(122),o=n.get(124),r=o.minimap,a=n.get(38),l=n.get(59);this.renderMinimap=r.renderMinimap,this.size=l.size,this.minimapHeightIsEditorHeight=r.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=n.get(89),this.showSlider=l.showSlider,this.pixelRatio=s,this.typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this.lineHeight=n.get(53),this.minimapLeft=r.minimapLeft,this.minimapWidth=r.minimapWidth,this.minimapHeight=o.height,this.canvasInnerWidth=r.minimapCanvasInnerWidth,this.canvasInnerHeight=r.minimapCanvasInnerHeight,this.canvasOuterWidth=r.minimapCanvasOuterWidth,this.canvasOuterHeight=r.minimapCanvasOuterHeight,this.isSampling=r.minimapIsSampling,this.editorHeight=o.height,this.fontScale=r.minimapScale,this.minimapLineHeight=r.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=Object(Oi["a"])(()=>Ai.create(this.fontScale,a.fontFamily)),this.backgroundColor=Bi._getMinimapBackground(t,i)}static _getMinimapBackground(e,t){const i=e.getColor(Li["Gb"]);return i?new wi(i.rgba.r,i.rgba.g,i.rgba.b,i.rgba.a):t.getColor(2)}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.showSlider===e.showSlider&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)}}class Wi{constructor(e,t,i,n,s,o,r,a){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=s,this.sliderHeight=o,this.startLineNumber=r,this.endLineNumber=a}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}static create(e,t,i,n,s,o,r,a,l,h,c){const d=e.pixelRatio,u=e.minimapLineHeight,g=Math.floor(e.canvasInnerHeight/u),p=e.lineHeight;if(e.minimapHeightIsEditorHeight){const t=a*e.lineHeight+(e.scrollBeyondLastLine?s-e.lineHeight:0),i=Math.max(1,Math.floor(s*s/t)),n=Math.max(0,e.minimapHeight-i),o=n/(h-s),c=l*o,d=n>0,u=Math.floor(e.canvasInnerHeight/e.minimapLineHeight);return new Wi(l,h,d,o,c,i,1,Math.min(r,u))}let m,f;if(o&&i!==r){const e=i-t+1;m=Math.floor(e*u/d)}else{const e=s/p;m=Math.floor(e*u/d)}f=e.scrollBeyondLastLine?(r-1)*u/d:Math.max(0,r*u/d-m),f=Math.min(e.minimapHeight-m,f);const _=f/(h-s),b=l*_;let v=0;if(e.scrollBeyondLastLine){const e=s/p;v=e-1}if(g>=r+v){const e=1,t=r,i=f>0;return new Wi(l,h,i,_,b,m,e,t)}{let e=Math.max(1,Math.floor(t-b*d/u));c&&c.scrollHeight===h&&(c.scrollTop>l&&(e=Math.min(e,c.startLineNumber)),c.scrollTop<l&&(e=Math.max(e,c.startLineNumber)));const i=Math.min(r,e+g-1),s=(l-n)/p,o=(t-e+s)*u/d;return new Wi(l,h,!0,_,o,m,e,i)}}}class Vi{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}Vi.INVALID=new Vi(-1);class ji{constructor(e,t,i){this.renderedLayout=e,this._imageData=t,this._renderedLines=new $t(()=>Vi.INVALID),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const t=this._renderedLines._get(),i=t.lines;for(let n=0,s=i.length;n<s;n++)if(-1===i[n].dy)return!1;return!0}scrollEquals(e){return this.renderedLayout.startLineNumber===e.startLineNumber&&this.renderedLayout.endLineNumber===e.endLineNumber}_get(){const e=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:e.rendLineNumberStart,lines:e.lines}}onLinesChanged(e,t){return this._renderedLines.onLinesChanged(e,t)}onLinesDeleted(e,t){this._renderedLines.onLinesDeleted(e,t)}onLinesInserted(e,t){this._renderedLines.onLinesInserted(e,t)}onTokensChanged(e){return this._renderedLines.onTokensChanged(e)}}class Hi{constructor(e,t,i,n){this._backgroundFillData=Hi._createBackgroundFillData(t,i,n),this._buffers=[e.createImageData(t,i),e.createImageData(t,i)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const e=this._buffers[this._lastUsedBuffer];return e.data.set(this._backgroundFillData),e}static _createBackgroundFillData(e,t,i){const n=i.r,s=i.g,o=i.b,r=new Uint8ClampedArray(e*t*4);let a=0;for(let l=0;l<t;l++)for(let t=0;t<e;t++)r[a]=n,r[a+1]=s,r[a+2]=o,r[a+3]=255,a+=4;return r}}class zi{constructor(e,t){this.samplingRatio=e,this.minimapLines=t}static compute(e,t,i){if(0===e.renderMinimap||!e.isSampling)return[null,[]];const n=e.pixelRatio,s=e.lineHeight,o=e.scrollBeyondLastLine,{minimapLineCount:r}=$["f"].computeContainedMinimapLineCount({viewLineCount:t,scrollBeyondLastLine:o,height:e.editorHeight,lineHeight:s,pixelRatio:n}),a=t/r,l=a/2;if(!i||0===i.minimapLines.length){let e=[];if(e[0]=1,r>1){for(let t=0,i=r-1;t<i;t++)e[t]=Math.round(t*a+l);e[r-1]=t}return[new zi(a,e),[]]}const h=i.minimapLines,c=h.length;let d=[],u=0,g=0,p=1;const m=10;let f=[],_=null;for(let b=0;b<r;b++){const e=Math.max(p,Math.round(b*a)),i=Math.max(e,Math.round((b+1)*a));while(u<c&&h[u]<e){if(f.length<m){const e=u+1+g;_&&"deleted"===_.type&&_._oldIndex===u-1?_.deleteToLineNumber++:(_={type:"deleted",_oldIndex:u,deleteFromLineNumber:e,deleteToLineNumber:e},f.push(_)),g--}u++}let n;if(u<c&&h[u]<=i)n=h[u],u++;else if(n=0===b?1:b+1===r?t:Math.round(b*a+l),f.length<m){const e=u+1+g;_&&"inserted"===_.type&&_._i===b-1?_.insertToLineNumber++:(_={type:"inserted",_i:b,insertFromLineNumber:e,insertToLineNumber:e},f.push(_)),g++}d[b]=n,p=n}if(f.length<m)while(u<c){const e=u+1+g;_&&"deleted"===_.type&&_._oldIndex===u-1?_.deleteToLineNumber++:(_={type:"deleted",_oldIndex:u,deleteFromLineNumber:e,deleteToLineNumber:e},f.push(_)),g--,u++}else f=[{type:"flush"}];return[new zi(a,d),f]}modelLineToMinimapLine(e){return Math.min(this.minimapLines.length,Math.max(1,Math.round(e/this.samplingRatio)))}modelLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e)-1;while(i>0&&this.minimapLines[i-1]>=e)i--;let n=this.modelLineToMinimapLine(t)-1;while(n+1<this.minimapLines.length&&this.minimapLines[n+1]<=t)n++;if(i===n){const n=this.minimapLines[i];if(n<e||n>t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let i=this.minimapLines.length,n=0;for(let s=this.minimapLines.length-1;s>=0;s--){if(this.minimapLines[s]<e.fromLineNumber)break;this.minimapLines[s]<=e.toLineNumber?(this.minimapLines[s]=Math.max(1,e.fromLineNumber-1),i=Math.min(i,s),n=Math.max(n,s)):this.minimapLines[s]-=t}return[i,n]}onLinesInserted(e){const t=e.toLineNumber-e.fromLineNumber+1;for(let i=this.minimapLines.length-1;i>=0;i--){if(this.minimapLines[i]<e.fromLineNumber)break;this.minimapLines[i]+=t}}}class Ui extends M{constructor(e){super(e),this.tokensColorTracker=yi.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new Bi(this._context.configuration,this._context.theme,this.tokensColorTracker);const[t]=zi.compute(this.options,this._context.model.getLineCount(),null);this._samplingState=t,this._shouldCheckSampling=!1,this._actual=new Ki(e.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const e=new Bi(this._context.configuration,this._context.theme,this.tokensColorTracker);return!this.options.equals(e)&&(this.options=e,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(e){return this._onOptionsMaybeChanged()}onCursorStateChanged(e){return this._selections=e.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(e){return!!e.affectsMinimap&&this._actual.onDecorationsChanged()}onFlushed(e){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(e){if(this._samplingState){const t=this._samplingState.modelLineRangeToMinimapLineRange(e.fromLineNumber,e.toLineNumber);return!!t&&this._actual.onLinesChanged(t[0],t[1])}return this._actual.onLinesChanged(e.fromLineNumber,e.toLineNumber)}onLinesDeleted(e){if(this._samplingState){const[t,i]=this._samplingState.onLinesDeleted(e);return t<=i&&this._actual.onLinesChanged(t+1,i+1),this._shouldCheckSampling=!0,!0}return this._actual.onLinesDeleted(e.fromLineNumber,e.toLineNumber)}onLinesInserted(e){return this._samplingState?(this._samplingState.onLinesInserted(e),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(e.fromLineNumber,e.toLineNumber)}onScrollChanged(e){return this._actual.onScrollChanged()}onThemeChanged(e){return this._context.model.invalidateMinimapColorCache(),this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(e){if(this._samplingState){let t=[];for(const i of e.ranges){const e=this._samplingState.modelLineRangeToMinimapLineRange(i.fromLineNumber,i.toLineNumber);e&&t.push({fromLineNumber:e[0],toLineNumber:e[1]})}return!!t.length&&this._actual.onTokensChanged(t)}return this._actual.onTokensChanged(e.ranges)}onTokensColorsChanged(e){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(e){return this._actual.onZonesChanged()}prepareRender(e){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(e){let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber;this._samplingState&&(t=this._samplingState.modelLineToMinimapLine(t),i=this._samplingState.modelLineToMinimapLine(i));const n={viewportContainsWhitespaceGaps:e.viewportData.whitespaceViewportData.length>0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;const e=Boolean(this._samplingState),[t,i]=zi.compute(this.options,this._context.model.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const n of i)switch(n.type){case"deleted":this._actual.onLinesDeleted(n.deleteFromLineNumber,n.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(n.insertFromLineNumber,n.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.model.getLineCount()}getRealLineCount(){return this._context.model.getLineCount()}getLineContent(e){return this._samplingState?this._context.model.getLineContent(this._samplingState.minimapLines[e-1]):this._context.model.getLineContent(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){let n=[];for(let s=0,o=t-e+1;s<o;s++)i[s]?n[s]=this._context.model.getViewLineData(this._samplingState.minimapLines[e+s-1]):n[s]=null;return n}return this._context.model.getMinimapLinesRenderingData(e,t,i).data}getSelections(){if(null===this._minimapSelections)if(this._samplingState){this._minimapSelections=[];for(const e of this._selections){const[t,i]=this._samplingState.decorationLineRangeToMinimapLineRange(e.startLineNumber,e.endLineNumber);this._minimapSelections.push(new _["a"](t,e.startColumn,i,e.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(e,t){let i;if(this._samplingState){const n=this._samplingState.minimapLines[e-1],s=this._samplingState.minimapLines[t-1];i=new oe["a"](n,1,s,this._context.model.getLineMaxColumn(s))}else i=new oe["a"](e,1,t,this._context.model.getLineMaxColumn(t));const n=this._context.model.getDecorationsInViewport(i);if(this._samplingState){let e=[];for(const t of n){if(!t.options.minimap)continue;const i=t.range,n=this._samplingState.modelLineToMinimapLine(i.startLineNumber),s=this._samplingState.modelLineToMinimapLine(i.endLineNumber);e.push(new Di["f"](new oe["a"](n,i.startColumn,s,i.endColumn),t.options))}return e}return n}getOptions(){return this._context.model.getTextModelOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.model.revealRange("mouse",!1,new oe["a"](e,1,e,1),1,0)}setScrollTop(e){this._context.model.setScrollPosition({scrollTop:e},1)}}class Ki extends u["a"]{constructor(e,t){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=e,this._model=t,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(Li["Jb"]),this._domNode=Object(b["b"])(document.createElement("div")),A.write(this._domNode,8),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=Object(b["b"])(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=Object(b["b"])(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=Object(b["b"])(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=Object(b["b"])(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=Object(b["b"])(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._mouseDownListener=h["k"](this._domNode.domNode,"mousedown",e=>{e.preventDefault();const t=this._model.options.renderMinimap;if(0===t)return;if(!this._lastRenderData)return;if("proportional"!==this._model.options.size){if(e.leftButton&&this._lastRenderData){const t=h["z"](this._slider.domNode),i=t.top+t.height/2;this._startSliderDragging(e.buttons,e.posx,i,e.posy,this._lastRenderData.renderedLayout)}return}const i=this._model.options.minimapLineHeight,n=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.browserEvent.offsetY,s=Math.floor(n/i);let o=s+this._lastRenderData.renderedLayout.startLineNumber;o=Math.min(o,this._model.getLineCount()),this._model.revealLineNumber(o)}),this._sliderMouseMoveMonitor=new y["a"],this._sliderMouseDownListener=h["k"](this._slider.domNode,"mousedown",e=>{e.preventDefault(),e.stopPropagation(),e.leftButton&&this._lastRenderData&&this._startSliderDragging(e.buttons,e.posx,e.posy,e.posy,this._lastRenderData.renderedLayout)}),this._gestureDisposable=C["b"].addTarget(this._domNode.domNode),this._sliderTouchStartListener=h["g"](this._domNode.domNode,C["a"].Start,e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))},{passive:!1}),this._sliderTouchMoveListener=h["g"](this._domNode.domNode,C["a"].Change,e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)},{passive:!1}),this._sliderTouchEndListener=h["k"](this._domNode.domNode,C["a"].End,e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(e,t,i,n,s){this._slider.toggleClassName("active",!0);const o=(e,n)=>{const o=Math.abs(n-t);if(v["j"]&&o>Fi)return void this._model.setScrollTop(s.scrollTop);const r=e-i;this._model.setScrollTop(s.getDesiredScrollTopFromDelta(r))};n!==i&&o(n,t),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,e,y["b"],e=>o(e.posy,e.posx),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){return"always"===this._model.options.showSlider?"minimap slider-always":"minimap slider-mouseover"}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new Hi(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}onLinesDeleted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(Li["Jb"]),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){const t=this._model.options.renderMinimap;if(0===t)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");const i=Wi.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(i.sliderNeeded?"block":"none"),this._slider.setTop(i.sliderTop),this._slider.setHeight(i.sliderHeight);const n=e.scrollLeft/this._model.options.typicalHalfwidthCharacterWidth,s=Math.min(this._model.options.minimapWidth,Math.round(n*this._model.options.minimapCharWidth/this._model.options.pixelRatio));this._sliderHorizontal.setLeft(s),this._sliderHorizontal.setWidth(this._model.options.minimapWidth-s),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(i.sliderHeight),this.renderDecorations(i),this._lastRenderData=this.renderLines(i)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections(),i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber),{canvasInnerWidth:n,canvasInnerHeight:s}=this._model.options,o=this._model.options.minimapLineHeight,r=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,n,s);const h=new Map;for(let c=0;c<t.length;c++){const i=t[c];for(let t=i.startLineNumber;t<=i.endLineNumber;t++)this.renderDecorationOnLine(l,h,i,this._selectionColor,e,t,o,o,a,r)}for(let c=0;c<i.length;c++){const t=i[c];if(!t.options.minimap)continue;const n=t.options.minimap.getColor(this._theme);for(let i=t.range.startLineNumber;i<=t.range.endLineNumber;i++)switch(t.options.minimap.position){case Ri["c"].Inline:this.renderDecorationOnLine(l,h,t.range,n,e,i,o,o,a,r);continue;case Ri["c"].Gutter:const s=(i-e.startLineNumber)*o,c=2;this.renderDecoration(l,n,c,s,Pi,o);continue}}}}renderDecorationOnLine(e,t,i,n,s,o,r,a,l,h){const c=(o-s.startLineNumber)*a;if(c+r<0||c>this._model.options.canvasInnerHeight)return;let d=t.get(o);const u=!d;if(!d){const e=this._model.getLineContent(o);d=[$["h"]];for(let t=1;t<e.length+1;t++){const i=e.charCodeAt(t-1),n=9===i?l*h:re["D"](i)?2*h:h;d[t]=d[t-1]+n}t.set(o,d)}const{startColumn:g,endColumn:p,startLineNumber:m,endLineNumber:f}=i,_=m===o?d[g-1]:$["h"],b=f>o?d.length-1:p-1;if(b>0){const t=d[b]-_||2;this.renderDecoration(e,n,_,c,t,r)}u&&this.renderLineHighlight(e,n,c,r)}renderLineHighlight(e,t,i,n){e.fillStyle=t&&t.transparent(.5).toString()||"",e.fillRect($["h"],i,e.canvas.width,n)}renderDecoration(e,t,i,n,s,o){e.fillStyle=t&&t.toString()||"",e.fillRect(i,n,s,o)}renderLines(e){const t=e.startLineNumber,i=e.endLineNumber,n=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const t=this._lastRenderData._get();return new ji(e,t.imageData,t.lines)}const s=this._getBuffer();if(!s)return null;let[o,r,a]=Ki._renderUntouchedLines(s,t,i,n,this._lastRenderData);const l=this._model.getMinimapLinesRenderingData(t,i,a),h=this._model.getOptions().tabSize,c=this._model.options.backgroundColor,d=this._model.tokensColorTracker,u=d.backgroundIsLight(),g=this._model.options.renderMinimap,p=this._model.options.charRenderer(),m=this._model.options.fontScale,f=this._model.options.minimapCharWidth,_=1===g?2:3,b=_*m,v=n>b?Math.floor((n-b)/2):0;let C=0;const w=[];for(let x=0,k=i-t+1;x<k;x++)a[x]&&Ki._renderLine(s,c,u,g,f,d,p,C,v,h,l[x],m,n),w[x]=new Vi(C),C+=n;const S=-1===o?0:o,y=-1===r?s.height:r,D=y-S,L=this._canvas.domNode.getContext("2d");return L.putImageData(s,0,0,0,S,s.width,D),new ji(e,s,w)}static _renderUntouchedLines(e,t,i,n,s){const o=[];if(!s){for(let e=0,n=i-t+1;e<n;e++)o[e]=!0;return[-1,-1,o]}const r=s._get(),a=r.imageData.data,l=r.rendLineNumberStart,h=r.lines,c=h.length,d=e.width,u=e.data,g=(i-t+1)*n*d*4;let p=-1,m=-1,f=-1,_=-1,b=-1,v=-1,C=0;for(let y=t;y<=i;y++){const e=y-t,i=y-l,s=i>=0&&i<c?h[i].dy:-1;if(-1===s){o[e]=!0,C+=n;continue}const r=s*d*4,w=(s+n)*d*4,S=C*d*4,D=(C+n)*d*4;_===r&&v===S?(_=w,v=D):(-1!==f&&(u.set(a.subarray(f,_),b),-1===p&&0===f&&f===b&&(p=_),-1===m&&_===g&&f===b&&(m=f)),f=r,_=w,b=S,v=D),o[e]=!1,C+=n}-1!==f&&(u.set(a.subarray(f,_),b),-1===p&&0===f&&f===b&&(p=_),-1===m&&_===g&&f===b&&(m=f));const w=-1===p?-1:p/(4*d),S=-1===m?-1:m/(4*d);return[w,S,o]}static _renderLine(e,t,i,n,s,o,r,a,l,h,c,d,u){const g=c.content,p=c.tokens,m=e.width-s,f=1===u;let _=$["h"],b=0,v=0;for(let C=0,w=p.getCount();C<w;C++){const c=p.getEndOffset(C),u=p.getForeground(C),w=o.getColor(u);for(;b<c;b++){if(_>m)return;const o=g.charCodeAt(b);if(9===o){const e=h-(b+v)%h;v+=e-1,_+=e*s}else if(32===o)_+=s;else{const h=re["D"](o)?2:1;for(let c=0;c<h;c++)if(2===n?r.blockRenderChar(e,_,a+l,w,t,i,f):r.renderChar(e,_,a+l,o,w,t,d,i,f),_+=s,_>m)return}}}}}Object(Je["f"])((e,t)=>{const i=e.getColor(Li["Gb"]);i&&t.addRule(`.monaco-editor .minimap > canvas { opacity: ${i.rgba.a}; will-change: opacity; }`);const n=e.getColor(Li["Lb"]);n&&t.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${n}; }`);const s=e.getColor(Li["Mb"]);s&&t.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${s}; }`);const o=e.getColor(Li["Kb"]);o&&t.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${o}; }`);const r=e.getColor(Li["Yb"]);r&&t.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${r} -6px 0 6px -6px inset; }`)});i("725e");class $i extends M{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(124);this._widgets={},this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,this._domNode=Object(b["b"])(document.createElement("div")),A.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(124);return this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,!0}addWidget(e){const t=Object(b["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()}setWidgetPosition(e,t){const i=this._widgets[e.getId()];return i.preference!==t&&(i.preference=t,this.setShouldRender(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t],i=e.domNode.domNode;delete this._widgets[t],i.parentNode.removeChild(i),this.setShouldRender()}}_renderWidget(e){const t=e.domNode;if(null!==e.preference)if(0===e.preference)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(1===e.preference){const e=t.domNode.clientHeight;t.setTop(this._editorHeight-e-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else 2===e.preference&&(t.setTop(0),t.domNode.style.right="50%");else t.unsetTop()}prepareRender(e){}render(e){this._domNode.setWidth(this._editorWidth);const t=Object.keys(this._widgets);for(let i=0,n=t.length;i<n;i++){const e=t[i];this._renderWidget(this._widgets[e])}}}var qi=i("ceb8");class Gi{constructor(e,t){const i=e.options;this.lineHeight=i.get(53),this.pixelRatio=i.get(122),this.overviewRulerLanes=i.get(68),this.renderBorder=i.get(67);const n=t.getColor(Qe["j"]);this.borderColor=n?n.toString():null,this.hideCursor=i.get(46);const s=t.getColor(Qe["d"]);this.cursorColor=s?s.transparent(.7).toString():null,this.themeType=t.type;const o=i.get(59),r=o.enabled,a=o.side,l=r?t.getColor(Qe["i"])||Si["A"].getDefaultBackground():null;this.backgroundColor=null===l||"left"===a?null:qi["a"].Format.CSS.formatHex(l);const h=i.get(124),c=h.overviewRuler;this.top=c.top,this.right=c.right,this.domWidth=c.width,this.domHeight=c.height,0===this.overviewRulerLanes?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[d,u]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=d,this.w=u}_initLanes(e,t,i){const n=t-e;if(i>=3){const t=Math.floor(n/3),i=Math.floor(n/3),s=n-t-i,o=e,r=o+t,a=o+t+s;return[[0,o,r,o,a,o,r,o],[0,t,s,t+s,i,t+s+i,s+i,t+s+i]]}if(2===i){const t=Math.floor(n/2),i=n-t,s=e,o=s+t;return[[0,s,s,s,o,s,s,s],[0,t,t,t,i,t+i,t+i,t+i]]}{const t=e,i=n;return[[0,t,t,t,t,t,t,t],[0,i,i,i,i,i,i,i]]}}equals(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}}class Yi extends M{constructor(e){super(e),this._domNode=Object(b["b"])(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=Si["A"].onDidChange(e=>{e.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new Gi(this._context.configuration,this._context.theme);return(!this._settings||!this._settings.equals(t))&&(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),!0)}onConfigurationChanged(e){return this._updateSettings(!1)}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;t<i;t++)this._cursorPositions[t]=e.selections[t].getPosition();return this._cursorPositions.sort(se["a"].compare),!0}onDecorationsChanged(e){return!!e.affectsOverviewRuler}onFlushed(e){return!0}onScrollChanged(e){return e.scrollHeightChanged}onZonesChanged(e){return!0}onThemeChanged(e){return this._context.model.invalidateOverviewRulerColorCache(),this._updateSettings(!1)}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render()}_render(){if(0===this._settings.overviewRulerLanes)return void this._domNode.setBackgroundColor(this._settings.backgroundColor?this._settings.backgroundColor:"");const e=this._settings.canvasWidth,t=this._settings.canvasHeight,i=this._settings.lineHeight,n=this._context.viewLayout,s=this._context.viewLayout.getScrollHeight(),o=t/s,r=this._context.model.getAllOverviewRulerDecorations(this._context.theme),a=6*this._settings.pixelRatio|0,l=a/2|0,h=this._domNode.domNode.getContext("2d");null===this._settings.backgroundColor?h.clearRect(0,0,e,t):(h.fillStyle=this._settings.backgroundColor,h.fillRect(0,0,e,t));const c=this._settings.x,d=this._settings.w,u=Object.keys(r);u.sort();for(let g=0,p=u.length;g<p;g++){const e=u[g],s=r[e];h.fillStyle=e;let p=0,m=0,f=0;for(let r=0,u=s.length;r<u;r++){const e=s[3*r],u=s[3*r+1],g=s[3*r+2];let _=n.getVerticalOffsetForLineNumber(u)*o|0,b=(n.getVerticalOffsetForLineNumber(g)+i)*o|0;const v=b-_;if(v<a){let e=(_+b)/2|0;e<l?e=l:e+l>t&&(e=t-l),_=e-l,b=e+l}_>f+1||e!==p?(0!==r&&h.fillRect(c[p],m,d[p],f-m),p=e,m=_,f=b):b>f&&(f=b)}h.fillRect(c[p],m,d[p],f-m)}if(!this._settings.hideCursor&&this._settings.cursorColor){const e=2*this._settings.pixelRatio|0,i=e/2|0,s=this._settings.x[7],r=this._settings.w[7];h.fillStyle=this._settings.cursorColor;let a=-100,l=-100;for(let c=0,d=this._cursorPositions.length;c<d;c++){const d=this._cursorPositions[c];let u=n.getVerticalOffsetForLineNumber(d.lineNumber)*o|0;u<i?u=i:u+i>t&&(u=t-i);const g=u-i,p=g+e;g>l+1?(0!==c&&h.fillRect(s,a,r,l-a),a=g,l=p):p>l&&(l=p)}h.fillRect(s,a,r,l-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(h.beginPath(),h.lineWidth=1,h.strokeStyle=this._settings.borderColor,h.moveTo(0,0),h.lineTo(0,t),h.stroke(),h.moveTo(0,0),h.lineTo(e,0),h.stroke())}}var Zi=i("32f2");class Xi extends T{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=Object(b["b"])(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new Zi["b"](e=>this._context.viewLayout.getVerticalOffsetForLineNumber(e)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(53)),this._zoneManager.setPixelRatio(i.get(122)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(53)&&(this._zoneManager.setLineHeight(t.get(53)),this._render()),e.hasChanged(122)&&(this._zoneManager.setPixelRatio(t.get(122)),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}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,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())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),s=this._domNode.domNode.getContext("2d");return s.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(s,i,n,e),!0}_renderOneLane(e,t,i,n){let s=0,o=0,r=0;for(const a of t){const t=a.colorId,l=a.from,h=a.to;t!==s?(e.fillRect(0,o,n,r-o),s=t,e.fillStyle=i[s],o=l,r=h):r>=l?r=Math.max(r,h):(e.fillRect(0,o,n,r-o),o=l,r=h)}e.fillRect(0,o,n,r-o)}}i("ef377");class Qi extends M{constructor(e){super(e),this.domNode=Object(b["b"])(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(86),this._typicalHalfwidthCharacterWidth=t.get(38).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(86),this._typicalHalfwidthCharacterWidth=t.get(38).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e<t){const{tabSize:i}=this._context.model.getTextModelOptions(),n=i;let s=t-e;while(s>0){const e=Object(b["b"])(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(n),this.domNode.appendChild(e),this._renderedRulers.push(e),s--}return}let i=e-t;while(i>0){const e=this._renderedRulers.pop();this.domNode.removeChild(e),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t<i;t++){const i=this._renderedRulers[t],n=this._rulers[t];i.setBoxShadow(n.color?`1px 0 0 0 ${n.color} inset`:""),i.setHeight(Math.min(e.scrollHeight,1e6)),i.setLeft(n.column*this._typicalHalfwidthCharacterWidth)}}}Object(Je["f"])((e,t)=>{const i=e.getColor(Qe["k"]);i&&t.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${i} inset; }`)});i("d8c3");class Ji extends M{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const t=this._context.configuration.options,i=t.get(87);this._useShadows=i.useShadows,this._domNode=Object(b["b"])(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){const e=this._context.configuration.options,t=e.get(124);0===t.minimap.renderMinimap||t.minimap.minimapWidth>0&&0===t.minimap.minimapLeft?this._width=t.width:this._width=t.width-t.minimap.minimapWidth-t.verticalScrollbarWidth}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(87);return this._useShadows=i.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}Object(Je["f"])((e,t)=>{const i=e.getColor(Li["Yb"]);i&&t.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${i} 0 6px 6px -6px inset; }`)});i("782d");class en{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class tn{constructor(e,t){this.lineNumber=e,this.ranges=t}}function nn(e){return new en(e)}function sn(e){return new tn(e.lineNumber,e.ranges.map(nn))}class on extends Xe{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(53),this._roundedSelection=t.get(85),this._typicalHalfwidthCharacterWidth=t.get(38).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(53),this._roundedSelection=t.get(85),this._typicalHalfwidthCharacterWidth=t.get(38).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t<i;t++){const i=e[t];if(i.ranges.length>1)return!0}return!1}_enrichVisibleRangesWithStyle(e,t,i){const n=this._typicalHalfwidthCharacterWidth/4;let s=null,o=null;if(i&&i.length>0&&t.length>0){const n=t[0].lineNumber;if(n===e.startLineNumber)for(let e=0;!s&&e<i.length;e++)i[e].lineNumber===n&&(s=i[e].ranges[0]);const r=t[t.length-1].lineNumber;if(r===e.endLineNumber)for(let e=i.length-1;!o&&e>=0;e--)i[e].lineNumber===r&&(o=i[e].ranges[0]);s&&!s.startStyle&&(s=null),o&&!o.startStyle&&(o=null)}for(let r=0,a=t.length;r<a;r++){const e=t[r].ranges[0],i=e.left,l=e.left+e.width,h={top:0,bottom:0},c={top:0,bottom:0};if(r>0){const e=t[r-1].ranges[0].left,s=t[r-1].ranges[0].left+t[r-1].ranges[0].width;rn(i-e)<n?h.top=2:i>e&&(h.top=1),rn(l-s)<n?c.top=2:e<l&&l<s&&(c.top=1)}else s&&(h.top=s.startStyle.top,c.top=s.endStyle.top);if(r+1<a){const e=t[r+1].ranges[0].left,s=t[r+1].ranges[0].left+t[r+1].ranges[0].width;rn(i-e)<n?h.bottom=2:e<i&&i<s&&(h.bottom=1),rn(l-s)<n?c.bottom=2:l<s&&(c.bottom=1)}else o&&(h.bottom=o.startStyle.bottom,c.bottom=o.endStyle.bottom);e.startStyle=h,e.endStyle=c}}_getVisibleRangesWithStyle(e,t,i){const n=t.linesVisibleRangesForRange(e,!0)||[],s=n.map(sn),o=this._visibleRangesHaveGaps(s);return!o&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(t.visibleRange,s,i),s}_createSelectionPiece(e,t,i,n,s){return'<div class="cslr '+i+'" style="top:'+e.toString()+"px;left:"+n.toString()+"px;width:"+s.toString()+"px;height:"+t+'px;"></div>'}_actualRenderOneSelection(e,t,i,n){if(0===n.length)return;const s=!!n[0].ranges[0].startStyle,o=this._lineHeight.toString(),r=(this._lineHeight-1).toString(),a=n[0].lineNumber,l=n[n.length-1].lineNumber;for(let h=0,c=n.length;h<c;h++){const c=n[h],d=c.lineNumber,u=d-t,g=i&&(d===l||d===a)?r:o,p=i&&d===a?1:0;let m="",f="";for(let e=0,t=c.ranges.length;e<t;e++){const t=c.ranges[e];if(s){const e=t.startStyle,i=t.endStyle;if(1===e.top||1===e.bottom){m+=this._createSelectionPiece(p,g,on.SELECTION_CLASS_NAME,t.left-on.ROUNDED_PIECE_WIDTH,on.ROUNDED_PIECE_WIDTH);let i=on.EDITOR_BACKGROUND_CLASS_NAME;1===e.top&&(i+=" "+on.SELECTION_TOP_RIGHT),1===e.bottom&&(i+=" "+on.SELECTION_BOTTOM_RIGHT),m+=this._createSelectionPiece(p,g,i,t.left-on.ROUNDED_PIECE_WIDTH,on.ROUNDED_PIECE_WIDTH)}if(1===i.top||1===i.bottom){m+=this._createSelectionPiece(p,g,on.SELECTION_CLASS_NAME,t.left+t.width,on.ROUNDED_PIECE_WIDTH);let e=on.EDITOR_BACKGROUND_CLASS_NAME;1===i.top&&(e+=" "+on.SELECTION_TOP_LEFT),1===i.bottom&&(e+=" "+on.SELECTION_BOTTOM_LEFT),m+=this._createSelectionPiece(p,g,e,t.left+t.width,on.ROUNDED_PIECE_WIDTH)}}let i=on.SELECTION_CLASS_NAME;if(s){const e=t.startStyle,n=t.endStyle;0===e.top&&(i+=" "+on.SELECTION_TOP_LEFT),0===e.bottom&&(i+=" "+on.SELECTION_BOTTOM_LEFT),0===n.top&&(i+=" "+on.SELECTION_TOP_RIGHT),0===n.bottom&&(i+=" "+on.SELECTION_BOTTOM_RIGHT)}f+=this._createSelectionPiece(p,g,i,t.left,t.width)}e[u][0]+=m,e[u][1]+=f}}prepareRender(e){const t=[],i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber;for(let o=i;o<=n;o++){const e=o-i;t[e]=["",""]}const s=[];for(let o=0,r=this._selections.length;o<r;o++){const n=this._selections[o];if(n.isEmpty()){s[o]=null;continue}const r=this._getVisibleRangesWithStyle(n,e,this._previousFrameVisibleRangesWithStyle[o]);s[o]=r,this._actualRenderOneSelection(t,i,this._selections.length>1,r)}this._previousFrameVisibleRangesWithStyle=s,this._renderResult=t.map(([e,t])=>e+t)}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function rn(e){return e<0?-e:e}on.SELECTION_CLASS_NAME="selected-text",on.SELECTION_TOP_LEFT="top-left-radius",on.SELECTION_BOTTOM_LEFT="bottom-left-radius",on.SELECTION_TOP_RIGHT="top-right-radius",on.SELECTION_BOTTOM_RIGHT="bottom-right-radius",on.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",on.ROUNDED_PIECE_WIDTH=10,Object(Je["f"])((e,t)=>{const i=e.getColor(Li["H"]);i&&t.addRule(`.monaco-editor .focused .selected-text { background-color: ${i}; }`);const n=e.getColor(Li["D"]);n&&t.addRule(`.monaco-editor .selected-text { background-color: ${n}; }`);const s=e.getColor(Li["I"]);s&&!s.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${s}; }`)});i("d93b");class an{constructor(e,t,i,n,s,o){this.top=e,this.left=t,this.width=i,this.height=n,this.textContent=s,this.textContentClassName=o}}class ln{constructor(e){this._context=e;const t=this._context.configuration.options,i=t.get(38);this._cursorStyle=t.get(21),this._lineHeight=t.get(53),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(24),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=Object(b["b"])(document.createElement("div")),this._domNode.setClassName("cursor "+nt["a"]),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),p["a"].applyFontInfo(this._domNode,i),this._domNode.setDisplay("none"),this._position=new se["a"](1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(38);return this._cursorStyle=t.get(21),this._lineHeight=t.get(53),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(24),this._typicalHalfwidthCharacterWidth),p["a"].applyFontInfo(this._domNode,i),!0}onCursorPositionChanged(e){return this._position=e,!0}_prepareRender(e){let t="";if(this._cursorStyle===$["i"].Line||this._cursorStyle===$["i"].LineThin){const i=e.visibleRangeForPosition(this._position);if(!i||i.outsideRenderedLine)return null;let n;if(this._cursorStyle===$["i"].Line){if(n=h["q"](this._lineCursorWidth>0?this._lineCursorWidth:2),n>2){const e=this._context.model.getLineContent(this._position.lineNumber),i=re["K"](e,this._position.column-1);t=e.substr(this._position.column-1,i)}}else n=h["q"](1);let s=i.left;n>=2&&s>=1&&(s-=1);const o=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new an(o,s,n,this._lineHeight,t,"")}const i=this._context.model.getLineContent(this._position.lineNumber),n=re["K"](i,this._position.column-1),s=e.linesVisibleRangesForRange(new oe["a"](this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+n),!1);if(!s||0===s.length)return null;const o=s[0];if(o.outsideRenderedLine||0===o.ranges.length)return null;const r=o.ranges[0],a=r.width<1?this._typicalHalfwidthCharacterWidth:r.width;let l="";if(this._cursorStyle===$["i"].Block){const e=this._context.model.getViewLineData(this._position.lineNumber);t=i.substr(this._position.column-1,n);const s=e.tokens.findTokenIndexAtOffset(this._position.column-1);l=e.tokens.getClassName(s)}let c=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,d=this._lineHeight;return this._cursorStyle!==$["i"].Underline&&this._cursorStyle!==$["i"].UnderlineThin||(c+=this._lineHeight-2,d=2),new an(c,r.left,a,d,t,l)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${nt["a"]} ${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)}}class hn extends M{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(75),this._cursorBlinking=t.get(19),this._cursorStyle=t.get(21),this._cursorSmoothCaretAnimation=t.get(20),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new ln(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=Object(b["b"])(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new S["g"],this._cursorFlatBlinkInterval=new S["c"],this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(75),this._cursorBlinking=t.get(19),this._cursorStyle=t.get(21),this._cursorSmoothCaretAnimation=t.get(20),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let i=0,n=this._secondaryCursors.length;i<n;i++)this._secondaryCursors[i].onConfigurationChanged(e);return!0}_onCursorPositionChanged(e,t){if(this._primaryCursor.onCursorPositionChanged(e),this._updateBlinking(),this._secondaryCursors.length<t.length){const e=t.length-this._secondaryCursors.length;for(let t=0;t<e;t++){const e=new ln(this._context);this._domNode.domNode.insertBefore(e.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(e)}}else if(this._secondaryCursors.length>t.length){const e=this._secondaryCursors.length-t.length;for(let t=0;t<e;t++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let i=0;i<t.length;i++)this._secondaryCursors[i].onCursorPositionChanged(t[i])}onCursorStateChanged(e){const t=[];for(let n=0,s=e.selections.length;n<s;n++)t[n]=e.selections[n].getPosition();this._onCursorPositionChanged(t[0],t.slice(1));const i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,this._updateDomClassName()),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onFocusChanged(e){return this._editorHasFocus=e.isFocused,this._updateBlinking(),!1}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onTokensChanged(e){const t=t=>{for(let i=0,n=e.ranges.length;i<n;i++)if(e.ranges[i].fromLineNumber<=t.lineNumber&&t.lineNumber<=e.ranges[i].toLineNumber)return!0;return!1};if(t(this._primaryCursor.getPosition()))return!0;for(const i of this._secondaryCursors)if(t(i.getPosition()))return!0;return!1}onZonesChanged(e){return!0}_getCursorBlinking(){return this._isComposingInput?0:this._editorHasFocus?this._readOnly?5:this._cursorBlinking:0}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const e=this._getCursorBlinking(),t=0===e,i=5===e;t?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),t||i||(1===e?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},hn.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},hn.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case $["i"].Line:e+=" cursor-line-style";break;case $["i"].Block:e+=" cursor-block-style";break;case $["i"].Underline:e+=" cursor-underline-style";break;case $["i"].LineThin:e+=" cursor-line-thin-style";break;case $["i"].BlockOutline:e+=" cursor-block-outline-style";break;case $["i"].UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].hide();this._isVisible=!1}prepareRender(e){this._primaryCursor.prepareRender(e);for(let t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].prepareRender(e)}render(e){let t=[],i=0;const n=this._primaryCursor.render(e);n&&(t[i++]=n);for(let s=0,o=this._secondaryCursors.length;s<o;s++){const n=this._secondaryCursors[s].render(e);n&&(t[i++]=n)}this._renderData=t}getLastRenderData(){return this._renderData}}hn.BLINK_INTERVAL=500,Object(Je["f"])((e,t)=>{const i=e.getColor(Qe["d"]);if(i){let n=e.getColor(Qe["c"]);n||(n=i.opposite()),t.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${i}; border-color: ${i}; color: ${n}; }`),"hc"===e.type&&t.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }`)}});const cn=()=>{throw new Error("Invalid change accessor")};class dn extends M{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(124);this._lineHeight=t.get(53),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=Object(b["b"])(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=Object(b["b"])(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const n of e)t.set(n.id,n);let i=!1;return this._context.model.changeWhitespace(e=>{const n=Object.keys(this._zones);for(let s=0,o=n.length;s<o;s++){const o=n[s],r=this._zones[o],a=this._computeWhitespaceProps(r.delegate),l=t.get(o);!l||l.afterLineNumber===a.afterViewLineNumber&&l.height===a.heightInPx||(e.changeOneWhitespace(o,a.afterViewLineNumber,a.heightInPx),this._safeCallOnComputedHeight(r.delegate,a.heightInPx),i=!0)}}),i}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(124);return this._lineHeight=t.get(53),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,e.hasChanged(53)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(e){return this._recomputeWhitespacesProps()}onLinesDeleted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}onLinesInserted(e){return!0}_getZoneOrdinal(e){return"undefined"!==typeof e.afterColumn?e.afterColumn:1e4}_computeWhitespaceProps(e){if(0===e.afterLineNumber)return{afterViewLineNumber:0,heightInPx:this._heightInPixels(e),minWidthInPx:this._minWidthInPixels(e)};let t,i;if("undefined"!==typeof e.afterColumn)t=this._context.model.validateModelPosition({lineNumber:e.afterLineNumber,column:e.afterColumn});else{const i=this._context.model.validateModelPosition({lineNumber:e.afterLineNumber,column:1}).lineNumber;t=new se["a"](i,this._context.model.getModelLineMaxColumn(i))}i=t.column===this._context.model.getModelLineMaxColumn(t.lineNumber)?this._context.model.validateModelPosition({lineNumber:t.lineNumber+1,column:1}):this._context.model.validateModelPosition({lineNumber:t.lineNumber,column:t.column+1});const n=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(t),s=this._context.model.coordinatesConverter.modelPositionIsVisible(i);return{afterViewLineNumber:n.lineNumber,heightInPx:s?this._heightInPixels(e):0,minWidthInPx:this._minWidthInPixels(e)}}changeViewZones(e){let t=!1;return this._context.model.changeWhitespace(i=>{const n={addZone:e=>(t=!0,this._addZone(i,e)),removeZone:e=>{e&&(t=this._removeZone(i,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(i,e)||t)}};un(e,n),n.addZone=cn,n.removeZone=cn,n.layoutZone=cn}),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),n=e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),s={whitespaceId:n,delegate:t,isVisible:!1,domNode:Object(b["b"])(t.domNode),marginDomNode:t.marginDomNode?Object(b["b"])(t.marginDomNode):null};return this._safeCallOnComputedHeight(s.delegate,i.heightInPx),s.domNode.setPosition("absolute"),s.domNode.domNode.style.width="100%",s.domNode.setDisplay("none"),s.domNode.setAttribute("monaco-view-zone",s.whitespaceId),this.domNode.appendChild(s.domNode),s.marginDomNode&&(s.marginDomNode.setPosition("absolute"),s.marginDomNode.domNode.style.width="100%",s.marginDomNode.setDisplay("none"),s.marginDomNode.setAttribute("monaco-view-zone",s.whitespaceId),this.marginDomNode.appendChild(s.marginDomNode)),this._zones[s.whitespaceId]=s,this.setShouldRender(),s.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.parentNode.removeChild(i.domNode.domNode),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.parentNode.removeChild(i.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(e){return"number"===typeof e.heightInPx?e.heightInPx:"number"===typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"===typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"===typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(i){Object(c["e"])(i)}}_safeCallOnDomNodeTop(e,t){if("function"===typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(i){Object(c["e"])(i)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(let o=0,r=t.length;o<r;o++)i[t[o].id]=t[o],n=!0;const s=Object.keys(this._zones);for(let o=0,r=s.length;o<r;o++){const t=s[o],n=this._zones[t];let r=0,a=0,l="none";i.hasOwnProperty(t)?(r=i[t].verticalOffset-e.bigNumbersDelta,a=i[t].height,l="block",n.isVisible||(n.domNode.setAttribute("monaco-visible-view-zone","true"),n.isVisible=!0),this._safeCallOnDomNodeTop(n.delegate,e.getScrolledTopFromAbsoluteTop(i[t].verticalOffset))):(n.isVisible&&(n.domNode.removeAttribute("monaco-visible-view-zone"),n.isVisible=!1),this._safeCallOnDomNodeTop(n.delegate,e.getScrolledTopFromAbsoluteTop(-1e6))),n.domNode.setTop(r),n.domNode.setHeight(a),n.domNode.setDisplay(l),n.marginDomNode&&(n.marginDomNode.setTop(r),n.marginDomNode.setHeight(a),n.marginDomNode.setDisplay(l))}n&&(this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}function un(e,t){try{return e(t)}catch(i){Object(c["e"])(i)}}class gn{constructor(e){this._theme=e}get type(){return this._theme.type}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}class pn{constructor(e,t,i){this.configuration=e,this.theme=new gn(t),this.model=i,this.viewLayout=i.viewLayout}addEventHandler(e){this.model.addViewEventHandler(e)}removeEventHandler(e){this.model.removeViewEventHandler(e)}}class mn{constructor(e,t,i,n){this.selections=e,this.startLineNumber=0|t.startLineNumber,this.endLineNumber=0|t.endLineNumber,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=0|t.bigNumbersDelta,this.whitespaceViewportData=i,this._model=n,this.visibleRange=new oe["a"](t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class fn extends T{constructor(e,t,i,n,s,o){super(),this._selections=[new _["a"](1,1,1,1)],this._renderAnimationFrame=null;const r=new jt(t,n,s,e);this._context=new pn(t,i.getColorTheme(),n),this._configPixelRatio=this._configPixelRatio=this._context.configuration.options.get(122),this._context.addEventHandler(this),this._register(i.onDidColorThemeChange(e=>{this._context.theme.update(e),this._context.model.onDidColorThemeChange(),this.render(!0,!1)})),this._viewParts=[],this._textAreaHandler=new rt(this._context,r,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=Object(b["b"])(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=Object(b["b"])(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=Object(b["b"])(document.createElement("div")),A.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new ci(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new bi(this._context,this._linesContent),this._viewZones=new dn(this._context),this._viewParts.push(this._viewZones);const a=new Yi(this._context);this._viewParts.push(a);const l=new Ji(this._context);this._viewParts.push(l);const h=new Xt(this._context);this._viewParts.push(h),h.addDynamicOverlay(new ri(this._context)),h.addDynamicOverlay(new on(this._context)),h.addDynamicOverlay(new pi(this._context)),h.addDynamicOverlay(new li(this._context));const c=new Qt(this._context);this._viewParts.push(c),c.addDynamicOverlay(new ai(this._context)),c.addDynamicOverlay(new gi(this._context)),c.addDynamicOverlay(new Ci(this._context)),c.addDynamicOverlay(new vi(this._context)),c.addDynamicOverlay(new et(this._context));const d=new tt(this._context);d.getDomNode().appendChild(this._viewZones.marginDomNode),d.getDomNode().appendChild(c.getDomNode()),this._viewParts.push(d),this._contentWidgets=new ei(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new hn(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new $i(this._context),this._viewParts.push(this._overlayWidgets);const u=new Qi(this._context);this._viewParts.push(u);const g=new Ui(this._context);if(this._viewParts.push(g),a){const e=this._scrollbar.getOverviewRulerLayoutInfo();e.parent.insertBefore(a.getDomNode(),e.insertBefore)}this._linesContent.appendChild(h.getDomNode()),this._linesContent.appendChild(u.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(d.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(l.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(g.getDomNode()),this.domNode.appendChild(this._overflowGuardContainer),o?o.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new Ze(this._context,r,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new Se(e,t)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new se["a"](e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPositionRelativeToEditor:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new se["a"](e,t)))}}_applyLayout(){const e=this._context.configuration.options,t=e.get(124);this.domNode.setWidth(t.width),this.domNode.setHeight(t.height),this._overflowGuardContainer.setWidth(t.width),this._overflowGuardContainer.setHeight(t.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(121)+" "+Object(Je["e"])(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this._configPixelRatio=this._context.configuration.options.get(122),this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){null===this._renderAnimationFrame&&(this._renderAnimationFrame=h["O"](this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){_n(()=>this._actualRender())}_getViewPartsToRender(){let e=[],t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_actualRender(){if(!h["J"](this.domNode.domNode))return;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&0===e.length)return;const t=this._context.viewLayout.getLinesViewportData();this._context.model.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new mn(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.model);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender());const n=new F(this._context.viewLayout,i,this._viewLines);for(const s of e)s.prepareRender(n);for(const s of e)s.render(n),s.onDidRender();Math.abs(f["a"]()-this._configPixelRatio)>.001&&this._context.configuration.updatePixelRatio()}delegateVerticalScrollbarMouseDown(e){this._scrollbar.delegateVerticalScrollbarMouseDown(e)}restoreState(e){this._context.model.setScrollPosition({scrollTop:e.scrollTop},1),this._context.model.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.model.setScrollPosition({scrollLeft:e.scrollLeft},1)}getOffsetForColumn(e,t){const i=this._context.model.validateModelPosition({lineNumber:e,column:t}),n=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const s=this._viewLines.visibleRangeForPosition(new se["a"](n.lineNumber,n.column));return s?s.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?Ht.convertViewToModelMouseTarget(i,this._context.model.coordinatesConverter):null}createOverviewRuler(e){return new Xi(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const e of this._viewParts)e.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){let t=e.position&&e.position.range||null;if(null===t){const i=e.position?e.position.position:null;null!==i&&(t=new oe["a"](i.lineNumber,i.column,i.lineNumber,i.column))}const i=e.position?e.position.preference:null;this._contentWidgets.setWidgetPosition(e.widget,t,i),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){const t=e.position?e.position.preference:null,i=this._overlayWidgets.setWidgetPosition(e.widget,t);i&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}}function _n(e){try{return e()}catch(t){Object(c["e"])(t)}}class bn{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new ge(new oe["a"](1,1,1,1),0,new se["a"](1,1),0),new ge(new oe["a"](1,1,1,1),0,new se["a"](1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new _e(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return 0===this.modelState.selection.getDirection()?new _["a"](t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new _["a"](t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,i){this._setState(e,t,i)}_setState(e,t,i){if(t){const i=e.model.validateRange(t.selectionStart),n=t.selectionStart.equalsRange(i)?t.selectionStartLeftoverVisibleColumns:0,s=e.model.validatePosition(t.position),o=t.position.equals(s)?t.leftoverVisibleColumns:0;t=new ge(i,n,s,o)}else{if(!i)return;const n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),s=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new ge(n,i.selectionStartLeftoverVisibleColumns,s,i.leftoverVisibleColumns)}if(i){const n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),s=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new ge(n,t.selectionStartLeftoverVisibleColumns,s,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new se["a"](t.selectionStart.startLineNumber,t.selectionStart.startColumn)),s=e.coordinatesConverter.convertModelPositionToViewPosition(new se["a"](t.selectionStart.endLineNumber,t.selectionStart.endColumn)),o=new oe["a"](n.lineNumber,n.column,s.lineNumber,s.column),r=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new ge(o,t.selectionStartLeftoverVisibleColumns,r,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class vn{constructor(e){this.context=e,this.primaryCursor=new bn(e),this.secondaryCursors=[],this.lastAddedCursorIndex=0}dispose(){this.primaryCursor.dispose(this.context),this.killSecondaryCursors()}startTrackingSelections(){this.primaryCursor.startTrackingSelection(this.context);for(let e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].startTrackingSelection(this.context)}stopTrackingSelections(){this.primaryCursor.stopTrackingSelection(this.context);for(let e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){this.primaryCursor.ensureValidState(this.context);for(let e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].ensureValidState(this.context)}readSelectionFromMarkers(){let e=[];e[0]=this.primaryCursor.readSelectionFromMarkers(this.context);for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].readSelectionFromMarkers(this.context);return e}getAll(){let e=[];e[0]=this.primaryCursor.asCursorState();for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].asCursorState();return e}getViewPositions(){let e=[];e[0]=this.primaryCursor.viewState.position;for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].viewState.position;return e}getTopMostViewPosition(){let e=this.primaryCursor.viewState.position;for(let t=0,i=this.secondaryCursors.length;t<i;t++){const i=this.secondaryCursors[t].viewState.position;i.isBefore(e)&&(e=i)}return e}getBottomMostViewPosition(){let e=this.primaryCursor.viewState.position;for(let t=0,i=this.secondaryCursors.length;t<i;t++){const i=this.secondaryCursors[t].viewState.position;e.isBeforeOrEqual(i)&&(e=i)}return e}getSelections(){let e=[];e[0]=this.primaryCursor.modelState.selection;for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].modelState.selection;return e}getViewSelections(){let e=[];e[0]=this.primaryCursor.viewState.selection;for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].viewState.selection;return e}setSelections(e){this.setStates(_e.fromModelSelections(e))}getPrimaryCursor(){return this.primaryCursor.asCursorState()}setStates(e){null!==e&&(this.primaryCursor.setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.secondaryCursors.length,i=e.length;if(t<i){let e=i-t;for(let t=0;t<e;t++)this._addSecondaryCursor()}else if(t>i){let e=t-i;for(let t=0;t<e;t++)this._removeSecondaryCursor(this.secondaryCursors.length-1)}for(let n=0;n<i;n++)this.secondaryCursors[n].setState(this.context,e[n].modelState,e[n].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.secondaryCursors.push(new bn(this.context)),this.lastAddedCursorIndex=this.secondaryCursors.length}getLastAddedCursorIndex(){return 0===this.secondaryCursors.length||0===this.lastAddedCursorIndex?0:this.lastAddedCursorIndex}_removeSecondaryCursor(e){this.lastAddedCursorIndex>=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1)}_getAll(){let e=[];e[0]=this.primaryCursor;for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t];return e}normalize(){if(0===this.secondaryCursors.length)return;let e=this._getAll(),t=[];for(let i=0,n=e.length;i<n;i++)t.push({index:i,selection:e[i].modelState.selection});t.sort((e,t)=>e.selection.startLineNumber===t.selection.startLineNumber?e.selection.startColumn-t.selection.startColumn:e.selection.startLineNumber-t.selection.startLineNumber);for(let i=0;i<t.length-1;i++){const n=t[i],s=t[i+1],o=n.selection,r=s.selection;if(!this.context.cursorConfig.multiCursorMergeOverlapping)continue;let a;if(a=r.isEmpty()||o.isEmpty()?r.getStartPosition().isBeforeOrEqual(o.getEndPosition()):r.getStartPosition().isBefore(o.getEndPosition()),a){const o=n.index<s.index?i:i+1,r=n.index<s.index?i+1:i,a=t[r].index,l=t[o].index,h=t[r].selection,c=t[o].selection;if(!h.equalsSelection(c)){const i=h.plusRange(c),n=h.selectionStartLineNumber===h.startLineNumber&&h.selectionStartColumn===h.startColumn,s=c.selectionStartLineNumber===c.startLineNumber&&c.selectionStartColumn===c.startColumn;let r,d;a===this.lastAddedCursorIndex?(r=n,this.lastAddedCursorIndex=l):r=s,d=r?new _["a"](i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn):new _["a"](i.endLineNumber,i.endColumn,i.startLineNumber,i.startColumn),t[o].selection=d;const u=_e.fromModelSelection(d);e[l].setState(this.context,u.modelState,u.viewState)}for(const e of t)e.index>a&&e.index--;e.splice(a,1),t.splice(r,1),this._removeSecondaryCursor(a-1),i--}}}}class Cn{constructor(){this.type=0}}class wn{constructor(){this.type=1}}class Sn{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class yn{constructor(e,t){this.type=3,this.selections=e,this.modelSelections=t}}class Dn{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}class Ln{constructor(){this.type=5}}class xn{constructor(e){this.type=6,this.isFocused=e}}class kn{constructor(){this.type=7}}class En{constructor(){this.type=8}}class Nn{constructor(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t}}class On{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class In{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class Tn{constructor(e,t,i,n,s,o){this.type=12,this.source=e,this.range=t,this.selections=i,this.verticalType=n,this.revealHorizontal=s,this.scrollType=o}}class Mn{constructor(e){this.type=13,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}}class An{constructor(){this.type=14}}class Rn{constructor(e){this.type=15,this.ranges=e}}class Fn{constructor(){this.type=16}}class Pn{constructor(){this.type=17}}class Bn extends u["a"]{constructor(){super(),this._onEvent=this._register(new d["a"]),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOugoingEvents()}_addOutgoingEvent(e){for(let t=0,i=this._outgoingEvents.length;t<i;t++)if(this._outgoingEvents[t].kind===e.kind)return void(this._outgoingEvents[t]=this._outgoingEvents[t].merge(e));this._outgoingEvents.push(e)}_emitOugoingEvents(){while(this._outgoingEvents.length>0){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t<i;t++)this._eventHandlers[t]===e&&console.warn("Detected duplicate listener in ViewEventDispatcher",e);this._eventHandlers.push(e)}removeViewEventHandler(e){for(let t=0;t<this._eventHandlers.length;t++)if(this._eventHandlers[t]===e){this._eventHandlers.splice(t,1);break}}beginEmitViewEvents(){return this._collectorCnt++,1===this._collectorCnt&&(this._collector=new Wn),this._collector}endEmitViewEvents(){if(this._collectorCnt--,0===this._collectorCnt){const e=this._collector.outgoingEvents,t=this._collector.viewEvents;this._collector=null;for(const i of e)this._addOutgoingEvent(i);t.length>0&&this._emitMany(t)}this._emitOugoingEvents()}emitSingleViewEvent(e){try{const t=this.beginEmitViewEvents();t.emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){while(this._viewEventQueue){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const i of t)i.handleEvents(e)}}}class Wn{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class Vn{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}merge(e){return 0!==e.kind?this:new Vn(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class jn{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}merge(e){return 1!==e.kind?this:new jn(this.oldHasFocus,e.hasFocus)}}class Hn{constructor(e,t,i,n,s,o,r,a){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=s,this.scrollLeft=o,this.scrollHeight=r,this.scrollTop=a,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}merge(e){return 2!==e.kind?this:new Hn(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class zn{constructor(){this.kind=3}isNoOp(){return!1}merge(e){return this}}class Un{constructor(e,t,i,n,s,o,r){this.kind=5,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=s,this.reason=o,this.reachedMaxCursorCount=r}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length,n=t.length;if(i!==n)return!1;for(let s=0;s<i;s++)if(!e[s].equalsSelection(t[s]))return!1;return!0}isNoOp(){return Un._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}merge(e){return 5!==e.kind?this:new Un(this.oldSelections,e.selections,this.oldModelVersionId,e.modelVersionId,e.source,e.reason,this.reachedMaxCursorCount||e.reachedMaxCursorCount)}}class Kn{constructor(){this.kind=4}isNoOp(){return!1}merge(e){return this}}class $n{constructor(e,t){this.modelVersionId=e.getVersionId(),this.cursorState=t.getCursorStates()}equals(e){if(!e)return!1;if(this.modelVersionId!==e.modelVersionId)return!1;if(this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t<i;t++)if(!this.cursorState[t].equals(e.cursorState[t]))return!1;return!0}}class qn{constructor(e,t,i){this._model=e,this._autoClosedCharactersDecorations=t,this._autoClosedEnclosingDecorations=i}static getAllAutoClosedCharacters(e){let t=[];for(const i of e)t=t.concat(i.getAutoClosedCharactersRanges());return t}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){let e=[];for(let t=0;t<this._autoClosedCharactersDecorations.length;t++){const i=this._model.getDecorationRange(this._autoClosedCharactersDecorations[t]);i&&e.push(i)}return e}isValid(e){let t=[];for(let i=0;i<this._autoClosedEnclosingDecorations.length;i++){const e=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[i]);if(e&&(t.push(e),e.startLineNumber!==e.endLineNumber))return!1}t.sort(oe["a"].compareRangesUsingStarts),e.sort(oe["a"].compareRangesUsingStarts);for(let i=0;i<e.length;i++){if(i>=t.length)return!1;if(!t[i].strictContainsRange(e[i]))return!1}return!0}}class Gn extends u["a"]{constructor(e,t,i,n){super(),this._model=e,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=t,this._coordinatesConverter=i,this.context=new pe(this._model,this._coordinatesConverter,n),this._cursors=new vn(this.context),this._hasFocus=!1,this._isHandling=!1,this._isDoingComposition=!1,this._selectionsWhenCompositionStarted=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=Object(u["f"])(this._autoClosedActions),super.dispose()}updateConfiguration(e){this.context=new pe(this._model,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}onLineMappingChanged(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}setHasFocus(e){this._hasFocus=e}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){let e=this._cursors.getSelections();for(let t=0;t<this._autoClosedActions.length;t++){const i=this._autoClosedActions[t];i.isValid(e)||(i.dispose(),this._autoClosedActions.splice(t,1),t--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(e,t,i,n){let s=!1;null!==n&&n.length>Gn.MAX_CURSOR_COUNT&&(n=n.slice(0,Gn.MAX_CURSOR_COUNT),s=!0);const o=new $n(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,o,s)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,i,n){const s=this._cursors.getViewPositions();if(s.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),0,i,n);else{const o=s[0],r=new oe["a"](o.lineNumber,o.column,o.lineNumber,o.column);this._emitCursorRevealRange(e,t,r,null,0,i,n)}}_revealPrimaryCursor(e,t,i,n,s){const o=this._cursors.getViewPositions();if(o.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),i,n,s);else{const r=o[0],a=new oe["a"](r.lineNumber,r.column,r.lineNumber,r.column);this._emitCursorRevealRange(e,t,a,null,i,n,s)}}_emitCursorRevealRange(e,t,i,n,s,o,r){e.emitViewEvent(new Tn(t,i,n,s,o,r))}saveState(){let e=[];const t=this._cursors.getSelections();for(let i=0,n=t.length;i<n;i++){const n=t[i];e.push({inSelectionMode:!n.isEmpty(),selectionStart:{lineNumber:n.selectionStartLineNumber,column:n.selectionStartColumn},position:{lineNumber:n.positionLineNumber,column:n.positionColumn}})}return e}restoreState(e,t){let i=[];for(let n=0,s=t.length;n<s;n++){const e=t[n];let s=1,o=1;e.position&&e.position.lineNumber&&(s=e.position.lineNumber),e.position&&e.position.column&&(o=e.position.column);let r=s,a=o;e.selectionStart&&e.selectionStart.lineNumber&&(r=e.selectionStart.lineNumber),e.selectionStart&&e.selectionStart.column&&(a=e.selectionStart.column),i.push({selectionStartLineNumber:r,selectionStartColumn:a,positionLineNumber:s,positionColumn:o})}this.setStates(e,"restoreState",0,_e.fromModelSelections(i)),this.revealPrimary(e,"restoreState",!0,1)}onModelContentChanged(e,t){if(this._knownModelVersionId=t.versionId,this._isHandling)return;const i=t.containsEvent(1);if(this._prevEditOperationType=0,i)this._cursors.dispose(),this._cursors=new vn(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,"model",1,null,!1);else if(this._hasFocus&&t.resultingSelection&&t.resultingSelection.length>0){const i=_e.fromModelSelections(t.resultingSelection);this.setStates(e,"modelChange",t.isUndoing?5:t.isRedoing?6:2,i)&&this._revealPrimaryCursor(e,"modelChange",0,!0,0)}else{const t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,_e.fromModelSelections(t))}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:ve.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:ve.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,_e.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){let i=[],n=[];for(let r=0,a=e.length;r<a;r++)i.push({range:e[r],options:{inlineClassName:"auto-closed-character",stickiness:1}}),n.push({range:t[r],options:{stickiness:1}});const s=this._model.deltaDecorations([],i),o=this._model.deltaDecorations([],n);this._autoClosedActions.push(new qn(this._model,s,o))}_executeEditOperation(e){if(!e)return;e.shouldPushStackElementBefore&&this._model.pushStackElement();const t=Yn.executeCommands(this._model,this._cursors.getSelections(),e.commands);if(t){this._interpretCommandResult(t);let i=[],n=[];for(let t=0;t<e.commands.length;t++){const s=e.commands[t];s instanceof Lt&&s.enclosingRange&&s.closeCharacterRange&&(i.push(s.closeCharacterRange),n.push(s.enclosingRange))}i.length>0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,s){const o=new $n(this._model,this);if(o.equals(n))return!1;const r=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new yn(a,r)),!n||n.cursorState.length!==o.cursorState.length||o.cursorState.some((e,t)=>!e.modelState.equals(n.cursorState[t].modelState))){const a=n?n.cursorState.map(e=>e.modelState.selection):null,l=n?n.modelVersionId:0;e.emitOutgoingEvent(new Un(a,r,l,o.modelVersionId,t||"keyboard",i,s))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;let t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i];if(!n.text||n.text.indexOf("\n")>=0)return null;const s=n.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!s)return null;const o=s[1],r=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(o);if(!r||1!==r.length)return null;const a=r[0].open,l=n.text.length-s[2].length-1,h=n.text.lastIndexOf(a,l-1);if(-1===h)return null;t.push([h,l])}return t}executeEdits(e,t,i,n){let s=null;"snippet"===t&&(s=this._findAutoClosingPairs(i)),s&&(i[0]._isTracked=!0);let o=[],r=[];const a=this._model.pushEditOperations(this.getSelections(),i,e=>{if(s)for(let i=0,n=s.length;i<n;i++){const[t,n]=s[i],a=e[i],l=a.range.startLineNumber,h=a.range.startColumn-1+t,c=a.range.startColumn-1+n;o.push(new oe["a"](l,c+1,l,c+2)),r.push(new oe["a"](l,h+1,l,c+2))}const t=n(e);return t&&(this._isHandling=!0),t});a&&(this._isHandling=!1,this.setSelections(e,t,a,0)),o.length>0&&this._pushAutoClosedAction(o,r)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const s=new $n(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(o){Object(c["e"])(o)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,s,!1)&&this._revealPrimaryCursor(t,i,0,!0,0)}setIsDoingComposition(e){this._isDoingComposition=e}startComposition(e){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}endComposition(e,t){this._executeEdit(()=>{if("keyboard"===t){const e=qn.getAllAutoClosedCharacters(this._autoClosedActions);this._executeEditOperation(Dt.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this._selectionsWhenCompositionStarted,this.getSelections(),e)),this._selectionsWhenCompositionStarted=null}},e,t)}type(e,t,i){this._executeEdit(()=>{if("keyboard"===i){const e=t.length;let i=0;while(i<e){const e=re["K"](t,i),n=t.substr(i,e),s=qn.getAllAutoClosedCharacters(this._autoClosedActions);this._executeEditOperation(Dt.typeWithInterceptors(this._isDoingComposition,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),s,n)),i+=e}}else this._executeEditOperation(Dt.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t))},e,i)}compositionType(e,t,i,n,s,o){if(0!==t.length||0!==i||0!==n)this._executeEdit(()=>{this._executeEditOperation(Dt.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,s))},e,o);else if(0!==s){const t=this.getSelections().map(e=>{const t=e.getPosition();return new _["a"](t.lineNumber,t.column+s,t.lineNumber,t.column+s)});this.setSelections(e,o,t,0)}}paste(e,t,i,n,s){this._executeEdit(()=>{this._executeEditOperation(Dt.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))},e,s,4)}cut(e,t){this._executeEdit(()=>{this._executeEditOperation(ft.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,t)}executeCommand(e,t,i){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new be(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}executeCommands(e,t,i){this._executeEdit(()=>{this._executeEditOperation(new be(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}}Gn.MAX_CURSOR_COUNT=1e4;class Yn{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},s=this._innerExecuteCommands(n,i);for(let o=0,r=n.trackedRanges.length;o<r;o++)n.model._setTrackedRange(n.trackedRanges[o],null,0);return s}static _innerExecuteCommands(e,t){if(this._arrayIsEmpty(t))return null;const i=this._getEditOperations(e,t);if(0===i.operations.length)return null;const n=i.operations,s=this._getLoserCursorMap(n);if(s.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;let o=[];for(let l=0,h=n.length;l<h;l++)s.hasOwnProperty(n[l].identifier.major.toString())||o.push(n[l]);i.hadTrackedEditOperation&&o.length>0&&(o[0]._isTracked=!0);let r=e.model.pushEditOperations(e.selectionsBefore,o,i=>{let n=[];for(let t=0;t<e.selectionsBefore.length;t++)n[t]=[];for(const e of i)e.identifier&&n[e.identifier.major].push(e);const s=(e,t)=>e.identifier.minor-t.identifier.minor;let o=[];for(let r=0;r<e.selectionsBefore.length;r++)n[r].length>0?(n[r].sort(s),o[r]=t[r].computeCursorState(e.model,{getInverseEditOperations:()=>n[r],getTrackedSelection:t=>{const i=parseInt(t,10),n=e.model._getTrackedRange(e.trackedRanges[i]);return 0===e.trackedRangesDirection[i]?new _["a"](n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new _["a"](n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):o[r]=e.selectionsBefore[r];return o});r||(r=e.selectionsBefore);let a=[];for(let l in s)s.hasOwnProperty(l)&&a.push(parseInt(l,10));a.sort((e,t)=>t-e);for(const l of a)r.splice(l,1);return r}static _arrayIsEmpty(e){for(let t=0,i=e.length;t<i;t++)if(e[t])return!1;return!0}static _getEditOperations(e,t){let i=[],n=!1;for(let s=0,o=t.length;s<o;s++){const o=t[s];if(o){const t=this._getEditOperationsFromCommand(e,s,o);i=i.concat(t.operations),n=n||t.hadTrackedEditOperation}}return{operations:i,hadTrackedEditOperation:n}}static _getEditOperationsFromCommand(e,t,i){let n=[],s=0;const o=(e,o,r=!1)=>{oe["a"].isEmpty(e)&&""===o||n.push({identifier:{major:t,minor:s++},range:e,text:o,forceMoveMarkers:r,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let r=!1;const a=(e,t,i)=>{r=!0,o(e,t,i)},l=(t,i)=>{const n=_["a"].liftSelection(t);let s;if(n.isEmpty())if("boolean"===typeof i)s=i?2:3;else{const t=e.model.getLineMaxColumn(n.startLineNumber);s=n.startColumn===t?2:3}else s=1;const o=e.trackedRanges.length,r=e.model._setTrackedRange(null,n,s);return e.trackedRanges[o]=r,e.trackedRangesDirection[o]=n.getDirection(),o.toString()},h={addEditOperation:o,addTrackedEditOperation:a,trackSelection:l};try{i.getEditOperations(e.model,h)}catch(d){return Object(c["e"])(d),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:r}}static _getLoserCursorMap(e){e=e.slice(0),e.sort((e,t)=>-oe["a"].compareRangesUsingEnds(e.range,t.range));let t={};for(let i=1;i<e.length;i++){const n=e[i-1],s=e[i];if(oe["a"].getStartPosition(n.range).isBefore(oe["a"].getEndPosition(s.range))){let o;o=n.identifier.major>s.identifier.major?n.identifier.major:s.identifier.major,t[o.toString()]=!0;for(let t=0;t<e.length;t++)e[t].identifier.major===o&&(e.splice(t,1),t<i&&i--,t--);i>0&&i--}}return t}}var Zn=i("f58f"),Xn=i("8ae8"),Qn=i("4d05"),Jn=i("42e3");class es{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const t=this._inserts,i=this._changes,n=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,i,n)}}class ts{constructor(e,t,i,n,s){this.id=e,this.afterLineNumber=t,this.ordinal=i,this.height=n,this.minWidth=s,this.prefixSum=0}}class is{constructor(e,t,i,n){this._instanceId=re["P"](++is.INSTANCE_COUNT),this._pendingChanges=new es,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=i,this._paddingBottom=n}static findInsertionIndex(e,t,i){let n=0,s=e.length;while(n<s){const o=n+s>>>1;t===e[o].afterLineNumber?i<e[o].ordinal?s=o:n=o+1:t<e[o].afterLineNumber?s=o:n=o+1}return n}setLineHeight(e){this._checkPendingChanges(),this._lineHeight=e}setPadding(e,t){this._paddingTop=e,this._paddingBottom=t}onFlushed(e){this._checkPendingChanges(),this._lineCount=e}changeWhitespace(e){let t=!1;try{const i={insertWhitespace:(e,i,n,s)=>{t=!0,e|=0,i|=0,n|=0,s|=0;const o=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new ts(o,e,i,n,s)),o},changeOneWhitespace:(e,i,n)=>{t=!0,i|=0,n|=0,this._pendingChanges.change({id:e,newAfterLineNumber:i,newHeight:n})},removeWhitespace:e=>{t=!0,this._pendingChanges.remove({id:e})}};e(i)}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(const t of e)this._insertWhitespace(t);for(const e of t)this._changeOneWhitespace(e.id,e.newAfterLineNumber,e.newHeight);for(const e of i){const t=this._findWhitespaceIndex(e.id);-1!==t&&this._removeWhitespace(t)}return}const n=new Set;for(const a of i)n.add(a.id);const s=new Map;for(const a of t)s.set(a.id,a);const o=e=>{let t=[];for(const i of e)if(!n.has(i.id)){if(s.has(i.id)){const e=s.get(i.id);i.afterLineNumber=e.newAfterLineNumber,i.height=e.newHeight}t.push(i)}return t},r=o(this._arr).concat(o(e));r.sort((e,t)=>e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber),this._arr=r,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=is.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let i=0,n=t.length;i<n;i++)if(t[i].id===e)return i;return-1}_changeOneWhitespace(e,t,i){const n=this._findWhitespaceIndex(e);if(-1!==n&&(this._arr[n].height!==i&&(this._arr[n].height=i,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,n-1)),this._arr[n].afterLineNumber!==t)){const e=this._arr[n];this._removeWhitespace(n),e.afterLineNumber=t,this._insertWhitespace(e)}}_removeWhitespace(e){this._arr.splice(e,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,e-1)}onLinesDeleted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount-=t-e+1;for(let i=0,n=this._arr.length;i<n;i++){const n=this._arr[i].afterLineNumber;e<=n&&n<=t?this._arr[i].afterLineNumber=e-1:n>t&&(this._arr[i].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i<n;i++){const n=this._arr[i].afterLineNumber;e<=n&&(this._arr[i].afterLineNumber+=t-e+1)}}getWhitespacesTotalHeight(){return this._checkPendingChanges(),0===this._arr.length?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(e){this._checkPendingChanges(),e|=0;let t=Math.max(0,this._prefixSumValidIndex+1);0===t&&(this._arr[0].prefixSum=this._arr[0].height,t++);for(let i=t;i<=e;i++)this._arr[i].prefixSum=this._arr[i-1].prefixSum+this._arr[i].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,e),this._arr[e].prefixSum}getLinesTotalHeight(){this._checkPendingChanges();const e=this._lineHeight*this._lineCount,t=this.getWhitespacesTotalHeight();return e+t+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(e){this._checkPendingChanges(),e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e);return-1===t?0:this.getWhitespacesAccumulatedHeight(t)}_findLastWhitespaceBeforeLineNumber(e){e|=0;const t=this._arr;let i=0,n=t.length-1;while(i<=n){const s=n-i|0,o=s/2|0,r=i+o|0;if(t[r].afterLineNumber<e){if(r+1>=t.length||t[r+1].afterLineNumber>=e)return r;i=r+1|0}else n=r-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e),i=t+1;return i<this._arr.length?i:-1}getFirstWhitespaceIndexAfterLineNumber(e){return this._checkPendingChanges(),e|=0,this._findFirstWhitespaceAfterLineNumber(e)}getVerticalOffsetForLineNumber(e){let t;this._checkPendingChanges(),e|=0,t=e>1?this._lineHeight*(e-1):0;const i=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e);return t+i+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),-1===this._minWidth){let e=0;for(let t=0,i=this._arr.length;t<i;t++)e=Math.max(e,this._arr[t].minWidth);this._minWidth=e}return this._minWidth}isAfterLines(e){this._checkPendingChanges();const t=this.getLinesTotalHeight();return e>t}isInTopPadding(e){return 0!==this._paddingTop&&(this._checkPendingChanges(),e<this._paddingTop)}isInBottomPadding(e){if(0===this._paddingBottom)return!1;this._checkPendingChanges();const t=this.getLinesTotalHeight();return e>=t-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),e|=0,e<0)return 1;const t=0|this._lineCount,i=this._lineHeight;let n=1,s=t;while(n<s){const t=(n+s)/2|0,o=0|this.getVerticalOffsetForLineNumber(t);if(e>=o+i)n=t+1;else{if(e>=o)return t;s=t}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this._lineHeight,n=0|this.getLineNumberAtOrAfterVerticalOffset(e),s=0|this.getVerticalOffsetForLineNumber(n);let o=0|this._lineCount,r=0|this.getFirstWhitespaceIndexAfterLineNumber(n);const a=0|this.getWhitespacesCount();let l,h;-1===r?(r=a,h=o+1,l=0):(h=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));let c=s,d=c;const u=5e5;let g=0;s>=u&&(g=Math.floor(s/u)*u,g=Math.floor(g/i)*i,d-=g);const p=[],m=e+(t-e)/2;let f=-1;for(let C=n;C<=o;C++){if(-1===f){const e=c,t=c+i;(e<=m&&m<t||e>m)&&(f=C)}c+=i,p[C-n]=d,d+=i;while(h===C)d+=l,c+=l,r++,r>=a?h=o+1:(h=0|this.getAfterLineNumberForWhitespaceIndex(r),l=0|this.getHeightForWhitespaceIndex(r));if(c>=t){o=C;break}}-1===f&&(f=o);const _=0|this.getVerticalOffsetForLineNumber(o);let b=n,v=o;return b<v&&s<e&&b++,b<v&&_+i>t&&v--,{bigNumbersDelta:g,startLineNumber:n,endLineNumber:o,relativeVerticalOffset:p,centeredLineNumber:f,completelyVisibleStartLineNumber:b,completelyVisibleEndLineNumber:v}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e|=0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i,n;return i=t>=1?this._lineHeight*t:0,n=e>0?this.getWhitespacesAccumulatedHeight(e-1):0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e|=0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;const n=this.getVerticalOffsetForWhitespaceIndex(i),s=this.getHeightForWhitespaceIndex(i);if(e>=n+s)return-1;while(t<i){const n=Math.floor((t+i)/2),s=this.getVerticalOffsetForWhitespaceIndex(n),o=this.getHeightForWhitespaceIndex(n);if(e>=s+o)t=n+1;else{if(e>=s)return n;i=n}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e|=0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t),s=this.getIdForWhitespaceIndex(t),o=this.getAfterLineNumberForWhitespaceIndex(t);return{id:s,afterLineNumber:o,verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];let s=[];for(let o=i;o<=n;o++){const e=this.getVerticalOffsetForWhitespaceIndex(o),i=this.getHeightForWhitespaceIndex(o);if(e>=t)break;s.push({id:this.getIdForWhitespaceIndex(o),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(o),verticalOffset:e,height:i})}return s}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}is.INSTANCE_COUNT=0;const ns=125;class ss{constructor(e,t,i,n){e|=0,t|=0,i|=0,n|=0,e<0&&(e=0),t<0&&(t=0),i<0&&(i=0),n<0&&(n=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class os extends u["a"]{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new d["a"]),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new ss(0,0,0,0),this._scrollable=this._register(new Jn["a"](e,t)),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const i=t.contentWidth!==e.contentWidth,n=t.contentHeight!==e.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new Vn(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}}class rs extends u["a"]{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,s=n.get(124),o=n.get(69);this._linesLayout=new is(t,n.get(53),o.top,o.bottom),this._scrollable=this._register(new os(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new ss(s.contentWidth,0,s.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(98)?ns:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(53)&&this._linesLayout.setLineHeight(t.get(53)),e.hasChanged(69)){const e=t.get(69);this._linesLayout.setPadding(e.top,e.bottom)}if(e.hasChanged(124)){const e=t.get(124),i=e.contentWidth,n=e.height,s=this._scrollable.getScrollDimensions(),o=s.contentWidth;this._scrollable.setScrollDimensions(new ss(i,s.contentWidth,n,this._getContentHeight(i,n,o)))}else this._updateHeight();e.hasChanged(98)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const i=this._configuration.options,n=i.get(87);return 2===n.horizontal||e>=t?0:n.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let s=this._linesLayout.getLinesTotalHeight();return n.get(89)?s+=Math.max(0,t-n.get(53)-n.get(69).bottom):s+=this._getHorizontalScrollbarHeight(e,i),s}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new ss(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new Di["g"](t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new Di["g"](t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(e){const t=this._configuration.options,i=t.get(125),n=t.get(38);if(i.isViewportWrapping){const i=t.get(124),s=t.get(59);return e>i.contentWidth+n.typicalHalfwidthCharacterWidth&&s.enabled&&"right"===s.side?e+i.verticalScrollbarWidth:e}{const i=t.get(88)*n.typicalHalfwidthCharacterWidth,s=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+i,s)}}setMaxLineWidth(e){const t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new ss(t.width,this._computeContentWidth(e),t.height,t.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition();let t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),n=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i);return{scrollTop:t,scrollTopWithoutViewZones:t-n,scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const 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)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){const e=this._scrollable.getScrollDimensions();return e.contentWidth}getScrollWidth(){const e=this._scrollable.getScrollDimensions();return e.scrollWidth}getContentHeight(){const e=this._scrollable.getScrollDimensions();return e.contentHeight}getScrollHeight(){const e=this._scrollable.getScrollDimensions();return e.scrollHeight}getCurrentScrollLeft(){const e=this._scrollable.getCurrentScrollPosition();return e.scrollLeft}getCurrentScrollTop(){const e=this._scrollable.getCurrentScrollPosition();return e.scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}var as=i("2de5");class ls{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column)}convertModelRangeToViewRange(e){return this._lines.convertModelRangeToViewRange(e)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}}class hs{constructor(e){this._counts=e,this._isValid=!1,this._validEndIndex=-1,this._modelToView=[],this._viewToModel=[]}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._counts.length;e<t;e++){const t=this._counts[e],i=e>0?this._modelToView[e-1]:0;this._modelToView[e]=i+t;for(let n=0;n<t;n++)this._viewToModel[i+n]=e}this._modelToView.length=this._counts.length,this._viewToModel.length=this._modelToView[this._modelToView.length-1],this._isValid=!0,this._validEndIndex=this._counts.length-1}}changeValue(e,t){this._counts[e]!==t&&(this._counts[e]=t,this._invalidate(e))}removeValues(e,t){this._counts.splice(e,t),this._invalidate(e)}insertValues(e,t){this._counts=ni["a"](this._counts,e,t),this._invalidate(e)}getTotalValue(){return this._ensureValid(),this._viewToModel.length}getAccumulatedValue(e){return this._ensureValid(),this._modelToView[e]}getIndexOf(e){this._ensureValid();const t=this._viewToModel[e],i=t>0?this._modelToView[t-1]:0;return new as["b"](t,e-i)}}class cs{constructor(e,t,i,n,s,o,r,a){this.model=e,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=t,this._monospaceLineBreaksComputerFactory=i,this.fontInfo=n,this.tabSize=s,this.wrappingStrategy=o,this.wrappingColumn=r,this.wrappingIndent=a,this._constructLines(!0,null)}dispose(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])}createCoordinatesConverter(){return new ls(this)}_constructLines(e,t){this.lines=[],e&&(this.hiddenAreasIds=[]);let i=this.model.getLinesContent();const n=i.length,s=this.createLineBreaksComputer();for(let u=0;u<n;u++)s.addRequest(i[u],t?t[u]:null);const o=s.finalize();let r=[],a=this.hiddenAreasIds.map(e=>this.model.getDecorationRange(e)).sort(oe["a"].compareRangesUsingStarts),l=1,h=0,c=-1,d=c+1<a.length?h+1:n+2;for(let u=0;u<n;u++){let e=u+1;e===d&&(c++,l=a[c].startLineNumber,h=a[c].endLineNumber,d=c+1<a.length?h+1:n+2);let t=e>=l&&e<=h,i=_s(o[u],!t);r[u]=i.getViewLineCount(),this.lines[u]=i}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new hs(r)}getHiddenAreas(){return this.hiddenAreasIds.map(e=>this.model.getDecorationRange(e))}_reduceRanges(e){if(0===e.length)return[];let t=e.map(e=>this.model.validateRange(e)).sort(oe["a"].compareRangesUsingStarts),i=[],n=t[0].startLineNumber,s=t[0].endLineNumber;for(let o=1,r=t.length;o<r;o++){let e=t[o];e.startLineNumber>s+1?(i.push(new oe["a"](n,1,s,1)),n=e.startLineNumber,s=e.endLineNumber):e.endLineNumber>s&&(s=e.endLineNumber)}return i.push(new oe["a"](n,1,s,1)),i}setHiddenAreas(e){let t=this._reduceRanges(e),i=this.hiddenAreasIds.map(e=>this.model.getDecorationRange(e)).sort(oe["a"].compareRangesUsingStarts);if(t.length===i.length){let e=!1;for(let n=0;n<t.length;n++)if(!t[n].equalsRange(i[n])){e=!0;break}if(!e)return!1}let n=[];for(const c of t)n.push({range:c,options:ae["a"].EMPTY});this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,n);let s=t,o=1,r=0,a=-1,l=a+1<s.length?r+1:this.lines.length+2,h=!1;for(let c=0;c<this.lines.length;c++){let e=c+1;e===l&&(a++,o=s[a].startLineNumber,r=s[a].endLineNumber,l=a+1<s.length?r+1:this.lines.length+2);let t=!1;if(e>=o&&e<=r?this.lines[c].isVisible()&&(this.lines[c]=this.lines[c].setVisible(!1),t=!0):(h=!0,this.lines[c].isVisible()||(this.lines[c]=this.lines[c].setVisible(!0),t=!0)),t){let e=this.lines[c].getViewLineCount();this.prefixSumComputer.changeValue(c,e)}}return h||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return!(e<1||e>this.lines.length)&&this.lines[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.lines.length?1:this.lines[e-1].getViewLineCount()}setTabSize(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n){const s=this.fontInfo.equals(e),o=this.wrappingStrategy===t,r=this.wrappingColumn===i,a=this.wrappingIndent===n;if(s&&o&&r&&a)return!1;const l=s&&o&&!r&&a;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n;let h=null;if(l){h=[];for(let e=0,t=this.lines.length;e<t;e++)h[e]=this.lines[e].getLineBreakData()}return this._constructLines(!1,h),!0}createLineBreaksComputer(){const e="advanced"===this.wrappingStrategy?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory;return e.createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(e,t,i){if(e<=this._validModelVersionId)return null;let n=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,s=this.prefixSumComputer.getAccumulatedValue(i-1);return this.lines.splice(t-1,i-t+1),this.prefixSumComputer.removeValues(t-1,i-t+1),new On(n,s)}onModelLinesInserted(e,t,i,n){if(e<=this._validModelVersionId)return null;const s=t>2&&!this.lines[t-2].isVisible();let o=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,r=0,a=[],l=[];for(let h=0,c=n.length;h<c;h++){let e=_s(n[h],!s);a.push(e);let t=e.getViewLineCount();r+=t,l[h]=t}return this.lines=this.lines.slice(0,t-1).concat(a).concat(this.lines.slice(t-1)),this.prefixSumComputer.insertValues(t-1,l),new In(o,o+r-1)}onModelLineChanged(e,t,i){if(e<=this._validModelVersionId)return[!1,null,null,null];let n=t-1,s=this.lines[n].getViewLineCount(),o=this.lines[n].isVisible(),r=_s(i,o);this.lines[n]=r;let a=this.lines[n].getViewLineCount(),l=!1,h=0,c=-1,d=0,u=-1,g=0,p=-1;s>a?(h=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,c=h+a-1,g=c+1,p=g+(s-a)-1,l=!0):s<a?(h=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,c=h+s-1,d=c+1,u=d+(a-s)-1,l=!0):(h=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,c=h+a-1),this.prefixSumComputer.changeValue(n,a);const m=h<=c?new Nn(h,c):null,f=d<=u?new In(d,u):null,_=g<=p?new On(g,p):null;return[l,m,f,_]}acceptVersionId(e){this._validModelVersionId=e,1!==this.lines.length||this.lines[0].isVisible()||this.setHiddenAreas([])}getViewLineCount(){return this.prefixSumComputer.getTotalValue()}_toValidViewLineNumber(e){if(e<1)return 1;const t=this.getViewLineCount();return e>t?t:0|e}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),s=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),o=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),r=this.model.getActiveIndentGuide(n.lineNumber,s.lineNumber,o.lineNumber),a=this.convertModelPositionToViewPosition(r.startLineNumber,1),l=this.convertModelPositionToViewPosition(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:r.indent}}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let s=[],o=[],r=[];const a=i.lineNumber-1,l=n.lineNumber-1;let h=null;for(let g=a;g<=l;g++){const e=this.lines[g];if(e.isVisible()){let t=e.getViewLineNumberOfModelPosition(0,g===a?i.column:1),n=e.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(g+1)),s=n-t+1,l=0;s>1&&1===e.getViewLineMinColumn(this.model,g+1,n)&&(l=0===t?1:2),o.push(s),r.push(l),null===h&&(h=new se["a"](g+1,0))}else null!==h&&(s=s.concat(this.model.getLinesIndentGuides(h.lineNumber,g)),h=null)}null!==h&&(s=s.concat(this.model.getLinesIndentGuides(h.lineNumber,n.lineNumber)),h=null);const c=t-e+1;let d=new Array(c),u=0;for(let g=0,p=s.length;g<p;g++){let e,t=s[g],i=Math.min(c-u,o[g]),n=r[g];e=2===n?0:1===n?1:i;for(let s=0;s<i;s++)s===e&&(t=0),d[u++]=t}return d}getViewLineContent(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineContent(this.model,i+1,n)}getViewLineLength(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineLength(this.model,i+1,n)}getViewLineMinColumn(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineMinColumn(this.model,i+1,n)}getViewLineMaxColumn(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineMaxColumn(this.model,i+1,n)}getViewLineData(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineData(this.model,i+1,n)}getViewLinesData(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);let n=this.prefixSumComputer.getIndexOf(e-1),s=e,o=n.index,r=n.remainder,a=[];for(let l=o,h=this.model.getLineCount();l<h;l++){let n=this.lines[l];if(!n.isVisible())continue;let h=l===o?r:0,c=n.getViewLineCount()-h,d=!1;s+c>t&&(d=!0,c=t-s+1);let u=h+c;if(n.getViewLinesData(this.model,l+1,h,u,s-e,i,a),s+=c,d)break}return a}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);let n=this.prefixSumComputer.getIndexOf(e-1),s=n.index,o=n.remainder,r=this.lines[s],a=r.getViewLineMinColumn(this.model,s+1,o),l=r.getViewLineMaxColumn(this.model,s+1,o);t<a&&(t=a),t>l&&(t=l);let h=r.getModelColumnOfViewPosition(o,t),c=this.model.validatePosition(new se["a"](s+1,h));return c.equals(i)?new se["a"](e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){const i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new oe["a"](i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){e=this._toValidViewLineNumber(e);let i=this.prefixSumComputer.getIndexOf(e-1),n=i.index,s=i.remainder,o=this.lines[n].getModelColumnOfViewPosition(s,t);return this.model.validatePosition(new se["a"](n+1,o))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new oe["a"](t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t){const i=this.model.validatePosition(new se["a"](e,t)),n=i.lineNumber,s=i.column;let o=n-1,r=!1;while(o>0&&!this.lines[o].isVisible())o--,r=!0;if(0===o&&!this.lines[o].isVisible())return new se["a"](1,1);const a=1+(0===o?0:this.prefixSumComputer.getAccumulatedValue(o-1));let l;return l=r?this.lines[o].getViewPositionOfModelPosition(a,this.model.getLineMaxColumn(o+1)):this.lines[n-1].getViewPositionOfModelPosition(a,s),l}convertModelRangeToViewRange(e){let t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn);return e.startLineNumber===e.endLineNumber&&t.lineNumber!==i.lineNumber&&i.column===this.getViewLineMinColumn(i.lineNumber)?new oe["a"](t.lineNumber,t.column,i.lineNumber-1,this.getViewLineMaxColumn(i.lineNumber-1)):new oe["a"](t.lineNumber,t.column,i.lineNumber,i.column)}_getViewLineNumberForModelPosition(e,t){let i=e-1;if(this.lines[i].isVisible()){const e=1+(0===i?0:this.prefixSumComputer.getAccumulatedValue(i-1));return this.lines[i].getViewLineNumberOfModelPosition(e,t)}while(i>0&&!this.lines[i].isVisible())i--;if(0===i&&!this.lines[i].isVisible())return 1;const n=1+(0===i?0:this.prefixSumComputer.getAccumulatedValue(i-1));return this.lines[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getAllOverviewRulerDecorations(e,t,i){const n=this.model.getOverviewRulerDecorations(e,t),s=new Cs;for(const o of n){const e=o.options.overviewRuler,t=e?e.position:0;if(0===t)continue;const n=e.getColor(i),r=this._getViewLineNumberForModelPosition(o.range.startLineNumber,o.range.startColumn),a=this._getViewLineNumberForModelPosition(o.range.endLineNumber,o.range.endColumn);s.accept(n,r,a,t)}return s.result}getDecorationsInRange(e,t,i){const n=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),s=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(s.lineNumber-n.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new oe["a"](n.lineNumber,1,s.lineNumber,s.column),t,i);let o=[];const r=n.lineNumber-1,a=s.lineNumber-1;let l=null;for(let u=r;u<=a;u++){const e=this.lines[u];if(e.isVisible())null===l&&(l=new se["a"](u+1,u===r?n.column:1));else if(null!==l){const e=this.model.getLineMaxColumn(u);o=o.concat(this.model.getDecorationsInRange(new oe["a"](l.lineNumber,l.column,u,e),t,i)),l=null}}null!==l&&(o=o.concat(this.model.getDecorationsInRange(new oe["a"](l.lineNumber,l.column,s.lineNumber,s.column),t,i)),l=null),o.sort((e,t)=>{const i=oe["a"].compareRangesUsingStarts(e.range,t.range);return 0===i?e.id<t.id?-1:e.id>t.id?1:0:i});let h=[],c=0,d=null;for(const u of o){const e=u.id;d!==e&&(d=e,h[c++]=u)}return h}}class ds{constructor(){}isVisible(){return!0}setVisible(e){return e?this:us.INSTANCE}getLineBreakData(){return null}getViewLineCount(){return 1}getViewLineContent(e,t,i){return e.getLineContent(t)}getViewLineLength(e,t,i){return e.getLineLength(t)}getViewLineMinColumn(e,t,i){return e.getLineMinColumn(t)}getViewLineMaxColumn(e,t,i){return e.getLineMaxColumn(t)}getViewLineData(e,t,i){let n=e.getLineTokens(t),s=n.getLineContent();return new Di["d"](s,!1,1,s.length+1,0,n.inflate())}getViewLinesData(e,t,i,n,s,o,r){o[s]?r[s]=this.getViewLineData(e,t,0):r[s]=null}getModelColumnOfViewPosition(e,t){return t}getViewPositionOfModelPosition(e,t){return new se["a"](e,t)}getViewLineNumberOfModelPosition(e,t){return e}}ds.INSTANCE=new ds;class us{constructor(){}isVisible(){return!1}setVisible(e){return e?ds.INSTANCE:this}getLineBreakData(){return null}getViewLineCount(){return 0}getViewLineContent(e,t,i){throw new Error("Not supported")}getViewLineLength(e,t,i){throw new Error("Not supported")}getViewLineMinColumn(e,t,i){throw new Error("Not supported")}getViewLineMaxColumn(e,t,i){throw new Error("Not supported")}getViewLineData(e,t,i){throw new Error("Not supported")}getViewLinesData(e,t,i,n,s,o,r){throw new Error("Not supported")}getModelColumnOfViewPosition(e,t){throw new Error("Not supported")}getViewPositionOfModelPosition(e,t){throw new Error("Not supported")}getViewLineNumberOfModelPosition(e,t){throw new Error("Not supported")}}us.INSTANCE=new us;class gs{constructor(e,t){this._lineBreakData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getLineBreakData(){return this._lineBreakData}getViewLineCount(){return this._isVisible?this._lineBreakData.breakOffsets.length:0}getInputStartOffsetOfOutputLineIndex(e){return Di["b"].getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,e,0)}getInputEndOffsetOfOutputLineIndex(e,t,i){return i+1===this._lineBreakData.breakOffsets.length?e.getLineMaxColumn(t)-1:Di["b"].getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,i+1,0)}getViewLineContent(e,t,i){if(!this._isVisible)throw new Error("Not supported");let n=this.getInputStartOffsetOfOutputLineIndex(i),s=this.getInputEndOffsetOfOutputLineIndex(e,t,i),o=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:s+1});return i>0&&(o=ms(this._lineBreakData.wrappedTextIndentLength)+o),o}getViewLineLength(e,t,i){if(!this._isVisible)throw new Error("Not supported");let n=this.getInputStartOffsetOfOutputLineIndex(i),s=this.getInputEndOffsetOfOutputLineIndex(e,t,i),o=s-n;return i>0&&(o=this._lineBreakData.wrappedTextIndentLength+o),o}getViewLineMinColumn(e,t,i){if(!this._isVisible)throw new Error("Not supported");return i>0?this._lineBreakData.wrappedTextIndentLength+1:1}getViewLineMaxColumn(e,t,i){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineContent(e,t,i).length+1}getViewLineData(e,t,i){if(!this._isVisible)throw new Error("Not supported");let n=this.getInputStartOffsetOfOutputLineIndex(i),s=this.getInputEndOffsetOfOutputLineIndex(e,t,i),o=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:s+1});i>0&&(o=ms(this._lineBreakData.wrappedTextIndentLength)+o);let r=i>0?this._lineBreakData.wrappedTextIndentLength+1:1,a=o.length+1,l=i+1<this.getViewLineCount(),h=0;i>0&&(h=this._lineBreakData.wrappedTextIndentLength);let c=e.getLineTokens(t);const d=0===i?0:this._lineBreakData.breakOffsetsVisibleColumn[i-1];return new Di["d"](o,l,r,a,d,c.sliceAndInflate(n,s,h))}getViewLinesData(e,t,i,n,s,o,r){if(!this._isVisible)throw new Error("Not supported");for(let a=i;a<n;a++){let n=s+a-i;o[n]?r[n]=this.getViewLineData(e,t,a):r[n]=null}}getModelColumnOfViewPosition(e,t){if(!this._isVisible)throw new Error("Not supported");let i=t-1;return e>0&&(i<this._lineBreakData.wrappedTextIndentLength?i=0:i-=this._lineBreakData.wrappedTextIndentLength),Di["b"].getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,e,i)+1}getViewPositionOfModelPosition(e,t){if(!this._isVisible)throw new Error("Not supported");let i=Di["b"].getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets,t-1),n=i.outputLineIndex,s=i.outputOffset+1;return n>0&&(s+=this._lineBreakData.wrappedTextIndentLength),new se["a"](e+n,s)}getViewLineNumberOfModelPosition(e,t){if(!this._isVisible)throw new Error("Not supported");const i=Di["b"].getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets,t-1);return e+i.outputLineIndex}}let ps=[""];function ms(e){if(e>=ps.length)for(let t=1;t<=e;t++)ps[t]=fs(t);return ps[e]}function fs(e){return new Array(e+1).join(" ")}function _s(e,t){return null===e?t?ds.INSTANCE:us.INSTANCE:new gs(e,t)}class bs{constructor(e){this._lines=e}_validPosition(e){return this._lines.model.validatePosition(e)}_validRange(e){return this._lines.model.validateRange(e)}convertViewPositionToModelPosition(e){return this._validPosition(e)}convertViewRangeToModelRange(e){return this._validRange(e)}validateViewPosition(e,t){return this._validPosition(t)}validateViewRange(e,t){return this._validRange(t)}convertModelPositionToViewPosition(e){return this._validPosition(e)}convertModelRangeToViewRange(e){return this._validRange(e)}modelPositionIsVisible(e){const t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)}getModelLineViewLineCount(e){return 1}}class vs{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new bs(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){let e=[];return{addRequest:(t,i)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new On(t,i)}onModelLinesInserted(e,t,i,n){return new In(t,i)}onModelLineChanged(e,t,i){return[!1,new Nn(t,t),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesIndentGuides(e,t){const i=t-e+1;let n=new Array(i);for(let s=0;s<i;s++)n[s]=0;return n}getViewLineContent(e){return this.model.getLineContent(e)}getViewLineLength(e){return this.model.getLineLength(e)}getViewLineMinColumn(e){return this.model.getLineMinColumn(e)}getViewLineMaxColumn(e){return this.model.getLineMaxColumn(e)}getViewLineData(e){let t=this.model.getLineTokens(e),i=t.getLineContent();return new Di["d"](i,!1,1,i.length+1,0,t.inflate())}getViewLinesData(e,t,i){const n=this.model.getLineCount();e=Math.min(Math.max(1,e),n),t=Math.min(Math.max(1,t),n);let s=[];for(let o=e;o<=t;o++){let t=o-e;i[t]||(s[t]=null),s[t]=this.getViewLineData(o)}return s}getAllOverviewRulerDecorations(e,t,i){const n=this.model.getOverviewRulerDecorations(e,t),s=new Cs;for(const o of n){const e=o.options.overviewRuler,t=e?e.position:0;if(0===t)continue;const n=e.getColor(i),r=o.range.startLineNumber,a=o.range.endLineNumber;s.accept(n,r,a,t)}return s.result}getDecorationsInRange(e,t,i){return this.model.getDecorationsInRange(e,t,i)}}class Cs{constructor(){this.result=Object.create(null)}accept(e,t,i,n){let s=this.result[e];if(s){const e=s[s.length-3],o=s[s.length-1];if(e===n&&o+1>=t)return void(i>o&&(s[s.length-1]=i));s.push(n,t,i)}else this.result[e]=[n,t,i]}}class ws{constructor(e,t,i,n,s){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=s,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let i=this._decorationsCache[t];if(!i){const n=e.range,s=e.options;let o;if(s.isWholeLine){const e=this._coordinatesConverter.convertModelPositionToViewPosition(new se["a"](n.startLineNumber,1)),t=this._coordinatesConverter.convertModelPositionToViewPosition(new se["a"](n.endLineNumber,this.model.getLineMaxColumn(n.endLineNumber)));o=new oe["a"](e.lineNumber,e.column,t.lineNumber,t.column)}else o=this._coordinatesConverter.convertModelRangeToViewRange(n);i=new Di["f"](o,s),this._decorationsCache[t]=i}return i}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}_getDecorationsViewportData(e){const t=this._linesCollection.getDecorationsInRange(e,this.editorId,Object($["m"])(this.configuration.options)),i=e.startLineNumber,n=e.endLineNumber;let s=[],o=0,r=[];for(let a=i;a<=n;a++)r[a-i]=[];for(let a=0,l=t.length;a<l;a++){let e=t[a],l=e.options,h=this._getOrCreateViewModelDecoration(e),c=h.range;if(s[o++]=h,l.inlineClassName){let e=new Di["a"](c,l.inlineClassName,l.inlineClassNameAffectsLetterSpacing?3:0),t=Math.max(i,c.startLineNumber),s=Math.min(n,c.endLineNumber);for(let n=t;n<=s;n++)r[n-i].push(e)}if(l.beforeContentClassName&&i<=c.startLineNumber&&c.startLineNumber<=n){let e=new Di["a"](new oe["a"](c.startLineNumber,c.startColumn,c.startLineNumber,c.startColumn),l.beforeContentClassName,1);r[c.startLineNumber-i].push(e)}if(l.afterContentClassName&&i<=c.endLineNumber&&c.endLineNumber<=n){let e=new Di["a"](new oe["a"](c.endLineNumber,c.endColumn,c.endLineNumber,c.endColumn),l.afterContentClassName,2);r[c.endLineNumber-i].push(e)}}return{decorations:s,inlineDecorations:r}}}const Ss=!0;class ys extends u["a"]{constructor(e,t,i,n,s,o){if(super(),this._editorId=e,this._configuration=t,this.model=i,this._eventDispatcher=new Bn,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new ue(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._tokenizeViewportSoon=this._register(new S["e"](()=>this.tokenizeViewport(),50)),this._updateConfigurationViewLineCount=this._register(new S["e"](()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0,Ss&&this.model.isTooLargeForTokenization())this._lines=new vs(this.model);else{const e=this._configuration.options,t=e.get(38),i=e.get(118),o=e.get(125),r=e.get(117);this._lines=new cs(this.model,n,s,t,this.model.getOptions().tabSize,i,o.wrappingColumn,r)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new Gn(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new rs(this._configuration,this.getLineCount(),o)),this._register(this.viewLayout.onDidScroll(e=>{e.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new Mn(e)),this._eventDispatcher.emitOutgoingEvent(new Hn(e.oldScrollWidth,e.oldScrollLeft,e.oldScrollHeight,e.oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(e=>{this._eventDispatcher.emitOutgoingEvent(e)})),this._decorations=new ws(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(yi.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new Fn)})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this.invalidateMinimapColorCache(),this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,null,1),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}tokenizeViewport(){const e=this.viewLayout.getLinesViewportData(),t=this.coordinatesConverter.convertViewPositionToModelPosition(new se["a"](e.startLineNumber,1)),i=this.coordinatesConverter.convertViewPositionToModelPosition(new se["a"](e.endLineNumber,1));this.model.tokenizeViewport(t.lineNumber,i.lineNumber)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new xn(e)),this._eventDispatcher.emitOutgoingEvent(new jn(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new Cn)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new wn)}onDidColorThemeChange(){this._eventDispatcher.emitSingleViewEvent(new An)}_onConfigurationChanged(e,t){let i=null;if(-1!==this._viewportStartLine){let e=new se["a"](this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));i=this.coordinatesConverter.convertViewPositionToModelPosition(e)}let n=!1;const s=this._configuration.options,o=s.get(38),r=s.get(118),a=s.get(125),l=s.get(117);if(this._lines.setWrappingSettings(o,r,a.wrappingColumn,l)&&(e.emitViewEvent(new Ln),e.emitViewEvent(new En),e.emitViewEvent(new Dn(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),0!==this.viewLayout.getCurrentScrollTop()&&(n=!0),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(75)&&(this._decorations.reset(),e.emitViewEvent(new Dn(null))),e.emitViewEvent(new Sn(t)),this.viewLayout.onConfigurationChanged(t),n&&i){const e=this.coordinatesConverter.convertModelPositionToViewPosition(i),t=this.viewLayout.getVerticalOffsetForLineNumber(e.lineNumber);this.viewLayout.setScrollPosition({scrollTop:t+this._viewportStartLineDelta},1)}ue.shouldRecreate(t)&&(this.cursorConfig=new ue(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeRawContentFast(e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();let i=!1,n=!1;const s=e.changes,o=e.versionId,r=this._lines.createLineBreaksComputer();for(const e of s)switch(e.changeType){case 4:for(const t of e.detail)r.addRequest(t,null);break;case 2:r.addRequest(e.detail,null);break}const a=r.finalize();let l=0;for(const e of s)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new Ln),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break;case 3:{const n=this._lines.onModelLinesDeleted(o,e.fromLineNumber,e.toLineNumber);null!==n&&(t.emitViewEvent(n),this.viewLayout.onLinesDeleted(n.fromLineNumber,n.toLineNumber)),i=!0;break}case 4:{const n=a.slice(l,l+e.detail.length);l+=e.detail.length;const s=this._lines.onModelLinesInserted(o,e.fromLineNumber,e.toLineNumber,n);null!==s&&(t.emitViewEvent(s),this.viewLayout.onLinesInserted(s.fromLineNumber,s.toLineNumber)),i=!0;break}case 2:{const i=a[l];l++;const[s,r,h,c]=this._lines.onModelLineChanged(o,e.lineNumber,i);n=s,r&&t.emitViewEvent(r),h&&(t.emitViewEvent(h),this.viewLayout.onLinesInserted(h.fromLineNumber,h.toLineNumber)),c&&(t.emitViewEvent(c),this.viewLayout.onLinesDeleted(c.fromLineNumber,c.toLineNumber));break}case 5:break}this._lines.acceptVersionId(o),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new En),t.emitViewEvent(new Dn(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}if(this._viewportStartLine=-1,this._configuration.setMaxLineNumber(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&this._viewportStartLineTrackedRange){const e=this.model._getTrackedRange(this._viewportStartLineTrackedRange);if(e){const t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),i=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:i+this._viewportStartLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(this.model.onDidChangeTokens(e=>{let t=[];for(let i=0,n=e.ranges.length;i<n;i++){const n=e.ranges[i],s=this.coordinatesConverter.convertModelPositionToViewPosition(new se["a"](n.fromLineNumber,1)).lineNumber,o=this.coordinatesConverter.convertModelPositionToViewPosition(new se["a"](n.toLineNumber,this.model.getLineMaxColumn(n.toLineNumber))).lineNumber;t[i]={fromLineNumber:s,toLineNumber:o}}this._eventDispatcher.emitSingleViewEvent(new Rn(t)),e.tokenizationSupportChanged&&this._tokenizeViewportSoon.schedule()})),this._register(this.model.onDidChangeLanguageConfiguration(e=>{this._eventDispatcher.emitSingleViewEvent(new kn),this.cursorConfig=new ue(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeLanguage(e=>{this.cursorConfig=new ue(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeOptions(e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new Ln),e.emitViewEvent(new En),e.emitViewEvent(new Dn(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new ue(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeDecorations(e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new Dn(e))}))}setHiddenAreas(e){try{const t=this._eventDispatcher.beginEmitViewEvents();let i=this._lines.setHiddenAreas(e);i&&(t.emitViewEvent(new Ln),t.emitViewEvent(new En),t.emitViewEvent(new Dn(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(124),t=this._configuration.options.get(53),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),s=Math.max(1,n.completelyVisibleStartLineNumber-i),o=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new oe["a"](s,this.getLineMinColumn(s),o,this.getLineMaxColumn(o)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(0===i.length)return[t];let n=[],s=0,o=t.startLineNumber,r=t.startColumn,a=t.endLineNumber,l=t.endColumn;for(let h=0,c=i.length;h<c;h++){const e=i[h].startLineNumber,t=i[h].endLineNumber;t<o||(e>a||(o<e&&(n[s++]=new oe["a"](o,r,e-1,this.model.getLineMaxColumn(e-1))),o=t+1,r=1))}return(o<a||o===a&&r<l)&&(n[s++]=new oe["a"](o,r,a,l)),n}getCompletelyVisibleViewRange(){const e=this.viewLayout.getLinesViewportData(),t=e.completelyVisibleStartLineNumber,i=e.completelyVisibleEndLineNumber;return new oe["a"](t,this.getLineMinColumn(t),i,this.getLineMaxColumn(i))}getCompletelyVisibleViewRangeAtScrollTop(e){const t=this.viewLayout.getLinesViewportDataAtScrollTop(e),i=t.completelyVisibleStartLineNumber,n=t.completelyVisibleEndLineNumber;return new oe["a"](i,this.getLineMinColumn(i),n,this.getLineMaxColumn(n))}saveState(){const e=this.viewLayout.saveState(),t=e.scrollTop,i=this.viewLayout.getLineNumberAtVerticalOffset(t),n=this.coordinatesConverter.convertViewPositionToModelPosition(new se["a"](i,this.getLineMinColumn(i))),s=this.viewLayout.getVerticalOffsetForLineNumber(i)-t;return{scrollLeft:e.scrollLeft,firstPosition:n,firstPositionDeltaTop:s}}reduceRestoreState(e){if("undefined"===typeof e.firstPosition)return this._reduceRestoreStateCompatibility(e);const t=this.model.validatePosition(e.firstPosition),i=this.coordinatesConverter.convertModelPositionToViewPosition(t),n=this.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:n}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getTextModelOptions(){return this.model.getOptions()}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,t,i){this._viewportStartLine=e;let n=this.coordinatesConverter.convertViewPositionToModelPosition(new se["a"](e,this.getLineMinColumn(e)));this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,new oe["a"](n.lineNumber,n.column,n.lineNumber,n.column),1);const s=this.viewLayout.getVerticalOffsetForLineNumber(e),o=this.viewLayout.getCurrentScrollTop();this._viewportStartLineDelta=o-s}getActiveIndentGuide(e,t,i){return this._lines.getActiveIndentGuide(e,t,i)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){const t=re["v"](this.getLineContent(e));return-1===t?0:t+1}getLineLastNonWhitespaceColumn(e){const t=re["I"](this.getLineContent(e));return-1===t?0:t+2}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getViewLineRenderingData(e,t){let i=this.model.mightContainRTL(),n=this.model.mightContainNonBasicASCII(),s=this.getTabSize(),o=this._lines.getViewLineData(t),r=this._decorations.getDecorationsViewportData(e).inlineDecorations,a=r[t-e.startLineNumber];return new Di["e"](o.minColumn,o.maxColumn,o.content,o.continuesWithWrappedLine,i,n,o.tokens,a,s,o.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){let n=this._lines.getViewLinesData(e,t,i);return new Di["c"](this.getTabSize(),n)}getAllOverviewRulerDecorations(e){return this._lines.getAllOverviewRulerDecorations(this._editorId,Object($["m"])(this._configuration.options),e)}invalidateOverviewRulerColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const e=t.options.overviewRuler;e&&e.invalidateCachedColor()}}invalidateMinimapColorCache(){const e=this.model.getAllDecorations();for(const t of e){const e=t.options.minimap;e&&e.invalidateCachedColor()}}getValueInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}getModelLineMaxColumn(e){return this.model.getLineMaxColumn(e)}validateModelPosition(e){return this.model.validatePosition(e)}validateModelRange(e){return this.model.validateRange(e)}deduceModelPositionRelativeToViewPosition(e,t,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e);2===this.model.getEOL().length&&(t<0?t-=i:t+=i);const s=this.model.getOffsetAt(n),o=s+t;return this.model.getPositionAt(o)}getEOL(){return this.model.getEOL()}getPlainTextToCopy(e,t,i){const n=i?"\r\n":this.model.getEOL();e=e.slice(0),e.sort(oe["a"].compareRangesUsingStarts);let s=!1,o=!1;for(const a of e)a.isEmpty()?s=!0:o=!0;if(!o){if(!t)return"";const i=e.map(e=>e.startLineNumber);let s="";for(let e=0;e<i.length;e++)e>0&&i[e-1]===i[e]||(s+=this.model.getLineContent(i[e])+n);return s}if(s&&t){let t=[],n=0;for(const s of e){const e=s.startLineNumber;s.isEmpty()?e!==n&&t.push(this.model.getLineContent(e)):t.push(this.model.getValueInRange(s,i?2:0)),n=e}return 1===t.length?t[0]:t}let r=[];for(const a of e)a.isEmpty()||r.push(this.model.getValueInRange(a,i?2:0));return 1===r.length?r[0]:r}getRichTextToCopy(e,t){const i=this.model.getLanguageIdentifier();if(1===i.id)return null;if(1!==e.length)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const e=n.startLineNumber;n=new oe["a"](e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const s=this._configuration.options.get(38),o=this._getColorMap(),r=s.fontFamily===$["c"].fontFamily?s.fontFamily:`'${s.fontFamily}', ${$["c"].fontFamily}`;return{mode:i.language,html:`<div style="color: ${o[1]};background-color: ${o[2]};font-family: ${r};font-weight: ${s.fontWeight};font-size: ${s.fontSize}px;line-height: ${s.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(n,o)+"</div>"}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,o=e.endColumn,r=this.getTabSize();let a="";for(let l=i;l<=s;l++){const e=this.model.getLineTokens(l),h=e.getLineContent(),c=l===i?n-1:0,d=l===s?o-1:h.length;a+=""===h?"<br>":Object(Qn["a"])(h,e.inflate(),t,c,d,r,v["j"])}return a}_getColorMap(){let e=Si["A"].getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;i<n;i++)t[i]=qi["a"].Format.CSS.formatHex(e[i]);return t}pushStackElement(){this.model.pushStackElement()}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(e,t,i){this._withViewEventsCollector(n=>this._cursor.setStates(n,e,t,i))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector(n=>this._cursor.setSelections(n,e,t,i))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector(t=>this._cursor.restoreState(t,e))}_executeCursorEdit(e){this._cursor.context.cursorConfig.readOnly?this._eventDispatcher.emitOutgoingEvent(new Kn):this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit(n=>this._cursor.executeEdits(n,e,t,i))}startComposition(){this._cursor.setIsDoingComposition(!0),this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._cursor.setIsDoingComposition(!1),this._executeCursorEdit(t=>this._cursor.endComposition(t,e))}type(e,t){this._executeCursorEdit(i=>this._cursor.type(i,e,t))}compositionType(e,t,i,n,s){this._executeCursorEdit(o=>this._cursor.compositionType(o,e,t,i,n,s))}paste(e,t,i,n){this._executeCursorEdit(s=>this._cursor.paste(s,e,t,i,n))}cut(e){this._executeCursorEdit(t=>this._cursor.cut(t,e))}executeCommand(e,t){this._executeCursorEdit(i=>this._cursor.executeCommand(i,e,t))}executeCommands(e,t){this._executeCursorEdit(i=>this._cursor.executeCommands(i,e,t))}revealPrimaryCursor(e,t){this._withViewEventsCollector(i=>this._cursor.revealPrimary(i,e,t,0))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new oe["a"](t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(t=>t.emitViewEvent(new Tn(e,i,null,0,!0,0)))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new oe["a"](t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(t=>t.emitViewEvent(new Tn(e,i,null,0,!0,0)))}revealRange(e,t,i,n,s){this._withViewEventsCollector(o=>o.emitViewEvent(new Tn(e,i,null,n,t,s)))}getVerticalOffsetForLineNumber(e){return this.viewLayout.getVerticalOffsetForLineNumber(e)}getScrollTop(){return this.viewLayout.getCurrentScrollTop()}setScrollTop(e,t){this.viewLayout.setScrollPosition({scrollTop:e},t)}setScrollPosition(e,t){this.viewLayout.setScrollPosition(e,t)}deltaScrollNow(e,t){this.viewLayout.deltaScrollNow(e,t)}changeWhitespace(e){const t=this.viewLayout.changeWhitespace(e);t&&(this._eventDispatcher.emitSingleViewEvent(new Pn),this._eventDispatcher.emitOutgoingEvent(new zn))}setMaxLineWidth(e){this.viewLayout.setMaxLineWidth(e)}_withViewEventsCollector(e){try{const t=this._eventDispatcher.beginEmitViewEvents();e(t)}finally{this._eventDispatcher.endEmitViewEvents()}}}var Ds=i("9e74"),Ls=i("0a0f"),xs=i("f07b"),ks=i("b0cd"),Es=i("4779"),Ns=i("3170");class Os extends Ns["a"]{constructor(e,t){super(0);for(let i=0;i<e.length;i++)this.set(e.charCodeAt(i),1);for(let i=0;i<t.length;i++)this.set(t.charCodeAt(i),2)}get(e){return e>=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let Is=[],Ts=[];class Ms{constructor(e,t){this.classifier=new Os(e,t)}static create(e){return new Ms(e.get(113),e.get(112))}createLineBreaksComputer(e,t,i,n){t|=0,i=+i;let s=[],o=[];return{addRequest:(e,t)=>{s.push(e),o.push(t)},finalize:()=>{const r=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth;let a=[];for(let e=0,l=s.length;e<l;e++){const l=o[e];a[e]=l?As(this.classifier,l,s[e],t,i,r,n):Rs(this.classifier,s[e],t,i,r,n)}return Is.length=0,Ts.length=0,a}}}}function As(e,t,i,n,s,o,r){if(-1===s)return null;const a=i.length;if(a<=1)return null;const l=t.breakOffsets,h=t.breakOffsetsVisibleColumn,c=Ws(i,n,s,o,r),d=s-c;let u=Is,g=Ts,p=0,m=0,f=0,_=s;const b=l.length;let v=0;if(v>=0){let e=Math.abs(h[v]-_);while(v+1<b){const t=Math.abs(h[v+1]-_);if(t>=e)break;e=t,v++}}while(v<b){let t=v<0?0:l[v],s=v<0?0:h[v];m>t&&(t=m,s=f);let r=0,c=0,C=0,w=0;if(s<=_){let f=s,b=0===t?0:i.charCodeAt(t-1),v=0===t?0:e.get(b),S=!0;for(let s=t;s<a;s++){const t=s,a=i.charCodeAt(s);let l,h;if(re["E"](a)?(s++,l=0,h=2):(l=e.get(a),h=Fs(a,f,n,o)),t>m&&Bs(b,v,a,l)&&(r=t,c=f),f+=h,f>_){t>m?(C=t,w=f-h):(C=s+1,w=f),f-c>d&&(r=0),S=!1;break}b=a,v=l}if(S){p>0&&(u[p]=l[l.length-1],g[p]=h[l.length-1],p++);break}}if(0===r){let a=s,l=i.charCodeAt(t),h=e.get(l),u=!1;for(let n=t-1;n>=m;n--){const t=n+1,s=i.charCodeAt(n);if(9===s){u=!0;break}let g,p;if(re["F"](s)?(n--,g=0,p=2):(g=e.get(s),p=re["D"](s)?o:1),a<=_){if(0===C&&(C=t,w=a),a<=_-d)break;if(Bs(s,g,l,h)){r=t,c=a;break}}a-=p,l=s,h=g}if(0!==r){const e=d-(w-c);if(e<=n){const t=i.charCodeAt(C);let s;s=re["E"](t)?2:Fs(t,w,n,o),e-s<0&&(r=0)}}if(u){v--;continue}}if(0===r&&(r=C,c=w),r<=m){const e=i.charCodeAt(m);re["E"](e)?(r=m+2,c=f+2):(r=m+1,c=f+Fs(e,f,n,o))}m=r,u[p]=r,f=c,g[p]=c,p++,_=c+d;while(v<0||v<b&&h[v]<c)v++;let S=Math.abs(h[v]-_);while(v+1<b){const e=Math.abs(h[v+1]-_);if(e>=S)break;S=e,v++}}return 0===p?null:(u.length=p,g.length=p,Is=t.breakOffsets,Ts=t.breakOffsetsVisibleColumn,t.breakOffsets=u,t.breakOffsetsVisibleColumn=g,t.wrappedTextIndentLength=c,t)}function Rs(e,t,i,n,s,o){if(-1===n)return null;const r=t.length;if(r<=1)return null;const a=Ws(t,i,n,s,o),l=n-a;let h=[],c=[],d=0,u=0,g=0,p=n,m=t.charCodeAt(0),f=e.get(m),_=Fs(m,0,i,s),b=1;re["E"](m)&&(_+=1,m=t.charCodeAt(1),f=e.get(m),b++);for(let v=b;v<r;v++){const n=v,o=t.charCodeAt(v);let r,a;re["E"](o)?(v++,r=0,a=2):(r=e.get(o),a=Fs(o,_,i,s)),Bs(m,f,o,r)&&(u=n,g=_),_+=a,_>p&&((0===u||_-g>l)&&(u=n,g=_-a),h[d]=u,c[d]=g,d++,p=g+l,u=0),m=o,f=r}return 0===d?null:(h[d]=r,c[d]=_,new Di["b"](h,c,a))}function Fs(e,t,i,n){return 9===e?i-t%i:re["D"](e)||e<32?n:1}function Ps(e,t){return t-e%t}function Bs(e,t,i,n){return 32!==i&&(2===t||3===t&&2!==n||1===n||3===n&&1!==t)}function Ws(e,t,i,n,s){let o=0;if(0!==s){const r=re["v"](e);if(-1!==r){for(let i=0;i<r;i++){const n=9===e.charCodeAt(i)?Ps(o,t):1;o+=n}const a=3===s?2:2===s?1:0;for(let e=0;e<a;e++){const e=Ps(o,t);o+=e}o+n>i&&(o=0)}}return o}var Vs;const js=null===(Vs=window.trustedTypes)||void 0===Vs?void 0:Vs.createPolicy("domLineBreaksComputer",{createHTML:e=>e});class Hs{static create(){return new Hs}constructor(){}createLineBreaksComputer(e,t,i,n){t|=0,i=+i;let s=[];return{addRequest:(e,t)=>{s.push(e)},finalize:()=>zs(s,e,t,i,n)}}}function zs(e,t,i,n,s){var o;if(-1===n){const t=[];for(let i=0,n=e.length;i<n;i++)t[i]=null;return t}const r=Math.round(n*t.typicalHalfwidthCharacterWidth);2!==s&&3!==s||(s=1);const a=document.createElement("div");p["a"].applyFontInfoSlow(a,t);const l=Object(Kt["a"])(1e4),h=[],c=[],d=[],u=[],g=[];for(let p=0;p<e.length;p++){const n=e[p];let o=0,a=0,m=r;if(0!==s)if(o=re["v"](n),-1===o)o=0;else{for(let t=0;t<o;t++){const e=9===n.charCodeAt(t)?i-a%i:1;a+=e}const e=Math.ceil(t.spaceWidth*a);e+t.typicalFullwidthCharacterWidth>r?(o=0,a=0):m=r-e}const f=n.substr(o),_=Us(f,a,i,m,l);h[p]=o,c[p]=a,d[p]=f,u[p]=_[0],g[p]=_[1]}const m=l.build(),f=null!==(o=null===js||void 0===js?void 0:js.createHTML(m))&&void 0!==o?o:m;a.innerHTML=f,a.style.position="absolute",a.style.top="10000",a.style.wordWrap="break-word",document.body.appendChild(a);let _=document.createRange();const b=Array.prototype.slice.call(a.children,0);let v=[];for(let p=0;p<e.length;p++){const e=b[p],t=Ks(_,e,d[p],u[p]);if(null===t){v[p]=null;continue}const i=h[p],n=c[p],s=g[p],o=[];for(let r=0,a=t.length;r<a;r++)o[r]=s[t[r]];if(0!==i)for(let r=0,a=t.length;r<a;r++)t[r]+=i;v[p]=new Di["b"](t,o,n)}return document.body.removeChild(a),v}function Us(e,t,i,n,s){s.appendASCIIString('<div style="width:'),s.appendASCIIString(String(n)),s.appendASCIIString('px;">');const o=e.length;let r=t,a=0,l=[],h=[],c=0<o?e.charCodeAt(0):0;s.appendASCIIString("<span>");for(let d=0;d<o;d++){0!==d&&d%16384===0&&s.appendASCIIString("</span><span>"),l[d]=a,h[d]=r;const t=c;c=d+1<o?e.charCodeAt(d+1):0;let n=1,u=1;switch(t){case 9:n=i-r%i,u=n;for(let e=1;e<=n;e++)e<n?s.write1(160):s.appendASCII(32);break;case 32:32===c?s.write1(160):s.appendASCII(32);break;case 60:s.appendASCIIString("&lt;");break;case 62:s.appendASCIIString("&gt;");break;case 38:s.appendASCIIString("&amp;");break;case 0:s.appendASCIIString("&#00;");break;case 65279:case 8232:case 8233:case 133:s.write1(65533);break;default:re["D"](t)&&u++,t<32?s.write1(9216+t):s.write1(t)}a+=n,r+=u}return s.appendASCIIString("</span>"),l[e.length]=a,h[e.length]=r,s.appendASCIIString("</div>"),[l,h]}function Ks(e,t,i,n){if(i.length<=1)return null;const s=Array.prototype.slice.call(t.children,0),o=[];try{$s(e,s,n,0,null,i.length-1,null,o)}catch(r){return console.log(r),null}return 0===o.length?null:(o.push(i.length),o)}function $s(e,t,i,n,s,o,r,a){if(n===o)return;if(s=s||qs(e,t,i[n],i[n+1]),r=r||qs(e,t,i[o],i[o+1]),Math.abs(s[0].top-r[0].top)<=.1)return;if(n+1===o)return void a.push(o);const l=n+(o-n)/2|0,h=qs(e,t,i[l],i[l+1]);$s(e,t,i,n,s,l,h,a),$s(e,t,i,l,h,o,r,a)}function qs(e,t,i,n){return e.setStart(t[i/16384|0].firstChild,i%16384),e.setEnd(t[n/16384|0].firstChild,n%16384),e.getClientRects()}var Gs=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Ys=function(e,t){return function(i,n){t(i,n,e)}};let Zs=0;class Xs{constructor(e,t,i,n,s){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=s}dispose(){Object(u["f"])(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let Qs=class e extends u["a"]{constructor(e,t,i,n,o,r,a,l,h,u){super(),this._onDidDispose=this._register(new d["a"]),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new d["a"]),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new d["a"]),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new d["a"]),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new d["a"]),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new d["a"]),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeConfiguration=this._register(new d["a"]),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new d["a"]),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new d["a"]),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new d["a"]),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new d["a"]),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new d["a"]),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new Js),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new Js),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new d["a"]),this.onWillType=this._onWillType.event,this._onDidType=this._register(new d["a"]),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new d["a"]),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new d["a"]),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new d["a"]),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new d["a"]),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new d["a"]),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new d["a"]),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new d["a"]),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new d["a"]),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onContextMenu=this._register(new d["a"]),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new d["a"]),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new d["a"]),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new d["a"]),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new d["a"]),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new d["a"]),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new d["a"]),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new d["a"]),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new d["a"]),this.onDidChangeViewZones=this._onDidChangeViewZones.event;const g=Object.assign({},t);let p;this._domElement=e,this._overflowWidgetsDomNode=g.overflowWidgetsDomNode,delete g.overflowWidgetsDomNode,this._id=++Zs,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this.isSimpleWidget=i.isSimpleWidget||!1,this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(g,u)),this._register(this._configuration.onDidChange(e=>{this._onDidChangeConfiguration.fire(e);const t=this._configuration.options;if(e.hasChanged(124)){const e=t.get(124);this._onDidLayoutChange.fire(e)}})),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=h,this._codeEditorService=o,this._commandService=r,this._themeService=l,this._register(new eo(this,this._contextKeyService)),this._register(new to(this,this._contextKeyService)),this._instantiationService=n.createChild(new xs["a"]([kt["b"],this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new io(e),this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())}),this._contentWidgets={},this._overlayWidgets={},p=Array.isArray(i.contributions)?i.contributions:s["d"].getEditorContributions();for(const s of p)try{const e=this._instantiationService.createInstance(s.ctor,this);this._contributions[s.id]=e}catch(m){Object(c["e"])(m)}s["d"].getEditorActions().forEach(e=>{const t=new Zn["a"](e.id,e.label,e.alias,Object(ct["m"])(e.precondition),()=>this._instantiationService.invokeFunction(t=>Promise.resolve(e.runEditorCommand(t,this,null))),this._contextKeyService);this._actions[t.id]=t}),this._codeEditorService.addCodeEditor(this)}_createConfiguration(e,t){return new p["a"](this.isSimpleWidget,e,this._domElement,t)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return Xn["a"].ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const e=Object.keys(this._contributions);for(let t=0,i=e.length;t<i;t++){const i=e[t];this._contributions[i].dispose()}this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(e){return this._instantiationService.invokeFunction(e)}updateOptions(e){this._configuration.updateOptions(e)}getOptions(){return this._configuration.options}getOption(e){return this._configuration.options.get(e)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(e){return this._modelData?_t.getWordAtPosition(this._modelData.model,this._configuration.options.get(110),e):null}getValue(e=null){if(!this._modelData)return"";const t=!(!e||!e.preserveBOM);let i=0;return e&&e.lineEnding&&"\n"===e.lineEnding?i=1:e&&e.lineEnding&&"\r\n"===e.lineEnding&&(i=2),this._modelData.model.getValue(i,t)}setValue(e){this._modelData&&this._modelData.model.setValue(e)}getModel(){return this._modelData?this._modelData.model:null}setModel(e=null){const t=e;if(null===this._modelData&&null===t)return;if(this._modelData&&this._modelData.model===t)return;const i=this.hasTextFocus(),n=this._detachModel();this._attachModel(t),i&&this.hasModel()&&this.focus();const s={oldModelUrl:n?n.uri:null,newModelUrl:t?t.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(s),this._postDetachModelCleanup(n)}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(let e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(let i in t)this._removeDecorationType(e+"-"+i)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetForPosition(e,t,i){const n=e.model.validatePosition({lineNumber:t,column:i}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(s.lineNumber)}getTopForLineNumber(t){return this._modelData?e._getVerticalOffsetForPosition(this._modelData,t,1):-1}getTopForPosition(t,i){return this._modelData?e._getVerticalOffsetForPosition(this._modelData,t,i):-1}setHiddenAreas(e){this._modelData&&this._modelData.viewModel.setHiddenAreas(e.map(e=>oe["a"].lift(e)))}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return ve.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e){if(this._modelData){if(!se["a"].isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections("api",[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!oe["a"].isIRange(e))throw new Error("Invalid arguments");const s=this._modelData.model.validateRange(e),o=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(s);this._modelData.viewModel.revealRange("api",i,o,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if("number"!==typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new oe["a"](e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!se["a"].isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new oe["a"](e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e){const t=_["a"].isISelection(e),i=oe["a"].isIRange(e);if(!t&&!i)throw new Error("Invalid arguments");if(t)this._setSelectionImpl(e);else if(i){const t={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(t)}}_setSelectionImpl(e){if(!this._modelData)return;const t=new _["a"](e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections("api",[t])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if("number"!==typeof e||"number"!==typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new oe["a"](e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!oe["a"].isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(oe["a"].lift(e),t,i,n)}setSelections(e,t="api",i=0){if(this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments");for(let t=0,i=e.length;t<i;t++)if(!_["a"].isISelection(e[t]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,e,i)}}getContentWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getContentWidth():-1}getScrollWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollWidth():-1}getScrollLeft(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollLeft():-1}getContentHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getContentHeight():-1}getScrollHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollHeight():-1}getScrollTop(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollTop():-1}setScrollLeft(e,t=1){if(this._modelData){if("number"!==typeof e)throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollLeft:e},t)}}setScrollTop(e,t=1){if(this._modelData){if("number"!==typeof e)throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollTop:e},t)}}setScrollPosition(e,t=1){this._modelData&&this._modelData.viewModel.setScrollPosition(e,t)}saveViewState(){if(!this._modelData)return null;const e={},t=Object.keys(this._contributions);for(const s of t){const t=this._contributions[s];"function"===typeof t.saveViewState&&(e[s]=t.saveViewState())}const i=this._modelData.viewModel.saveCursorState(),n=this._modelData.viewModel.saveState();return{cursorState:i,viewState:n,contributionsState:e}}restoreViewState(e){if(!this._modelData||!this._modelData.hasRealView)return;const t=e;if(t&&t.cursorState&&t.viewState){const e=t.cursorState;Array.isArray(e)?this._modelData.viewModel.restoreCursorState(e):this._modelData.viewModel.restoreCursorState([e]);const i=t.contributionsState||{},n=Object.keys(this._contributions);for(let t=0,o=n.length;t<o;t++){const e=n[t],s=this._contributions[e];"function"===typeof s.restoreViewState&&s.restoreViewState(i[e])}const s=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(s)}}getContribution(e){return this._contributions[e]||null}getActions(){const e=[],t=Object.keys(this._actions);for(let i=0,n=t.length;i<n;i++){const n=t[i];e.push(this._actions[n])}return e}getSupportedActions(){let e=this.getActions();return e=e.filter(e=>e.isSupported()),e}getAction(e){return this._actions[e]||null}trigger(e,t,i){switch(i=i||{},t){case"compositionStart":return void this._startComposition();case"compositionEnd":return void this._endComposition(e);case"type":{const t=i;return void this._type(e,t.text||"")}case"replacePreviousChar":{const t=i;return void this._compositionType(e,t.text||"",t.replaceCharCnt||0,0,0)}case"compositionType":{const t=i;return void this._compositionType(e,t.text||"",t.replacePrevCharCnt||0,t.replaceNextCharCnt||0,t.positionDelta||0)}case"paste":{const t=i;return void this._paste(e,t.text||"",t.pasteOnNewLine||!1,t.multicursorText||null,t.mode||null)}case"cut":return void this._cut(e)}const n=this.getAction(t);n?Promise.resolve(n.run()).then(void 0,c["e"]):this._modelData&&(this._triggerEditorCommand(e,t,i)||this._commandService.executeCommand(t,i))}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){this._modelData&&0!==t.length&&("keyboard"===e&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),"keyboard"===e&&this._onDidType.fire(t))}_compositionType(e,t,i,n,s){this._modelData&&this._modelData.viewModel.compositionType(t,i,n,s,e)}_paste(e,t,i,n,s){if(!this._modelData||0===t.length)return;const o=this._modelData.viewModel.getSelection().getStartPosition();this._modelData.viewModel.paste(t,i,n,e);const r=this._modelData.viewModel.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({range:new oe["a"](o.lineNumber,o.column,r.lineNumber,r.column),mode:s})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=s["d"].getEditorCommand(t);return!!n&&(i=i||{},i.source=e,this._instantiationService.invokeFunction(e=>{Promise.resolve(n.runEditorCommand(e,this,i)).then(void 0,c["e"])}),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!!this._modelData&&(!this._configuration.options.get(75)&&(this._modelData.model.pushStackElement(),!0))}popUndoStop(){return!!this._modelData&&(!this._configuration.options.get(75)&&(this._modelData.model.popStackElement(),!0))}executeEdits(e,t,i){if(!this._modelData)return!1;if(this._configuration.options.get(75))return!1;let n;return n=i?Array.isArray(i)?()=>i:i:()=>null,this._modelData.viewModel.executeEdits(e,t,n),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,Object($["m"])(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?0===e.length&&0===t.length?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){const t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){const e=this._configuration.options,t=e.get(124);return t}createOverviewRuler(e){return this._modelData&&this._modelData.hasRealView?this._modelData.view.createOverviewRuler(e):null}getContainerDomNode(){return this._domElement}getDomNode(){return this._modelData&&this._modelData.hasRealView?this._modelData.view.domNode.domNode:null}delegateVerticalScrollbarMouseDown(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateVerticalScrollbarMouseDown(e)}layout(e){this._configuration.observeReferenceElement(e),this.render()}focus(){this._modelData&&this._modelData.hasRealView&&this._modelData.view.focus()}hasTextFocus(){return!(!this._modelData||!this._modelData.hasRealView)&&this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const e=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(e)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const e=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(e)}}changeViewZones(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getTargetAtClientPoint(e,t):null}getScrolledVisiblePosition(t){if(!this._modelData||!this._modelData.hasRealView)return null;const i=this._modelData.model.validatePosition(t),n=this._configuration.options,s=n.get(124),o=e._getVerticalOffsetForPosition(this._modelData,i.lineNumber,i.column)-this.getScrollTop(),r=this._modelData.view.getOffsetForColumn(i.lineNumber,i.column)+s.glyphMarginWidth+s.lineNumbersWidth+s.decorationsWidth-this.getScrollLeft();return{top:o,left:r,height:n.get(53)}}getOffsetForColumn(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getOffsetForColumn(e,t):-1}render(e=!1){this._modelData&&this._modelData.hasRealView&&this._modelData.view.render(!0,e)}setAriaOptions(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}applyFontInfo(e){p["a"].applyFontInfoSlow(e,this._configuration.options.get(38))}_attachModel(e){if(!e)return void(this._modelData=null);const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setMaxLineNumber(e.getLineCount()),e.onBeforeAttached();const i=new ys(this._id,this._configuration,e,Hs.create(),Ms.create(this._configuration.options),e=>h["Q"](e));t.push(e.onDidChangeDecorations(e=>this._onDidChangeModelDecorations.fire(e))),t.push(e.onDidChangeLanguage(t=>{this._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),this._onDidChangeModelLanguage.fire(t)})),t.push(e.onDidChangeLanguageConfiguration(e=>this._onDidChangeModelLanguageConfiguration.fire(e))),t.push(e.onDidChangeContent(e=>this._onDidChangeModelContent.fire(e))),t.push(e.onDidChangeOptions(e=>this._onDidChangeModelOptions.fire(e))),t.push(e.onWillDispose(()=>this.setModel(null))),t.push(i.onEvent(e=>{switch(e.kind){case 0:this._onDidContentSizeChange.fire(e);break;case 1:this._editorTextFocus.setValue(e.hasFocus);break;case 2:this._onDidScrollChange.fire(e);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidAttemptReadOnlyEdit.fire();break;case 5:{e.reachedMaxCursorCount&&this._notificationService.warn(l["a"]("cursors.maximum","The number of cursors has been limited to {0}.",Gn.MAX_CURSOR_COUNT));const t=[];for(let s=0,o=e.selections.length;s<o;s++)t[s]=e.selections[s].getPosition();const i={position:t[0],secondaryPositions:t.slice(1),reason:e.reason,source:e.source};this._onDidChangeCursorPosition.fire(i);const n={selection:e.selections[0],secondarySelections:e.selections.slice(1),modelVersionId:e.modelVersionId,oldSelections:e.oldSelections,oldModelVersionId:e.oldModelVersionId,source:e.source,reason:e.reason};this._onDidChangeCursorSelection.fire(n);break}}}));const[n,s]=this._createView(i);if(s){this._domElement.appendChild(n.domNode.domNode);let t=Object.keys(this._contentWidgets);for(let e=0,i=t.length;e<i;e++){const i=t[e];n.addContentWidget(this._contentWidgets[i])}t=Object.keys(this._overlayWidgets);for(let e=0,i=t.length;e<i;e++){const i=t[e];n.addOverlayWidget(this._overlayWidgets[i])}n.render(!1,!0),n.domNode.domNode.setAttribute("data-uri",e.uri.toString())}this._modelData=new Xs(e,i,n,s,t)}_createView(e){let t;t=this.isSimpleWidget?{paste:(e,t,i,n)=>{this._paste("keyboard",e,t,i,n)},type:e=>{this._type("keyboard",e)},compositionType:(e,t,i,n)=>{this._compositionType("keyboard",e,t,i,n)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:{paste:(e,t,i,n)=>{const s={text:e,pasteOnNewLine:t,multicursorText:i,mode:n};this._commandService.executeCommand("paste",s)},type:e=>{const t={text:e};this._commandService.executeCommand("type",t)},compositionType:(e,t,i,n)=>{if(i||n){const s={text:e,replacePrevCharCnt:t,replaceNextCharCnt:i,positionDelta:n};this._commandService.executeCommand("compositionType",s)}else{const i={text:e,replaceCharCnt:t};this._commandService.executeCommand("replacePreviousChar",i)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new Ht(e.coordinatesConverter);i.onKeyDown=e=>this._onKeyDown.fire(e),i.onKeyUp=e=>this._onKeyUp.fire(e),i.onContextMenu=e=>this._onContextMenu.fire(e),i.onMouseMove=e=>this._onMouseMove.fire(e),i.onMouseLeave=e=>this._onMouseLeave.fire(e),i.onMouseDown=e=>this._onMouseDown.fire(e),i.onMouseUp=e=>this._onMouseUp.fire(e),i.onMouseDrag=e=>this._onMouseDrag.fire(e),i.onMouseDrop=e=>this._onMouseDrop.fire(e),i.onMouseDropCanceled=e=>this._onMouseDropCanceled.fire(e),i.onMouseWheel=e=>this._onMouseWheel.fire(e);const n=new fn(t,this._configuration,this._themeService,e,i,this._overflowWidgetsDomNode);return[n,!0]}_postDetachModelCleanup(e){e&&e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return null!==this._modelData}};Qs=Gs([Ys(3,Ls["a"]),Ys(4,m["a"]),Ys(5,Ds["b"]),Ys(6,kt["b"]),Ys(7,Je["b"]),Ys(8,ks["a"]),Ys(9,Es["b"])],Qs);class Js extends u["a"]{constructor(){super(),this._onDidChangeToTrue=this._register(new d["a"]),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new d["a"]),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())}}class eo extends u["a"]{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=xt["a"].editorSimpleInput.bindTo(t),this._editorFocus=xt["a"].focus.bindTo(t),this._textInputFocus=xt["a"].textInputFocus.bindTo(t),this._editorTextFocus=xt["a"].editorTextFocus.bindTo(t),this._editorTabMovesFocus=xt["a"].tabMovesFocus.bindTo(t),this._editorReadonly=xt["a"].readOnly.bindTo(t),this._inDiffEditor=xt["a"].inDiffEditor.bindTo(t),this._editorColumnSelection=xt["a"].columnSelection.bindTo(t),this._hasMultipleSelections=xt["a"].hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=xt["a"].hasNonEmptySelection.bindTo(t),this._canUndo=xt["a"].canUndo.bindTo(t),this._canRedo=xt["a"].canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._editorTabMovesFocus.set(e.get(123)),this._editorReadonly.set(e.get(75)),this._inDiffEditor.set(e.get(49)),this._editorColumnSelection.set(e.get(15))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(e=>!e.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class to extends u["a"]{constructor(e,t){super(),this._editor=e,this._contextKeyService=t,this._langId=xt["a"].languageId.bindTo(t),this._hasCompletionItemProvider=xt["a"].hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=xt["a"].hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=xt["a"].hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=xt["a"].hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=xt["a"].hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=xt["a"].hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=xt["a"].hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=xt["a"].hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=xt["a"].hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=xt["a"].hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=xt["a"].hasReferenceProvider.bindTo(t),this._hasRenameProvider=xt["a"].hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=xt["a"].hasSignatureHelpProvider.bindTo(t),this._hasInlineHintsProvider=xt["a"].hasInlineHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=xt["a"].hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=xt["a"].hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=xt["a"].hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=xt["a"].hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=xt["a"].isInWalkThroughSnippet.bindTo(t);const i=()=>this._update();this._register(e.onDidChangeModel(i)),this._register(e.onDidChangeModelLanguage(i)),this._register(Si["d"].onDidChange(i)),this._register(Si["a"].onDidChange(i)),this._register(Si["b"].onDidChange(i)),this._register(Si["f"].onDidChange(i)),this._register(Si["e"].onDidChange(i)),this._register(Si["p"].onDidChange(i)),this._register(Si["B"].onDidChange(i)),this._register(Si["o"].onDidChange(i)),this._register(Si["h"].onDidChange(i)),this._register(Si["l"].onDidChange(i)),this._register(Si["v"].onDidChange(i)),this._register(Si["w"].onDidChange(i)),this._register(Si["g"].onDidChange(i)),this._register(Si["i"].onDidChange(i)),this._register(Si["y"].onDidChange(i)),this._register(Si["q"].onDidChange(i)),i()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.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()})}_update(){const e=this._editor.getModel();e?this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageIdentifier().language),this._hasCompletionItemProvider.set(Si["d"].has(e)),this._hasCodeActionsProvider.set(Si["a"].has(e)),this._hasCodeLensProvider.set(Si["b"].has(e)),this._hasDefinitionProvider.set(Si["f"].has(e)),this._hasDeclarationProvider.set(Si["e"].has(e)),this._hasImplementationProvider.set(Si["p"].has(e)),this._hasTypeDefinitionProvider.set(Si["B"].has(e)),this._hasHoverProvider.set(Si["o"].has(e)),this._hasDocumentHighlightProvider.set(Si["h"].has(e)),this._hasDocumentSymbolProvider.set(Si["l"].has(e)),this._hasReferenceProvider.set(Si["v"].has(e)),this._hasRenameProvider.set(Si["w"].has(e)),this._hasSignatureHelpProvider.set(Si["y"].has(e)),this._hasInlineHintsProvider.set(Si["q"].has(e)),this._hasDocumentFormattingProvider.set(Si["g"].has(e)||Si["i"].has(e)),this._hasDocumentSelectionFormattingProvider.set(Si["i"].has(e)),this._hasMultipleDocumentFormattingProvider.set(Si["g"].all(e).length+Si["i"].all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(Si["i"].all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===g["c"].walkThroughSnippet)}):this.reset()}}class io extends u["a"]{constructor(e){super(),this._onChange=this._register(new d["a"]),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(h["T"](e)),this._register(this._domFocusTracker.onDidFocus(()=>{this._hasFocus=!0,this._onChange.fire(void 0)})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasFocus=!1,this._onChange.fire(void 0)}))}hasFocus(){return this._hasFocus}}const no=encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),so=encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function oo(e){return no+encodeURIComponent(e.toString())+so}const ro=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),ao=encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');function lo(e){return ro+encodeURIComponent(e.toString())+ao}Object(Je["f"])((e,t)=>{const i=e.getColor(Li["s"]);i&&t.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${i}; }`);const n=e.getColor(Li["t"]);n&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${oo(n)}") repeat-x bottom left; }`);const s=e.getColor(Li["r"]);s&&t.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${s}; }`);const o=e.getColor(Li["L"]);o&&t.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${o}; }`);const r=e.getColor(Li["M"]);r&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${oo(r)}") repeat-x bottom left; }`);const a=e.getColor(Li["K"]);a&&t.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${a}; }`);const l=e.getColor(Li["F"]);l&&t.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${l}; }`);const h=e.getColor(Li["G"]);h&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${oo(h)}") repeat-x bottom left; }`);const c=e.getColor(Li["E"]);c&&t.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${c}; }`);const d=e.getColor(Li["B"]);d&&t.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${d}; }`);const u=e.getColor(Li["C"]);u&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${lo(u)}") no-repeat bottom left; }`);const g=e.getColor(Qe["m"]);g&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${g.rgba.a}; }`);const p=e.getColor(Qe["l"]);p&&t.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${p}; }`);const m=e.getColor(Li["A"])||"inherit";t.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${m}}`)})},"9c3e":function(e,t,i){"use strict";i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return s}));class n{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const s=new n("id#")},"9c41":function(e,t,i){"use strict";var n;i.d(t,"a",(function(){return n})),function(e){e["DARK"]="dark",e["LIGHT"]="light",e["HIGH_CONTRAST"]="hc"}(n||(n={}))},"9e74":function(e,t,i){"use strict";i.d(t,"b",(function(){return h})),i.d(t,"a",(function(){return c}));var n=i("a666"),s=i("ef8e"),o=i("0a0f"),r=i("308f"),a=i("db88"),l=i("258a");const h=Object(o["c"])("commandService"),c=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new r["a"],this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,t){if(!e)throw new Error("invalid command");if("string"===typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.description){const t=[];for(let n of e.description.args)t.push(n.constraint);const i=e.handler;e.handler=function(e,...n){return Object(s["l"])(n,t),i(e,...n)}}const{id:i}=e;let o=this._commands.get(i);o||(o=new a["a"],this._commands.set(i,o));let r=o.unshift(e),l=Object(n["h"])(()=>{r();const e=this._commands.get(i);(null===e||void 0===e?void 0:e.isEmpty())&&this._commands.delete(i)});return this._onDidRegisterCommand.fire(i),l}registerCommandAlias(e,t){return c.registerCommand(e,(e,...i)=>e.get(h).executeCommand(t,...i))}getCommand(e){const t=this._commands.get(e);if(t&&!t.isEmpty())return l["a"].first(t)}getCommands(){const e=new Map;for(const t of this._commands.keys()){const i=this.getCommand(t);i&&e.set(t,i)}return e}}},"9eb8":function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var n=i("fe45"),s=i("30db"),o=i("9e74"),r=i("89cd");class a{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(1===s["a"]){if(e&&e.win)return e.win}else if(2===s["a"]){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const t=a.bindToCurrentPlatform(e);if(t&&t.primary){const i=Object(n["f"])(t.primary,s["a"]);i&&this._registerDefaultKeybinding(i,e.id,e.args,e.weight,0,e.when)}if(t&&Array.isArray(t.secondary))for(let i=0,o=t.secondary.length;i<o;i++){const o=t.secondary[i],r=Object(n["f"])(o,s["a"]);r&&this._registerDefaultKeybinding(r,e.id,e.args,e.weight,-i-1,e.when)}}registerCommandAndKeybindingRule(e){this.registerKeybindingRule(e),o["a"].registerCommand(e)}static _mightProduceChar(e){return e>=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))}_assertNoCtrlAlt(e,t){e.ctrlKey&&e.altKey&&!e.metaKey&&a._mightProduceChar(e.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",e," for ",t)}_registerDefaultKeybinding(e,t,i,n,o,r){1===s["a"]&&this._assertNoCtrlAlt(e.parts[0],t),this._coreKeybindings.push({keybinding:e,command:t,commandArgs:i,when:r,weight1:n,weight2:o,extensionId:null,isBuiltinExtension:!1}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(c)),this._cachedMergedKeybindings.slice(0)}}const l=new a,h={EditorModes:"platform.keybindingsRegistry"};function c(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.command<t.command?-1:e.command>t.command?1:e.weight2-t.weight2}r["a"].add(h.EditorModes,l)},"9ee1":function(e,t,i){"use strict";var n;i.d(t,"a",(function(){return n})),function(e){function t(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};const i=Math.max(e.start,t.start),n=Math.min(e.end,t.end);return n-i<=0?{start:0,end:0}:{start:i,end:n}}function i(e){return e.end-e.start<=0}function n(e,n){return!i(t(e,n))}function s(e,t){const n=[],s={start:e.start,end:Math.min(t.start,e.end)},o={start:Math.max(t.end,e.start),end:e.end};return i(s)||n.push(s),i(o)||n.push(o),n}e.intersect=t,e.isEmpty=i,e.intersects=n,e.relativeComplement=s}(n||(n={}))},a054:function(e,t,i){"use strict";i.d(t,"b",(function(){return m})),i.d(t,"a",(function(){return f}));var n=i("dff7"),s=i("fdcc"),o=i("8025"),r=i("6d8e"),a=i("e6793"),l=i("1e93"),h=i("82c9");function c(e){return e.toString()}class d{constructor(e,t,i,n,s,o,r){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=i,this.afterEOL=n,this.beforeCursorState=s,this.afterCursorState=o,this.changes=r}static create(e,t){const i=e.getAlternativeVersionId(),n=p(e);return new d(i,i,n,n,t,t,[])}append(e,t,i,n,s){t.length>0&&(this.changes=Object(a["b"])(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=s}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(l["f"](e,t?t.length:0,i),i+=4,t)for(const n of t)l["f"](e,n.selectionStartLineNumber,i),i+=4,l["f"](e,n.selectionStartColumn,i),i+=4,l["f"](e,n.positionLineNumber,i),i+=4,l["f"](e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=l["c"](e,t);t+=4;for(let s=0;s<n;s++){const n=l["c"](e,t);t+=4;const s=l["c"](e,t);t+=4;const r=l["c"](e,t);t+=4;const a=l["c"](e,t);t+=4,i.push(new o["a"](n,s,r,a))}return t}serialize(){let e=10+d._writeSelectionsSize(this.beforeCursorState)+d._writeSelectionsSize(this.afterCursorState)+4;for(const n of this.changes)e+=n.writeSize();const t=new Uint8Array(e);let i=0;l["f"](t,this.beforeVersionId,i),i+=4,l["f"](t,this.afterVersionId,i),i+=4,l["g"](t,this.beforeEOL,i),i+=1,l["g"](t,this.afterEOL,i),i+=1,i=d._writeSelections(t,this.beforeCursorState,i),i=d._writeSelections(t,this.afterCursorState,i),l["f"](t,this.changes.length,i),i+=4;for(const n of this.changes)i=n.write(t,i);return t.buffer}static deserialize(e){const t=new Uint8Array(e);let i=0;const n=l["c"](t,i);i+=4;const s=l["c"](t,i);i+=4;const o=l["d"](t,i);i+=1;const r=l["d"](t,i);i+=1;const h=[];i=d._readSelections(t,i,h);const c=[];i=d._readSelections(t,i,c);const u=l["c"](t,i);i+=4;const g=[];for(let l=0;l<u;l++)i=a["a"].read(t,i,g);return new d(n,s,o,r,h,c,g)}}class u{constructor(e,t){this.model=e,this._data=d.create(e,t)}get type(){return 0}get resource(){return r["a"].isUri(this.model)?this.model:this.model.uri}get label(){return n["a"]("edit","Typing")}toString(){const e=this._data instanceof d?this._data:d.deserialize(this._data);return e.changes.map(e=>e.toString()).join(", ")}matchesResource(e){const t=r["a"].isUri(this.model)?this.model:this.model.uri;return t.toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof d}append(e,t,i,n,s){this._data instanceof d&&this._data.append(e,t,i,n,s)}close(){this._data instanceof d&&(this._data=this._data.serialize())}open(){this._data instanceof d||(this._data=d.deserialize(this._data))}undo(){if(r["a"].isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof d&&(this._data=this._data.serialize());const e=d.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(r["a"].isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof d&&(this._data=this._data.serialize());const e=d.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof d&&(this._data=this._data.serialize()),this._data.byteLength+168}}class g{constructor(e,t){this.type=1,this.label=e,this._isOpen=!0,this._editStackElementsArr=t.slice(0),this._editStackElementsMap=new Map;for(const i of this._editStackElementsArr){const e=c(i.resource);this._editStackElementsMap.set(e,i)}this._delegate=null}get resources(){return this._editStackElementsArr.map(e=>e.resource)}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=c(e);return this._editStackElementsMap.has(t)}setModel(e){const t=c(r["a"].isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=c(e.uri);if(this._editStackElementsMap.has(t)){const i=this._editStackElementsMap.get(t);return i.canAppend(e)}return!1}append(e,t,i,n,s){const o=c(e.uri),r=this._editStackElementsMap.get(o);r.append(e,t,i,n,s)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=c(e);if(this._editStackElementsMap.has(t)){const e=this._editStackElementsMap.get(t);return e.heapSize()}return 0}split(){return this._editStackElementsArr}toString(){let e=[];for(const t of this._editStackElementsArr)e.push(`${Object(h["b"])(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function p(e){const t=e.getEOL();return"\n"===t?0:1}function m(e){return!!e&&(e instanceof u||e instanceof g)}class f{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);m(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);m(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){const t=this._undoRedoService.getLastElement(this._model.uri);if(m(t)&&t.canAppend(this._model))return t;const i=new u(this._model,e);return this._undoRedoService.pushElement(i),i}pushEOL(e){const t=this._getOrCreateEditStackElement(null);this._model.setEOL(e),t.append(this._model,[],p(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i){const n=this._getOrCreateEditStackElement(e),s=this._model.applyEdits(t,!0),o=f._computeCursorState(i,s),r=s.map((e,t)=>({index:t,textChange:e.textChange}));return r.sort((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition),n.append(this._model,r.map(e=>e.textChange),p(this._model),this._model.getAlternativeVersionId(),o),o}static _computeCursorState(e,t){try{return e?e(t):null}catch(i){return Object(s["e"])(i),null}}}},a106:function(e,t,i){"use strict";i.r(t),i.d(t,"getSelectionSearchString",(function(){return vt})),i.d(t,"CommonFindController",(function(){return Ct})),i.d(t,"FindController",(function(){return wt})),i.d(t,"StartFindAction",(function(){return St})),i.d(t,"StartFindWithSelectionAction",(function(){return yt})),i.d(t,"MatchFindAction",(function(){return Dt})),i.d(t,"NextMatchFindAction",(function(){return Lt})),i.d(t,"NextMatchFindAction2",(function(){return xt})),i.d(t,"PreviousMatchFindAction",(function(){return kt})),i.d(t,"PreviousMatchFindAction2",(function(){return Et})),i.d(t,"SelectionMatchFindAction",(function(){return Nt})),i.d(t,"NextSelectionMatchFindAction",(function(){return Ot})),i.d(t,"PreviousSelectionMatchFindAction",(function(){return It})),i.d(t,"StartFindReplaceAction",(function(){return Tt}));var n=i("dff7"),s=i("5fe7"),o=i("a666"),r=i("3742"),a=i("b2cc"),l=i("c101"),h=i("2c29"),c=i("7061"),d=i("6a89"),u=i("8025"),g=i("8c02"),p=i("3352"),m=i("b57f"),f=i("303e"),_=i("b7d0");class b{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.deltaDecorations(this._allDecorations(),[]),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map(e=>this._editor.getModel().getDecorationRange(e)).filter(e=>!!e);if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getCurrentMatchesPosition(e){let t=this._editor.getModel().getDecorationsInRange(e);for(const i of t){const e=i.options;if(e===b._FIND_MATCH_DECORATION||e===b._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(i.id)}return 0}setCurrentFindMatch(e){let t=null,i=0;if(e)for(let n=0,s=this._decorations.length;n<s;n++){let s=this._editor.getModel().getDecorationRange(this._decorations[n]);if(e.equalsRange(s)){t=this._decorations[n],i=n+1;break}}return null===this._highlightedDecorationId&&null===t||this._editor.changeDecorations(e=>{if(null!==this._highlightedDecorationId&&(e.changeDecorationOptions(this._highlightedDecorationId,b._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),null!==t&&(this._highlightedDecorationId=t,e.changeDecorationOptions(this._highlightedDecorationId,b._CURRENT_FIND_MATCH_DECORATION)),null!==this._rangeHighlightDecorationId&&(e.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),null!==t){let i=this._editor.getModel().getDecorationRange(t);if(i.startLineNumber!==i.endLineNumber&&1===i.endColumn){let e=i.endLineNumber-1,t=this._editor.getModel().getLineMaxColumn(e);i=new d["a"](i.startLineNumber,i.startColumn,e,t)}this._rangeHighlightDecorationId=e.addDecoration(i,b._RANGE_HIGHLIGHT_DECORATION)}}),i}set(e,t){this._editor.changeDecorations(i=>{let n=b._FIND_MATCH_DECORATION,s=[];if(e.length>1e3){n=b._FIND_MATCH_NO_OVERVIEW_DECORATION;const t=this._editor.getModel().getLineCount(),i=this._editor.getLayoutInfo().height,o=i/t,r=Math.max(2,Math.ceil(3/o));let a=e[0].range.startLineNumber,l=e[0].range.endLineNumber;for(let n=1,h=e.length;n<h;n++){const t=e[n].range;l+r>=t.startLineNumber?t.endLineNumber>l&&(l=t.endLineNumber):(s.push({range:new d["a"](a,1,l,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),a=t.startLineNumber,l=t.endLineNumber)}s.push({range:new d["a"](a,1,l,1),options:b._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let o=new Array(e.length);for(let t=0,r=e.length;t<r;t++)o[t]={range:e[t].range,options:n};this._decorations=i.deltaDecorations(this._decorations,o),this._overviewRulerApproximateDecorations=i.deltaDecorations(this._overviewRulerApproximateDecorations,s),this._rangeHighlightDecorationId&&(i.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(e=>i.removeDecoration(e)),this._findScopeDecorationIds=[]),(null===t||void 0===t?void 0:t.length)&&(this._findScopeDecorationIds=t.map(e=>i.addDecoration(e,b._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(0===this._decorations.length)return null;for(let t=this._decorations.length-1;t>=0;t--){let i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(n&&!(n.endLineNumber>e.lineNumber)){if(n.endLineNumber<e.lineNumber)return n;if(!(n.endColumn>e.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(0===this._decorations.length)return null;for(let t=0,i=this._decorations.length;t<i;t++){let i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(n&&!(n.startLineNumber<e.lineNumber)){if(n.startLineNumber>e.lineNumber)return n;if(!(n.startColumn<e.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let e=[];return e=e.concat(this._decorations),e=e.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&e.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&e.push(this._rangeHighlightDecorationId),e}}b._CURRENT_FIND_MATCH_DECORATION=m["a"].register({stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:Object(_["g"])(f["Ob"]),position:p["d"].Center},minimap:{color:Object(_["g"])(f["Ib"]),position:p["c"].Inline}}),b._FIND_MATCH_DECORATION=m["a"].register({stickiness:1,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:Object(_["g"])(f["Ob"]),position:p["d"].Center},minimap:{color:Object(_["g"])(f["Ib"]),position:p["c"].Inline}}),b._FIND_MATCH_NO_OVERVIEW_DECORATION=m["a"].register({stickiness:1,className:"findMatch",showIfCollapsed:!0}),b._FIND_MATCH_ONLY_OVERVIEW_DECORATION=m["a"].register({stickiness:1,overviewRuler:{color:Object(_["g"])(f["Ob"]),position:p["d"].Center}}),b._RANGE_HIGHLIGHT_DECORATION=m["a"].register({stickiness:1,className:"rangeHighlight",isWholeLine:!0}),b._FIND_SCOPE_DECORATION=m["a"].register({className:"findScope",isWholeLine:!0});class v{constructor(e,t,i){this._editorSelection=e,this._ranges=t,this._replaceStrings=i,this._trackedEditorSelectionId=null}getEditOperations(e,t){if(this._ranges.length>0){let e=[];for(let t=0;t<this._ranges.length;t++)e.push({range:this._ranges[t],text:this._replaceStrings[t]});e.sort((e,t)=>d["a"].compareRangesUsingStarts(e.range,t.range));let i=[],n=e[0];for(let t=1;t<e.length;t++)n.range.endLineNumber===e[t].range.startLineNumber&&n.range.endColumn===e[t].range.startColumn?(n.range=n.range.plusRange(e[t].range),n.text=n.text+e[t].text):(i.push(n),n=e[t]);i.push(n);for(const s of i)t.addEditOperation(s.range,s.text)}this._trackedEditorSelectionId=t.trackSelection(this._editorSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._trackedEditorSelectionId)}}function C(e,t){if(e&&""!==e[0]){const i=w(e,t,"-"),n=w(e,t,"_");return i&&!n?S(e,t,"-"):!i&&n?S(e,t,"_"):e[0].toUpperCase()===e[0]?t.toUpperCase():e[0].toLowerCase()===e[0]?t.toLowerCase():r["o"](e[0][0])&&t.length>0?t[0].toUpperCase()+t.substr(1):t}return t}function w(e,t,i){const n=-1!==e[0].indexOf(i)&&-1!==t.indexOf(i);return n&&e[0].split(i).length===t.split(i).length}function S(e,t,i){const n=t.split(i),s=e[0].split(i);let o="";return n.forEach((e,t)=>{o+=C([s[t]],e)+i}),o.slice(0,-1)}class y{constructor(e){this.staticValue=e,this.kind=0}}class D{constructor(e){this.pieces=e,this.kind=1}}class L{constructor(e){e&&0!==e.length?1===e.length&&null!==e[0].staticValue?this._state=new y(e[0].staticValue):this._state=new D(e):this._state=new y("")}static fromStaticValue(e){return new L([x.staticValue(e)])}get hasReplacementPatterns(){return 1===this._state.kind}buildReplaceString(e,t){if(0===this._state.kind)return t?C(e,this._state.staticValue):this._state.staticValue;let i="";for(let n=0,s=this._state.pieces.length;n<s;n++){let t=this._state.pieces[n];if(null!==t.staticValue){i+=t.staticValue;continue}let s=L._substitute(t.matchIndex,e);if(null!==t.caseOps&&t.caseOps.length>0){let e=[],i=t.caseOps.length,n=0;for(let o=0,r=s.length;o<r;o++){if(n>=i){e.push(s.slice(o));break}switch(t.caseOps[n]){case"U":e.push(s[o].toUpperCase());break;case"u":e.push(s[o].toUpperCase()),n++;break;case"L":e.push(s[o].toLowerCase());break;case"l":e.push(s[o].toLowerCase()),n++;break;default:e.push(s[o])}}s=e.join("")}i+=s}return i}static _substitute(e,t){if(null===t)return"";if(0===e)return t[0];let i="";while(e>0){if(e<t.length){let n=t[e]||"";return n+i}i=String(e%10)+i,e=Math.floor(e/10)}return"$"+i}}class x{constructor(e,t,i){this.staticValue=e,this.matchIndex=t,i&&0!==i.length?this.caseOps=i.slice(0):this.caseOps=null}static staticValue(e){return new x(e,-1,null)}static caseOps(e,t){return new x(null,e,t)}}class k{constructor(e){this._source=e,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(e){this._emitStatic(this._source.substring(this._lastCharIndex,e)),this._lastCharIndex=e}emitStatic(e,t){this._emitStatic(e),this._lastCharIndex=t}_emitStatic(e){0!==e.length&&(this._currentStaticPiece+=e)}emitMatchIndex(e,t,i){0!==this._currentStaticPiece.length&&(this._result[this._resultLen++]=x.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=x.caseOps(e,i),this._lastCharIndex=t}finalize(){return this.emitUnchanged(this._source.length),0!==this._currentStaticPiece.length&&(this._result[this._resultLen++]=x.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new L(this._result)}}function E(e){if(!e||0===e.length)return new L(null);let t=[],i=new k(e);for(let n=0,s=e.length;n<s;n++){let o=e.charCodeAt(n);if(92!==o){if(36===o){if(n++,n>=s)break;let o=e.charCodeAt(n);if(36===o){i.emitUnchanged(n-1),i.emitStatic("$",n+1);continue}if(48===o||38===o){i.emitUnchanged(n-1),i.emitMatchIndex(0,n+1,t),t.length=0;continue}if(49<=o&&o<=57){let r=o-48;if(n+1<s){let s=e.charCodeAt(n+1);if(48<=s&&s<=57){n++,r=10*r+(s-48),i.emitUnchanged(n-2),i.emitMatchIndex(r,n+1,t),t.length=0;continue}}i.emitUnchanged(n-1),i.emitMatchIndex(r,n+1,t),t.length=0;continue}}}else{if(n++,n>=s)break;let o=e.charCodeAt(n);switch(o){case 92:i.emitUnchanged(n-1),i.emitStatic("\\",n+1);break;case 110:i.emitUnchanged(n-1),i.emitStatic("\n",n+1);break;case 116:i.emitUnchanged(n-1),i.emitStatic("\t",n+1);break;case 117:case 85:case 108:case 76:i.emitUnchanged(n-1),i.emitStatic("",n+1),t.push(String.fromCharCode(o));break}}}return i.finalize()}var N=i("4fc3"),O=i("e8e3");const I=new N["c"]("findWidgetVisible",!1),T=new N["c"]("findInputFocussed",!1),M=new N["c"]("replaceInputFocussed",!1),A={primary:545,mac:{primary:2593}},R={primary:565,mac:{primary:2613}},F={primary:560,mac:{primary:2608}},P={primary:554,mac:{primary:2602}},B={primary:558,mac:{primary:2606}},W={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},V=19999,j=240;class H{constructor(e,t){this._toDispose=new o["b"],this._editor=e,this._state=t,this._isDisposed=!1,this._startSearchingTimer=new s["g"],this._decorations=new b(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new s["e"](()=>this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(e=>{3!==e.reason&&5!==e.reason&&6!==e.reason||this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(e=>{this._ignoreModelContentChanged||(e.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(e=>this._onStateChanged(e))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,Object(o["f"])(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){if(!this._isDisposed&&this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)){let t=this._editor.getModel();t.isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)},j)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)}}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let i=null;"undefined"!==typeof t?null!==t&&(i=Array.isArray(t)?t:[t]):i=this._decorations.getFindScopes(),null!==i&&(i=i.map(e=>{if(e.startLineNumber!==e.endLineNumber){let t=e.endLineNumber;return 1===e.endColumn&&(t-=1),new d["a"](e.startLineNumber,1,t,this._editor.getModel().getLineMaxColumn(t))}return e}));let n=this._findMatches(i,!1,V);this._decorations.set(n,i);const s=this._editor.getSelection();let o=this._decorations.getCurrentMatchesPosition(s);if(0===o&&n.length>0){const e=Object(O["h"])(n.map(e=>e.range),e=>d["a"].compareRangesUsingStarts(e,s)>=0);o=e>0?e-1+1:o}this._state.changeMatchInfo(o,this._decorations.getCount(),void 0),e&&this._editor.getOption(31).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){let t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:i,column:n}=e,s=this._editor.getModel();return t||1===n?(1===i?i=s.getLineCount():i--,n=s.getLineMaxColumn(i)):n--,new c["a"](i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const t=this._decorations.matchAfterPosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()<V){let t=this._decorations.matchBeforePosition(e);return t&&t.isEmpty()&&t.getStartPosition().equals(e)&&(e=this._prevSearchPosition(e),t=this._decorations.matchBeforePosition(e)),void(t&&this._setCurrentFindMatch(t))}if(this._cannotFind())return;let i=this._decorations.getFindScope(),n=H._getSearchRange(this._editor.getModel(),i);n.getEndPosition().isBefore(e)&&(e=n.getEndPosition()),e.isBefore(n.getStartPosition())&&(e=n.getEndPosition());let{lineNumber:s,column:o}=e,r=this._editor.getModel(),a=new c["a"](s,o),l=r.findPreviousMatch(this._state.searchString,a,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(110):null,!1);return l&&l.range.isEmpty()&&l.range.getStartPosition().equals(a)&&(a=this._prevSearchPosition(a),l=r.findPreviousMatch(this._state.searchString,a,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(110):null,!1)),l?t||n.containsRange(l.range)?void this._setCurrentFindMatch(l.range):this._moveToPrevMatch(l.range.getStartPosition(),!0):void 0}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:i,column:n}=e,s=this._editor.getModel();return t||n===s.getLineMaxColumn(i)?(i===s.getLineCount()?i=1:i++,n=1):n++,new c["a"](i,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const t=this._decorations.matchBeforePosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()<V){let 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))}let t=this._getNextMatch(e,!1,!0);t&&this._setCurrentFindMatch(t.range)}_getNextMatch(e,t,i,n=!1){if(this._cannotFind())return null;let s=this._decorations.getFindScope(),o=H._getSearchRange(this._editor.getModel(),s);o.getEndPosition().isBefore(e)&&(e=o.getStartPosition()),e.isBefore(o.getStartPosition())&&(e=o.getStartPosition());let{lineNumber:r,column:a}=e,l=this._editor.getModel(),h=new c["a"](r,a),d=l.findNextMatch(this._state.searchString,h,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(110):null,t);return i&&d&&d.range.isEmpty()&&d.range.getStartPosition().equals(h)&&(h=this._nextSearchPosition(h),d=l.findNextMatch(this._state.searchString,h,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(110):null,t)),d?n||o.containsRange(d.range)?d:this._getNextMatch(d.range.getEndPosition(),t,i,!0):null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_getReplacePattern(){return this._state.isRegex?E(this._state.replaceString):L.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;let e=this._getReplacePattern(),t=this._editor.getSelection(),i=this._getNextMatch(t.getStartPosition(),!0,!1);if(i)if(t.equalsRange(i.range)){let n=e.buildReplaceString(i.matches,this._state.preserveCase),s=new h["a"](t,n);this._executeEditorCommand("replace",s),this._decorations.setStartPosition(new c["a"](t.startLineNumber,t.startColumn+n.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(i.range)}_findMatches(e,t,i){const n=(e||[null]).map(e=>H._getSearchRange(this._editor.getModel(),e));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(110):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();null===e&&this._state.matchesCount>=V?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const e=new g["a"](this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(110):null),t=e.parseSearchRequest();if(!t)return;let i=t.regex;if(!i.multiline){let e="mu";i.ignoreCase&&(e+="i"),i.global&&(e+="g"),i=new RegExp(i.source,e)}const n=this._editor.getModel(),s=n.getValue(1),o=n.getFullModelRange(),r=this._getReplacePattern();let a;const l=this._state.preserveCase;a=r.hasReplacementPatterns||l?s.replace(i,(function(){return r.buildReplaceString(arguments,l)})):s.replace(i,r.buildReplaceString(null,l));let c=new h["b"](o,a,this._editor.getSelection());this._executeEditorCommand("replaceAll",c)}_regularReplaceAll(e){const t=this._getReplacePattern();let i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let o=0,r=i.length;o<r;o++)n[o]=t.buildReplaceString(i[o].matches,this._state.preserveCase);let s=new v(this._editor.getSelection(),i.map(e=>e.range),n);this._executeEditorCommand("replaceAll",s)}selectAllMatches(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes(),t=this._findMatches(e,!1,1073741824),i=t.map(e=>new u["a"](e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn)),n=this._editor.getSelection();for(let s=0,o=i.length;s<o;s++){let e=i[s];if(e.equalsRange(n)){i=[n].concat(i.slice(0,s)).concat(i.slice(s+1));break}}this._editor.setSelections(i)}_executeEditorCommand(e,t){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(e,t),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}var z=i("11f7"),U=(i("8899"),i("1b7d")),K=i("ceb8"),$=i("308f"),q=i("561a");const G={inputActiveOptionBorder:K["a"].fromHex("#007ACC00"),inputActiveOptionForeground:K["a"].fromHex("#FFFFFF"),inputActiveOptionBackground:K["a"].fromHex("#0E639C50")};class Y extends U["a"]{constructor(e){super(),this._onChange=this._register(new $["a"]),this.onChange=this._onChange.event,this._onKeyDown=this._register(new $["a"]),this.onKeyDown=this._onKeyDown.event,this._opts=Object.assign(Object.assign({},G),e),this._checked=this._opts.isChecked;const t=["monaco-custom-checkbox"];this._opts.icon&&t.push(...q["a"].asClassNameArray(this._opts.icon)),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,e=>{this.checked=!this._checked,this._onChange.fire(!1),e.preventDefault()}),this.ignoreGesture(this.domNode),this.onkeydown(this.domNode,e=>{if(10===e.keyCode||3===e.keyCode)return this.checked=!this._checked,this._onChange.fire(!0),void e.preventDefault();this._onKeyDown.fire(e)})}get enabled(){return"true"!==this.domNode.getAttribute("aria-disabled")}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}style(e){e.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=e.inputActiveOptionBorder),e.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=e.inputActiveOptionForeground),e.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=e.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"transparent",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground?this._opts.inputActiveOptionForeground.toString():"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"transparent")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}const Z=n["a"]("caseDescription","Match Case"),X=n["a"]("wordsDescription","Match Whole Word"),Q=n["a"]("regexDescription","Use Regular Expression");class J extends Y{constructor(e){super({icon:q["b"].caseSensitive,title:Z+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class ee extends Y{constructor(e){super({icon:q["b"].wholeWord,title:X+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class te extends Y{constructor(e){super({icon:q["b"].regex,title:Q+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class ie extends U["a"]{constructor(e,t,i,n){super(),this._hideSoon=this._register(new s["e"](()=>this._hide(),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=i,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const o=n.getColorTheme().getColor(f["V"]),r=n.getColorTheme().getColor(f["W"]),a=n.getColorTheme().getColor(f["U"]);this.caseSensitive=this._register(new J({appendTitle:this._keybindingLabelFor(W.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,inputActiveOptionBorder:o,inputActiveOptionForeground:r,inputActiveOptionBackground:a})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new ee({appendTitle:this._keybindingLabelFor(W.ToggleWholeWordCommand),isChecked:this._state.wholeWord,inputActiveOptionBorder:o,inputActiveOptionForeground:r,inputActiveOptionBackground:a})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new te({appendTitle:this._keybindingLabelFor(W.ToggleRegexCommand),isChecked:this._state.isRegex,inputActiveOptionBorder:o,inputActiveOptionForeground:r,inputActiveOptionBackground:a})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(e=>{let t=!1;e.isRegex&&(this.regex.checked=this._state.isRegex,t=!0),e.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,t=!0),e.matchCase&&(this.caseSensitive.checked=this._state.matchCase,t=!0),!this._state.isRevealed&&t&&this._revealTemporarily()})),this._register(z["h"](this._domNode,e=>this._onMouseOut())),this._register(z["g"](this._domNode,"mouseover",e=>this._onMouseOver())),this._applyTheme(n.getColorTheme()),this._register(n.onDidColorThemeChange(this._applyTheme.bind(this)))}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return ie.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseOut(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}_applyTheme(e){let t={inputActiveOptionBorder:e.getColor(f["V"]),inputActiveOptionForeground:e.getColor(f["W"]),inputActiveOptionBackground:e.getColor(f["U"])};this.caseSensitive.style(t),this.wholeWords.style(t),this.regex.style(t)}}function ne(e,t){return 1===e||2!==e&&t}ie.ID="editor.contrib.findOptionsWidget",Object(_["f"])((e,t)=>{const i=e.getColor(f["N"]);i&&t.addRule(`.monaco-editor .findOptionsWidget { background-color: ${i}; }`);const n=e.getColor(f["P"]);n&&t.addRule(`.monaco-editor .findOptionsWidget { color: ${n}; }`);const s=e.getColor(f["kc"]);s&&t.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 0 8px 2px ${s}; }`);const o=e.getColor(f["h"]);o&&t.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${o}; }`)});class se extends o["a"]{constructor(){super(),this._onFindReplaceStateChange=this._register(new $["a"]),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0}get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return ne(this._isRegexOverride,this._isRegex)}get wholeWord(){return ne(this._wholeWordOverride,this._wholeWord)}get matchCase(){return ne(this._matchCaseOverride,this._matchCase)}get preserveCase(){return ne(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}changeMatchInfo(e,t,i){let n={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1},s=!1;0===t&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,s=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,s=!0),"undefined"!==typeof i&&(d["a"].equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0,s=!0)),s&&this._onFindReplaceStateChange.fire(n)}change(e,t,i=!0){var n;let s={moveCursor:t,updateHistory:i,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1},o=!1;const r=this.isRegex,a=this.wholeWord,l=this.matchCase,h=this.preserveCase;"undefined"!==typeof e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,s.searchString=!0,o=!0),"undefined"!==typeof e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,s.replaceString=!0,o=!0),"undefined"!==typeof e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,s.isRevealed=!0,o=!0),"undefined"!==typeof e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,s.isReplaceRevealed=!0,o=!0),"undefined"!==typeof e.isRegex&&(this._isRegex=e.isRegex),"undefined"!==typeof e.wholeWord&&(this._wholeWord=e.wholeWord),"undefined"!==typeof e.matchCase&&(this._matchCase=e.matchCase),"undefined"!==typeof e.preserveCase&&(this._preserveCase=e.preserveCase),"undefined"!==typeof e.searchScope&&((null===(n=e.searchScope)||void 0===n?void 0:n.every(e=>{var t;return null===(t=this._searchScope)||void 0===t?void 0:t.some(t=>!d["a"].equalsRange(t,e))}))||(this._searchScope=e.searchScope,s.searchScope=!0,o=!0)),"undefined"!==typeof e.loop&&this._loop!==e.loop&&(this._loop=e.loop,s.loop=!0,o=!0),this._isRegexOverride="undefined"!==typeof e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride="undefined"!==typeof e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride="undefined"!==typeof e.matchCaseOverride?e.matchCaseOverride:0,this._preserveCaseOverride="undefined"!==typeof e.preserveCaseOverride?e.preserveCaseOverride:0,r!==this.isRegex&&(o=!0,s.isRegex=!0),a!==this.wholeWord&&(o=!0,s.wholeWord=!0),l!==this.matchCase&&(o=!0,s.matchCase=!0),h!==this.preserveCase&&(o=!0,s.preserveCase=!0),o&&this._onFindReplaceStateChange.fire(s)}canNavigateBack(){return this.canNavigateInLoop()||1!==this.matchesPosition}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=V}}i("01b0");var oe=i("3813"),re=i("70c3"),ae=i("fdcc"),le=i("30db"),he=(i("caa1"),i("d3ef"));const ce=n["a"]("defaultLabel","input");class de extends U["a"]{constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this._onDidOptionChange=this._register(new $["a"]),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new $["a"]),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new $["a"]),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new $["a"]),this._onKeyUp=this._register(new $["a"]),this._onCaseSensitiveKeyDown=this._register(new $["a"]),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new $["a"]),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||ce,this.inputActiveOptionBorder=n.inputActiveOptionBorder,this.inputActiveOptionForeground=n.inputActiveOptionForeground,this.inputActiveOptionBackground=n.inputActiveOptionBackground,this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBorder=n.inputValidationInfoBorder,this.inputValidationInfoBackground=n.inputValidationInfoBackground,this.inputValidationInfoForeground=n.inputValidationInfoForeground,this.inputValidationWarningBorder=n.inputValidationWarningBorder,this.inputValidationWarningBackground=n.inputValidationWarningBackground,this.inputValidationWarningForeground=n.inputValidationWarningForeground,this.inputValidationErrorBorder=n.inputValidationErrorBorder,this.inputValidationErrorBackground=n.inputValidationErrorBackground,this.inputValidationErrorForeground=n.inputValidationErrorForeground;const s=n.appendCaseSensitiveLabel||"",o=n.appendWholeWordsLabel||"",r=n.appendRegexLabel||"",a=n.history||[],l=!!n.flexibleHeight,h=!!n.flexibleWidth,c=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new he["a"](this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:a,flexibleHeight:l,flexibleWidth:h,flexibleMaxHeight:c})),this.regex=this._register(new te({appendTitle:r,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.regex.onChange(e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(e=>{this._onRegexKeyDown.fire(e)})),this.wholeWords=this._register(new ee({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.wholeWords.onChange(e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new J({appendTitle:s,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.caseSensitive.onChange(e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(e=>{this._onCaseSensitiveKeyDown.fire(e)})),this._showOptionButtons&&(this.inputBox.paddingRight=this.caseSensitive.width()+this.wholeWords.width()+this.regex.width());let d=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){let t=d.indexOf(document.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%d.length:e.equals(15)&&(i=0===t?d.length-1:t-1),e.equals(9)?(d[t].blur(),this.inputBox.focus()):i>=0&&d[i].focus(),z["c"].stop(e,!0)}}});let u=document.createElement("div");u.className="controls",u.style.display=this._showOptionButtons?"block":"none",u.appendChild(this.caseSensitive.domNode),u.appendChild(this.wholeWords.domNode),u.appendChild(this.regex.domNode),this.domNode.appendChild(u),e&&e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,e=>this._onKeyDown.fire(e)),this.onkeyup(this.inputBox.inputElement,e=>this._onKeyUp.fire(e)),this.oninput(this.inputBox.inputElement,e=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,e=>this._onMouseDown.fire(e))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style(e),this.wholeWords.style(e),this.caseSensitive.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive.checked}setCaseSensitive(e){this.caseSensitive.checked=e}getWholeWords(){return this.wholeWords.checked}setWholeWords(e){this.wholeWords.checked=e}getRegex(){return this.regex.checked}setRegex(e){this.regex.checked=e,this.validate()}focusOnCaseSensitive(){this.caseSensitive.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}clearMessage(){this.inputBox.hideMessage()}}var ue=i("9eb8");const ge=n["a"]("defaultLabel","input"),pe=n["a"]("label.preserveCaseCheckbox","Preserve Case");class me extends Y{constructor(e){super({icon:q["b"].preserveCase,title:pe+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class fe extends U["a"]{constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new $["a"]),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new $["a"]),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new $["a"]),this._onInput=this._register(new $["a"]),this._onKeyUp=this._register(new $["a"]),this._onPreserveCaseKeyDown=this._register(new $["a"]),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||ge,this.inputActiveOptionBorder=n.inputActiveOptionBorder,this.inputActiveOptionForeground=n.inputActiveOptionForeground,this.inputActiveOptionBackground=n.inputActiveOptionBackground,this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBorder=n.inputValidationInfoBorder,this.inputValidationInfoBackground=n.inputValidationInfoBackground,this.inputValidationInfoForeground=n.inputValidationInfoForeground,this.inputValidationWarningBorder=n.inputValidationWarningBorder,this.inputValidationWarningBackground=n.inputValidationWarningBackground,this.inputValidationWarningForeground=n.inputValidationWarningForeground,this.inputValidationErrorBorder=n.inputValidationErrorBorder,this.inputValidationErrorBackground=n.inputValidationErrorBackground,this.inputValidationErrorForeground=n.inputValidationErrorForeground;const s=n.appendPreserveCaseLabel||"",o=n.history||[],r=!!n.flexibleHeight,a=!!n.flexibleWidth,l=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new he["a"](this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:o,flexibleHeight:r,flexibleWidth:a,flexibleMaxHeight:l})),this.preserveCase=this._register(new me({appendTitle:s,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.preserveCase.onChange(e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(e=>{this._onPreserveCaseKeyDown.fire(e)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let h=[this.preserveCase.domNode];this.onkeydown(this.domNode,e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){let t=h.indexOf(document.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%h.length:e.equals(15)&&(i=0===t?h.length-1:t-1),e.equals(9)?(h[t].blur(),this.inputBox.focus()):i>=0&&h[i].focus(),z["c"].stop(e,!0)}}});let c=document.createElement("div");c.className="controls",c.style.display=this._showOptionButtons?"block":"none",c.appendChild(this.preserveCase.domNode),this.domNode.appendChild(c),e&&e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,e=>this._onKeyDown.fire(e)),this.onkeyup(this.inputBox.inputElement,e=>this._onKeyUp.fire(e)),this.oninput(this.inputBox.inputElement,e=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,e=>this._onMouseDown.fire(e))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox&&this.inputBox.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=e,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var _e=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},be=function(e,t){return function(i,n){t(i,n,e)}};const ve="historyNavigationWidget",Ce="historyNavigationEnabled";function we(e,t,i){new N["c"](i,t).bindTo(e)}function Se(e,t){return e.createScoped(t.target)}function ye(e,t){return e.getContext(document.activeElement).getValue(t)}function De(e,t){const i=Se(e,t);we(i,t,ve);const n=new N["c"](Ce,!0).bindTo(i);return{scopedContextKeyService:i,historyNavigationEnablement:n}}let Le=class extends de{constructor(e,t,i,n,s=!1){super(e,t,s,i),this._register(De(n,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};Le=_e([be(3,N["b"])],Le);let xe=class extends fe{constructor(e,t,i,n,s=!1){super(e,t,s,i),this._register(De(n,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};xe=_e([be(3,N["b"])],xe),ue["a"].registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:N["a"].and(N["a"].has(ve),N["a"].equals(Ce,!0)),primary:16,secondary:[528],handler:(e,t)=>{const i=ye(e.get(N["b"]),ve);if(i){const e=i.historyNavigator;e.showPreviousValue()}}}),ue["a"].registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:N["a"].and(N["a"].has(ve),N["a"].equals(Ce,!0)),primary:18,secondary:[530],handler:(e,t)=>{const i=ye(e.get(N["b"]),ve);if(i){const e=i.historyNavigator;e.showNextValue()}}});var ke=i("bf5b"),Ee=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Ne=Object(ke["b"])("find-selection",q["b"].selection,n["a"]("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),Oe=Object(ke["b"])("find-collapsed",q["b"].chevronRight,n["a"]("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),Ie=Object(ke["b"])("find-expanded",q["b"].chevronDown,n["a"]("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),Te=Object(ke["b"])("find-replace",q["b"].replace,n["a"]("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),Me=Object(ke["b"])("find-replace-all",q["b"].replaceAll,n["a"]("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),Ae=Object(ke["b"])("find-previous-match",q["b"].arrowUp,n["a"]("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),Re=Object(ke["b"])("find-next-match",q["b"].arrowDown,n["a"]("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),Fe=n["a"]("label.find","Find"),Pe=n["a"]("placeholder.find","Find"),Be=n["a"]("label.previousMatchButton","Previous match"),We=n["a"]("label.nextMatchButton","Next match"),Ve=n["a"]("label.toggleSelectionFind","Find in selection"),je=n["a"]("label.closeButton","Close"),He=n["a"]("label.replace","Replace"),ze=n["a"]("placeholder.replace","Replace"),Ue=n["a"]("label.replaceButton","Replace"),Ke=n["a"]("label.replaceAllButton","Replace All"),$e=n["a"]("label.toggleReplaceButton","Toggle Replace mode"),qe=n["a"]("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",V),Ge=n["a"]("label.matchesLocation","{0} of {1}"),Ye=n["a"]("label.noResults","No results"),Ze=419,Xe=275,Qe=Xe-54;let Je=69;const et=33,tt="ctrlEnterReplaceAll.windows.donotask",it=le["f"]?256:2048;class nt{constructor(e){this.afterLineNumber=e,this.heightInPx=et,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function st(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionStart>0&&e.stopPropagation()}function ot(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionEnd<i.value.length&&e.stopPropagation()}class rt extends U["a"]{constructor(e,t,i,n,r,a,l,h,c){super(),this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=e,this._controller=t,this._state=i,this._contextViewProvider=n,this._keybindingService=r,this._contextKeyService=a,this._storageService=h,this._notificationService=c,this._ctrlEnterReplaceAllWarningPrompted=!!h.getBoolean(tt,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new s["a"](500),this._register(Object(o["h"])(()=>this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(e=>this._onStateChanged(e))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(e=>{if(e.hasChanged(75)&&(this._codeEditor.getOption(75)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),e.hasChanged(124)&&this._tryUpdateWidgetWidth(),e.hasChanged(2)&&this.updateAccessibilitySupport(),e.hasChanged(31)){const e=this._codeEditor.getOption(31).addExtraSpaceOnTop;e&&!this._viewZone&&(this._viewZone=new nt(0),this._showViewZone()),!e&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>Ee(this,void 0,void 0,(function*(){if(this._isVisible){let e=yield this._controller.getGlobalBufferTerm();e&&e!==this._state.searchString&&(this._state.change({searchString:e},!1),this._findInput.select())}})))),this._findInputFocused=T.bindTo(a),this._findFocusTracker=this._register(z["T"](this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=M.bindTo(a),this._replaceFocusTracker=this._register(z["T"](this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(31).addExtraSpaceOnTop&&(this._viewZone=new nt(0)),this._applyTheme(l.getColorTheme()),this._register(l.onDidColorThemeChange(this._applyTheme.bind(this))),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(e=>{e.scrollTopChanged?this._layoutViewZone():setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return rt.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getOption(75)||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInput.width=z["E"](this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),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.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){let e=this._state.searchString.length>0&&0===this._state.matchesCount;this._domNode.classList.toggle("no-results",e),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,ae["e"])}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){let e;if(this._matchesCount.style.minWidth=Je+"px",this._state.matchesCount>=V?this._matchesCount.title=qe:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild),this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=V&&(t+="+");let i=String(this._state.matchesPosition);"0"===i&&(i="?"),e=r["w"](Ge,i,t)}else e=Ye;this._matchesCount.appendChild(document.createTextNode(e)),Object(oe["a"])(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),Je=Math.max(Je,this._matchesCount.clientWidth)}_getAriaLabel(e,t,i){if(e===Ye)return""===i?n["a"]("ariaSearchNoResultEmpty","{0} found",e):n["a"]("ariaSearchNoResult","{0} found for '{1}'",e,i);if(t){const s=n["a"]("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,i,t.startLineNumber+":"+t.startColumn),o=this._codeEditor.getModel();if(o&&t.startLineNumber<=o.getLineCount()&&t.startLineNumber>=1){const e=o.getLineContent(t.startLineNumber);return`${e}, ${s}`}return s}return n["a"]("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,i)}_updateToggleSelectionFindButton(){let e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),i=this._toggleSelectionFind.checked;this._isVisible&&(i||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);let e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);let i=!this._codeEditor.getOption(75);this._toggleReplaceBtn.setEnabled(this._isVisible&&i)}_reveal(){if(this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(31).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":const t=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=t;break;default:break}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(31).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const n=z["z"](i),s=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),o=n.left+(s?s.left:0),r=s?s.top:0;if(this._viewZone&&r<this._viewZone.heightInPx){e.endLineNumber>e.startLineNumber&&(t=!1);const i=z["C"](this._domNode).left;o>i&&(t=!1);const s=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition()),r=n.left+(s?s.left:0);r>i&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach(e=>{clearTimeout(e)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){const t=this._codeEditor.getOption(31).addExtraSpaceOnTop;if(!t)return void this._removeViewZone();if(!this._isVisible)return;const i=this._viewZone;void 0===this._viewZoneId&&i&&this._codeEditor.changeViewZones(t=>{i.heightInPx=this._getHeight(),this._viewZoneId=t.addZone(i),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+i.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible)return;const t=this._codeEditor.getOption(31).addExtraSpaceOnTop;if(!t)return;void 0===this._viewZone&&(this._viewZone=new nt(0));const i=this._viewZone;this._codeEditor.changeViewZones(t=>{if(void 0!==this._viewZoneId){const n=this._getHeight();if(n===i.heightInPx)return;let s=n-i.heightInPx;return i.heightInPx=n,t.layoutZone(this._viewZoneId),void(e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s))}{let n=this._getHeight();if(n-=this._codeEditor.getOption(69).top,n<=0)return;i.heightInPx=n,this._viewZoneId=t.addZone(i),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+n)}})}_removeViewZone(){this._codeEditor.changeViewZones(e=>{void 0!==this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_applyTheme(e){let t={inputActiveOptionBorder:e.getColor(f["V"]),inputActiveOptionBackground:e.getColor(f["U"]),inputActiveOptionForeground:e.getColor(f["W"]),inputBackground:e.getColor(f["X"]),inputForeground:e.getColor(f["Z"]),inputBorder:e.getColor(f["Y"]),inputValidationInfoBackground:e.getColor(f["db"]),inputValidationInfoForeground:e.getColor(f["fb"]),inputValidationInfoBorder:e.getColor(f["eb"]),inputValidationWarningBackground:e.getColor(f["gb"]),inputValidationWarningForeground:e.getColor(f["ib"]),inputValidationWarningBorder:e.getColor(f["hb"]),inputValidationErrorBackground:e.getColor(f["ab"]),inputValidationErrorForeground:e.getColor(f["cb"]),inputValidationErrorBorder:e.getColor(f["bb"])};this._findInput.style(t),this._replaceInput.style(t),this._toggleSelectionFind.style(t)}_tryUpdateWidgetWidth(){if(!this._isVisible)return;if(!z["J"](this._domNode))return;const e=this._codeEditor.getLayoutInfo(),t=e.contentWidth;if(t<=0)return void this._domNode.classList.add("hiddenEditor");this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const i=e.width,n=e.minimap.minimapWidth;let s=!1,o=!1,r=!1;if(this._resized){let e=z["E"](this._domNode);if(e>Ze)return this._domNode.style.maxWidth=i-28-n-15+"px",void(this._replaceInput.width=z["E"](this._findInput.domNode))}if(Ze+28+n>=i&&(o=!0),Ze+28+n-Je>=i&&(r=!0),Ze+28+n-Je>=i+50&&(s=!0),this._domNode.classList.toggle("collapsed-find-widget",s),this._domNode.classList.toggle("narrow-find-widget",r),this._domNode.classList.toggle("reduced-find-widget",o),r||s||(this._domNode.style.maxWidth=i-28-n-15+"px"),this._resized){this._findInput.inputBox.layout();let e=this._findInput.inputBox.element.clientWidth;e>0&&(this._replaceInput.width=e)}else this._isReplaceVisible&&(this._replaceInput.width=z["E"](this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return(null===this._cachedHeight||this._cachedHeight!==e)&&(this._cachedHeight=e,this._domNode.style.height=e+"px",!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){let e=this._codeEditor.getSelections();e.map(e=>{1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1)));const t=this._state.currentMatch;return e.startLineNumber===e.endLineNumber||d["a"].equalsRange(e,t)?null:e}).filter(e=>!!e),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){return e.equals(3|it)?(this._findInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?st(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):e.equals(18)?ot(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):void 0}_onReplaceInputKeyDown(e){return e.equals(3|it)?(le["j"]&&le["g"]&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(n["a"]("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(tt,!0,0,0)),this._replaceInput.inputBox.insertAtCursor("\n"),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()):e.equals(16)?st(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):e.equals(18)?ot(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):void 0}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){const e=!0,t=!0;this._findInput=this._register(new Le(null,this._contextViewProvider,{width:Qe,label:Fe,placeholder:Pe,appendCaseSensitiveLabel:this._keybindingLabelFor(W.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(W.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(W.ToggleRegexCommand),validation:e=>{if(0===e.length||!this._findInput.getRegex())return null;try{return new RegExp(e,"gu"),null}catch(t){return{content:t.message}}},flexibleHeight:e,flexibleWidth:t,flexibleMaxHeight:118},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(e=>this._onFindInputKeyDown(e))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(e=>{e.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),e.preventDefault())})),this._register(this._findInput.onRegexKeyDown(e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),e.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(e=>{this._tryUpdateHeight()&&this._showViewZone()})),le["d"]&&this._register(this._findInput.onMouseDown(e=>this._onFindInputMouseDown(e))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new at({label:Be+this._keybindingLabelFor(W.PreviousMatchFindAction),icon:Ae,onTrigger:()=>{this._codeEditor.getAction(W.PreviousMatchFindAction).run().then(void 0,ae["e"])}})),this._nextBtn=this._register(new at({label:We+this._keybindingLabelFor(W.NextMatchFindAction),icon:Re,onTrigger:()=>{this._codeEditor.getAction(W.NextMatchFindAction).run().then(void 0,ae["e"])}}));let i=document.createElement("div");i.className="find-part",i.appendChild(this._findInput.domNode);const n=document.createElement("div");n.className="find-actions",i.appendChild(n),n.appendChild(this._matchesCount),n.appendChild(this._prevBtn.domNode),n.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new Y({icon:Ne,title:Ve+this._keybindingLabelFor(W.ToggleSearchScopeCommand),isChecked:!1})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let e=this._codeEditor.getSelections();e.map(e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e)).filter(e=>!!e),e.length&&this._state.change({searchScope:e},!0)}}else this._state.change({searchScope:null},!0)})),n.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new at({label:je+this._keybindingLabelFor(W.CloseFindWidgetCommand),icon:ke["c"],onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),e.preventDefault())}})),n.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new xe(null,void 0,{label:He,placeholder:ze,appendPreserveCaseLabel:this._keybindingLabelFor(W.TogglePreserveCaseCommand),history:[],flexibleHeight:e,flexibleWidth:t,flexibleMaxHeight:118},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(e=>this._onReplaceInputKeyDown(e))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(e=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(e=>{e.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),e.preventDefault())})),this._replaceBtn=this._register(new at({label:Ue+this._keybindingLabelFor(W.ReplaceOneAction),icon:Te,onTrigger:()=>{this._controller.replace()},onKeyDown:e=>{e.equals(1026)&&(this._closeBtn.focus(),e.preventDefault())}})),this._replaceAllBtn=this._register(new at({label:Ke+this._keybindingLabelFor(W.ReplaceAllAction),icon:Me,onTrigger:()=>{this._controller.replaceAll()}}));let s=document.createElement("div");s.className="replace-part",s.appendChild(this._replaceInput.domNode);const o=document.createElement("div");o.className="replace-actions",s.appendChild(o),o.appendChild(this._replaceBtn.domNode),o.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new at({label:$e,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=z["E"](this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),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=Ze+"px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(i),this._domNode.appendChild(s),this._resizeSash=new re["b"](this._domNode,this,{orientation:0,size:2}),this._resized=!1;let r=Ze;this._register(this._resizeSash.onDidStart(()=>{r=z["E"](this._domNode)})),this._register(this._resizeSash.onDidChange(e=>{this._resized=!0;let t=r+e.startX-e.currentX;if(t<Ze)return;const i=parseFloat(z["w"](this._domNode).maxWidth)||0;t>i||(this._domNode.style.width=t+"px",this._isReplaceVisible&&(this._replaceInput.width=z["E"](this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const e=z["E"](this._domNode);if(e<Ze)return;let t=Ze;if(!this._resized||e===Ze){const e=this._codeEditor.getLayoutInfo();t=e.width-28-e.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=t+"px",this._isReplaceVisible&&(this._replaceInput.width=z["E"](this._findInput.domNode)),this._findInput.inputBox.layout()}))}updateAccessibilitySupport(){const e=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(2!==e)}}rt.ID="editor.contrib.findWidget";class at extends U["a"]{constructor(e){super(),this._opts=e;let t="button";this._opts.className&&(t=t+" "+this._opts.className),this._opts.icon&&(t=t+" "+_["d"].asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className=t,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,e=>{this._opts.onTrigger(),e.preventDefault()}),this.onkeydown(this._domNode,e=>{if(e.equals(10)||e.equals(3))return this._opts.onTrigger(),void e.preventDefault();this._opts.onKeyDown&&this._opts.onKeyDown(e)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(..._["d"].asClassNameArray(Oe)),this._domNode.classList.add(..._["d"].asClassNameArray(Ie))):(this._domNode.classList.remove(..._["d"].asClassNameArray(Ie)),this._domNode.classList.add(..._["d"].asClassNameArray(Oe)))}}Object(_["f"])((e,t)=>{const i=(e,i)=>{i&&t.addRule(`.monaco-editor ${e} { background-color: ${i}; }`)};i(".findMatch",e.getColor(f["w"])),i(".currentFindMatch",e.getColor(f["u"])),i(".findScope",e.getColor(f["y"]));const n=e.getColor(f["N"]);i(".find-widget",n);const s=e.getColor(f["kc"]);s&&t.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${s}; }`);const o=e.getColor(f["x"]);o&&t.addRule(`.monaco-editor .findMatch { border: 1px ${"hc"===e.type?"dotted":"solid"} ${o}; box-sizing: border-box; }`);const r=e.getColor(f["v"]);r&&t.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${r}; padding: 1px; box-sizing: border-box; }`);const a=e.getColor(f["z"]);a&&t.addRule(`.monaco-editor .findScope { border: 1px ${"hc"===e.type?"dashed":"solid"} ${a}; }`);const l=e.getColor(f["h"]);l&&t.addRule(`.monaco-editor .find-widget { border: 1px solid ${l}; }`);const h=e.getColor(f["P"]);h&&t.addRule(`.monaco-editor .find-widget { color: ${h}; }`);const c=e.getColor(f["R"]);c&&t.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${c}; }`);const d=e.getColor(f["Q"]);if(d)t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${d}; }`);else{const i=e.getColor(f["O"]);i&&t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${i}; }`)}const u=e.getColor(f["S"]);u&&t.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${u}; }`)});var lt=i("7e32"),ht=i("f577"),ct=i("533b"),dt=i("6dec"),ut=i("03e8"),gt=i("b0cd"),pt=i("5717b"),mt=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},ft=function(e,t){return function(i,n){t(i,n,e)}},_t=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const bt=524288;function vt(e,t="single"){if(!e.hasModel())return null;const i=e.getSelection();if("single"===t&&i.startLineNumber===i.endLineNumber||"multiple"===t)if(i.isEmpty()){const t=e.getConfiguredWordAtPosition(i.getStartPosition());if(t)return t.word}else if(e.getModel().getValueLengthInRange(i)<bt)return e.getModel().getValueInRange(i);return null}let Ct=class e extends o["a"]{constructor(e,t,i,n){super(),this._editor=e,this._findWidgetVisible=I.bindTo(t),this._contextKeyService=t,this._storageService=i,this._clipboardService=n,this._updateHistoryDelayer=new s["a"](500),this._state=this._register(new se),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(e=>this._onStateChanged(e))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{let e=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),e&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(31).loop})}))}get editor(){return this._editor}static get(t){return t.getContribution(e.ID)}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(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)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,0),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,0),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,0),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,0)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!T.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e.map(e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._editor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e)).filter(e=>!!e),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=r["u"](e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e){return _t(this,void 0,void 0,(function*(){if(this.disposeModel(),!this._editor.hasModel())return;let t={isRevealed:!0};if("single"===e.seedSearchStringFromSelection){let i=vt(this._editor,e.seedSearchStringFromSelection);i&&(this._state.isRegex?t.searchString=r["u"](i):t.searchString=i)}else if("multiple"===e.seedSearchStringFromSelection&&!e.updateSearchScope){let i=vt(this._editor,e.seedSearchStringFromSelection);i&&(t.searchString=i)}if(!t.searchString&&e.seedSearchStringFromGlobalClipboard){let e=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;e&&(t.searchString=e)}if(e.forceRevealReplace?t.isReplaceRevealed=!0:this._findWidgetVisible.get()||(t.isReplaceRevealed=!1),e.updateSearchScope){let e=this._editor.getSelections();e.some(e=>!e.isEmpty())&&(t.searchScope=e)}t.loop=e.loop,this._state.change(t,!1),this._model||(this._model=new H(this._editor,this._state))}))}start(e){return this._start(e)}moveToNextMatch(){return!!this._model&&(this._model.moveToNextMatch(),!0)}moveToPrevMatch(){return!!this._model&&(this._model.moveToPrevMatch(),!0)}replace(){return!!this._model&&(this._model.replace(),!0)}replaceAll(){return!!this._model&&(this._model.replaceAll(),!0)}selectAllMatches(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)}getGlobalBufferTerm(){return _t(this,void 0,void 0,(function*(){return this._editor.getOption(31).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}))}setGlobalBufferTerm(e){this._editor.getOption(31).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};Ct.ID="editor.contrib.findController",Ct=mt([ft(1,N["b"]),ft(2,ut["a"]),ft(3,ht["a"])],Ct);let wt=class extends Ct{constructor(e,t,i,n,s,o,r,a){super(e,i,r,a),this._contextViewService=t,this._keybindingService=n,this._themeService=s,this._notificationService=o,this._widget=null,this._findOptionsWidget=null}_start(e){const t=Object.create(null,{_start:{get:()=>super._start}});return _t(this,void 0,void 0,(function*(){this._widget||this._createFindWidget();const i=this._editor.getSelection();let n=!1;switch(this._editor.getOption(31).autoFindInSelection){case"always":n=!0;break;case"never":n=!1;break;case"multiline":const e=!!i&&i.startLineNumber!==i.endLineNumber;n=e;break;default:break}e.updateSearchScope=n,yield t._start.call(this,e),this._widget&&(2===e.shouldFocus?this._widget.focusReplaceInput():1===e.shouldFocus&&this._widget.focusFindInput())}))}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new rt(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new ie(this._editor,this._state,this._keybindingService,this._themeService))}};wt=mt([ft(1,ct["b"]),ft(2,N["b"]),ft(3,dt["a"]),ft(4,_["b"]),ft(5,gt["a"]),ft(6,ut["a"]),ft(7,ht["a"])],wt);const St=Object(a["l"])(new a["e"]({id:W.StartFindAction,label:n["a"]("startFindAction","Find"),alias:"Find",precondition:N["a"].or(l["a"].focus,N["a"].has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:lt["b"].MenubarEditMenu,group:"3_find",title:n["a"]({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));St.addImplementation(0,(e,t)=>{const i=e.get(pt["a"]),n=i.getFocusedCodeEditor()||i.getActiveCodeEditor();if(!n)return!1;const s=Ct.get(n);return!!s&&s.start({forceRevealReplace:!1,seedSearchStringFromSelection:n.getOption(31).seedSearchStringFromSelection?"single":"none",seedSearchStringFromGlobalClipboard:n.getOption(31).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:n.getOption(31).loop})});class yt extends a["b"]{constructor(){super({id:W.StartFindWithSelection,label:n["a"]("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(e,t){return _t(this,void 0,void 0,(function*(){let e=Ct.get(t);e&&(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(31).loop}),e.setGlobalBufferTerm(e.getState().searchString))}))}}class Dt extends a["b"]{run(e,t){return _t(this,void 0,void 0,(function*(){let e=Ct.get(t);e&&!this._run(e)&&(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===e.getState().searchString.length&&t.getOption(31).seedSearchStringFromSelection?"single":"none",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(31).loop}),this._run(e))}))}}class Lt extends Dt{constructor(){super({id:W.NextMatchFindAction,label:n["a"]("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:{kbExpr:l["a"].focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100}})}_run(e){const t=e.moveToNextMatch();return!!t&&(e.editor.pushUndoStop(),!0)}}class xt extends Dt{constructor(){super({id:W.NextMatchFindAction,label:n["a"]("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:{kbExpr:N["a"].and(l["a"].focus,T),primary:3,weight:100}})}_run(e){const t=e.moveToNextMatch();return!!t&&(e.editor.pushUndoStop(),!0)}}class kt extends Dt{constructor(){super({id:W.PreviousMatchFindAction,label:n["a"]("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:{kbExpr:l["a"].focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100}})}_run(e){return e.moveToPrevMatch()}}class Et extends Dt{constructor(){super({id:W.PreviousMatchFindAction,label:n["a"]("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:{kbExpr:N["a"].and(l["a"].focus,T),primary:1027,weight:100}})}_run(e){return e.moveToPrevMatch()}}class Nt extends a["b"]{run(e,t){return _t(this,void 0,void 0,(function*(){let e=Ct.get(t);if(!e)return;let i=vt(t);i&&e.setSearchString(i),this._run(e)||(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getOption(31).seedSearchStringFromSelection?"single":"none",seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(31).loop}),this._run(e))}))}}class Ot extends Nt{constructor(){super({id:W.NextSelectionMatchFindAction,label:n["a"]("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:l["a"].focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}class It extends Nt{constructor(){super({id:W.PreviousSelectionMatchFindAction,label:n["a"]("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:l["a"].focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}}const Tt=Object(a["l"])(new a["e"]({id:W.StartFindReplaceAction,label:n["a"]("startReplace","Replace"),alias:"Replace",precondition:N["a"].or(l["a"].focus,N["a"].has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:lt["b"].MenubarEditMenu,group:"3_find",title:n["a"]({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));Tt.addImplementation(0,(e,t)=>{const i=e.get(pt["a"]),n=i.getFocusedCodeEditor()||i.getActiveCodeEditor();if(!n||!n.hasModel()||n.getOption(75))return!1;const s=Ct.get(n);if(!s)return!1;const o=n.getSelection(),r=s.isFindInputFocused(),a=!o.isEmpty()&&o.startLineNumber===o.endLineNumber&&n.getOption(31).seedSearchStringFromSelection&&!r,l=r||a?2:1;return s.start({forceRevealReplace:!0,seedSearchStringFromSelection:a?"single":"none",seedSearchStringFromGlobalClipboard:n.getOption(31).seedSearchStringFromSelection,shouldFocus:l,shouldAnimate:!0,updateSearchScope:!1,loop:n.getOption(31).loop})}),Object(a["k"])(Ct.ID,wt),Object(a["i"])(yt),Object(a["i"])(Lt),Object(a["i"])(xt),Object(a["i"])(kt),Object(a["i"])(Et),Object(a["i"])(Ot),Object(a["i"])(It);const Mt=a["c"].bindToContribution(Ct.get);Object(a["j"])(new Mt({id:W.CloseFindWidgetCommand,precondition:I,handler:e=>e.closeFindWidget(),kbOpts:{weight:105,kbExpr:N["a"].and(l["a"].focus,N["a"].not("isComposing")),primary:9,secondary:[1033]}})),Object(a["j"])(new Mt({id:W.ToggleCaseSensitiveCommand,precondition:void 0,handler:e=>e.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:l["a"].focus,primary:A.primary,mac:A.mac,win:A.win,linux:A.linux}})),Object(a["j"])(new Mt({id:W.ToggleWholeWordCommand,precondition:void 0,handler:e=>e.toggleWholeWords(),kbOpts:{weight:105,kbExpr:l["a"].focus,primary:R.primary,mac:R.mac,win:R.win,linux:R.linux}})),Object(a["j"])(new Mt({id:W.ToggleRegexCommand,precondition:void 0,handler:e=>e.toggleRegex(),kbOpts:{weight:105,kbExpr:l["a"].focus,primary:F.primary,mac:F.mac,win:F.win,linux:F.linux}})),Object(a["j"])(new Mt({id:W.ToggleSearchScopeCommand,precondition:void 0,handler:e=>e.toggleSearchScope(),kbOpts:{weight:105,kbExpr:l["a"].focus,primary:P.primary,mac:P.mac,win:P.win,linux:P.linux}})),Object(a["j"])(new Mt({id:W.TogglePreserveCaseCommand,precondition:void 0,handler:e=>e.togglePreserveCase(),kbOpts:{weight:105,kbExpr:l["a"].focus,primary:B.primary,mac:B.mac,win:B.win,linux:B.linux}})),Object(a["j"])(new Mt({id:W.ReplaceOneAction,precondition:I,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:l["a"].focus,primary:3094}})),Object(a["j"])(new Mt({id:W.ReplaceOneAction,precondition:I,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:N["a"].and(l["a"].focus,M),primary:3}})),Object(a["j"])(new Mt({id:W.ReplaceAllAction,precondition:I,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:l["a"].focus,primary:2563}})),Object(a["j"])(new Mt({id:W.ReplaceAllAction,precondition:I,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:N["a"].and(l["a"].focus,M),primary:void 0,mac:{primary:2051}}})),Object(a["j"])(new Mt({id:W.SelectAllMatchesAction,precondition:I,handler:e=>e.selectAllMatches(),kbOpts:{weight:105,kbExpr:l["a"].focus,primary:515}}))},a37f:function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var n=i("a666");class s extends n["a"]{constructor(e,t,i){super(),this.referenceDomElement=e,this.changeCallback=i,this.width=-1,this.height=-1,this.resizeObserver=null,this.measureReferenceDomElementToken=-1,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this.width}getHeight(){return this.height}startObserving(){"undefined"!==typeof ResizeObserver?!this.resizeObserver&&this.referenceDomElement&&(this.resizeObserver=new ResizeObserver(e=>{e&&e[0]&&e[0].contentRect?this.observe({width:e[0].contentRect.width,height:e[0].contentRect.height}):this.observe()}),this.resizeObserver.observe(this.referenceDomElement)):-1===this.measureReferenceDomElementToken&&(this.measureReferenceDomElementToken=setInterval(()=>this.observe(),100))}stopObserving(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),-1!==this.measureReferenceDomElementToken&&(clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let i=0,n=0;t?(i=t.width,n=t.height):this.referenceDomElement&&(i=this.referenceDomElement.clientWidth,n=this.referenceDomElement.clientHeight),i=Math.max(5,i),n=Math.max(5,n),this.width===i&&this.height===n||(this.width=i,this.height=n,e&&this.changeCallback())}}},a40b:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var n=i("0a0f");const s="editorWorkerService",o=Object(n["c"])(s)},a60f:function(e,t,i){"use strict";i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return h}));var n,s=i("e8e3"),o=i("a666"),r=i("11f7"),a=i("6424"),l=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};(function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"})(n||(n={}));class h extends o["a"]{constructor(){super(),this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(r["g"](document,"touchstart",e=>this.onTouchStart(e),{passive:!1})),this._register(r["g"](document,"touchend",e=>this.onTouchEnd(e))),this._register(r["g"](document,"touchmove",e=>this.onTouchMove(e),{passive:!1}))}static addTarget(e){return h.isTouchDevice()?(h.INSTANCE||(h.INSTANCE=new h),h.INSTANCE.targets.push(e),{dispose:()=>{h.INSTANCE.targets=h.INSTANCE.targets.filter(t=>t!==e)}}):o["a"].None}static ignoreTarget(e){return h.isTouchDevice()?(h.INSTANCE||(h.INSTANCE=new h),h.INSTANCE.ignoreTargets.push(e),{dispose:()=>{h.INSTANCE.ignoreTargets=h.INSTANCE.ignoreTargets.filter(t=>t!==e)}}):o["a"].None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,s=e.targetTouches.length;i<s;i++){let s=e.targetTouches.item(i);this.activeTouches[s.identifier]={id:s.identifier,initialTarget:s.target,initialTimeStamp:t,initialPageX:s.pageX,initialPageY:s.pageY,rollingTimestamps:[t],rollingPageX:[s.pageX],rollingPageY:[s.pageY]};let o=this.newGestureEvent(n.Start,s.target);o.pageX=s.pageX,o.pageY=s.pageY,this.dispatchEvent(o)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}onTouchEnd(e){let t=Date.now(),i=Object.keys(this.activeTouches).length;for(let o=0,r=e.changedTouches.length;o<r;o++){let r=e.changedTouches.item(o);if(!this.activeTouches.hasOwnProperty(String(r.identifier))){console.warn("move of an UNKNOWN touch",r);continue}let a=this.activeTouches[r.identifier],l=Date.now()-a.initialTimeStamp;if(l<h.HOLD_DELAY&&Math.abs(a.initialPageX-s["s"](a.rollingPageX))<30&&Math.abs(a.initialPageY-s["s"](a.rollingPageY))<30){let e=this.newGestureEvent(n.Tap,a.initialTarget);e.pageX=s["s"](a.rollingPageX),e.pageY=s["s"](a.rollingPageY),this.dispatchEvent(e)}else if(l>=h.HOLD_DELAY&&Math.abs(a.initialPageX-s["s"](a.rollingPageX))<30&&Math.abs(a.initialPageY-s["s"](a.rollingPageY))<30){let e=this.newGestureEvent(n.Contextmenu,a.initialTarget);e.pageX=s["s"](a.rollingPageX),e.pageY=s["s"](a.rollingPageY),this.dispatchEvent(e)}else if(1===i){let e=s["s"](a.rollingPageX),i=s["s"](a.rollingPageY),n=s["s"](a.rollingTimestamps)-a.rollingTimestamps[0],o=e-a.rollingPageX[0],r=i-a.rollingPageY[0];const l=this.targets.filter(e=>a.initialTarget instanceof Node&&e.contains(a.initialTarget));this.inertia(l,t,Math.abs(o)/n,o>0?1:-1,e,Math.abs(r)/n,r>0?1:-1,i)}this.dispatchEvent(this.newGestureEvent(n.End,a.initialTarget)),delete this.activeTouches[r.identifier]}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){let i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===n.Tap){const t=(new Date).getTime();let i=0;i=t-this._lastSetTapCountTime>h.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=i}else e.type!==n.Change&&e.type!==n.Contextmenu||(this._lastSetTapCountTime=0);for(let t=0;t<this.ignoreTargets.length;t++)if(e.initialTarget instanceof Node&&this.ignoreTargets[t].contains(e.initialTarget))return;this.targets.forEach(t=>{e.initialTarget instanceof Node&&t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)})}inertia(e,t,i,s,o,a,l,c){this.handle=r["Q"](()=>{let r=Date.now(),d=r-t,u=0,g=0,p=!0;i+=h.SCROLL_FRICTION*d,a+=h.SCROLL_FRICTION*d,i>0&&(p=!1,u=s*i*d),a>0&&(p=!1,g=l*a*d);let m=this.newGestureEvent(n.Change);m.translationX=u,m.translationY=g,e.forEach(e=>e.dispatchEvent(m)),p||this.inertia(e,r,i,s,o+u,a,l,c+g)})}onTouchMove(e){let t=Date.now();for(let i=0,o=e.changedTouches.length;i<o;i++){let o=e.changedTouches.item(i);if(!this.activeTouches.hasOwnProperty(String(o.identifier))){console.warn("end of an UNKNOWN touch",o);continue}let r=this.activeTouches[o.identifier],a=this.newGestureEvent(n.Change,r.initialTarget);a.translationX=o.pageX-s["s"](r.rollingPageX),a.translationY=o.pageY-s["s"](r.rollingPageY),a.pageX=o.pageX,a.pageY=o.pageY,this.dispatchEvent(a),r.rollingPageX.length>3&&(r.rollingPageX.shift(),r.rollingPageY.shift(),r.rollingTimestamps.shift()),r.rollingPageX.push(o.pageX),r.rollingPageY.push(o.pageY),r.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}h.SCROLL_FRICTION=-.005,h.HOLD_DELAY=700,h.CLEAR_TAP_COUNT_TIME=400,l([a["a"]],h,"isTouchDevice",null)},a666:function(e,t,i){"use strict";i.d(t,"g",(function(){return h})),i.d(t,"f",(function(){return c})),i.d(t,"e",(function(){return d})),i.d(t,"h",(function(){return u})),i.d(t,"b",(function(){return g})),i.d(t,"a",(function(){return p})),i.d(t,"d",(function(){return m})),i.d(t,"c",(function(){return f}));var n=i("258a");const s=!1;let o=null;if(s){const e="__is_disposable_tracked__";o=new class{trackDisposable(t){const i=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(i)},3e3)}markTracked(t){if(t&&t!==p.None)try{t[e]=!0}catch(i){}}}}function r(e){o&&o.markTracked(e)}function a(e){return o?(o.trackDisposable(e),e):e}class l extends Error{constructor(e){super(`Encountered errors while disposing of store. Errors: [${e.join(", ")}]`),this.errors=e}}function h(e){return"function"===typeof e.dispose&&0===e.dispose.length}function c(e){if(n["a"].is(e)){let i=[];for(const n of e)if(n){r(n);try{n.dispose()}catch(t){i.push(t)}}if(1===i.length)throw i[0];if(i.length>1)throw new l(i);return Array.isArray(e)?[]:e}if(e)return r(e),e.dispose(),e}function d(...e){return e.forEach(r),u(()=>c(e))}function u(e){const t=a({dispose:()=>{r(t),e()}});return t}class g{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(r(this),this._isDisposed=!0,this.clear())}clear(){try{c(this._toDispose.values())}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return r(e),this._isDisposed?g.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}}g.DISABLE_DISPOSED_WARNING=!1;class p{constructor(){this._store=new g,a(this)}dispose(){r(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}p.None=Object.freeze({dispose(){}});class m{constructor(){this._isDisposed=!1,a(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||(null===(t=this._value)||void 0===t||t.dispose(),e&&r(e),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,r(this),null===(e=this._value)||void 0===e||e.dispose(),this._value=void 0}}class f{constructor(e){this.object=e}dispose(){}}},a6d7:function(e,t,i){"use strict";i.d(t,"c",(function(){return s})),i.d(t,"a",(function(){return r})),i.d(t,"d",(function(){return a})),i.d(t,"b",(function(){return h}));var n=i("303e");function s(e,t){const i=Object.create(null);for(let s in t){const o=t[s];o&&(i[s]=Object(n["Xb"])(o,e))}return i}function o(e,t,i){function n(n){const o=s(e.getColorTheme(),t);"function"===typeof i?i(o):i.style(o)}return n(e.getColorTheme()),e.onDidColorThemeChange(n)}function r(e,t,i){return o(t,Object.assign(Object.assign({},a),i||{}),e)}const a={listFocusBackground:n["pb"],listFocusForeground:n["qb"],listFocusOutline:n["rb"],listActiveSelectionBackground:n["jb"],listActiveSelectionForeground:n["kb"],listFocusAndSelectionBackground:n["jb"],listFocusAndSelectionForeground:n["kb"],listInactiveSelectionBackground:n["xb"],listInactiveSelectionForeground:n["yb"],listInactiveFocusBackground:n["vb"],listInactiveFocusOutline:n["wb"],listHoverBackground:n["tb"],listHoverForeground:n["ub"],listDropBackground:n["lb"],listSelectionOutline:n["b"],listHoverOutline:n["b"],listFilterWidgetBackground:n["mb"],listFilterWidgetOutline:n["ob"],listFilterWidgetNoMatchesOutline:n["nb"],listMatchesShadow:n["kc"],treeIndentGuidesStroke:n["jc"],tableColumnsBorder:n["gc"]},l={shadowColor:n["kc"],borderColor:n["Ab"],foregroundColor:n["Bb"],backgroundColor:n["zb"],selectionForegroundColor:n["Eb"],selectionBackgroundColor:n["Cb"],selectionBorderColor:n["Db"],separatorColor:n["Fb"]};function h(e,t,i){return o(t,Object.assign(Object.assign({},l),i),e)}},a79b:function(e,t,i){"use strict";i.r(t),i.d(t,"jsonDefaults",(function(){return a}));i("33f9");var n=i("0ab8"),s=function(){function e(e,t,i){this._onDidChange=new n["Emitter"],this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"diagnosticsOptions",{get:function(){return this._diagnosticsOptions},enumerable:!1,configurable:!0}),e.prototype.setDiagnosticsOptions=function(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)},e.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},e}(),o={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning"},r={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},a=new s("json",o,r);function l(){return i.e("chunk-e13e4362").then(i.bind(null,"47b9"))}n["languages"].json={jsonDefaults:a},n["languages"].register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]}),n["languages"].onLanguage("json",(function(){l().then((function(e){return e.setupMode(a)}))}))},a8d0:function(e,t,i){"use strict";i.d(t,"g",(function(){return s})),i.d(t,"b",(function(){return r})),i.d(t,"c",(function(){return a})),i.d(t,"d",(function(){return l})),i.d(t,"e",(function(){return h})),i.d(t,"a",(function(){return c})),i.d(t,"f",(function(){return d}));var n=i("3742");class s{constructor(e,t,i,n){this.top=0|e,this.left=0|t,this.width=0|i,this.height=0|n}}class o{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}}class r{constructor(e,t,i){this.breakOffsets=e,this.breakOffsetsVisibleColumn=t,this.wrappedTextIndentLength=i}static getInputOffsetOfOutputPosition(e,t,i){return 0===t?i:e[t-1]+i}static getOutputPositionOfInputOffset(e,t){let i=0,n=e.length-1,s=0,r=0;while(i<=n){s=i+(n-i)/2|0;const o=e[s];if(r=s>0?e[s-1]:0,t<r)n=s-1;else{if(!(t>=o))break;i=s+1}}return new o(s,t-r)}}class a{constructor(e,t){this.tabSize=e,this.data=t}}class l{constructor(e,t,i,n,s,o){this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=s,this.tokens=o}}class h{constructor(e,t,i,n,s,o,r,a,l,c){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=h.isBasicASCII(i,o),this.containsRTL=h.containsRTL(i,this.isBasicASCII,s),this.tokens=r,this.inlineDecorations=a,this.tabSize=l,this.startVisibleColumn=c}static isBasicASCII(e,t){return!t||n["A"](e)}static containsRTL(e,t,i){return!(t||!i)&&n["m"](e)}}class c{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class d{constructor(e,t){this.range=e,this.options=t}}},aa3d:function(e,t,i){"use strict";i.d(t,"b",(function(){return s})),i.d(t,"c",(function(){return o})),i.d(t,"a",(function(){return a})),i.d(t,"f",(function(){return h})),i.d(t,"d",(function(){return c})),i.d(t,"e",(function(){return d}));var n=i("ef8e");function s(e){if(!e||"object"!==typeof e)return e;if(e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach(i=>{e[i]&&"object"===typeof e[i]?t[i]=s(e[i]):t[i]=e[i]}),t}function o(e){if(!e||"object"!==typeof e)return e;const t=[e];while(t.length>0){const e=t.shift();Object.freeze(e);for(const i in e)if(r.call(e,i)){const n=e[i];"object"!==typeof n||Object.isFrozen(n)||t.push(n)}}return e}const r=Object.prototype.hasOwnProperty;function a(e,t){return l(e,t,new Set)}function l(e,t,i){if(Object(n["k"])(e))return e;const s=t(e);if("undefined"!==typeof s)return s;if(Object(n["d"])(e)){const n=[];for(const s of e)n.push(l(s,t,i));return n}if(Object(n["h"])(e)){if(i.has(e))throw new Error("Cannot clone recursive data-structure");i.add(e);const n={};for(let s in e)r.call(e,s)&&(n[s]=l(e[s],t,i));return i.delete(e),n}return e}function h(e,t,i=!0){return Object(n["h"])(e)?(Object(n["h"])(t)&&Object.keys(t).forEach(s=>{s in e?i&&(Object(n["h"])(e[s])&&Object(n["h"])(t[s])?h(e[s],t[s],i):e[s]=t[s]):e[s]=t[s]}),e):t}function c(e,t){if(e===t)return!0;if(null===e||void 0===e||null===t||void 0===t)return!1;if(typeof e!==typeof t)return!1;if("object"!==typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let i,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(!c(e[i],t[i]))return!1}else{const s=[];for(n in e)s.push(n);s.sort();const o=[];for(n in t)o.push(n);if(o.sort(),!c(s,o))return!1;for(i=0;i<s.length;i++)if(!c(e[s[i]],t[s[i]]))return!1}return!0}function d(e,t,i){const n=t(e);return"undefined"===typeof n?i:n}},abf2:function(e,t,i){},af40:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));class n{constructor(e,t=[],i=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=i}}},afa2:function(e,t,i){},b0cd:function(e,t,i){"use strict";i.d(t,"a",(function(){return o})),i.d(t,"b",(function(){return r}));var n=i("4b76"),s=i("0a0f");n["a"];const o=Object(s["c"])("notificationService");class r{}},b223:function(e,t,i){},b2cc:function(e,t,i){"use strict";i.d(t,"a",(function(){return g})),i.d(t,"c",(function(){return f})),i.d(t,"b",(function(){return _})),i.d(t,"e",(function(){return b})),i.d(t,"j",(function(){return v})),i.d(t,"i",(function(){return C})),i.d(t,"l",(function(){return w})),i.d(t,"k",(function(){return S})),i.d(t,"d",(function(){return n})),i.d(t,"h",(function(){return x})),i.d(t,"f",(function(){return k})),i.d(t,"g",(function(){return E}));var n,s=i("dff7"),o=(i("6d8e"),i("5717b")),r=(i("7061"),i("1b69"),i("b78f"),i("7e32")),a=i("9e74"),l=i("4fc3"),h=i("9eb8"),c=i("89cd"),d=i("5d75"),u=i("ef8e");class g{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this._description=e.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){let e=this._kbOpts.kbExpr;this.precondition&&(e=e?l["a"].and(e,this.precondition):this.precondition),h["a"].registerCommandAndKeybindingRule({id:this.id,handler:(e,t)=>this.runCommand(e,t),weight:this._kbOpts.weight,args:this._kbOpts.args,when:e,primary:this._kbOpts.primary,secondary:this._kbOpts.secondary,win:this._kbOpts.win,linux:this._kbOpts.linux,mac:this._kbOpts.mac,description:this._description})}else a["a"].registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),description:this._description})}_registerMenuItem(e){r["d"].appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class p extends g{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort((e,t)=>t[0]-e[0]),{dispose:()=>{for(let e=0;e<this._implementations.length;e++)if(this._implementations[e][1]===t)return void this._implementations.splice(e,1)}}}runCommand(e,t){for(const i of this._implementations){const n=i[1](e,t);if(n){if("boolean"===typeof n)return;return n}}}}class m extends g{constructor(e,t){super(t),this.command=e}runCommand(e,t){return this.command.runCommand(e,t)}}class f extends g{static bindToContribution(e){return class extends f{constructor(e){super(e),this._callback=e.handler}runEditorCommand(t,i,n){const s=e(i);s&&this._callback(e(i),n)}}}runCommand(e,t){const i=e.get(o["a"]),n=i.getFocusedCodeEditor()||i.getActiveCodeEditor();if(n)return n.invokeWithinContext(e=>{const i=e.get(l["b"]);if(i.contextMatchesRules(Object(u["m"])(this.precondition)))return this.runEditorCommand(e,n,t)})}}class _ extends f{constructor(e){super(_.convertOptions(e)),this.label=e.label,this.alias=e.alias}static convertOptions(e){let t;function i(t){return t.menuId||(t.menuId=r["b"].EditorContext),t.title||(t.title=e.label),t.when=l["a"].and(e.precondition,t.when),t}return t=Array.isArray(e.menuOpts)?e.menuOpts:e.menuOpts?[e.menuOpts]:[],Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&t.push(i(e.contextMenuOpts)),e.menuOpts=t,e}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(d["a"]).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class b extends _{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort((e,t)=>t[0]-e[0]),{dispose:()=>{for(let e=0;e<this._implementations.length;e++)if(this._implementations[e][1]===t)return void this._implementations.splice(e,1)}}}run(e,t,i){for(const n of this._implementations){const t=n[1](e,i);if(t){if("boolean"===typeof t)return;return t}}}}function v(e){return D.INSTANCE.registerEditorCommand(e),e}function C(e){const t=new e;return D.INSTANCE.registerEditorAction(t),t}function w(e){return D.INSTANCE.registerEditorAction(e),e}function S(e,t){D.INSTANCE.registerEditorContribution(e,t)}(function(e){function t(e){return D.INSTANCE.getEditorCommand(e)}function i(){return D.INSTANCE.getEditorActions()}function n(){return D.INSTANCE.getEditorContributions()}function s(e){return D.INSTANCE.getEditorContributions().filter(t=>e.indexOf(t.id)>=0)}function o(){return D.INSTANCE.getDiffEditorContributions()}e.getEditorCommand=t,e.getEditorActions=i,e.getEditorContributions=n,e.getSomeEditorContributions=s,e.getDiffEditorContributions=o})(n||(n={}));const y={EditorCommonContributions:"editor.contributions"};class D{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t){this.editorContributions.push({id:e,ctor:t})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function L(e){return e.register(),e}D.INSTANCE=new D,c["a"].add(y.EditorCommonContributions,D.INSTANCE);const x=L(new p({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:r["b"].MenubarEditMenu,group:"1_do",title:s["a"]({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:r["b"].CommandPalette,group:"",title:s["a"]("undo","Undo"),order:1}]}));L(new m(x,{id:"default:undo",precondition:void 0}));const k=L(new p({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:r["b"].MenubarEditMenu,group:"1_do",title:s["a"]({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:r["b"].CommandPalette,group:"",title:s["a"]("redo","Redo"),order:1}]}));L(new m(k,{id:"default:redo",precondition:void 0}));const E=L(new p({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:r["b"].MenubarSelectionMenu,group:"1_basic",title:s["a"]({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:r["b"].CommandPalette,group:"",title:s["a"]("selectAll","Select All"),order:1}]}))},b57f:function(e,t,i){"use strict";i.d(t,"b",(function(){return ot})),i.d(t,"a",(function(){return dt}));var n=i("fdcc"),s=i("308f"),o=i("a666"),r=i("3742"),a=i("6d8e"),l=i("fd49"),h=i("7061"),c=i("6a89"),d=i("8025"),u=i("3352"),g=i("a054");class p{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function m(e,t,i,n,s){let o;for(s.spacesDiff=0,s.looksLikeAlignment=!1,o=0;o<t&&o<n;o++){let t=e.charCodeAt(o),n=i.charCodeAt(o);if(t!==n)break}let r=0,a=0;for(let u=o;u<t;u++){let t=e.charCodeAt(u);32===t?r++:a++}let l=0,h=0;for(let u=o;u<n;u++){let e=i.charCodeAt(u);32===e?l++:h++}if(r>0&&a>0)return;if(l>0&&h>0)return;let c=Math.abs(a-h),d=Math.abs(r-l);if(0===c)return s.spacesDiff=d,void(d>0&&0<=l-1&&l-1<e.length&&l<i.length&&32!==i.charCodeAt(l)&&32===e.charCodeAt(l-1)&&44===e.charCodeAt(e.length-1)&&(s.looksLikeAlignment=!0));d%c!==0||(s.spacesDiff=d/c)}function f(e,t,i){const n=Math.min(e.getLineCount(),1e4);let s=0,o=0,r="",a=0;const l=[2,4,6,8,3,5,7],h=8;let c=[0,0,0,0,0,0,0,0,0],d=new p;for(let p=1;p<=n;p++){let n=e.getLineLength(p),l=e.getLineContent(p);const u=n<=65536;let g=!1,f=0,_=0,b=0;for(let t=0,i=n;t<i;t++){let i=u?l.charCodeAt(t):e.getLineCharCode(p,t);if(9===i)b++;else{if(32!==i){g=!0,f=t;break}_++}}if(!g)continue;if(b>0?s++:_>1&&o++,m(r,a,l,f,d),d.looksLikeAlignment&&(!i||t!==d.spacesDiff))continue;let v=d.spacesDiff;v<=h&&c[v]++,r=l,a=f}let u=i;s!==o&&(u=s<o);let g=t;if(u){let e=u?0:.1*n;l.forEach(t=>{let i=c[t];i>e&&(e=i,g=t)}),4===g&&c[4]>0&&c[2]>0&&c[2]>=c[4]/2&&(g=2)}return{insertSpaces:u,tabSize:g}}function _(e){return(1&e.metadata)>>>0}function b(e,t){e.metadata=254&e.metadata|t<<0}function v(e){return(2&e.metadata)>>>1===1}function C(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function w(e){return(4&e.metadata)>>>2===1}function S(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function y(e){return(8&e.metadata)>>>3===1}function D(e,t){e.metadata=247&e.metadata|(t?1:0)<<3}function L(e){return(48&e.metadata)>>>4}function x(e,t){e.metadata=207&e.metadata|t<<4}function k(e){return(64&e.metadata)>>>6===1}function E(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}class N{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,b(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,S(this,!1),x(this,1),D(this,!1),E(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,C(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;let t=this.options.className;S(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),x(this,this.options.stickiness),D(this,!(!this.options.overviewRuler||!this.options.overviewRuler.color)),E(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const O=new N(null,0,0);O.parent=O,O.left=O,O.right=O,b(O,0);class I{constructor(){this.root=O,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,s){return this.root===O?[]:V(this,e,t,i,n,s)}search(e,t,i){return this.root===O?[]:W(this,e,t,i)}collectNodesFromOwner(e){return P(this,e)}collectNodesPostOrder(){return B(this)}insert(e){j(this,e),this._normalizeDeltaIfNecessary()}delete(e){z(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;while(e!==this.root)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const s=i.start+n,o=i.end+n;i.setCachedOffsets(s,o,t)}acceptReplace(e,t,i,n){const s=R(this,e,e+t);for(let o=0,r=s.length;o<r;o++){const e=s[o];z(this,e)}this._normalizeDeltaIfNecessary(),F(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let o=0,r=s.length;o<r;o++){const r=s[o];r.start=r.cachedAbsoluteStart,r.end=r.cachedAbsoluteEnd,A(r,e,e+t,i,n),r.maxEnd=r.end,j(this,r)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){this.requestNormalizeDelta&&(this.requestNormalizeDelta=!1,T(this))}}function T(e){let t=e.root,i=0;while(t!==O)t.left===O||v(t.left)?t.right===O||v(t.right)?(t.start=i+t.start,t.end=i+t.end,t.delta=0,Y(t),C(t,!0),C(t.left,!1),C(t.right,!1),t===t.parent.right&&(i-=t.parent.delta),t=t.parent):(i+=t.delta,t=t.right):t=t.left;C(e.root,!1)}function M(e,t,i,n){return e<i||!(e>i)&&(1!==n&&(2===n||t))}function A(e,t,i,n,s){const o=L(e),r=0===o||2===o,a=1===o||2===o,l=i-t,h=n,c=Math.min(l,h),d=e.start;let u=!1;const g=e.end;let p=!1;t<=d&&g<=i&&k(e)&&(e.start=t,u=!0,e.end=t,p=!0);{const e=s?1:l>0?2:0;!u&&M(d,r,t,e)&&(u=!0),!p&&M(g,a,t,e)&&(p=!0)}if(c>0&&!s){const e=l>h?2:0;!u&&M(d,r,t+c,e)&&(u=!0),!p&&M(g,a,t+c,e)&&(p=!0)}{const n=s?1:0;!u&&M(d,r,i,n)&&(e.start=t+h,u=!0),!p&&M(g,a,i,n)&&(e.end=t+h,p=!0)}const m=h-l;u||(e.start=Math.max(0,d+m)),p||(e.end=Math.max(0,g+m)),e.start>e.end&&(e.end=e.start)}function R(e,t,i){let n=e.root,s=0,o=0,r=0,a=0,l=[],h=0;while(n!==O)if(v(n))C(n.left,!1),C(n.right,!1),n===n.parent.right&&(s-=n.parent.delta),n=n.parent;else{if(!v(n.left)){if(o=s+n.maxEnd,o<t){C(n,!0);continue}if(n.left!==O){n=n.left;continue}}r=s+n.start,r>i?C(n,!0):(a=s+n.end,a>=t&&(n.setCachedOffsets(r,a,0),l[h++]=n),C(n,!0),n.right===O||v(n.right)||(s+=n.delta,n=n.right))}return C(e.root,!1),l}function F(e,t,i,n){let s=e.root,o=0,r=0,a=0;const l=n-(i-t);while(s!==O)if(v(s))C(s.left,!1),C(s.right,!1),s===s.parent.right&&(o-=s.parent.delta),Y(s),s=s.parent;else{if(!v(s.left)){if(r=o+s.maxEnd,r<t){C(s,!0);continue}if(s.left!==O){s=s.left;continue}}a=o+s.start,a>i?(s.start+=l,s.end+=l,s.delta+=l,(s.delta<-1073741824||s.delta>1073741824)&&(e.requestNormalizeDelta=!0),C(s,!0)):(C(s,!0),s.right===O||v(s.right)||(o+=s.delta,s=s.right))}C(e.root,!1)}function P(e,t){let i=e.root,n=[],s=0;while(i!==O)v(i)?(C(i.left,!1),C(i.right,!1),i=i.parent):i.left===O||v(i.left)?(i.ownerId===t&&(n[s++]=i),C(i,!0),i.right===O||v(i.right)||(i=i.right)):i=i.left;return C(e.root,!1),n}function B(e){let t=e.root,i=[],n=0;while(t!==O)v(t)?(C(t.left,!1),C(t.right,!1),t=t.parent):t.left===O||v(t.left)?t.right===O||v(t.right)?(i[n++]=t,C(t,!0)):t=t.right:t=t.left;return C(e.root,!1),i}function W(e,t,i,n){let s=e.root,o=0,r=0,a=0,l=[],h=0;while(s!==O){if(v(s)){C(s.left,!1),C(s.right,!1),s===s.parent.right&&(o-=s.parent.delta),s=s.parent;continue}if(s.left!==O&&!v(s.left)){s=s.left;continue}r=o+s.start,a=o+s.end,s.setCachedOffsets(r,a,n);let e=!0;t&&s.ownerId&&s.ownerId!==t&&(e=!1),i&&w(s)&&(e=!1),e&&(l[h++]=s),C(s,!0),s.right===O||v(s.right)||(o+=s.delta,s=s.right)}return C(e.root,!1),l}function V(e,t,i,n,s,o){let r=e.root,a=0,l=0,h=0,c=0,d=[],u=0;while(r!==O)if(v(r))C(r.left,!1),C(r.right,!1),r===r.parent.right&&(a-=r.parent.delta),r=r.parent;else{if(!v(r.left)){if(l=a+r.maxEnd,l<t){C(r,!0);continue}if(r.left!==O){r=r.left;continue}}if(h=a+r.start,h>i)C(r,!0);else{if(c=a+r.end,c>=t){r.setCachedOffsets(h,c,o);let e=!0;n&&r.ownerId&&r.ownerId!==n&&(e=!1),s&&w(r)&&(e=!1),e&&(d[u++]=r)}C(r,!0),r.right===O||v(r.right)||(a+=r.delta,r=r.right)}}return C(e.root,!1),d}function j(e,t){if(e.root===O)return t.parent=O,t.left=O,t.right=O,b(t,0),e.root=t,e.root;H(e,t),Z(t.parent);let i=t;while(i!==e.root&&1===_(i.parent))if(i.parent===i.parent.parent.left){const t=i.parent.parent.right;1===_(t)?(b(i.parent,0),b(t,0),b(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&(i=i.parent,$(e,i)),b(i.parent,0),b(i.parent.parent,1),q(e,i.parent.parent))}else{const t=i.parent.parent.left;1===_(t)?(b(i.parent,0),b(t,0),b(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&(i=i.parent,q(e,i)),b(i.parent,0),b(i.parent.parent,1),$(e,i.parent.parent))}return b(e.root,0),t}function H(e,t){let i=0,n=e.root;const s=t.start,o=t.end;while(1){const e=X(s,o,n.start+i,n.end+i);if(e<0){if(n.left===O){t.start-=i,t.end-=i,t.maxEnd-=i,n.left=t;break}n=n.left}else{if(n.right===O){t.start-=i+n.delta,t.end-=i+n.delta,t.maxEnd-=i+n.delta,n.right=t;break}i+=n.delta,n=n.right}}t.parent=n,t.left=O,t.right=O,b(t,1)}function z(e,t){let i,n;if(t.left===O?(i=t.right,n=t,i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta):t.right===O?(i=t.left,n=t):(n=U(t.right),i=n.right,i.start+=n.delta,i.end+=n.delta,i.delta+=n.delta,(i.delta<-1073741824||i.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=i,b(i,0),t.detach(),K(),Y(i),void(e.root.parent=O);let s,o=1===_(n);if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?i.parent=n.parent:(n.parent===t?i.parent=n:i.parent=n.parent,n.left=t.left,n.right=t.right,n.parent=t.parent,b(n,_(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==O&&(n.left.parent=n),n.right!==O&&(n.right.parent=n)),t.detach(),o)return Z(i.parent),n!==t&&(Z(n),Z(n.parent)),void K();Z(i),Z(i.parent),n!==t&&(Z(n),Z(n.parent));while(i!==e.root&&0===_(i))i===i.parent.left?(s=i.parent.right,1===_(s)&&(b(s,0),b(i.parent,1),$(e,i.parent),s=i.parent.right),0===_(s.left)&&0===_(s.right)?(b(s,1),i=i.parent):(0===_(s.right)&&(b(s.left,0),b(s,1),q(e,s),s=i.parent.right),b(s,_(i.parent)),b(i.parent,0),b(s.right,0),$(e,i.parent),i=e.root)):(s=i.parent.left,1===_(s)&&(b(s,0),b(i.parent,1),q(e,i.parent),s=i.parent.left),0===_(s.left)&&0===_(s.right)?(b(s,1),i=i.parent):(0===_(s.left)&&(b(s.right,0),b(s,1),$(e,s),s=i.parent.left),b(s,_(i.parent)),b(i.parent,0),b(s.left,0),q(e,i.parent),i=e.root));b(i,0),K()}function U(e){while(e.left!==O)e=e.left;return e}function K(){O.parent=O,O.delta=0,O.start=0,O.end=0}function $(e,t){const i=t.right;i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,t.right=i.left,i.left!==O&&(i.left.parent=t),i.parent=t.parent,t.parent===O?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i,Y(t),Y(i)}function q(e,t){const i=t.left;t.delta-=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=i.delta,t.end-=i.delta,t.left=i.right,i.right!==O&&(i.right.parent=t),i.parent=t.parent,t.parent===O?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i,Y(t),Y(i)}function G(e){let t=e.end;if(e.left!==O){const i=e.left.maxEnd;i>t&&(t=i)}if(e.right!==O){const i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function Y(e){e.maxEnd=G(e)}function Z(e){while(e!==O){const t=G(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}function X(e,t,i,n){return e===i?t-n:e-i}class Q{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==J)return ee(this.right);let e=this;while(e.parent!==J){if(e.parent.left===e)break;e=e.parent}return e.parent===J?J:e.parent}prev(){if(this.left!==J)return te(this.left);let e=this;while(e.parent!==J){if(e.parent.right===e)break;e=e.parent}return e.parent===J?J:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const J=new Q(null,0);function ee(e){while(e.left!==J)e=e.left;return e}function te(e){while(e.right!==J)e=e.right;return e}function ie(e){return e===J?0:e.size_left+e.piece.length+ie(e.right)}function ne(e){return e===J?0:e.lf_left+e.piece.lineFeedCnt+ne(e.right)}function se(){J.parent=J}function oe(e,t){let i=t.right;i.size_left+=t.size_left+(t.piece?t.piece.length:0),i.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=i.left,i.left!==J&&(i.left.parent=t),i.parent=t.parent,t.parent===J?e.root=i:t.parent.left===t?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i}function re(e,t){let i=t.left;t.left=i.right,i.right!==J&&(i.right.parent=t),i.parent=t.parent,t.size_left-=i.size_left+(i.piece?i.piece.length:0),t.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),t.parent===J?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i}function ae(e,t){let i,n;if(t.left===J?(n=t,i=n.right):t.right===J?(n=t,i=n.left):(n=ee(t.right),i=n.right),n===e.root)return e.root=i,i.color=0,t.detach(),se(),void(e.root.parent=J);let s,o=1===n.color;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?(i.parent=n.parent,ce(e,i)):(n.parent===t?i.parent=n:i.parent=n.parent,ce(e,i),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!==J&&(n.left.parent=n),n.right!==J&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,ce(e,n)),t.detach(),i.parent.left===i){let t=ie(i),n=ne(i);if(t!==i.parent.size_left||n!==i.parent.lf_left){let s=t-i.parent.size_left,o=n-i.parent.lf_left;i.parent.size_left=t,i.parent.lf_left=n,he(e,i.parent,s,o)}}if(ce(e,i.parent),o)se();else{while(i!==e.root&&0===i.color)i===i.parent.left?(s=i.parent.right,1===s.color&&(s.color=0,i.parent.color=1,oe(e,i.parent),s=i.parent.right),0===s.left.color&&0===s.right.color?(s.color=1,i=i.parent):(0===s.right.color&&(s.left.color=0,s.color=1,re(e,s),s=i.parent.right),s.color=i.parent.color,i.parent.color=0,s.right.color=0,oe(e,i.parent),i=e.root)):(s=i.parent.left,1===s.color&&(s.color=0,i.parent.color=1,re(e,i.parent),s=i.parent.left),0===s.left.color&&0===s.right.color?(s.color=1,i=i.parent):(0===s.left.color&&(s.right.color=0,s.color=1,oe(e,s),s=i.parent.left),s.color=i.parent.color,i.parent.color=0,s.left.color=0,re(e,i.parent),i=e.root));i.color=0,se()}}function le(e,t){ce(e,t);while(t!==e.root&&1===t.parent.color)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&(t=t.parent,oe(e,t)),t.parent.color=0,t.parent.parent.color=1,re(e,t.parent.parent))}else{const i=t.parent.parent.left;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&(t=t.parent,re(e,t)),t.parent.color=0,t.parent.parent.color=1,oe(e,t.parent.parent))}e.root.color=0}function he(e,t,i,n){while(t!==e.root&&t!==J)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}function ce(e,t){let i=0,n=0;if(t!==e.root){if(0===i){while(t!==e.root&&t===t.parent.right)t=t.parent;if(t===e.root)return;t=t.parent,i=ie(t.left)-t.size_left,n=ne(t.left)-t.lf_left,t.size_left+=i,t.lf_left+=n}while(t!==e.root&&(0!==i||0!==n))t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}}J.parent=J,J.left=J,J.right=J,J.color=0;var de=i("8c02");const ue=65535;function ge(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class pe{constructor(e,t,i,n,s){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=s}}function me(e,t=!0){let i=[0],n=1;for(let s=0,o=e.length;s<o;s++){const t=e.charCodeAt(s);13===t?s+1<o&&10===e.charCodeAt(s+1)?(i[n++]=s+2,s++):i[n++]=s+1:10===t&&(i[n++]=s+1)}return t?ge(i):i}function fe(e,t){e.length=0,e[0]=0;let i=1,n=0,s=0,o=0,r=!0;for(let l=0,h=t.length;l<h;l++){const a=t.charCodeAt(l);13===a?l+1<h&&10===t.charCodeAt(l+1)?(o++,e[i++]=l+2,l++):(n++,e[i++]=l+1):10===a?(s++,e[i++]=l+1):r&&9!==a&&(a<32||a>126)&&(r=!1)}const a=new pe(ge(e),n,s,o,r);return e.length=0,a}class _e{constructor(e,t,i,n,s){this.bufferIndex=e,this.start=t,this.end=i,this.lineFeedCnt=n,this.length=s}}class be{constructor(e,t){this.buffer=e,this.lineStarts=t}}class ve{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==J&&e.iterate(e.root,e=>(e!==J&&this._pieces.push(e.piece),!0))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class Ce{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){let i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){let i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber<e&&i.nodeStartLineNumber+i.node.piece.lineFeedCnt>=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1,i=this._cache;for(let n=0;n<i.length;n++){let s=i[n];(null===s.node.parent||s.nodeStartOffset>=e)&&(i[n]=null,t=!0)}if(t){let e=[];for(const t of i)null!==t&&e.push(t);this._cache=e}}}class we{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new be("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=J,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let s=0,o=e.length;s<o;s++)if(e[s].buffer.length>0){e[s].lineStarts||(e[s].lineStarts=me(e[s].buffer));let t=new _e(s+1,{line:0,column:0},{line:e[s].lineStarts.length-1,column:e[s].buffer.length-e[s].lineStarts[e[s].lineStarts.length-1]},e[s].lineStarts.length-1,e[s].buffer.length);this._buffers.push(e[s]),n=this.rbInsertRight(n,t)}this._searchCache=new Ce(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){let t=ue,i=t-Math.floor(t/3),n=2*i,s="",o=0,r=[];if(this.iterate(this.root,t=>{let a=this.getNodeContent(t),l=a.length;if(o<=i||o+l<n)return s+=a,o+=l,!0;let h=s.replace(/\r\n|\r|\n/g,e);return r.push(new be(h,me(h))),s=a,o=l,!0}),o>0){let t=s.replace(/\r\n|\r|\n/g,e);r.push(new be(t,me(t)))}this.create(r,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new ve(this,e)}getOffsetAt(e,t){let i=0,n=this.root;while(n!==J)if(n.left!==J&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e){i+=n.size_left;let s=this.getAccumulatedValue(n,e-n.lf_left-2);return i+(s+t-1)}e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,i=0,n=e;while(t!==J)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){let s=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+s.index,0===s.index){let e=this.getOffsetAt(i+1,1),t=n-e;return new h["a"](i+1,t+1)}return new h["a"](i+1,s.remainder+1)}if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===J){let t=this.getOffsetAt(i+1,1),s=n-e-t;return new h["a"](i+1,s+1)}t=t.right}return new h["a"](1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";let i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),s=this.getValueInRange2(i,n);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?s:s.replace(/\r\n|\r|\n/g,t):s}getValueInRange2(e,t){if(e.node===t.node){let i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n.substring(s+e.remainder,s+t.remainder)}let i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start),o=n.substring(s+e.remainder,s+i.piece.length);i=i.next();while(i!==J){let e=this._buffers[i.piece.bufferIndex].buffer,n=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){o+=e.substring(n,n+t.remainder);break}o+=e.substr(n,i.piece.length),i=i.next()}return o}getLinesContent(){let e=[],t=0,i="",n=!1;return this.iterate(this.root,s=>{if(s===J)return!0;const o=s.piece;let r=o.length;if(0===r)return!0;const a=this._buffers[o.bufferIndex].buffer,l=this._buffers[o.bufferIndex].lineStarts,h=o.start.line,c=o.end.line;let d=l[h]+o.start.column;if(n&&(10===a.charCodeAt(d)&&(d++,r--),e[t++]=i,i="",n=!1,0===r))return!0;if(h===c)return this._EOLNormalized||13!==a.charCodeAt(d+r-1)?i+=a.substr(d,r):(n=!0,i+=a.substr(d,r-1)),!0;i+=this._EOLNormalized?a.substring(d,Math.max(d,l[h+1]-this._EOLLength)):a.substring(d,l[h+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let n=h+1;n<c;n++)i=this._EOLNormalized?a.substring(l[n],l[n+1]-this._EOLLength):a.substring(l[n],l[n+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;return this._EOLNormalized||13!==a.charCodeAt(l[c]+o.end.column-1)?i=a.substr(l[c],o.end.column):(n=!0,0===o.end.column?t--:i=a.substr(l[c],o.end.column-1)),!0}),n&&(e[t++]=i,i=""),e[t++]=i,e}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(e){return this._lastVisitedLine.lineNumber===e||(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}_getCharCode(e){if(e.remainder===e.node.piece.length){let t=e.node.next();if(!t)return 0;let i=this._buffers[t.piece.bufferIndex],n=this.offsetInBuffer(t.piece.bufferIndex,t.piece.start);return i.buffer.charCodeAt(n)}{let t=this._buffers[e.node.piece.bufferIndex],i=this.offsetInBuffer(e.node.piece.bufferIndex,e.node.piece.start),n=i+e.remainder;return t.buffer.charCodeAt(n)}}getLineCharCode(e,t){let i=this.nodeAt2(e,t+1);return this._getCharCode(i)}getLineLength(e){if(e===this.getLineCount()){let t=this.getOffsetAt(e,1);return this.getLength()-t}return this.getOffsetAt(e+1,1)-this.getOffsetAt(e,1)-this._EOLLength}findMatchesInNode(e,t,i,n,s,o,r,a,l,h,d){let u,g,p,m=this._buffers[e.piece.bufferIndex],f=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),_=this.offsetInBuffer(e.piece.bufferIndex,s),b=this.offsetInBuffer(e.piece.bufferIndex,o),v={line:0,column:0};t._wordSeparators?(g=m.buffer.substring(_,b),p=e=>e+_,t.reset(0)):(g=m.buffer,p=e=>e,t.reset(_));do{if(u=t.next(g),u){if(p(u.index)>=b)return h;this.positionInBuffer(e,p(u.index)-f,v);let t=this.getLineFeedCnt(e.piece.bufferIndex,s,v),o=v.line===s.line?v.column-s.column+n:v.column+1,r=o+u[0].length;if(d[h++]=Object(de["d"])(new c["a"](i+t,o,i+t,r),u,a),p(u.index)+u[0].length>=b)return h;if(h>=l)return h}}while(u);return h}findMatchesLineByLine(e,t,i,n){const s=[];let o=0;const r=new de["b"](t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];let l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let h=this.positionInBuffer(a.node,a.remainder),c=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,r,e.startLineNumber,e.startColumn,h,c,t,i,n,o,s),s;let d=e.startLineNumber,u=a.node;while(u!==l.node){let l=this.getLineFeedCnt(u.piece.bufferIndex,h,u.piece.end);if(l>=1){let a=this._buffers[u.piece.bufferIndex].lineStarts,c=this.offsetInBuffer(u.piece.bufferIndex,u.piece.start),g=a[h.line+l],p=d===e.startLineNumber?e.startColumn:1;if(o=this.findMatchesInNode(u,r,d,p,h,this.positionInBuffer(u,g-c),t,i,n,o,s),o>=n)return s;d+=l}let c=d===e.startLineNumber?e.startColumn-1:0;if(d===e.endLineNumber){const a=this.getLineContent(d).substring(c,e.endColumn-1);return o=this._findMatchesInLine(t,r,a,e.endLineNumber,c,o,s,i,n),s}if(o=this._findMatchesInLine(t,r,this.getLineContent(d).substr(c),d,c,o,s,i,n),o>=n)return s;d++,a=this.nodeAt2(d,1),u=a.node,h=this.positionInBuffer(a.node,a.remainder)}if(d===e.endLineNumber){let a=d===e.startLineNumber?e.startColumn-1:0;const l=this.getLineContent(d).substring(a,e.endColumn-1);return o=this._findMatchesInLine(t,r,l,e.endLineNumber,a,o,s,i,n),s}let g=d===e.startLineNumber?e.startColumn:1;return o=this.findMatchesInNode(l.node,r,d,g,h,c,t,i,n,o,s),s}_findMatchesInLine(e,t,i,n,s,o,r,a,l){const h=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,d=i.length;let g=-a;while(-1!==(g=i.indexOf(t,g+a)))if((!h||Object(de["e"])(h,i,d,g,a))&&(r[o++]=new u["b"](new c["a"](n,g+1+s,n,g+1+a+s),null),o>=l))return o;return o}let d;t.reset(0);do{if(d=t.next(i),d&&(r[o++]=Object(de["d"])(new c["a"](n,d.index+1+s,n,d.index+1+d[0].length+s),d,a),o>=l))return o}while(d);return o}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==J){let{node:i,remainder:n,nodeStartOffset:s}=this.nodeAt(e),o=i.piece,r=o.bufferIndex,a=this.positionInBuffer(i,n);if(0===i.piece.bufferIndex&&o.end.line===this._lastChangeBufferPos.line&&o.end.column===this._lastChangeBufferPos.column&&s+o.length===e&&t.length<ue)return this.appendToNode(i,t),void this.computeBufferMetadata();if(s===e)this.insertContentToNodeLeft(t,i),this._searchCache.validate(e);else if(s+i.piece.length>e){let e=[],s=new _e(o.bufferIndex,a,o.end,this.getLineFeedCnt(o.bufferIndex,a,o.end),this.offsetInBuffer(r,o.end)-this.offsetInBuffer(r,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)){let e=this.nodeCharCodeAt(i,n);if(10===e){let e={line:s.start.line+1,column:0};s=new _e(s.bufferIndex,e,s.end,this.getLineFeedCnt(s.bufferIndex,e,s.end),s.length-1),t+="\n"}}if(this.shouldCheckCRLF()&&this.startWithLF(t)){let s=this.nodeCharCodeAt(i,n-1);if(13===s){let s=this.positionInBuffer(i,n-1);this.deleteNodeTail(i,s),t="\r"+t,0===i.piece.length&&e.push(i)}else this.deleteNodeTail(i,a)}else this.deleteNodeTail(i,a);let l=this.createNewPieces(t);s.length>0&&this.rbInsertRight(i,s);let h=i;for(let t=0;t<l.length;t++)h=this.rbInsertRight(h,l[t]);this.deleteNodes(e)}else this.insertContentToNodeRight(t,i)}else{let e=this.createNewPieces(t),i=this.rbInsertLeft(null,e[0]);for(let t=1;t<e.length;t++)i=this.rbInsertRight(i,e[t])}this.computeBufferMetadata()}delete(e,t){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",t<=0||this.root===J)return;let i=this.nodeAt(e),n=this.nodeAt(e+t),s=i.node,o=n.node;if(s===o){let o=this.positionInBuffer(s,i.remainder),r=this.positionInBuffer(s,n.remainder);if(i.nodeStartOffset===e){if(t===s.piece.length){let e=s.next();return ae(this,s),this.validateCRLFWithPrevNode(e),void this.computeBufferMetadata()}return this.deleteNodeHead(s,r),this._searchCache.validate(e),this.validateCRLFWithPrevNode(s),void this.computeBufferMetadata()}return i.nodeStartOffset+s.piece.length===e+t?(this.deleteNodeTail(s,o),this.validateCRLFWithNextNode(s),void this.computeBufferMetadata()):(this.shrinkNode(s,o,r),void this.computeBufferMetadata())}let r=[],a=this.positionInBuffer(s,i.remainder);this.deleteNodeTail(s,a),this._searchCache.validate(e),0===s.piece.length&&r.push(s);let l=this.positionInBuffer(o,n.remainder);this.deleteNodeHead(o,l),0===o.piece.length&&r.push(o);let h=s.next();for(let d=h;d!==J&&d!==o;d=d.next())r.push(d);let c=0===s.piece.length?s.prev():s;this.deleteNodes(r),this.validateCRLFWithNextNode(c),this.computeBufferMetadata()}insertContentToNodeLeft(e,t){let i=[];if(this.shouldCheckCRLF()&&this.endWithCR(e)&&this.startWithLF(t)){let n=t.piece,s={line:n.start.line+1,column:0},o=new _e(n.bufferIndex,s,n.end,this.getLineFeedCnt(n.bufferIndex,s,n.end),n.length-1);t.piece=o,e+="\n",he(this,t,-1,-1),0===t.piece.length&&i.push(t)}let n=this.createNewPieces(e),s=this.rbInsertLeft(t,n[n.length-1]);for(let o=n.length-2;o>=0;o--)s=this.rbInsertLeft(s,n[o]);this.validateCRLFWithPrevNode(s),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");let i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]),s=n;for(let o=1;o<i.length;o++)s=this.rbInsertRight(s,i[o]);this.validateCRLFWithPrevNode(n)}positionInBuffer(e,t,i){let n=e.piece,s=e.piece.bufferIndex,o=this._buffers[s].lineStarts,r=o[n.start.line]+n.start.column,a=r+t,l=n.start.line,h=n.end.line,c=0,d=0,u=0;while(l<=h){if(c=l+(h-l)/2|0,u=o[c],c===h)break;if(d=o[c+1],a<u)h=c-1;else{if(!(a>=d))break;l=c+1}}return i?(i.line=c,i.column=a-u,null):{line:c,column:a-u}}getLineFeedCnt(e,t,i){if(0===i.column)return i.line-t.line;let n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;let s=n[i.line+1],o=n[i.line]+i.column;if(s>o+1)return i.line-t.line;let r=o-1,a=this._buffers[e].buffer;return 13===a.charCodeAt(r)?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){let i=this._buffers[e].lineStarts;return i[t.line]+t.column}deleteNodes(e){for(let t=0;t<e.length;t++)ae(this,e[t])}createNewPieces(e){if(e.length>ue){let t=[];while(e.length>ue){const i=e.charCodeAt(ue-1);let n;13===i||i>=55296&&i<=56319?(n=e.substring(0,ue-1),e=e.substring(ue-1)):(n=e.substring(0,ue),e=e.substring(ue));let s=me(n);t.push(new _e(this._buffers.length,{line:0,column:0},{line:s.length-1,column:n.length-s[s.length-1]},s.length-1,n.length)),this._buffers.push(new be(n,s))}let i=me(e);return t.push(new _e(this._buffers.length,{line:0,column:0},{line:i.length-1,column:e.length-i[i.length-1]},i.length-1,e.length)),this._buffers.push(new be(e,i)),t}let t=this._buffers[0].buffer.length;const i=me(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let e=0;e<i.length;e++)i[e]+=t+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+="_"+e,t+=1}else{if(0!==t)for(let e=0;e<i.length;e++)i[e]+=t;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+=e}const s=this._buffers[0].buffer.length;let o=this._buffers[0].lineStarts.length-1,r=s-this._buffers[0].lineStarts[o],a={line:o,column:r},l=new _e(0,n,a,this.getLineFeedCnt(0,n,a),s-t);return this._lastChangeBufferPos=a,[l]}getLineRawContent(e,t=0){let i=this.root,n="",s=this._searchCache.get2(e);if(s){i=s.node;let o=this.getAccumulatedValue(i,e-s.nodeStartLineNumber-1),r=this._buffers[i.piece.bufferIndex].buffer,a=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(s.nodeStartLineNumber+i.piece.lineFeedCnt!==e){let n=this.getAccumulatedValue(i,e-s.nodeStartLineNumber);return r.substring(a+o,a+n-t)}n=r.substring(a+o,a+i.piece.length)}else{let s=0;const o=e;while(i!==J)if(i.left!==J&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){let n=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return s+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:s,nodeStartLineNumber:o-(e-1-i.lf_left)}),a.substring(l+n,l+r-t)}if(i.lf_left+i.piece.lineFeedCnt===e-1){let t=this.getAccumulatedValue(i,e-i.lf_left-2),s=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=s.substring(o+t,o+i.piece.length);break}e-=i.lf_left+i.piece.lineFeedCnt,s+=i.size_left+i.piece.length,i=i.right}}i=i.next();while(i!==J){let e=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){let s=this.getAccumulatedValue(i,0),o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=e.substring(o,o+s-t),n}{let t=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=e.substr(t,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;while(e!==J)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){let i=e.piece,n=this.positionInBuffer(e,t),s=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){let t=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(t!==s)return{index:t,remainder:0}}return{index:s,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;let i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,s=i.start.line+t+1;return s>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[s]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.end),o=t,r=this.offsetInBuffer(i.bufferIndex,o),a=this.getLineFeedCnt(i.bufferIndex,i.start,o),l=a-n,h=r-s,c=i.length+h;e.piece=new _e(i.bufferIndex,i.start,o,a,c),he(this,e,h,l)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.start),o=t,r=this.getLineFeedCnt(i.bufferIndex,o,i.end),a=this.offsetInBuffer(i.bufferIndex,o),l=r-n,h=s-a,c=i.length+h;e.piece=new _e(i.bufferIndex,o,i.end,r,c),he(this,e,h,l)}shrinkNode(e,t,i){const n=e.piece,s=n.start,o=n.end,r=n.length,a=n.lineFeedCnt,l=t,h=this.getLineFeedCnt(n.bufferIndex,n.start,l),c=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,s);e.piece=new _e(n.bufferIndex,n.start,l,h,c),he(this,e,c-r,h-a);let d=new _e(n.bufferIndex,i,o,this.getLineFeedCnt(n.bufferIndex,i,o),this.offsetInBuffer(n.bufferIndex,o)-this.offsetInBuffer(n.bufferIndex,i)),u=this.rbInsertRight(e,d);this.validateCRLFWithPrevNode(u)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const s=me(t,!1);for(let u=0;u<s.length;u++)s[u]+=n;if(i){let e=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:n-e}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(s.slice(1));const o=this._buffers[0].lineStarts.length-1,r=this._buffers[0].buffer.length-this._buffers[0].lineStarts[o],a={line:o,column:r},l=e.piece.length+t.length,h=e.piece.lineFeedCnt,c=this.getLineFeedCnt(0,e.piece.start,a),d=c-h;e.piece=new _e(e.piece.bufferIndex,e.piece.start,a,c,l),this._lastChangeBufferPos=a,he(this,e,t.length,d)}nodeAt(e){let t=this.root,i=this._searchCache.get(e);if(i)return{node:i.node,nodeStartOffset:i.nodeStartOffset,remainder:e-i.nodeStartOffset};let n=0;while(t!==J)if(t.size_left>e)t=t.left;else{if(t.size_left+t.piece.length>=e){n+=t.size_left;let 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}nodeAt2(e,t){let i=this.root,n=0;while(i!==J)if(i.left!==J&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){let s=this.getAccumulatedValue(i,e-i.lf_left-2),o=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(s+t-1,o),nodeStartOffset:n}}if(i.lf_left+i.piece.lineFeedCnt===e-1){let s=this.getAccumulatedValue(i,e-i.lf_left-2);if(s+t-1<=i.piece.length)return{node:i,remainder:s+t-1,nodeStartOffset:n};t-=i.piece.length-s;break}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}i=i.next();while(i!==J){if(i.piece.lineFeedCnt>0){let e=this.getAccumulatedValue(i,0),n=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,e),nodeStartOffset:n}}if(i.piece.length>=t-1){let e=this.offsetOfNode(i);return{node:i,remainder:t-1,nodeStartOffset:e}}t-=i.piece.length,i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;let i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;while(e!==this.root)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"===typeof e)return 10===e.charCodeAt(0);if(e===J||0===e.piece.lineFeedCnt)return!1;let t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,s=i[n]+t.start.column;if(n===i.length-1)return!1;let o=i[n+1];return!(o>s+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(s)}endWithCR(e){return"string"===typeof e?13===e.charCodeAt(e.length-1):e!==J&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){let t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){let i,n=[],s=this._buffers[e.piece.bufferIndex].lineStarts;i=0===e.piece.end.column?{line:e.piece.end.line-1,column:s[e.piece.end.line]-s[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const o=e.piece.length-1,r=e.piece.lineFeedCnt-1;e.piece=new _e(e.piece.bufferIndex,e.piece.start,i,r,o),he(this,e,-1,-1),0===e.piece.length&&n.push(e);let a={line:t.piece.start.line+1,column:0};const l=t.piece.length-1,h=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new _e(t.piece.bufferIndex,a,t.piece.end,h,l),he(this,t,-1,-1),0===t.piece.length&&n.push(t);let c=this.createNewPieces("\r\n");this.rbInsertRight(e,c[0]);for(let d=0;d<n.length;d++)ae(this,n[d])}adjustCarriageReturnFromNext(e,t){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let i=t.next();if(this.startWithLF(i)){if(e+="\n",1===i.piece.length)ae(this,i);else{const e=i.piece,t={line:e.start.line+1,column:0},n=e.length-1,s=this.getLineFeedCnt(e.bufferIndex,t,e.end);i.piece=new _e(e.bufferIndex,t,e.end,s,n),he(this,i,-1,-1)}return!0}}return!1}iterate(e,t){if(e===J)return t(J);let i=this.iterate(e.left,t);return i?t(e)&&this.iterate(e.right,t):i}getNodeContent(e){if(e===J)return"";let t,i=this._buffers[e.piece.bufferIndex],n=e.piece,s=this.offsetInBuffer(n.bufferIndex,n.start),o=this.offsetInBuffer(n.bufferIndex,n.end);return t=i.buffer.substring(s,o),t}getPieceContent(e){let t=this._buffers[e.bufferIndex],i=this.offsetInBuffer(e.bufferIndex,e.start),n=this.offsetInBuffer(e.bufferIndex,e.end),s=t.buffer.substring(i,n);return s}rbInsertRight(e,t){let i=new Q(t,1);i.left=J,i.right=J,i.parent=J,i.size_left=0,i.lf_left=0;let n=this.root;if(n===J)this.root=i,i.color=0;else if(e.right===J)e.right=i,i.parent=e;else{let t=ee(e.right);t.left=i,i.parent=t}return le(this,i),i}rbInsertLeft(e,t){let i=new Q(t,1);if(i.left=J,i.right=J,i.parent=J,i.size_left=0,i.lf_left=0,this.root===J)this.root=i,i.color=0;else if(e.left===J)e.left=i,i.parent=e;else{let t=te(e.left);t.right=i,i.parent=t}return le(this,i),i}}var Se=i("4111"),ye=i("e6793");class De extends o["a"]{constructor(e,t,i,n,o,r,a){super(),this._onDidChangeContent=this._register(new s["a"]),this._BOM=t,this._mightContainNonBasicASCII=!r,this._mightContainRTL=n,this._mightContainUnusualLineTerminators=o,this._pieceTree=new we(e,i,a)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(e){return this._pieceTree.createSnapshot(e?this._BOM:"")}getOffsetAt(e,t){return this._pieceTree.getOffsetAt(e,t)}getPositionAt(e){return this._pieceTree.getPositionAt(e)}getRangeAt(e,t){let i=e+t;const n=this.getPositionAt(e),s=this.getPositionAt(i);return new c["a"](n.lineNumber,n.column,s.lineNumber,s.column)}getValueInRange(e,t=0){if(e.isEmpty())return"";const i=this._getEndOfLine(t);return this._pieceTree.getValueInRange(e,i)}getValueLengthInRange(e,t=0){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;let i=this.getOffsetAt(e.startLineNumber,e.startColumn),n=this.getOffsetAt(e.endLineNumber,e.endColumn);return n-i}getCharacterCountInRange(e,t=0){if(this._mightContainNonBasicASCII){let i=0;const n=e.startLineNumber,s=e.endLineNumber;for(let t=n;t<=s;t++){const o=this.getLineContent(t),a=t===n?e.startColumn-1:0,l=t===s?e.endColumn-1:o.length;for(let e=a;e<l;e++)r["E"](o.charCodeAt(e))?(i+=1,e+=1):i+=1}return i+=this._getEndOfLine(t).length*(s-n),i}return this.getValueLengthInRange(e,t)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(e){return this._pieceTree.getLineContent(e)}getLineCharCode(e,t){return this._pieceTree.getLineCharCode(e,t)}getLineLength(e){return this._pieceTree.getLineLength(e)}getLineFirstNonWhitespaceColumn(e){const t=r["v"](this.getLineContent(e));return-1===t?0:t+1}getLineLastNonWhitespaceColumn(e){const t=r["I"](this.getLineContent(e));return-1===t?0:t+2}_getEndOfLine(e){switch(e){case 1:return"\n";case 2:return"\r\n";case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(e){this._pieceTree.setEOL(e)}applyEdits(e,t,i){let n=this._mightContainRTL,s=this._mightContainUnusualLineTerminators,o=this._mightContainNonBasicASCII,a=!0,l=[];for(let u=0;u<e.length;u++){let t=e[u];a&&t._isTracked&&(a=!1);let i=t.range;if(t.text){let e=!0;o||(e=!r["A"](t.text),o=e),!n&&e&&(n=r["m"](t.text)),!s&&e&&(s=r["n"](t.text))}let h="",c=0,d=0,g=0;if(t.text){let e;[c,d,g,e]=Object(Se["f"])(t.text);const i=this.getEOL(),n="\r\n"===i?2:1;h=0===e||e===n?t.text:t.text.replace(/\r\n|\r|\n/g,i)}l[u]={sortIndex:u,identifier:t.identifier||null,range:i,rangeOffset:this.getOffsetAt(i.startLineNumber,i.startColumn),rangeLength:this.getValueLengthInRange(i),text:h,eolCount:c,firstLineLength:d,lastLineLength:g,forceMoveMarkers:Boolean(t.forceMoveMarkers),isAutoWhitespaceEdit:t.isAutoWhitespaceEdit||!1}}l.sort(De._sortOpsAscending);let h=!1;for(let r=0,u=l.length-1;r<u;r++){let e=l[r].range.getEndPosition(),t=l[r+1].range.getStartPosition();if(t.isBeforeOrEqual(e)){if(t.isBefore(e))throw new Error("Overlapping ranges are not allowed!");h=!0}}a&&(l=this._reduceOperations(l));let c=i||t?De._getInverseEditRanges(l):[],d=[];if(t)for(let u=0;u<l.length;u++){let e=l[u],t=c[u];if(e.isAutoWhitespaceEdit&&e.range.isEmpty())for(let i=t.startLineNumber;i<=t.endLineNumber;i++){let n="";i===t.startLineNumber&&(n=this.getLineContent(e.range.startLineNumber),-1!==r["v"](n))||d.push({lineNumber:i,oldContent:n})}}let g=null;if(i){let e=0;g=[];for(let t=0;t<l.length;t++){const i=l[t],n=c[t],s=this.getValueInRange(i.range),o=i.rangeOffset+e;e+=i.text.length-s.length,g[t]={sortIndex:i.sortIndex,identifier:i.identifier,range:n,text:s,textChange:new ye["a"](i.rangeOffset,s,o,i.text)}}h||g.sort((e,t)=>e.sortIndex-t.sortIndex)}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._mightContainNonBasicASCII=o;const p=this._doApplyEdits(l);let m=null;if(t&&d.length>0){d.sort((e,t)=>t.lineNumber-e.lineNumber),m=[];for(let e=0,t=d.length;e<t;e++){let t=d[e].lineNumber;if(e>0&&d[e-1].lineNumber===t)continue;let i=d[e].oldContent,n=this.getLineContent(t);0!==n.length&&n!==i&&-1===r["v"](n)&&m.push(t)}}return this._onDidChangeContent.fire(),new u["a"](g,p,m)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,s=new c["a"](i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let o=i.startLineNumber,r=i.startColumn;const a=[];for(let g=0,p=e.length;g<p;g++){const i=e[g],n=i.range;t=t||i.forceMoveMarkers,a.push(this.getValueInRange(new c["a"](o,r,n.startLineNumber,n.startColumn))),i.text.length>0&&a.push(i.text),o=n.endLineNumber,r=n.endColumn}const l=a.join(""),[h,d,u]=Object(Se["f"])(l);return{sortIndex:0,identifier:e[0].identifier,range:s,rangeOffset:this.getOffsetAt(s.startLineNumber,s.startColumn),rangeLength:this.getValueLengthInRange(s,0),text:l,eolCount:h,firstLineLength:d,lastLineLength:u,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(De._sortOpsDescending);let t=[];for(let i=0;i<e.length;i++){let n=e[i];const s=n.range.startLineNumber,o=n.range.startColumn,r=n.range.endLineNumber,a=n.range.endColumn;if(s===r&&o===a&&0===n.text.length)continue;n.text?(this._pieceTree.delete(n.rangeOffset,n.rangeLength),this._pieceTree.insert(n.rangeOffset,n.text,!0)):this._pieceTree.delete(n.rangeOffset,n.rangeLength);const l=new c["a"](s,o,r,a);t.push({range:l,rangeLength:n.rangeLength,text:n.text,rangeOffset:n.rangeOffset,forceMoveMarkers:n.forceMoveMarkers})}return t}findMatchesLineByLine(e,t,i,n){return this._pieceTree.findMatchesLineByLine(e,t,i,n)}static _getInverseEditRanges(e){let t=[],i=0,n=0,s=null;for(let o=0,r=e.length;o<r;o++){let r,a,l,h=e[o];if(s?s.range.endLineNumber===h.range.startLineNumber?(r=i,a=n+(h.range.startColumn-s.range.endColumn)):(r=i+(h.range.startLineNumber-s.range.endLineNumber),a=h.range.startColumn):(r=h.range.startLineNumber,a=h.range.startColumn),h.text.length>0){const e=h.eolCount+1;l=1===e?new c["a"](r,a,r,a+h.firstLineLength):new c["a"](r,a,r+e-1,h.lastLineLength+1)}else l=new c["a"](r,a,r,a);i=l.endLineNumber,n=l.endColumn,t.push(l),s=h}return t}static _sortOpsAscending(e,t){let i=c["a"].compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){let i=c["a"].compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i}}class Le{constructor(e,t,i,n,s,o,r,a,l){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=s,this._containsRTL=o,this._containsUnusualLineTerminators=r,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":i>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e);let i=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let s=0,o=i.length;s<o;s++){let e=i[s].buffer.replace(/\r\n|\r|\n/g,t),n=me(e);i[s]=new be(e,n)}const n=new De(i,this._bom,t,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:n,disposable:n}}}class xe{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(e){if(0===e.length)return;0===this.chunks.length&&r["S"](e)&&(this.BOM=r["b"],e=e.substr(1));const t=e.charCodeAt(e.length-1);13===t||t>=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)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=fe(this._tmpLineStarts,e);this.chunks.push(new be(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=r["m"](e)),this.isBasicASCII||this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=r["n"](e))}finish(e=!0){return this._finish(),new Le(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);let t=me(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}class ke{constructor(){this.changeType=1}}class Ee{constructor(e,t){this.changeType=2,this.lineNumber=e,this.detail=t}}class Ne{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class Oe{constructor(e,t,i){this.changeType=4,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class Ie{constructor(){this.changeType=5}}class Te{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;t<i;t++){const i=this.changes[t];if(i.changeType===e)return!0}return!1}static merge(e,t){const i=[].concat(e.changes).concat(t.changes),n=t.versionId,s=e.isUndoing||t.isUndoing,o=e.isRedoing||t.isRedoing;return new Te(i,n,s,o)}}class Me{constructor(e,t){this.rawContentChangedEvent=e,this.contentChangedEvent=t}merge(e){const t=Te.merge(this.rawContentChangedEvent,e.rawContentChangedEvent),i=Me._mergeChangeEvents(this.contentChangedEvent,e.contentChangedEvent);return new Me(t,i)}static _mergeChangeEvents(e,t){const i=[].concat(e.changes).concat(t.changes),n=t.eol,s=t.versionId,o=e.isUndoing||t.isUndoing,r=e.isRedoing||t.isRedoing,a=e.isFlush||t.isFlush;return{changes:i,eol:n,versionId:s,isUndoing:o,isRedoing:r,isFlush:a}}}var Ae=i("e8e3"),Re=i("e1b5"),Fe=i("b707"),Pe=i("8bf1"),Be=i("e58e"),We=i("30db");class Ve{constructor(){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0}_reset(e){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0,e&&this._setBeginState(0,e)}flush(e){this._reset(e)}get invalidLineStartIndex(){return this._invalidLineStartIndex}_invalidateLine(e){e<this._len&&(this._valid[e]=!1),e<this._invalidLineStartIndex&&(this._invalidLineStartIndex=e)}_isValid(e){return e<this._len&&this._valid[e]}getBeginState(e){return e<this._len?this._beginState[e]:null}_ensureLine(e){while(e>=this._len)this._beginState[this._len]=null,this._valid[this._len]=!1,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._beginState.splice(e,t),this._valid.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;let i=[],n=[];for(let s=0;s<t;s++)i[s]=null,n[s]=!1;this._beginState=Ae["a"](this._beginState,e,i),this._valid=Ae["a"](this._valid,e,n),this._len+=t}_setValid(e,t){this._ensureLine(e),this._valid[e]=t}_setBeginState(e,t){this._ensureLine(e),this._beginState[e]=t}setEndState(e,t,i){if(this._setValid(t,!0),this._invalidLineStartIndex=t+1,t===e-1)return;const n=this.getBeginState(t+1);if(null===n||!i.equals(n))return this._setBeginState(t+1,i),void this._invalidateLine(t+1);let s=t+1;while(s<e){if(!this._isValid(s))break;s++}this._invalidLineStartIndex=s}setFakeTokens(e){this._setValid(e,!1)}applyEdits(e,t){const i=e.endLineNumber-e.startLineNumber,n=t,s=Math.min(i,n);for(let o=s;o>=0;o--)this._invalidateLine(e.startLineNumber+o-1);this._acceptDeleteRange(e),this._acceptInsertText(new h["a"](e.startLineNumber,e.startColumn),t)}_acceptDeleteRange(e){const t=e.startLineNumber-1;t>=this._len||this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t){const i=e.lineNumber-1;i>=this._len||this._insertLines(e.lineNumber,t)}}class je extends o["a"]{constructor(e){super(),this._isDisposed=!1,this._textModel=e,this._tokenizationStateStore=new Ve,this._tokenizationSupport=null,this._register(Fe["A"].onDidChange(e=>{const t=this._textModel.getLanguageIdentifier();-1!==e.changedLanguages.indexOf(t.language)&&(this._resetTokenizationState(),this._textModel.clearTokens())})),this._register(this._textModel.onDidChangeRawContentFast(e=>{e.containsEvent(1)&&this._resetTokenizationState()})),this._register(this._textModel.onDidChangeContentFast(e=>{for(let t=0,i=e.changes.length;t<i;t++){const i=e.changes[t],[n]=Object(Se["f"])(i.text);this._tokenizationStateStore.applyEdits(i.range,n)}this._beginBackgroundTokenization()})),this._register(this._textModel.onDidChangeAttached(()=>{this._beginBackgroundTokenization()})),this._register(this._textModel.onDidChangeLanguage(()=>{this._resetTokenizationState(),this._textModel.clearTokens()})),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}_resetTokenizationState(){const[e,t]=He(this._textModel);this._tokenizationSupport=e,this._tokenizationStateStore.flush(t),this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&We["k"](()=>{this._isDisposed||this._revalidateTokensNow()})}_revalidateTokensNow(e=this._textModel.getLineCount()){const t=1,i=new Se["b"],n=Be["a"].create(!1);while(this._hasLinesToTokenize()){if(n.elapsed()>t)break;const s=this._tokenizeOneInvalidLine(i);if(s>=e)break}this._beginBackgroundTokenization(),this._textModel.setTokens(i.tokens)}tokenizeViewport(e,t){const i=new Se["b"];this._tokenizeViewport(i,e,t),this._textModel.setTokens(i.tokens)}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(e){const t=new Se["b"];this._updateTokensUntilLine(t,e),this._textModel.setTokens(t.tokens)}isCheapToTokenize(e){if(!this._tokenizationSupport)return!0;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&(e<t||this._textModel.getLineLength(e)<2048)}_hasLinesToTokenize(){return!!this._tokenizationSupport&&this._tokenizationStateStore.invalidLineStartIndex<this._textModel.getLineCount()}_tokenizeOneInvalidLine(e){if(!this._hasLinesToTokenize())return this._textModel.getLineCount()+1;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return this._updateTokensUntilLine(e,t),t}_updateTokensUntilLine(e,t){if(!this._tokenizationSupport)return;const i=this._textModel.getLanguageIdentifier(),n=this._textModel.getLineCount(),s=t-1;for(let o=this._tokenizationStateStore.invalidLineStartIndex;o<=s;o++){const t=this._textModel.getLineContent(o+1),s=this._tokenizationStateStore.getBeginState(o),r=ze(i,this._tokenizationSupport,t,!0,s);e.add(o+1,r.tokens),this._tokenizationStateStore.setEndState(n,o,r.endState),o=this._tokenizationStateStore.invalidLineStartIndex-1}}_tokenizeViewport(e,t,i){if(!this._tokenizationSupport)return;if(i<=this._tokenizationStateStore.invalidLineStartIndex)return;if(t<=this._tokenizationStateStore.invalidLineStartIndex)return void this._updateTokensUntilLine(e,i);let n=this._textModel.getLineFirstNonWhitespaceColumn(t),s=[],o=null;for(let l=t-1;n>0&&l>=1;l--){let e=this._textModel.getLineFirstNonWhitespaceColumn(l);if(0!==e&&e<n){if(o=this._tokenizationStateStore.getBeginState(l-1),o)break;s.push(this._textModel.getLineContent(l)),n=e}}o||(o=this._tokenizationSupport.getInitialState());const r=this._textModel.getLanguageIdentifier();let a=o;for(let l=s.length-1;l>=0;l--){let e=ze(r,this._tokenizationSupport,s[l],!1,a);a=e.endState}for(let l=t;l<=i;l++){let t=this._textModel.getLineContent(l),i=ze(r,this._tokenizationSupport,t,!0,a);e.add(l,i.tokens),this._tokenizationStateStore.setFakeTokens(l-1),a=i.endState}}}function He(e){const t=e.getLanguageIdentifier();let i=e.isTooLargeForTokenization()?null:Fe["A"].get(t.language),s=null;if(i)try{s=i.getInitialState()}catch(o){Object(n["e"])(o),i=null}return[i,s]}function ze(e,t,i,s,o){let r=null;if(t)try{r=t.tokenize2(i,s,o.clone(),0)}catch(a){Object(n["e"])(a)}return r||(r=Object(Pe["e"])(e.id,i,o,0)),Re["a"].convertToEndOffset(r.tokens,i.length),r}var Ue=i("d093"),Ke=i("70cb"),$e=i("045b"),qe=i("1080"),Ge=i("ceb8");function Ye(){return new xe}function Ze(e){const t=Ye();return t.acceptChunk(e),t.finish()}function Xe(e,t){const i="string"===typeof e?Ze(e):e;return i.create(t)}let Qe=0;const Je=999,et=1e4;class tt{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;let e=[],t=0,i=0;do{let n=this._source.read();if(null===n)return this._eos=!0,0===t?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=65536)return e.join("")}while(1)}}const it=()=>{throw new Error("Invalid change accessor")};class nt{constructor(){this._searchCanceledBrand=void 0}}function st(e){return e instanceof nt?null:e}nt.INSTANCE=new nt;class ot extends o["a"]{constructor(e,t,i,n=null,o){super(),this._onWillDispose=this._register(new s["a"]),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new pt),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new s["a"]),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new s["a"]),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new s["a"]),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new s["a"]),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new s["a"]),this.onDidChangeAttached=this._onDidChangeAttached.event,this._eventEmitter=this._register(new mt),Qe++,this.id="$model"+Qe,this.isForSimpleWidget=t.isForSimpleWidget,this._associatedResource="undefined"===typeof n||null===n?a["a"].parse("inmemory://model/"+Qe):n,this._undoRedoService=o,this._attachedEditorCount=0;const{textBuffer:l,disposable:h}=Xe(e,t.defaultEOL);this._buffer=l,this._bufferDisposable=h,this._options=ot.resolveOptions(this._buffer,t);const d=this._buffer.getLineCount(),u=this._buffer.getValueLengthInRange(new c["a"](1,1,d,this._buffer.getLineLength(d)+1),0);t.largeFileOptimizations?this._isTooLargeForTokenization=u>ot.LARGE_FILE_SIZE_THRESHOLD||d>ot.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=u>ot.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this._isDisposing=!1,this._languageIdentifier=i||Pe["a"],this._languageRegistryListener=Ke["a"].onDidChange(e=>{e.languageIdentifier.id===this._languageIdentifier.id&&this._onDidChangeLanguageConfiguration.fire({})}),this._instanceId=r["P"](Qe),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new rt,this._commandManager=new g["a"](this,o),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new Se["d"],this._tokens2=new Se["e"],this._tokenization=new je(this)}static resolveOptions(e,t){if(t.detectIndentation){const i=f(e,t.tabSize,t.insertSpaces);return new u["e"]({tabSize:i.tabSize,indentSize:i.tabSize,insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}return new u["e"]({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}onDidChangeRawContentFast(e){return this._eventEmitter.fastEvent(t=>e(t.rawContentChangedEvent))}onDidChangeContentFast(e){return this._eventEmitter.fastEvent(t=>e(t.contentChangedEvent))}onDidChangeContent(e){return this._eventEmitter.slowEvent(t=>e(t.contentChangedEvent))}dispose(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this._isDisposing=!1;const e=new De([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this._isDisposing||this._eventEmitter.fire(new Me(e,t))}setValue(e){if(this._assertNotDisposed(),null===e)return;const{textBuffer:t,disposable:i}=Xe(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,s,o,r){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:s,isRedoing:o,isFlush:r}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),s=this.getLineCount(),o=this.getLineMaxColumn(s);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._tokens.flush(),this._tokens2.flush(),this._decorations=Object.create(null),this._decorationsTree=new rt,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new Te([new ke],this._versionId,!1,!1),this._createContentChanged2(new c["a"](1,1,s,o),0,n,this.getValue(),!1,!1,!0))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),s=this.getLineCount(),o=this.getLineMaxColumn(s);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new Te([new Ie],this._versionId,!1,!1),this._createContentChanged2(new c["a"](1,1,s,o),0,n,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.search(0,!1,!1,e);this._ensureNodesHaveRanges(t)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i<n;i++){const n=t[i],s=n.cachedAbsoluteStart-n.start,o=this._buffer.getOffsetAt(n.range.startLineNumber,n.range.startColumn),r=this._buffer.getOffsetAt(n.range.endLineNumber,n.range.endColumn);n.cachedAbsoluteStart=o,n.cachedAbsoluteEnd=r,n.cachedVersionId=e,n.start=o-s,n.end=r-s,Y(n)}}onBeforeAttached(){this._attachedEditorCount++,1===this._attachedEditorCount&&this._onDidChangeAttached.fire(void 0)}onBeforeDetached(){this._attachedEditorCount--,0===this._attachedEditorCount&&this._onDidChangeAttached.fire(void 0)}isAttachedToEditor(){return this._attachedEditorCount>0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const i=this._buffer.getLineLength(n);i>=et?t+=i:e+=i}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();let t="undefined"!==typeof e.tabSize?e.tabSize:this._options.tabSize,i="undefined"!==typeof e.indentSize?e.indentSize:this._options.indentSize,n="undefined"!==typeof e.insertSpaces?e.insertSpaces:this._options.insertSpaces,s="undefined"!==typeof e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,o=new u["e"]({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:s});if(this._options.equals(o))return;let r=this._options.createChangeEvent(o);this._options=o,this._onDidChangeOptions.fire(r)}detectIndentation(e,t){this._assertNotDisposed();let i=f(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}static _normalizeIndentationFromWhitespace(e,t,i){let n=0;for(let o=0;o<e.length;o++)"\t"===e.charAt(o)?n+=t:n++;let s="";if(!i){let e=Math.floor(n/t);n%=t;for(let t=0;t<e;t++)s+="\t"}for(let o=0;o<n;o++)s+=" ";return s}static normalizeIndentation(e,t,i){let n=r["v"](e);return-1===n&&(n=e.length),ot._normalizeIndentationFromWhitespace(e.substring(0,n),t,i)+e.substring(n)}normalizeIndentation(e){return this._assertNotDisposed(),ot.normalizeIndentation(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(r["a"].source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map(e=>({range:e.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();let t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();let t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new tt(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let s,o;if(i<1)s=1,o=1;else if(i>t)s=t,o=this.getLineMaxColumn(s);else if(s=0|i,n<=1)o=1;else{const e=this.getLineMaxColumn(s);o=n>=e?e:0|n}const r=e.endLineNumber,a=e.endColumn;let l,h;if(r<1)l=1,h=1;else if(r>t)l=t,h=this.getLineMaxColumn(l);else if(l=0|r,a<=1)h=1;else{const e=this.getLineMaxColumn(l);h=a>=e?e:0|a}return i===s&&n===o&&r===l&&a===h&&e instanceof c["a"]&&!(e instanceof d["a"])?e:new c["a"](s,o,l,h)}_isValidPosition(e,t,i){if("number"!==typeof e||"number"!==typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;const n=this._buffer.getLineCount();if(e>n)return!1;if(1===t)return!0;const s=this.getLineMaxColumn(e);if(t>s)return!1;if(1===i){const i=this._buffer.getLineCharCode(e,t-2);if(r["E"](i))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor("number"!==typeof e||isNaN(e)?1:e),s=Math.floor("number"!==typeof t||isNaN(t)?1:t),o=this._buffer.getLineCount();if(n<1)return new h["a"](1,1);if(n>o)return new h["a"](o,this.getLineMaxColumn(o));if(s<=1)return new h["a"](n,1);const a=this.getLineMaxColumn(n);if(s>=a)return new h["a"](n,a);if(1===i){const e=this._buffer.getLineCharCode(n,s-2);if(r["E"](e))return new h["a"](n,s-1)}return new h["a"](n,s)}validatePosition(e){const t=1;return this._assertNotDisposed(),e instanceof h["a"]&&this._isValidPosition(e.lineNumber,e.column,t)?e:this._validatePosition(e.lineNumber,e.column,t)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,o=e.endColumn;if(!this._isValidPosition(i,n,0))return!1;if(!this._isValidPosition(s,o,0))return!1;if(1===t){const e=n>1?this._buffer.getLineCharCode(i,n-2):0,t=o>1&&o<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,o-2):0,a=r["E"](e),l=r["E"](t);return!a&&!l}return!0}validateRange(e){const t=1;if(this._assertNotDisposed(),e instanceof c["a"]&&!(e instanceof d["a"])&&this._isValidRange(e,t))return e;const i=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),s=i.lineNumber,o=i.column,a=n.lineNumber,l=n.column;if(1===t){const e=o>1?this._buffer.getLineCharCode(s,o-2):0,t=l>1&&l<=this._buffer.getLineLength(a)?this._buffer.getLineCharCode(a,l-2):0,i=r["E"](e),n=r["E"](t);return i||n?s===a&&o===l?new c["a"](s,o-1,a,l-1):i&&n?new c["a"](s,o-1,a,l+1):i?new c["a"](s,o-1,a,l):new c["a"](s,o,a,l+1):new c["a"](s,o,a,l)}return new c["a"](s,o,a,l)}modifyPosition(e,t){this._assertNotDisposed();let i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new c["a"](1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,s,o,r=Je){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every(e=>c["a"].isIRange(e))&&(a=t.map(e=>this.validateRange(e)))),null===a&&(a=[this.getFullModelRange()]),a=a.sort((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn);const l=[];let h;if(l.push(a.reduce((e,t)=>c["a"].areIntersecting(e,t)?e.plusRange(t):(l.push(e),t))),!i&&e.indexOf("\n")<0){const t=new de["a"](e,i,n,s),a=t.parseSearchRequest();if(!a)return[];h=e=>this.findMatchesLineByLine(e,a,o,r)}else h=t=>de["c"].findMatches(this,new de["a"](e,i,n,s),t,o,r);return l.map(h).reduce((e,t)=>e.concat(t),[])}findNextMatch(e,t,i,n,s,o){this._assertNotDisposed();const r=this.validatePosition(t);if(!i&&e.indexOf("\n")<0){const t=new de["a"](e,i,n,s),a=t.parseSearchRequest();if(!a)return null;const l=this.getLineCount();let h=new c["a"](r.lineNumber,r.column,l,this.getLineMaxColumn(l)),d=this.findMatchesLineByLine(h,a,o,1);return de["c"].findNextMatch(this,new de["a"](e,i,n,s),r,o),d.length>0?d[0]:(h=new c["a"](1,1,r.lineNumber,this.getLineMaxColumn(r.lineNumber)),d=this.findMatchesLineByLine(h,a,o,1),d.length>0?d[0]:null)}return de["c"].findNextMatch(this,new de["a"](e,i,n,s),r,o)}findPreviousMatch(e,t,i,n,s,o){this._assertNotDisposed();const r=this.validatePosition(t);return de["c"].findPreviousMatch(this,new de["a"](e,i,n,s),r,o)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){const t="\n"===this.getEOL()?0:1;if(t!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof u["f"]?e:new u["f"](e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i<n;i++)t[i]=this._validateEditOperation(e[i]);return t}pushEditOperations(e,t,i){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,this._validateEditOperations(t),i)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(e,t,i){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){let i=t.map(e=>({range:this.validateRange(e.range),text:e.text})),n=!0;if(e)for(let t=0,s=e.length;t<s;t++){let s=e[t],o=!1;for(let e=0,t=i.length;e<t;e++){let t=i[e].range,n=t.startLineNumber>s.endLineNumber,r=s.startLineNumber>t.endLineNumber;if(!n&&!r){o=!0;break}}if(!o){n=!1;break}}if(n)for(let e=0,s=this._trimAutoWhitespaceLines.length;e<s;e++){let n=this._trimAutoWhitespaceLines[e],s=this.getLineMaxColumn(n),o=!0;for(let e=0,t=i.length;e<t;e++){let t=i[e].range,r=i[e].text;if(!(n<t.startLineNumber||n>t.endLineNumber)&&(!(n===t.startLineNumber&&t.startColumn===s&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(0))&&!(n===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&r&&r.length>0&&"\n"===r.charAt(r.length-1)))){o=!1;break}}if(o){const e=new c["a"](n,1,n,s);t.push(new u["f"](null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i)}_applyUndo(e,t,i,n){const s=e.map(e=>{const t=this.getPositionAt(e.newPosition),i=this.getPositionAt(e.newEnd);return{range:new c["a"](t.lineNumber,t.column,i.lineNumber,i.column),text:e.oldText}});this._applyUndoRedoEdits(s,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const s=e.map(e=>{const t=this.getPositionAt(e.oldPosition),i=this.getPositionAt(e.oldEnd);return{range:new c["a"](t.lineNumber,t.column,i.lineNumber,i.column),text:e.newText}});this._applyUndoRedoEdits(s,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,s,o){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(s)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(o),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),n=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),s=this._buffer.getLineCount(),o=n.changes;if(this._trimAutoWhitespaceLines=n.trimAutoWhitespaceLineNumbers,0!==o.length){let e=[],t=i;for(let i=0,n=o.length;i<n;i++){const n=o[i],[r,a,l]=Object(Se["f"])(n.text);this._tokens.acceptEdit(n.range,r,a),this._tokens2.acceptEdit(n.range,r,a,l,n.text.length>0?n.text.charCodeAt(0):0),this._onDidChangeDecorations.fire(),this._decorationsTree.acceptReplace(n.rangeOffset,n.rangeLength,n.text.length,n.forceMoveMarkers);const h=n.range.startLineNumber,c=n.range.endLineNumber,d=c-h,u=r,g=Math.min(d,u),p=u-d;for(let i=g;i>=0;i--){const n=h+i,o=s-t-p+n;e.push(new Ee(n,this.getLineContent(o)))}if(g<d){const t=h+g;e.push(new Ne(t+1,c))}if(g<u){const i=h+g,n=u-g,o=s-t-n+i+1;let r=[];for(let e=0;e<n;e++){let t=o+e;r[t-o]=this.getLineContent(t)}e.push(new Oe(i+1,h+u,r))}t+=p}this._increaseVersionId(),this._emitContentChangedEvent(new Te(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:o,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===n.reverseEdits?void 0:n.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){let i={addDecoration:(t,i)=>this._deltaDecorationsImpl(e,[],[{range:t,options:i}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,gt(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,i)=>0===t.length&&0===i.length?[]:this._deltaDecorationsImpl(e,t,i)},s=null;try{s=t(i)}catch(o){Object(n["e"])(o)}return i.addDecoration=it,i.changeDecoration=it,i.changeDecorationOptions=it,i.removeDecoration=it,i.deltaDecorations=it,s}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:ut[i]}])[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const s=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(s.startLineNumber,s.startColumn),r=this._buffer.getOffsetAt(s.endLineNumber,s.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),o,r,s),n.setOptions(ut[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let i=0,n=t.length;i<n;i++){const e=t[i];this._decorationsTree.delete(e),delete this._decorations[e.id]}}getDecorationOptions(e){const t=this._decorations[e];return t?t.options:null}getDecorationRange(e){const t=this._decorations[e];if(!t)return null;const i=this.getVersionId();return t.cachedVersionId!==i&&this._decorationsTree.resolveNode(t,i),null===t.range&&(t.range=this._getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}getLineDecorations(e,t=0,i=!1){return e<1||e>this.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,n=!1){let s=this.getLineCount(),o=Math.min(s,Math.max(1,e)),r=Math.min(s,Math.max(1,t)),a=this.getLineMaxColumn(r);return this._getDecorationsInRange(new c["a"](o,1,r,a),i,n)}getDecorationsInRange(e,t=0,i=!1){let n=this.validateRange(e);return this._getDecorationsInRange(n,t,i)}getOverviewRulerDecorations(e=0,t=!1){const i=this.getVersionId(),n=this._decorationsTree.search(e,t,!0,i);return this._ensureNodesHaveRanges(n)}getAllDecorations(e=0,t=!1){const i=this.getVersionId(),n=this._decorationsTree.search(e,t,!1,i);return this._ensureNodesHaveRanges(n)}_getDecorationsInRange(e,t,i){const n=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),s=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn),o=this.getVersionId(),r=this._decorationsTree.intervalSearch(n,s,t,i,o);return this._ensureNodesHaveRanges(r)}_ensureNodesHaveRanges(e){for(let t=0,i=e.length;t<i;t++){const i=e[t];null===i.range&&(i.range=this._getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd))}return e}_getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const i=this._decorations[e];if(!i)return;const n=this._validateRangeRelaxedNoAllocations(t),s=this._buffer.getOffsetAt(n.startLineNumber,n.startColumn),o=this._buffer.getOffsetAt(n.endLineNumber,n.endColumn);this._decorationsTree.delete(i),i.reset(this.getVersionId(),s,o,n),this._decorationsTree.insert(i),this._onDidChangeDecorations.checkAffectedAndFire(i.options)}_changeDecorationOptionsImpl(e,t){const i=this._decorations[e];if(!i)return;const n=!(!i.options.overviewRuler||!i.options.overviewRuler.color),s=!(!t.overviewRuler||!t.overviewRuler.color);this._onDidChangeDecorations.checkAffectedAndFire(i.options),this._onDidChangeDecorations.checkAffectedAndFire(t),n!==s?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i){const n=this.getVersionId(),s=t.length;let o=0;const r=i.length;let a=0,l=new Array(r);while(o<s||a<r){let h=null;if(o<s){do{h=this._decorations[t[o++]]}while(!h&&o<s);h&&(this._decorationsTree.delete(h),this._onDidChangeDecorations.checkAffectedAndFire(h.options))}if(a<r){if(!h){const e=++this._lastDecorationId,t=`${this._instanceId};${e}`;h=new N(t,0,0),this._decorations[t]=h}const t=i[a],s=this._validateRangeRelaxedNoAllocations(t.range),o=gt(t.options),r=this._buffer.getOffsetAt(s.startLineNumber,s.startColumn),c=this._buffer.getOffsetAt(s.endLineNumber,s.endColumn);h.ownerId=e,h.reset(n,r,c,s),h.setOptions(o),this._onDidChangeDecorations.checkAffectedAndFire(o),this._decorationsTree.insert(h),l[a]=h.id,a++}else h&&delete this._decorations[h.id]}return l}setTokens(e){if(0===e.length)return;let t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i];let s=0,o=0,r=!1;for(let e=0,t=n.tokens.length;e<t;e++){const t=n.startLineNumber+e;if(r)this._tokens.setTokens(this._languageIdentifier.id,t-1,this._buffer.getLineLength(t),n.tokens[e],!1),o=t;else{const i=this._tokens.setTokens(this._languageIdentifier.id,t-1,this._buffer.getLineLength(t),n.tokens[e],!0);i&&(r=!0,s=t,o=t)}}r&&t.push({fromLineNumber:s,toLineNumber:o})}t.length>0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:t})}setSemanticTokens(e,t){this._tokens2.set(e,t),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}hasCompleteSemanticTokens(){return this._tokens2.isComplete()}hasSomeSemanticTokens(){return!this._tokens2.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this._tokens2.setPartial(e,t);this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}tokenizeViewport(e,t){e=Math.max(1,e),t=Math.min(this._buffer.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}_emitModelTokensChangedEvent(e){this._isDisposing||this._onDidChangeTokens.fire(e)}resetTokenization(){this._tokenization.reset()}forceTokenization(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}isCheapToTokenize(e){return this._tokenization.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)}_getLineTokens(e){const t=this.getLineContent(e),i=this._tokens.getTokens(this._languageIdentifier.id,e-1,t);return this._tokens2.addSemanticTokens(e,i)}getLanguageIdentifier(){return this._languageIdentifier}getModeId(){return this._languageIdentifier.language}setMode(e){if(this._languageIdentifier.id===e.id)return;let t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}getLanguageIdAtPosition(e,t){const i=this.validatePosition(new h["a"](e,t)),n=this.getLineTokens(i.lineNumber);return n.getLanguageId(n.findTokenIndexAtOffset(i.column-1))}getWordAtPosition(e){this._assertNotDisposed();const t=this.validatePosition(e),i=this.getLineContent(t.lineNumber),n=this._getLineTokens(t.lineNumber),s=n.findTokenIndexAtOffset(t.column-1),[o,r]=ot._findLanguageBoundaries(n,s),a=Object(Ue["d"])(t.column,Ke["a"].getWordDefinition(n.getLanguageId(s)),i.substring(o,r),o);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(s>0&&o===t.column-1){const[o,r]=ot._findLanguageBoundaries(n,s-1),a=Object(Ue["d"])(t.column,Ke["a"].getWordDefinition(n.getLanguageId(s-1)),i.substring(o,r),o);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}static _findLanguageBoundaries(e,t){const i=e.getLanguageId(t);let n=0;for(let o=t;o>=0&&e.getLanguageId(o)===i;o--)n=e.getStartOffset(o);let s=e.getLineContent().length;for(let o=t,r=e.getCount();o<r&&e.getLanguageId(o)===i;o++)s=e.getEndOffset(o);return[n,s]}getWordUntilPosition(e){const t=this.getWordAtPosition(e);return t?{word:t.word.substr(0,e.column-t.startColumn),startColumn:t.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}}findMatchingBracketUp(e,t){let i=e.toLowerCase(),n=this.validatePosition(t),s=this._getLineTokens(n.lineNumber),o=s.getLanguageId(s.findTokenIndexAtOffset(n.column-1)),r=Ke["a"].getBracketsSupport(o);if(!r)return null;let a=r.textIsBracket[i];return a?st(this._findMatchingBracketUp(a,n,null)):null}matchBracket(e){return this._matchBracket(this.validatePosition(e))}_matchBracket(e){const t=e.lineNumber,i=this._getLineTokens(t),n=i.getCount(),s=this._buffer.getLineContent(t),o=i.findTokenIndexAtOffset(e.column-1);if(o<0)return null;const r=Ke["a"].getBracketsSupport(i.getLanguageId(o));if(r&&!Object($e["b"])(i.getStandardTokenType(o))){let n=Math.max(0,e.column-1-r.maxBracketLength);for(let e=o-1;e>=0;e--){const t=i.getEndOffset(e);if(t<=n)break;Object($e["b"])(i.getStandardTokenType(e))&&(n=t)}const a=Math.min(s.length,e.column-1+r.maxBracketLength);let l=null;while(1){const i=qe["a"].findNextBracketInRange(r.forwardRegex,t,s,n,a);if(!i)break;if(i.startColumn<=e.column&&e.column<=i.endColumn){const e=s.substring(i.startColumn-1,i.endColumn-1).toLowerCase(),t=this._matchFoundBracket(i,r.textIsBracket[e],r.textIsOpenBracket[e],null);if(t){if(t instanceof nt)return null;l=t}}n=i.endColumn-1}if(l)return l}if(o>0&&i.getStartOffset(o)===e.column-1){const r=o-1,a=Ke["a"].getBracketsSupport(i.getLanguageId(r));if(a&&!Object($e["b"])(i.getStandardTokenType(r))){const o=Math.max(0,e.column-1-a.maxBracketLength);let l=Math.min(s.length,e.column-1+a.maxBracketLength);for(let e=r+1;e<n;e++){const t=i.getStartOffset(e);if(t>=l)break;Object($e["b"])(i.getStandardTokenType(e))&&(l=t)}const h=qe["a"].findPrevBracketInRange(a.reversedRegex,t,s,o,l);if(h&&h.startColumn<=e.column&&e.column<=h.endColumn){const e=s.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),t=this._matchFoundBracket(h,a.textIsBracket[e],a.textIsOpenBracket[e],null);if(t)return t instanceof nt?null:t}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;const s=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return s?s instanceof nt?s:[e,s]:null}_findMatchingBracketUp(e,t,i){const n=e.languageIdentifier.id,s=e.reversedRegex;let o=-1,r=0;const a=(t,n,a,l)=>{while(1){if(i&&++r%100===0&&!i())return nt.INSTANCE;const h=qe["a"].findPrevBracketInRange(s,t,n,a,l);if(!h)break;const c=n.substring(h.startColumn-1,h.endColumn-1).toLowerCase();if(e.isOpen(c)?o++:e.isClose(c)&&o--,0===o)return h;l=h.startColumn-1}return null};for(let l=t.lineNumber;l>=1;l--){const e=this._getLineTokens(l),i=e.getCount(),s=this._buffer.getLineContent(l);let o=i-1,r=s.length,h=s.length;l===t.lineNumber&&(o=e.findTokenIndexAtOffset(t.column-1),r=t.column-1,h=t.column-1);let c=!0;for(;o>=0;o--){const t=e.getLanguageId(o)===n&&!Object($e["b"])(e.getStandardTokenType(o));if(t)c?r=e.getStartOffset(o):(r=e.getStartOffset(o),h=e.getEndOffset(o));else if(c&&r!==h){const e=a(l,s,r,h);if(e)return e}c=t}if(c&&r!==h){const e=a(l,s,r,h);if(e)return e}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageIdentifier.id,s=e.forwardRegex;let o=1,r=0;const a=(t,n,a,l)=>{while(1){if(i&&++r%100===0&&!i())return nt.INSTANCE;const h=qe["a"].findNextBracketInRange(s,t,n,a,l);if(!h)break;const c=n.substring(h.startColumn-1,h.endColumn-1).toLowerCase();if(e.isOpen(c)?o++:e.isClose(c)&&o--,0===o)return h;a=h.endColumn-1}return null},l=this.getLineCount();for(let h=t.lineNumber;h<=l;h++){const e=this._getLineTokens(h),i=e.getCount(),s=this._buffer.getLineContent(h);let o=0,r=0,l=0;h===t.lineNumber&&(o=e.findTokenIndexAtOffset(t.column-1),r=t.column-1,l=t.column-1);let c=!0;for(;o<i;o++){const t=e.getLanguageId(o)===n&&!Object($e["b"])(e.getStandardTokenType(o));if(t)c||(r=e.getStartOffset(o)),l=e.getEndOffset(o);else if(c&&r!==l){const e=a(h,s,r,l);if(e)return e}c=t}if(c&&r!==l){const e=a(h,s,r,l);if(e)return e}}return null}findPrevBracket(e){const t=this.validatePosition(e);let i=-1,n=null;for(let s=t.lineNumber;s>=1;s--){const e=this._getLineTokens(s),o=e.getCount(),r=this._buffer.getLineContent(s);let a=o-1,l=r.length,h=r.length;if(s===t.lineNumber){a=e.findTokenIndexAtOffset(t.column-1),l=t.column-1,h=t.column-1;const s=e.getLanguageId(a);i!==s&&(i=s,n=Ke["a"].getBracketsSupport(i))}let c=!0;for(;a>=0;a--){const t=e.getLanguageId(a);if(i!==t){if(n&&c&&l!==h){const e=qe["a"].findPrevBracketInRange(n.reversedRegex,s,r,l,h);if(e)return this._toFoundBracket(n,e);c=!1}i=t,n=Ke["a"].getBracketsSupport(i)}const o=!!n&&!Object($e["b"])(e.getStandardTokenType(a));if(o)c?l=e.getStartOffset(a):(l=e.getStartOffset(a),h=e.getEndOffset(a));else if(n&&c&&l!==h){const e=qe["a"].findPrevBracketInRange(n.reversedRegex,s,r,l,h);if(e)return this._toFoundBracket(n,e)}c=o}if(n&&c&&l!==h){const e=qe["a"].findPrevBracketInRange(n.reversedRegex,s,r,l,h);if(e)return this._toFoundBracket(n,e)}}return null}findNextBracket(e){const t=this.validatePosition(e),i=this.getLineCount();let n=-1,s=null;for(let o=t.lineNumber;o<=i;o++){const e=this._getLineTokens(o),i=e.getCount(),r=this._buffer.getLineContent(o);let a=0,l=0,h=0;if(o===t.lineNumber){a=e.findTokenIndexAtOffset(t.column-1),l=t.column-1,h=t.column-1;const i=e.getLanguageId(a);n!==i&&(n=i,s=Ke["a"].getBracketsSupport(n))}let c=!0;for(;a<i;a++){const t=e.getLanguageId(a);if(n!==t){if(s&&c&&l!==h){const e=qe["a"].findNextBracketInRange(s.forwardRegex,o,r,l,h);if(e)return this._toFoundBracket(s,e);c=!1}n=t,s=Ke["a"].getBracketsSupport(n)}const i=!!s&&!Object($e["b"])(e.getStandardTokenType(a));if(i)c||(l=e.getStartOffset(a)),h=e.getEndOffset(a);else if(s&&c&&l!==h){const e=qe["a"].findNextBracketInRange(s.forwardRegex,o,r,l,h);if(e)return this._toFoundBracket(s,e)}c=i}if(s&&c&&l!==h){const e=qe["a"].findNextBracketInRange(s.forwardRegex,o,r,l,h);if(e)return this._toFoundBracket(s,e)}}return null}findEnclosingBrackets(e,t){let i;if("undefined"===typeof t)i=null;else{const e=Date.now();i=()=>Date.now()-e<=t}const n=this.validatePosition(e),s=this.getLineCount(),o=new Map;let r=[];const a=(e,t)=>{if(!o.has(e)){let i=[];for(let e=0,n=t?t.brackets.length:0;e<n;e++)i[e]=0;o.set(e,i)}r=o.get(e)};let l=0;const h=(e,t,n,s,o)=>{while(1){if(i&&++l%100===0&&!i())return nt.INSTANCE;const a=qe["a"].findNextBracketInRange(e.forwardRegex,t,n,s,o);if(!a)break;const h=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),c=e.textIsBracket[h];if(c&&(c.isOpen(h)?r[c.index]++:c.isClose(h)&&r[c.index]--,-1===r[c.index]))return this._matchFoundBracket(a,c,!1,i);s=a.endColumn-1}return null};let c=-1,d=null;for(let u=n.lineNumber;u<=s;u++){const e=this._getLineTokens(u),t=e.getCount(),i=this._buffer.getLineContent(u);let s=0,o=0,r=0;if(u===n.lineNumber){s=e.findTokenIndexAtOffset(n.column-1),o=n.column-1,r=n.column-1;const t=e.getLanguageId(s);c!==t&&(c=t,d=Ke["a"].getBracketsSupport(c),a(c,d))}let l=!0;for(;s<t;s++){const t=e.getLanguageId(s);if(c!==t){if(d&&l&&o!==r){const e=h(d,u,i,o,r);if(e)return st(e);l=!1}c=t,d=Ke["a"].getBracketsSupport(c),a(c,d)}const n=!!d&&!Object($e["b"])(e.getStandardTokenType(s));if(n)l||(o=e.getStartOffset(s)),r=e.getEndOffset(s);else if(d&&l&&o!==r){const e=h(d,u,i,o,r);if(e)return st(e)}l=n}if(d&&l&&o!==r){const e=h(d,u,i,o,r);if(e)return st(e)}}return null}_toFoundBracket(e,t){if(!t)return null;let i=this.getValueInRange(t);i=i.toLowerCase();let n=e.textIsBracket[i];return n?{range:t,open:n.open,close:n.close,isOpen:e.textIsOpenBracket[i]}:null}static computeIndentLevel(e,t){let i=0,n=0,s=e.length;while(n<s){let s=e.charCodeAt(n);if(32===s)i++;else{if(9!==s)break;i=i-i%t+t}n++}return n===s?-1:i}_computeIndentLevel(e){return ot.computeIndentLevel(this._buffer.getLineContent(e+1),this._options.tabSize)}getActiveIndentGuide(e,t,i){this._assertNotDisposed();const n=this.getLineCount();if(e<1||e>n)throw new Error("Illegal value for lineNumber");const s=Ke["a"].getFoldingRules(this._languageIdentifier.id),o=Boolean(s&&s.offSide);let r=-2,a=-1,l=-2,h=-1;const c=e=>{if(-1!==r&&(-2===r||r>e-1)){r=-1,a=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){r=t,a=e;break}}}if(-2===l){l=-1,h=-1;for(let t=e;t<n;t++){let e=this._computeIndentLevel(t);if(e>=0){l=t,h=e;break}}}};let d=-2,u=-1,g=-2,p=-1;const m=e=>{if(-2===d){d=-1,u=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){d=t,u=e;break}}}if(-1!==g&&(-2===g||g<e-1)){g=-1,p=-1;for(let t=e;t<n;t++){let e=this._computeIndentLevel(t);if(e>=0){g=t,p=e;break}}}};let f=0,_=!0,b=0,v=!0,C=0,w=0;for(let S=0;_||v;S++){const s=e-S,r=e+S;S>1&&(s<1||s<t)&&(_=!1),S>1&&(r>n||r>i)&&(v=!1),S>5e4&&(_=!1,v=!1);let g=-1;if(_){const e=this._computeIndentLevel(s-1);e>=0?(l=s-1,h=e,g=Math.ceil(e/this._options.indentSize)):(c(s),g=this._getIndentLevelForWhitespaceLine(o,a,h))}let y=-1;if(v){const e=this._computeIndentLevel(r-1);e>=0?(d=r-1,u=e,y=Math.ceil(e/this._options.indentSize)):(m(r),y=this._getIndentLevelForWhitespaceLine(o,u,p))}if(0!==S){if(1===S){if(r<=n&&y>=0&&w+1===y){_=!1,f=r,b=r,C=y;continue}if(s>=1&&g>=0&&g-1===w){v=!1,f=s,b=s,C=g;continue}if(f=e,b=e,C=w,0===C)return{startLineNumber:f,endLineNumber:b,indent:C}}_&&(g>=C?f=s:_=!1),v&&(y>=C?b=r:v=!1)}else w=g}return{startLineNumber:f,endLineNumber:b,indent:C}}getLinesIndentGuides(e,t){this._assertNotDisposed();const i=this.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(t<1||t>i)throw new Error("Illegal value for endLineNumber");const n=Ke["a"].getFoldingRules(this._languageIdentifier.id),s=Boolean(n&&n.offSide);let o=new Array(t-e+1),r=-2,a=-1,l=-2,h=-1;for(let c=e;c<=t;c++){let t=c-e;const n=this._computeIndentLevel(c-1);if(n>=0)r=c-1,a=n,o[t]=Math.ceil(n/this._options.indentSize);else{if(-2===r){r=-1,a=-1;for(let e=c-2;e>=0;e--){let t=this._computeIndentLevel(e);if(t>=0){r=e,a=t;break}}}if(-1!==l&&(-2===l||l<c-1)){l=-1,h=-1;for(let e=c;e<i;e++){let t=this._computeIndentLevel(e);if(t>=0){l=e,h=t;break}}}o[t]=this._getIndentLevelForWhitespaceLine(s,a,h)}}return o}_getIndentLevelForWhitespaceLine(e,t,i){return-1===t||-1===i?0:t<i?1+Math.floor(t/this._options.indentSize):t===i||e?Math.ceil(i/this._options.indentSize):1+Math.floor(i/this._options.indentSize)}}ot.MODEL_SYNC_LIMIT=52428800,ot.LARGE_FILE_SIZE_THRESHOLD=20971520,ot.LARGE_FILE_LINE_COUNT_THRESHOLD=3e5,ot.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:l["d"].tabSize,indentSize:l["d"].indentSize,insertSpaces:l["d"].insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:l["d"].trimAutoWhitespace,largeFileOptimizations:l["d"].largeFileOptimizations};class rt{constructor(){this._decorationsTree0=new I,this._decorationsTree1=new I}intervalSearch(e,t,i,n,s){const o=this._decorationsTree0.intervalSearch(e,t,i,n,s),r=this._decorationsTree1.intervalSearch(e,t,i,n,s);return o.concat(r)}search(e,t,i,n){if(i)return this._decorationsTree1.search(e,t,n);{const i=this._decorationsTree0.search(e,t,n),s=this._decorationsTree1.search(e,t,n);return i.concat(s)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e);return t.concat(i)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder();return e.concat(t)}insert(e){y(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){y(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}resolveNode(e,t){y(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,i,n){this._decorationsTree0.acceptReplace(e,t,i,n),this._decorationsTree1.acceptReplace(e,t,i,n)}}function at(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class lt{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class ht extends lt{constructor(e){super(e),this._resolvedColor=null,this.position="number"===typeof e.position?e.position:u["d"].Center}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if("string"===typeof e)return e;let i=e?t.getColor(e.id):null;return i?i.toString():""}}class ct extends lt{constructor(e){super(e),this.position=e.position}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return"string"===typeof e?Ge["a"].fromHex(e):t.getColor(e.id)}}class dt{constructor(e){this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?at(e.className):null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new ht(e.overviewRuler):null,this.minimap=e.minimap?new ct(e.minimap):null,this.glyphMarginClassName=e.glyphMarginClassName?at(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?at(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?at(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?at(e.marginClassName):null,this.inlineClassName=e.inlineClassName?at(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?at(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?at(e.afterContentClassName):null}static register(e){return new dt(e)}static createDynamic(e){return new dt(e)}}dt.EMPTY=dt.register({});const ut=[dt.register({stickiness:0}),dt.register({stickiness:1}),dt.register({stickiness:2}),dt.register({stickiness:3})];function gt(e){return e instanceof dt?e:dt.createDynamic(e)}class pt extends o["a"]{constructor(){super(),this._actual=this._register(new s["a"]),this.event=this._actual.event,this._deferredCnt=0,this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){if(this._deferredCnt--,0===this._deferredCnt&&this._shouldFire){const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(e)}}checkAffectedAndFire(e){this._affectsMinimap||(this._affectsMinimap=!(!e.minimap||!e.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!(!e.overviewRuler||!e.overviewRuler.color)),this._shouldFire=!0}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._shouldFire=!0}}class mt extends o["a"]{constructor(){super(),this._fastEmitter=this._register(new s["a"]),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new s["a"]),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}},b589:function(e,t,i){"use strict";i.d(t,"c",(function(){return n})),i.d(t,"b",(function(){return a})),i.d(t,"a",(function(){return h}));var n,s=i("6d8e"),o=i("30db");(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",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.userData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebook="vscode-notebook",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.vscodeWebviewResource="vscode-webview-resource",e.extension="extension",e.vscodeFileResource="vscode-file"})(n||(n={}));class r{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)return this._delegate(e);const t=e.authority;let i=this._hosts[t];i&&-1!==i.indexOf(":")&&(i=`[${i}]`);const r=this._ports[t],a=this._connectionTokens[t];let l="path="+encodeURIComponent(e.path);return"string"===typeof a&&(l+="&tkn="+encodeURIComponent(a)),s["a"].from({scheme:o["i"]?this._preferredWebSchema:n.vscodeRemoteResource,authority:`${i}:${r}`,path:"/vscode-remote-resource",query:l})}}const a=new r;class l{constructor(){this.FALLBACK_AUTHORITY="vscode-app"}asBrowserUri(e,t,i){const s=this.toUri(e,t);return s.scheme===n.vscodeRemote?a.rewrite(s):o["g"]&&(i||o["h"])&&s.scheme===n.file?s.with({scheme:n.vscodeFileResource,authority:s.authority||this.FALLBACK_AUTHORITY,query:null,fragment:null}):s}toUri(e,t){return s["a"].isUri(e)?e:s["a"].parse(t.toUrl(e))}}const h=new l},b707:function(e,t,i){"use strict";i.d(t,"r",(function(){return g})),i.d(t,"z",(function(){return p})),i.d(t,"D",(function(){return m})),i.d(t,"C",(function(){return f})),i.d(t,"m",(function(){return w})),i.d(t,"v",(function(){return S})),i.d(t,"w",(function(){return y})),i.d(t,"d",(function(){return D})),i.d(t,"y",(function(){return L})),i.d(t,"o",(function(){return x})),i.d(t,"l",(function(){return k})),i.d(t,"h",(function(){return E})),i.d(t,"t",(function(){return N})),i.d(t,"f",(function(){return O})),i.d(t,"e",(function(){return I})),i.d(t,"p",(function(){return T})),i.d(t,"B",(function(){return M})),i.d(t,"b",(function(){return A})),i.d(t,"q",(function(){return R})),i.d(t,"a",(function(){return F})),i.d(t,"g",(function(){return P})),i.d(t,"i",(function(){return B})),i.d(t,"u",(function(){return W})),i.d(t,"s",(function(){return V})),i.d(t,"c",(function(){return j})),i.d(t,"x",(function(){return H})),i.d(t,"n",(function(){return z})),i.d(t,"k",(function(){return U})),i.d(t,"j",(function(){return K})),i.d(t,"A",(function(){return $}));i("6d8e"),i("6a89");var n=i("308f"),s=(i("eda7"),i("a666")),o=(i("4035"),i("49d9"),i("9768")),r=i("32b8");function a(e,t,i,n){if(Array.isArray(e)){let s=0;for(const o of e){const e=a(o,t,i,n);if(10===e)return e;e>s&&(s=e)}return s}if("string"===typeof e)return n?"*"===e?5:e===i?10:0:0;if(e){const{language:s,pattern:a,scheme:l,hasAccessToAllModels:h}=e;if(!n&&!h)return 0;let c=0;if(l)if(l===t.scheme)c=10;else{if("*"!==l)return 0;c=5}if(s)if(s===i)c=10;else{if("*"!==s)return 0;c=Math.max(c,5)}if(a){let e;if(e="string"===typeof a?a:Object.assign(Object.assign({},a),{base:Object(r["d"])(a.base)}),e!==t.fsPath&&!Object(o["a"])(e,t.fsPath))return 0;c=10}return c}return 0}var l=i("1b69");function h(e){return"string"!==typeof e&&(Array.isArray(e)?e.every(h):!!e.exclusive)}class c{constructor(){this._clock=0,this._entries=[],this._onDidChange=new n["a"]}get onDidChange(){return this._onDidChange.event}register(e,t){let i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),Object(s["h"])(()=>{if(i){let e=this._entries.indexOf(i);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}})}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e);const t=[];for(let i of this._entries)i._score>0&&t.push(i.provider);return t}ordered(e){const t=[];return this._orderedForEach(e,e=>t.push(e.provider)),t}orderedGroups(e){const t=[];let i,n;return this._orderedForEach(e,e=>{i&&n===e._score?i.push(e.provider):(n=e._score,i=[e.provider],t.push(i))}),t}_orderedForEach(e,t){if(e){this._updateScores(e);for(const e of this._entries)e._score>0&&t(e)}}_updateScores(e){let t={uri:e.uri.toString(),language:e.getLanguageIdentifier().language};if(!this._lastCandidate||this._lastCandidate.language!==t.language||this._lastCandidate.uri!==t.uri){this._lastCandidate=t;for(let t of this._entries)if(t._score=a(t.selector,e.uri,e.getLanguageIdentifier().language,Object(l["b"])(e)),h(t.selector)&&t._score>0){for(let e of this._entries)e._score=0;t._score=1e3;break}this._entries.sort(c._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._score<t._score?1:e._score>t._score?-1:e._time<t._time?1:e._time>t._time?-1:0}}class d{constructor(){this._map=new Map,this._promises=new Map,this._onDidChange=new n["a"],this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._map.set(e,t),this.fire([e]),Object(s["h"])(()=>{this._map.get(e)===t&&(this._map.delete(e),this.fire([e]))})}registerPromise(e,t){let i=null,n=!1;return this._promises.set(e,t.then(t=>{this._promises.delete(e),!n&&t&&(i=this.register(e,t))})),Object(s["h"])(()=>{n=!0,i&&i.dispose()})}getPromise(e){const t=this.get(e);if(t)return Promise.resolve(t);const i=this._promises.get(e);return i?i.then(t=>this.get(e)):null}get(e){return this._map.get(e)||null}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}var u=i("561a");class g{constructor(e,t){this.language=e,this.id=t}}class p{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(1792&e)>>>8}static getFontStyle(e){return(14336&e)>>>11}static getForeground(e){return(8372224&e)>>>14}static getBackground(e){return(4286578688&e)>>>23}static getClassNameFromMetadata(e){let t=this.getForeground(e),i="mtk"+t,n=this.getFontStyle(e);return 1&n&&(i+=" mtki"),2&n&&(i+=" mtkb"),4&n&&(i+=" mtku"),i}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let s=`color: ${t[i]};`;return 1&n&&(s+="font-style: italic;"),2&n&&(s+="font-weight: bold;"),4&n&&(s+="text-decoration: underline;"),s}}const m=function(){let e=Object.create(null);return e[0]="symbol-method",e[1]="symbol-function",e[2]="symbol-constructor",e[3]="symbol-field",e[4]="symbol-variable",e[5]="symbol-class",e[6]="symbol-struct",e[7]="symbol-interface",e[8]="symbol-module",e[9]="symbol-property",e[10]="symbol-event",e[11]="symbol-operator",e[12]="symbol-unit",e[13]="symbol-value",e[14]="symbol-constant",e[15]="symbol-enum",e[16]="symbol-enum-member",e[17]="symbol-keyword",e[27]="symbol-snippet",e[18]="symbol-text",e[19]="symbol-color",e[20]="symbol-file",e[21]="symbol-reference",e[22]="symbol-customcolor",e[23]="symbol-folder",e[24]="symbol-type-parameter",e[25]="account",e[26]="issues",function(t){const i=e[t];let n=i&&u["c"].get(i);return n||(console.info("No codicon found for CompletionItemKind "+t),n=u["b"].symbolProperty),n.classNames}}();let f=function(){let e=Object.create(null);return e["method"]=0,e["function"]=1,e["constructor"]=2,e["field"]=3,e["variable"]=4,e["class"]=5,e["struct"]=6,e["interface"]=7,e["module"]=8,e["property"]=9,e["event"]=10,e["operator"]=11,e["unit"]=12,e["value"]=13,e["constant"]=14,e["enum"]=15,e["enum-member"]=16,e["enumMember"]=16,e["keyword"]=17,e["snippet"]=27,e["text"]=18,e["color"]=19,e["file"]=20,e["reference"]=21,e["customcolor"]=22,e["folder"]=23,e["type-parameter"]=24,e["typeParameter"]=24,e["account"]=25,e["issue"]=26,function(t,i){let n=e[t];return"undefined"!==typeof n||i||(n=9),n}}();var _,b,v,C;(function(e){e[e["Invoke"]=1]="Invoke",e[e["TriggerCharacter"]=2]="TriggerCharacter",e[e["ContentChange"]=3]="ContentChange"})(_||(_={})),function(e){e[e["Text"]=0]="Text",e[e["Read"]=1]="Read",e[e["Write"]=2]="Write"}(b||(b={})),function(e){const t=new Map;t.set("file",0),t.set("module",1),t.set("namespace",2),t.set("package",3),t.set("class",4),t.set("method",5),t.set("property",6),t.set("field",7),t.set("constructor",8),t.set("enum",9),t.set("interface",10),t.set("function",11),t.set("variable",12),t.set("constant",13),t.set("string",14),t.set("number",15),t.set("boolean",16),t.set("array",17),t.set("object",18),t.set("key",19),t.set("null",20),t.set("enum-member",21),t.set("struct",22),t.set("event",23),t.set("operator",24),t.set("type-parameter",25);const i=new Map;function n(e){return t.get(e)}function s(e){return i.get(e)}function o(e,t){const n=i.get(e);let s=n&&u["c"].get("symbol-"+n);return s||(console.info("No codicon found for SymbolKind "+e),s=u["b"].symbolProperty),`${t?"inline":"block"} ${s.classNames}`}i.set(0,"file"),i.set(1,"module"),i.set(2,"namespace"),i.set(3,"package"),i.set(4,"class"),i.set(5,"method"),i.set(6,"property"),i.set(7,"field"),i.set(8,"constructor"),i.set(9,"enum"),i.set(10,"interface"),i.set(11,"function"),i.set(12,"variable"),i.set(13,"constant"),i.set(14,"string"),i.set(15,"number"),i.set(16,"boolean"),i.set(17,"array"),i.set(18,"object"),i.set(19,"key"),i.set(20,"null"),i.set(21,"enum-member"),i.set(22,"struct"),i.set(23,"event"),i.set(24,"operator"),i.set(25,"type-parameter"),e.fromString=n,e.toString=s,e.toCssClassName=o}(v||(v={}));class w{constructor(e){this.value=e}}w.Comment=new w("comment"),w.Imports=new w("imports"),w.Region=new w("region"),function(e){e[e["Other"]=0]="Other",e[e["Type"]=1]="Type",e[e["Parameter"]=2]="Parameter"}(C||(C={}));const S=new c,y=new c,D=new c,L=new c,x=new c,k=new c,E=new c,N=new c,O=new c,I=new c,T=new c,M=new c,A=new c,R=new c,F=new c,P=new c,B=new c,W=new c,V=new c,j=new c,H=new c,z=new c,U=new c,K=new c,$=new d},b78f:function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var n=i("0a0f");const s=Object(n["c"])("textModelService")},b7d0:function(e,t,i){"use strict";i.d(t,"b",(function(){return h})),i.d(t,"g",(function(){return u})),i.d(t,"d",(function(){return d})),i.d(t,"e",(function(){return g})),i.d(t,"a",(function(){return p})),i.d(t,"f",(function(){return _})),i.d(t,"c",(function(){return b}));var n=i("0a0f"),s=i("a666"),o=i("89cd"),r=i("308f"),a=i("9c41"),l=i("561a");const h=Object(n["c"])("themeService");var c,d;function u(e){return{id:e}}function g(e){switch(e){case a["a"].DARK:return"vs-dark";case a["a"].HIGH_CONTRAST:return"hc-black";default:return"vs"}}(function(e){function t(e){return e&&"object"===typeof e&&"string"===typeof e.id}e.isThemeColor=t})(c||(c={})),function(e){function t(e){return e&&"object"===typeof e&&"string"===typeof e.id&&("undefined"===typeof e.color||c.isThemeColor(e.color))}e.isThemeIcon=t;const i=new RegExp(`^\\$\\((${l["a"].iconNameExpression}(?:${l["a"].iconModifierExpression})?)\\)$`);function n(e){const t=i.exec(e);if(!t)return;let[,n]=t;return{id:n}}function s(e,t){let i=e.id;const n=i.lastIndexOf("~");return-1!==n&&(i=i.substring(0,n)),t&&(i=`${i}~${t}`),{id:i}}function o(e,t){var i,n;return e.id===t.id&&(null===(i=e.color)||void 0===i?void 0:i.id)===(null===(n=t.color)||void 0===n?void 0:n.id)}e.fromString=n,e.modify=s,e.isEqual=o,e.asClassNameArray=l["a"].asClassNameArray,e.asClassName=l["a"].asClassName,e.asCSSSelector=l["a"].asCSSSelector}(d||(d={}));const p={ThemingContribution:"base.contributions.theming"};class m{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new r["a"]}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),Object(s["h"])(()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)})}getThemingParticipants(){return this.themingParticipants}}let f=new m;function _(e){return f.onColorThemeChange(e)}o["a"].add(p.ThemingContribution,f);class b extends s["a"]{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(e=>this.onThemeChange(e)))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}},b835:function(e,t,i){"use strict";i.d(t,"a",(function(){return g}));var n=i("0f70"),s=i("fe45"),o=i("30db");let r=new Array(230),a=new Array(112);function l(e){if(e.charCode){let t=String.fromCharCode(e.charCode).toUpperCase();return s["b"].fromString(t)}return r[e.keyCode]||0}(function(){for(let t=0;t<a.length;t++)a[t]=-1;function e(e,t){r[e]=t,a[t]=e}e(3,7),e(8,1),e(9,2),e(13,3),e(16,4),e(17,5),e(18,6),e(19,7),e(20,8),e(27,9),e(32,10),e(33,11),e(34,12),e(35,13),e(36,14),e(37,15),e(38,16),e(39,17),e(40,18),e(45,19),e(46,20),e(48,21),e(49,22),e(50,23),e(51,24),e(52,25),e(53,26),e(54,27),e(55,28),e(56,29),e(57,30),e(65,31),e(66,32),e(67,33),e(68,34),e(69,35),e(70,36),e(71,37),e(72,38),e(73,39),e(74,40),e(75,41),e(76,42),e(77,43),e(78,44),e(79,45),e(80,46),e(81,47),e(82,48),e(83,49),e(84,50),e(85,51),e(86,52),e(87,53),e(88,54),e(89,55),e(90,56),e(93,58),e(96,93),e(97,94),e(98,95),e(99,96),e(100,97),e(101,98),e(102,99),e(103,100),e(104,101),e(105,102),e(106,103),e(107,104),e(108,105),e(109,106),e(110,107),e(111,108),e(112,59),e(113,60),e(114,61),e(115,62),e(116,63),e(117,64),e(118,65),e(119,66),e(120,67),e(121,68),e(122,69),e(123,70),e(124,71),e(125,72),e(126,73),e(127,74),e(128,75),e(129,76),e(130,77),e(144,78),e(145,79),e(186,80),e(187,81),e(188,82),e(189,83),e(190,84),e(191,85),e(192,86),e(193,110),e(194,111),e(219,87),e(220,88),e(221,89),e(222,90),e(223,91),e(226,92),e(229,109),n["i"]?(e(59,80),e(107,81),e(109,83),o["f"]&&e(224,57)):n["l"]&&(e(91,57),o["f"]?e(93,57):e(92,57))})();const h=o["f"]?256:2048,c=512,d=1024,u=o["f"]?2048:256;class g{constructor(e){this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.keyCode=l(t),this.code=t.code,this.ctrlKey=this.ctrlKey||5===this.keyCode,this.altKey=this.altKey||6===this.keyCode,this.shiftKey=this.shiftKey||4===this.keyCode,this.metaKey=this.metaKey||57===this.keyCode,this._asKeybinding=this._computeKeybinding(),this._asRuntimeKeybinding=this._computeRuntimeKeybinding()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeybinding(){return this._asRuntimeKeybinding}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=h),this.altKey&&(t|=c),this.shiftKey&&(t|=d),this.metaKey&&(t|=u),t|=e,t}_computeRuntimeKeybinding(){let e=0;return 5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode),new s["e"](this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}},b9db:function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));i("1e03"),i("f2d2");var n=i("561a");function s(e){let t=e.definition;while(t instanceof n["b"])t=t.definition;return`.codicon-${e.id}:before { content: '${t.fontCharacter}'; }`}},ba77:function(e,t,i){},bc04:function(e,t,i){"use strict";i.d(t,"a",(function(){return m})),i.d(t,"c",(function(){return f})),i.d(t,"b",(function(){return _}));i("3742");var n=i("6a89"),s=i("2504"),o=i("a666"),r=i("b2cc"),a=i("4fc3"),l=i("db88"),h=i("0a0f"),c=i("f5f3"),d=i("dff7");const u=Object(h["c"])("IEditorCancelService"),g=new a["c"]("cancellableOperation",!1,Object(d["a"])("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));Object(c["b"])(u,class{constructor(){this._tokens=new WeakMap}add(e,t){let i,n=this._tokens.get(e);return n||(n=e.invokeWithinContext(e=>{const t=g.bindTo(e.get(a["b"])),i=new l["a"];return{key:t,tokens:i}}),this._tokens.set(e,n)),n.key.set(!0),i=n.tokens.push(t),()=>{i&&(i(),n.key.set(!n.tokens.isEmpty()),i=void 0)}}cancel(e){const t=this._tokens.get(e);if(!t)return;const i=t.tokens.pop();i&&(i.cancel(),t.key.set(!t.tokens.isEmpty()))}},!0);class p extends s["b"]{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext(t=>t.get(u).add(e,this))}dispose(){this._unregister(),super.dispose()}}Object(r["j"])(new class extends r["c"]{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:g})}runEditorCommand(e,t){e.get(u).cancel(t)}});class m extends p{constructor(e,t,i,s){super(e,s),this.editor=e,this._listener=new o["b"],4&t&&this._listener.add(e.onDidChangeCursorPosition(e=>{i&&n["a"].containsPosition(i,e.position)||this.cancel()})),2&t&&this._listener.add(e.onDidChangeCursorSelection(e=>{i&&n["a"].containsRange(i,e.selection)||this.cancel()})),8&t&&this._listener.add(e.onDidScrollChange(e=>this.cancel())),1&t&&(this._listener.add(e.onDidChangeModel(e=>this.cancel())),this._listener.add(e.onDidChangeModelContent(e=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}class f extends s["b"]{constructor(e,t){super(t),this._listener=e.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}class _{constructor(e,t,i){this._visiblePosition=e,this._visiblePositionScrollDelta=t,this._cursorPosition=i}static capture(e){let t=null,i=0;if(0!==e.getScrollTop()){const n=e.getVisibleRanges();if(n.length>0){t=n[0].getStartPosition();const s=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-s}}return new _(t,i,e.getPosition())}restore(e){if(this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){const t=e.getPosition();if(!this._cursorPosition||!t)return;const i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i)}}},be5f:function(e,t,i){"use strict";i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return o}));const n=Object.prototype.hasOwnProperty;function s(e,t){for(let i in e)if(n.call(e,i)){const n=t({key:i,value:e[i]},(function(){delete e[i]}));if(!1===n)return}}class o{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){const i=this.map.get(e);i&&(i.delete(t),0===i.size&&this.map.delete(e))}forEach(e,t){const i=this.map.get(e);i&&i.forEach(t)}}},bf44:function(e,t,i){"use strict";var n=i("33f9");i.o(n,"Emitter")&&i.d(t,"Emitter",(function(){return n["Emitter"]})),i.o(n,"MarkerSeverity")&&i.d(t,"MarkerSeverity",(function(){return n["MarkerSeverity"]})),i.o(n,"MarkerTag")&&i.d(t,"MarkerTag",(function(){return n["MarkerTag"]})),i.o(n,"Range")&&i.d(t,"Range",(function(){return n["Range"]})),i.o(n,"Uri")&&i.d(t,"Uri",(function(){return n["Uri"]})),i.o(n,"editor")&&i.d(t,"editor",(function(){return n["editor"]})),i.o(n,"languages")&&i.d(t,"languages",(function(){return n["languages"]}))},bf5b:function(e,t,i){"use strict";i.d(t,"b",(function(){return g})),i.d(t,"a",(function(){return p})),i.d(t,"c",(function(){return v}));var n=i("89cd"),s=i("b7d0"),o=i("308f"),r=i("dff7"),a=i("dd1b"),l=i("5fe7"),h=i("561a");const c={IconContribution:"base.contributions.icons"};class d{constructor(){this._onDidChange=new o["a"],this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:Object(r["a"])("iconDefintion.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:Object(r["a"])("iconDefintion.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${h["a"].iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,i,n){const s=this.iconsById[e];if(s){if(i&&!s.description){s.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;const t=this.iconReferenceSchema.enum.indexOf(e);-1!==t&&(this.iconReferenceSchema.enumDescriptions[t]=i),this._onDidChange.fire()}return s}let o={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=o;let r={$ref:"#/definitions/icons"};return n&&(r.deprecationMessage=n),i&&(r.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=r,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map(e=>this.iconsById[e])}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}getIconFont(e){return this.iconFontsById[e]}toString(){const e=(e,t)=>e.id.localeCompare(t.id),t=e=>{while(s["d"].isThemeIcon(e.defaults))e=this.iconsById[e.defaults.id];return"codicon codicon-"+(e?e.id:"")};let i=[];i.push("| preview     | identifier                        | default codicon ID                | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const n=Object.keys(this.iconsById).map(e=>this.iconsById[e]);for(const o of n.filter(e=>!!e.description).sort(e))i.push(`|<i class="${t(o)}"></i>|${o.id}|${s["d"].isThemeIcon(o.defaults)?o.defaults.id:o.id}|${o.description||""}|`);i.push("| preview     | identifier                        "),i.push("| ----------- | --------------------------------- |");for(const o of n.filter(e=>!s["d"].isThemeIcon(e.defaults)).sort(e))i.push(`|<i class="${t(o)}"></i>|${o.id}|`);return i.join("\n")}}const u=new d;function g(e,t,i,n){return u.registerIcon(e,t,i,n)}function p(){return u}function m(){for(const e of h["c"].all)u.registerIcon(e.id,e.definition,e.description);h["c"].onDidRegister(e=>u.registerIcon(e.id,e.definition,e.description))}n["a"].add(c.IconContribution,u),m();const f="vscode://schemas/icons";let _=n["a"].as(a["a"].JSONContribution);_.registerSchema(f,u.getIconSchema());const b=new l["e"](()=>_.notifySchemaChanged(f),200);u.onDidChange(()=>{b.isScheduled()||b.schedule()});const v=g("widget-close",h["b"].close,Object(r["a"])("widgetClose","Icon for the close action in widgets."))},c101:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var n,s=i("dff7"),o=i("4fc3");(function(e){e.editorSimpleInput=new o["c"]("editorSimpleInput",!1,!0),e.editorTextFocus=new o["c"]("editorTextFocus",!1,s["a"]("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),e.focus=new o["c"]("editorFocus",!1,s["a"]("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),e.textInputFocus=new o["c"]("textInputFocus",!1,s["a"]("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),e.readOnly=new o["c"]("editorReadonly",!1,s["a"]("editorReadonly","Whether the editor is read only")),e.inDiffEditor=new o["c"]("inDiffEditor",!1,s["a"]("inDiffEditor","Whether the context is a diff editor")),e.columnSelection=new o["c"]("editorColumnSelection",!1,s["a"]("editorColumnSelection","Whether `editor.columnSelection` is enabled")),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new o["c"]("editorHasSelection",!1,s["a"]("editorHasSelection","Whether the editor has text selected")),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new o["c"]("editorHasMultipleSelections",!1,s["a"]("editorHasMultipleSelections","Whether the editor has multiple selections")),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new o["c"]("editorTabMovesFocus",!1,s["a"]("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInWalkThroughSnippet=new o["c"]("isInEmbeddedEditor",!1,!0),e.canUndo=new o["c"]("canUndo",!1,!0),e.canRedo=new o["c"]("canRedo",!1,!0),e.hoverVisible=new o["c"]("editorHoverVisible",!1,s["a"]("editorHoverVisible","Whether the editor hover is visible")),e.inCompositeEditor=new o["c"]("inCompositeEditor",void 0,s["a"]("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),e.notInCompositeEditor=e.inCompositeEditor.toNegated(),e.languageId=new o["c"]("editorLangId","",s["a"]("editorLangId","The language identifier of the editor")),e.hasCompletionItemProvider=new o["c"]("editorHasCompletionItemProvider",!1,s["a"]("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),e.hasCodeActionsProvider=new o["c"]("editorHasCodeActionsProvider",!1,s["a"]("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),e.hasCodeLensProvider=new o["c"]("editorHasCodeLensProvider",!1,s["a"]("editorHasCodeLensProvider","Whether the editor has a code lens provider")),e.hasDefinitionProvider=new o["c"]("editorHasDefinitionProvider",!1,s["a"]("editorHasDefinitionProvider","Whether the editor has a definition provider")),e.hasDeclarationProvider=new o["c"]("editorHasDeclarationProvider",!1,s["a"]("editorHasDeclarationProvider","Whether the editor has a declaration provider")),e.hasImplementationProvider=new o["c"]("editorHasImplementationProvider",!1,s["a"]("editorHasImplementationProvider","Whether the editor has an implementation provider")),e.hasTypeDefinitionProvider=new o["c"]("editorHasTypeDefinitionProvider",!1,s["a"]("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),e.hasHoverProvider=new o["c"]("editorHasHoverProvider",!1,s["a"]("editorHasHoverProvider","Whether the editor has a hover provider")),e.hasDocumentHighlightProvider=new o["c"]("editorHasDocumentHighlightProvider",!1,s["a"]("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),e.hasDocumentSymbolProvider=new o["c"]("editorHasDocumentSymbolProvider",!1,s["a"]("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),e.hasReferenceProvider=new o["c"]("editorHasReferenceProvider",!1,s["a"]("editorHasReferenceProvider","Whether the editor has a reference provider")),e.hasRenameProvider=new o["c"]("editorHasRenameProvider",!1,s["a"]("editorHasRenameProvider","Whether the editor has a rename provider")),e.hasSignatureHelpProvider=new o["c"]("editorHasSignatureHelpProvider",!1,s["a"]("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),e.hasInlineHintsProvider=new o["c"]("editorHasInlineHintsProvider",!1,s["a"]("editorHasInlineHintsProvider","Whether the editor has an inline hints provider")),e.hasDocumentFormattingProvider=new o["c"]("editorHasDocumentFormattingProvider",!1,s["a"]("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),e.hasDocumentSelectionFormattingProvider=new o["c"]("editorHasDocumentSelectionFormattingProvider",!1,s["a"]("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),e.hasMultipleDocumentFormattingProvider=new o["c"]("editorHasMultipleDocumentFormattingProvider",!1,s["a"]("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),e.hasMultipleDocumentSelectionFormattingProvider=new o["c"]("editorHasMultipleDocumentSelectionFormattingProvider",!1,s["a"]("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))})(n||(n={}))},c317:function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return o})),i.d(t,"b",(function(){return r})),i.d(t,"c",(function(){return a}));var n=i("30db");let s;s="undefined"!==typeof e?e:"undefined"!==typeof n["b"].vscode?{get platform(){return n["b"].vscode.process.platform},get env(){return n["b"].vscode.process.env},nextTick(e){return Object(n["k"])(e)},cwd(){return n["b"].vscode.process.env["VSCODE_CWD"]||n["b"].vscode.process.execPath.substr(0,n["b"].vscode.process.execPath.lastIndexOf("win32"===n["b"].vscode.process.platform?"\\":"/"))}}:{get platform(){return n["j"]?"win32":n["f"]?"darwin":"linux"},nextTick(e){return Object(n["k"])(e)},get env(){return Object.create(null)},cwd(){return"/"}};const o=s.cwd,r=s.env,a=s.platform}).call(this,i("4362"))},c4e3:function(e,t,i){"use strict";i.d(t,"a",(function(){return m}));i("2a04");var n=i("11f7"),s=i("ee56"),o=i("a666"),r=i("9ee1"),a=i("aa3d"),l=i("30db"),h=i("ef8e"),c=i("e32d"),d=i("dff7"),u=i("2504"),g=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class p{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class m extends o["a"]{constructor(e,t){super(),this.hoverDelegate=void 0,this.customHovers=new Map,this.domNode=this._register(new p(n["m"](e,n["a"](".monaco-icon-label")))),this.labelContainer=n["m"](this.domNode.element,n["a"](".monaco-icon-label-container"));const i=n["m"](this.labelContainer,n["a"]("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new p(n["m"](this.labelContainer,n["a"]("span.monaco-icon-description-container")))),(null===t||void 0===t?void 0:t.supportHighlights)?this.nameNode=new b(i,!!t.supportIcons):this.nameNode=new f(i),(null===t||void 0===t?void 0:t.supportDescriptionHighlights)?this.descriptionNodeFactory=()=>new s["a"](n["m"](this.descriptionContainer.element,n["a"]("span.label-description")),!!t.supportIcons):this.descriptionNodeFactory=()=>this._register(new p(n["m"](this.descriptionContainer.element,n["a"]("span.label-description")))),(null===t||void 0===t?void 0:t.hoverDelegate)&&(this.hoverDelegate=t.hoverDelegate)}setLabel(e,t,i){const n=["monaco-icon-label"];i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough")),this.domNode.className=n.join(" "),this.setupHover(this.labelContainer,null===i||void 0===i?void 0:i.title),this.nameNode.setLabel(e,i),(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof s["a"]?(this.descriptionNode.set(t||"",i?i.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,null===i||void 0===i?void 0:i.descriptionTitle)):(this.descriptionNode.textContent=t||"",this.setupHover(this.descriptionNode.element,(null===i||void 0===i?void 0:i.descriptionTitle)||""),this.descriptionNode.empty=!t))}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),t)return this.hoverDelegate?this.setupCustomHover(this.hoverDelegate,e,t):this.setupNativeHover(e,t);e.removeAttribute("title")}static adjustXAndShowCustomHover(e,t,i,n){if(e&&n)return void 0!==t&&(e.target.x=t+10),i.showHover(e)}getTooltipForCustom(e){if(Object(h["i"])(e))return()=>g(this,void 0,void 0,(function*(){return e}));if(Object(h["f"])(e.markdown))return e.markdown;{const t=e.markdown;return()=>g(this,void 0,void 0,(function*(){return t}))}}setupCustomHover(e,t,i){t.setAttribute("title",""),t.removeAttribute("title");let s=this.getTooltipForCustom(i);const o=l["f"]?1500:500;let r,a,p,f,_=!1;function b(l){if(_)return;function b(e){e.type!==n["d"].MOUSE_DOWN&&e.fromElement!==t||(null===f||void 0===f||f.dispose(),f=void 0,_=!1,r=void 0,p.dispose(!0),v.dispose(),C.dispose())}p=new u["b"];const v=Object(c["a"])(t,n["d"].MOUSE_LEAVE,!0)(b.bind(t)),C=Object(c["a"])(t,n["d"].MOUSE_DOWN,!0)(b.bind(t));function w(e){a=e.x}_=!0;const S=Object(c["a"])(t,n["d"].MOUSE_MOVE,!0)(w.bind(t));setTimeout(()=>g(this,void 0,void 0,(function*(){var t;if(_&&s&&!r){const n={targetElements:[this],dispose:()=>{}};r={text:Object(d["a"])("iconLabel.loading","Loading..."),target:n,anchorPosition:0},f=m.adjustXAndShowCustomHover(r,a,e,_);const o=null!==(t=yield s(p.token))&&void 0!==t?t:Object(h["i"])(i)?void 0:i.markdownNotSupportedFallback;o?(r={text:o,target:n,anchorPosition:0},f=m.adjustXAndShowCustomHover(r,a,e,_)):f&&(f.dispose(),f=void 0)}S.dispose()})),o)}const v=this._register(Object(c["a"])(t,n["d"].MOUSE_OVER,!0)(b.bind(t)));this.customHovers.set(t,v)}setupNativeHover(e,t){let i="";Object(h["i"])(t)?i=t:(null===t||void 0===t?void 0:t.markdownNotSupportedFallback)&&(i=t.markdownNotSupportedFallback),e.title=i}}class f{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!Object(a["d"])(this.options,t))if(this.label=e,this.options=t,"string"===typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=n["m"](this.container,n["a"]("a.label-name",{id:null===t||void 0===t?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i<e.length;i++){const s=e[i],o=(null===t||void 0===t?void 0:t.domId)&&`${null===t||void 0===t?void 0:t.domId}_${i}`;n["m"](this.container,n["a"]("a.label-name",{id:o,"data-icon-label-count":e.length,"data-icon-label-index":i,role:"treeitem"},s)),i<e.length-1&&n["m"](this.container,n["a"]("span.label-separator",void 0,(null===t||void 0===t?void 0:t.separator)||"/"))}}}}function _(e,t,i){if(!i)return;let n=0;return e.map(e=>{const s={start:n,end:n+e.length},o=i.map(e=>r["a"].intersect(s,e)).filter(e=>!r["a"].isEmpty(e)).map(({start:e,end:t})=>({start:e-n,end:t-n}));return n=s.end+t.length,o})}class b{constructor(e,t){this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!Object(a["d"])(this.options,t))if(this.label=e,this.options=t,"string"===typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new s["a"](n["m"](this.container,n["a"]("a.label-name",{id:null===t||void 0===t?void 0:t.domId})),this.supportIcons)),this.singleLabel.set(e,null===t||void 0===t?void 0:t.matches,void 0,null===t||void 0===t?void 0:t.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const i=(null===t||void 0===t?void 0:t.separator)||"/",o=_(e,i,null===t||void 0===t?void 0:t.matches);for(let r=0;r<e.length;r++){const a=e[r],l=o?o[r]:void 0,h=(null===t||void 0===t?void 0:t.domId)&&`${null===t||void 0===t?void 0:t.domId}_${r}`,c=n["a"]("a.label-name",{id:h,"data-icon-label-count":e.length,"data-icon-label-index":r,role:"treeitem"}),d=new s["a"](n["m"](this.container,c),this.supportIcons);d.set(a,l,void 0,null===t||void 0===t?void 0:t.labelEscapeNewLines),r<e.length-1&&n["m"](c,n["a"]("span.label-separator",void 0,i))}}}}},c84a:function(e,t,i){},caa1:function(e,t,i){},ceb8:function(e,t,i){"use strict";function n(e,t){const i=Math.pow(10,t);return Math.round(e*i)/i}i.d(t,"b",(function(){return s})),i.d(t,"a",(function(){return a}));class s{constructor(e,t,i,s=1){this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,i)),this.a=n(Math.max(Math.min(1,s),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class o{constructor(e,t,i,s){this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.l=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,s),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,s=e.a,r=Math.max(t,i,n),a=Math.min(t,i,n);let l=0,h=0;const c=(a+r)/2,d=r-a;if(d>0){switch(h=Math.min(c<=.5?d/(2*c):d/(2-2*c),1),r){case t:l=(i-n)/d+(i<n?6:0);break;case i:l=(n-t)/d+2;break;case n:l=(t-i)/d+4;break}l*=60,l=Math.round(l)}return new o(l,h,c,s)}static _hue2rgb(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}static toRGBA(e){const t=e.h/360,{s:i,l:n,a:r}=e;let a,l,h;if(0===i)a=l=h=n;else{const e=n<.5?n*(1+i):n+i-n*i,s=2*n-e;a=o._hue2rgb(s,e,t+1/3),l=o._hue2rgb(s,e,t),h=o._hue2rgb(s,e,t-1/3)}return new s(Math.round(255*a),Math.round(255*l),Math.round(255*h),r)}}class r{constructor(e,t,i,s){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,i),0),3),this.a=n(Math.max(Math.min(1,s),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,s=Math.max(t,i,n),o=Math.min(t,i,n),a=s-o,l=0===s?0:a/s;let h;return h=0===a?0:s===t?((i-n)/a%6+6)%6:s===i?(n-t)/a+2:(t-i)/a+4,new r(Math.round(60*h),l,s,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:o}=e,r=n*i,a=r*(1-Math.abs(t/60%2-1)),l=n-r;let[h,c,d]=[0,0,0];return t<60?(h=r,c=a):t<120?(h=a,c=r):t<180?(c=r,d=a):t<240?(c=a,d=r):t<300?(h=a,d=r):t<=360&&(h=r,d=a),h=Math.round(255*(h+l)),c=Math.round(255*(c+l)),d=Math.round(255*(d+l)),new s(h,c,d,o)}}class a{constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof s)this.rgba=e;else if(e instanceof o)this._hsla=e,this.rgba=o.toRGBA(e);else{if(!(e instanceof r))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=r.toRGBA(e)}}static fromHex(e){return a.Format.CSS.parseHex(e)||a.red}get hsla(){return this._hsla?this._hsla:o.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:r.fromRGBA(this.rgba)}equals(e){return!!e&&s.equals(this.rgba,e.rgba)&&o.equals(this.hsla,e.hsla)&&r.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=a._relativeLuminanceForComponent(this.rgba.r),t=a._relativeLuminanceForComponent(this.rgba.g),i=a._relativeLuminanceForComponent(this.rgba.b),s=.2126*e+.7152*t+.0722*i;return n(s,4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){const e=(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3;return e>=128}isLighterThan(e){const t=this.getRelativeLuminance(),i=e.getRelativeLuminance();return t>i}isDarkerThan(e){const t=this.getRelativeLuminance(),i=e.getRelativeLuminance();return t<i}lighten(e){return new a(new o(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*e,this.hsla.a))}darken(e){return new a(new o(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*e,this.hsla.a))}transparent(e){const{r:t,g:i,b:n,a:o}=this.rgba;return new a(new s(t,i,n,o*e))}isTransparent(){return 0===this.rgba.a}isOpaque(){return 1===this.rgba.a}opposite(){return new a(new s(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}toString(){return""+a.Format.CSS.format(this)}static getLighterColor(e,t,i){if(e.isLighterThan(t))return e;i=i||.5;const n=e.getRelativeLuminance(),s=t.getRelativeLuminance();return i=i*(s-n)/s,e.lighten(i)}static getDarkerColor(e,t,i){if(e.isDarkerThan(t))return e;i=i||.5;const n=e.getRelativeLuminance(),s=t.getRelativeLuminance();return i=i*(n-s)/n,e.darken(i)}}a.white=new a(new s(255,255,255,1)),a.black=new a(new s(0,0,0,1)),a.red=new a(new s(255,0,0,1)),a.blue=new a(new s(0,0,255,1)),a.cyan=new a(new s(0,255,255,1)),a.lightgrey=new a(new s(211,211,211,1)),a.transparent=new a(new s(0,0,0,0)),function(e){let t;(function(t){let i;(function(t){function i(t){return 1===t.rgba.a?`rgb(${t.rgba.r}, ${t.rgba.g}, ${t.rgba.b})`:e.Format.CSS.formatRGBA(t)}function n(e){return`rgba(${e.rgba.r}, ${e.rgba.g}, ${e.rgba.b}, ${+e.rgba.a.toFixed(2)})`}function o(t){return 1===t.hsla.a?`hsl(${t.hsla.h}, ${(100*t.hsla.s).toFixed(2)}%, ${(100*t.hsla.l).toFixed(2)}%)`:e.Format.CSS.formatHSLA(t)}function r(e){return`hsla(${e.hsla.h}, ${(100*e.hsla.s).toFixed(2)}%, ${(100*e.hsla.l).toFixed(2)}%, ${e.hsla.a.toFixed(2)})`}function a(e){const t=e.toString(16);return 2!==t.length?"0"+t:t}function l(e){return`#${a(e.rgba.r)}${a(e.rgba.g)}${a(e.rgba.b)}`}function h(t,i=!1){return i&&1===t.rgba.a?e.Format.CSS.formatHex(t):`#${a(t.rgba.r)}${a(t.rgba.g)}${a(t.rgba.b)}${a(Math.round(255*t.rgba.a))}`}function c(t){return t.isOpaque()?e.Format.CSS.formatHex(t):e.Format.CSS.formatRGBA(t)}function d(t){const i=t.length;if(0===i)return null;if(35!==t.charCodeAt(0))return null;if(7===i){const i=16*u(t.charCodeAt(1))+u(t.charCodeAt(2)),n=16*u(t.charCodeAt(3))+u(t.charCodeAt(4)),o=16*u(t.charCodeAt(5))+u(t.charCodeAt(6));return new e(new s(i,n,o,1))}if(9===i){const i=16*u(t.charCodeAt(1))+u(t.charCodeAt(2)),n=16*u(t.charCodeAt(3))+u(t.charCodeAt(4)),o=16*u(t.charCodeAt(5))+u(t.charCodeAt(6)),r=16*u(t.charCodeAt(7))+u(t.charCodeAt(8));return new e(new s(i,n,o,r/255))}if(4===i){const i=u(t.charCodeAt(1)),n=u(t.charCodeAt(2)),o=u(t.charCodeAt(3));return new e(new s(16*i+i,16*n+n,16*o+o))}if(5===i){const i=u(t.charCodeAt(1)),n=u(t.charCodeAt(2)),o=u(t.charCodeAt(3)),r=u(t.charCodeAt(4));return new e(new s(16*i+i,16*n+n,16*o+o,(16*r+r)/255))}return null}function u(e){switch(e){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}t.formatRGB=i,t.formatRGBA=n,t.formatHSL=o,t.formatHSLA=r,t.formatHex=l,t.formatHexA=h,t.format=c,t.parseHex=d})(i=t.CSS||(t.CSS={}))})(t=e.Format||(e.Format={}))}(a||(a={}))},cf78:function(e,t,i){"use strict";i.r(t),i.d(t,"ModuleKind",(function(){return n})),i.d(t,"JsxEmit",(function(){return s})),i.d(t,"NewLineKind",(function(){return o})),i.d(t,"ScriptTarget",(function(){return r})),i.d(t,"ModuleResolutionKind",(function(){return a})),i.d(t,"typescriptVersion",(function(){return d})),i.d(t,"typescriptDefaults",(function(){return u})),i.d(t,"javascriptDefaults",(function(){return g})),i.d(t,"getTypeScriptWorker",(function(){return p})),i.d(t,"getJavaScriptWorker",(function(){return m}));i("33f9");var n,s,o,r,a,l="4.2.3",h=i("bf44");(function(e){e[e["None"]=0]="None",e[e["CommonJS"]=1]="CommonJS",e[e["AMD"]=2]="AMD",e[e["UMD"]=3]="UMD",e[e["System"]=4]="System",e[e["ES2015"]=5]="ES2015",e[e["ESNext"]=99]="ESNext"})(n||(n={})),function(e){e[e["None"]=0]="None",e[e["Preserve"]=1]="Preserve",e[e["React"]=2]="React",e[e["ReactNative"]=3]="ReactNative",e[e["ReactJSX"]=4]="ReactJSX",e[e["ReactJSXDev"]=5]="ReactJSXDev"}(s||(s={})),function(e){e[e["CarriageReturnLineFeed"]=0]="CarriageReturnLineFeed",e[e["LineFeed"]=1]="LineFeed"}(o||(o={})),function(e){e[e["ES3"]=0]="ES3",e[e["ES5"]=1]="ES5",e[e["ES2015"]=2]="ES2015",e[e["ES2016"]=3]="ES2016",e[e["ES2017"]=4]="ES2017",e[e["ES2018"]=5]="ES2018",e[e["ES2019"]=6]="ES2019",e[e["ES2020"]=7]="ES2020",e[e["ESNext"]=99]="ESNext",e[e["JSON"]=100]="JSON",e[e["Latest"]=99]="Latest"}(r||(r={})),function(e){e[e["Classic"]=1]="Classic",e[e["NodeJs"]=2]="NodeJs"}(a||(a={}));var c=function(){function e(e,t,i){this._onDidChange=new h["Emitter"],this._onDidExtraLibsChange=new h["Emitter"],this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this._onDidExtraLibsChangeTimeout=-1}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onDidExtraLibsChange",{get:function(){return this._onDidExtraLibsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"workerOptions",{get:function(){return this._workerOptions},enumerable:!1,configurable:!0}),e.prototype.getExtraLibs=function(){return this._extraLibs},e.prototype.addExtraLib=function(e,t){var i,n=this;if(i="undefined"===typeof t?"ts:extralib-"+Math.random().toString(36).substring(2,15):t,this._extraLibs[i]&&this._extraLibs[i].content===e)return{dispose:function(){}};var s=1;return this._removedExtraLibs[i]&&(s=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(s=this._extraLibs[i].version+1),this._extraLibs[i]={content:e,version:s},this._fireOnDidExtraLibsChangeSoon(),{dispose:function(){var e=n._extraLibs[i];e&&e.version===s&&(delete n._extraLibs[i],n._removedExtraLibs[i]=s,n._fireOnDidExtraLibsChangeSoon())}}},e.prototype.setExtraLibs=function(e){for(var t in this._extraLibs)this._removedExtraLibs[t]=this._extraLibs[t].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(var i=0,n=e;i<n.length;i++){var s=n[i],o=(t=s.filePath||"ts:extralib-"+Math.random().toString(36).substring(2,15),s.content),r=1;this._removedExtraLibs[t]&&(r=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:o,version:r}}this._fireOnDidExtraLibsChangeSoon()},e.prototype._fireOnDidExtraLibsChangeSoon=function(){var e=this;-1===this._onDidExtraLibsChangeTimeout&&(this._onDidExtraLibsChangeTimeout=setTimeout((function(){e._onDidExtraLibsChangeTimeout=-1,e._onDidExtraLibsChange.fire(void 0)}),0))},e.prototype.getCompilerOptions=function(){return this._compilerOptions},e.prototype.setCompilerOptions=function(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)},e.prototype.getDiagnosticsOptions=function(){return this._diagnosticsOptions},e.prototype.setDiagnosticsOptions=function(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)},e.prototype.setWorkerOptions=function(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)},e.prototype.setMaximumWorkerIdleTime=function(e){},e.prototype.setEagerModelSync=function(e){this._eagerModelSync=e},e.prototype.getEagerModelSync=function(){return this._eagerModelSync},e}(),d=l,u=new c({allowNonTsExtensions:!0,target:r.Latest},{noSemanticValidation:!1,noSyntaxValidation:!1},{}),g=new c({allowNonTsExtensions:!0,allowJs:!0,target:r.Latest},{noSemanticValidation:!0,noSyntaxValidation:!1},{}),p=function(){return f().then((function(e){return e.getTypeScriptWorker()}))},m=function(){return f().then((function(e){return e.getJavaScriptWorker()}))};function f(){return i.e("chunk-2d22502a").then(i.bind(null,"e328"))}h["languages"].typescript={ModuleKind:n,JsxEmit:s,NewLineKind:o,ScriptTarget:r,ModuleResolutionKind:a,typescriptVersion:d,typescriptDefaults:u,javascriptDefaults:g,getTypeScriptWorker:p,getJavaScriptWorker:m},h["languages"].onLanguage("typescript",(function(){return f().then((function(e){return e.setupTypeScript(u)}))})),h["languages"].onLanguage("javascript",(function(){return f().then((function(e){return e.setupJavaScript(g)}))}))},d093:function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"a",(function(){return o})),i.d(t,"c",(function(){return r})),i.d(t,"d",(function(){return l}));const n="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function s(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const i of n)e.indexOf(i)>=0||(t+="\\"+i);return t+="\\s]+)",new RegExp(t,"g")}const o=s();function r(e){let t=o;if(e&&e instanceof RegExp)if(e.global)t=e;else{let i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),e.unicode&&(i+="u"),t=new RegExp(e.source,i)}return t.lastIndex=0,t}const a={maxLen:1e3,windowSize:15,timeBudget:150};function l(e,t,i,n,s=a){if(i.length>s.maxLen){let o=e-s.maxLen/2;return o<0?o=0:n+=o,i=i.substring(o,e+s.maxLen/2),l(e,t,i,n,s)}const o=Date.now(),r=e-1-n;let c=-1,d=null;for(let a=1;;a++){if(Date.now()-o>=s.timeBudget)break;const e=r-s.windowSize*a;t.lastIndex=Math.max(0,e);const n=h(t,i,r,c);if(!n&&d)break;if(d=n,e<=0)break;c=e}if(d){let e={word:d[0],startColumn:n+1+d.index,endColumn:n+1+d.index+d[0].length};return t.lastIndex=0,e}return null}function h(e,t,i,n){let s;while(s=e.exec(t)){const t=s.index||0;if(t<=i&&e.lastIndex>=i)return s;if(n>0&&t>n)return null}return null}},d3d7:function(e,t,i){"use strict";i.d(t,"b",(function(){return r})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){return c})),i.d(t,"d",(function(){return d}));var n=i("0a0f"),s=i("a666"),o=i("308f");const r=Object(n["c"])("logService");var a;(function(e){e[e["Trace"]=0]="Trace",e[e["Debug"]=1]="Debug",e[e["Info"]=2]="Info",e[e["Warning"]=3]="Warning",e[e["Error"]=4]="Error",e[e["Critical"]=5]="Critical",e[e["Off"]=6]="Off"})(a||(a={}));const l=a.Info;class h extends s["a"]{constructor(){super(...arguments),this.level=l,this._onDidChangeLogLevel=this._register(new o["a"])}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}class c extends h{constructor(e=l){super(),this.setLevel(e)}trace(e,...t){this.getLevel()<=a.Trace&&console.log("%cTRACE","color: #888",e,...t)}debug(e,...t){this.getLevel()<=a.Debug&&console.log("%cDEBUG","background: #eee; color: #888",e,...t)}info(e,...t){this.getLevel()<=a.Info&&console.log("%c INFO","color: #33f",e,...t)}error(e,...t){this.getLevel()<=a.Error&&console.log("%c  ERR","color: #f33",e,...t)}dispose(){}}class d extends s["a"]{constructor(e){super(),this.logger=e,this._register(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}error(e,...t){this.logger.error(e,...t)}}},d3ef:function(e,t,i){"use strict";i.d(t,"b",(function(){return b})),i.d(t,"a",(function(){return v}));i("8bf4");var n=i("dff7"),s=i("11f7"),o=i("31df"),r=i("3813"),a=i("5aa5"),l=i("308f"),h=i("1b7d"),c=i("ceb8"),d=i("aa3d");class u{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class g{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return 0!==this._currentPosition()?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new u(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach(t=>e.push(t)),e}}var p=i("1898"),m=i("e32d");const f=s["a"],_={inputBackground:c["a"].fromHex("#3C3C3C"),inputForeground:c["a"].fromHex("#CCCCCC"),inputValidationInfoBorder:c["a"].fromHex("#55AAFF"),inputValidationInfoBackground:c["a"].fromHex("#063B49"),inputValidationWarningBorder:c["a"].fromHex("#B89500"),inputValidationWarningBackground:c["a"].fromHex("#352A05"),inputValidationErrorBorder:c["a"].fromHex("#BE1100"),inputValidationErrorBackground:c["a"].fromHex("#5A1D1D")};class b extends h["a"]{constructor(e,t,i){super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new l["a"]),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new l["a"]),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i||Object.create(null),Object(d["f"])(this.options,_,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=s["m"](e,f(".monaco-inputbox.idle"));let n=this.options.flexibleHeight?"textarea":"input",o=s["m"](this.element,f(".ibwrapper"));if(this.input=s["m"](o,f(n+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight="number"===typeof this.options.flexibleMaxHeight?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=s["m"](o,f("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new p["b"](this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),s["m"](e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(e=>this.input.scrollTop=e.scrollTop));const t=l["b"].filter(Object(m["a"])(document,"selectionchange"),()=>{const e=document.getSelection();return(null===e||void 0===e?void 0:e.anchorNode)===o});this._register(t(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&this.setPlaceHolder(this.placeholder),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this.ignoreGesture(this.input),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new a["a"](this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage()}onFocus(){this._showMessage()}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e),this.input.title=e}setAriaLabel(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return"number"===typeof this.cachedHeight?this.cachedHeight:s["D"](this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}get width(){return s["E"](this.input)}set width(e){if(this.options.flexibleHeight&&this.options.flexibleWidth){let t=0;if(this.mirror){const e=parseFloat(this.mirror.style.paddingLeft||"")||0,i=parseFloat(this.mirror.style.paddingRight||"")||0;t=e+i}this.input.style.width=e-t+"px"}else this.input.style.width=e+"px";this.mirror&&(this.mirror.style.width=e+"px")}set paddingRight(e){this.options.flexibleHeight&&this.options.flexibleWidth?this.input.style.width=`calc(100% - ${e}px)`:this.input.style.paddingRight=e+"px",this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if("number"!==typeof this.cachedContentHeight||"number"!==typeof this.cachedHeight||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=i.border?"1px solid "+i.border:"",(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),null===e||void 0===e?void 0:e.type}stylesForType(e){switch(e){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e,t,i=()=>e.style.width=s["E"](this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:t=>{if(!this.message)return null;e=s["m"](t,f(".monaco-inputbox-container")),i();const n={inline:!0,className:"monaco-inputbox-message"},r=this.message.formatContent?Object(o["b"])(this.message.content,n):Object(o["c"])(this.message.content,n);r.classList.add(this.classForType(this.message.type));const a=this.stylesForType(this.message.type);return r.style.backgroundColor=a.background?a.background.toString():"",r.style.color=a.foreground?a.foreground.toString():"",r.style.border=a.border?"1px solid "+a.border:"",s["m"](e,r),null},onHide:()=>{this.state="closed"},layout:i}),t=3===this.message.type?n["a"]("alertErrorMessage","Error: {0}",this.message.content):2===this.message.type?n["a"]("alertWarningMessage","Warning: {0}",this.message.content):n["a"]("alertInfoMessage","Info: {0}",this.message.content),r["a"](t),this.state="open"}_hideMessage(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,t=e.charCodeAt(e.length-1),i=10===t?" ":"",n=e+i;n?this.mirror.textContent=e+i:this.mirror.innerText=" ",this.layout()}style(e){this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const e=this.inputBackground?this.inputBackground.toString():"",t=this.inputForeground?this.inputForeground.toString():"",i=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.input.style.backgroundColor="inherit",this.input.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=s["D"](this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,s=t.value;null!==i&&null!==n&&(this.value=s.substr(0,i)+e+s.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}class v extends b{constructor(e,t,i){super(e,t,i),this.history=new g(i.history,100)}addToHistory(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),e&&(this.value=e,r["c"](this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,r["c"](this.value))}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}}},d3f4:function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var n=i("6a89");class s{static insert(e,t){return{range:new n["a"](e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}},d8c3:function(e,t,i){},d93b:function(e,t,i){},d95f:function(e,t,i){},db88:function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));class n{constructor(e){this.element=e,this.next=n.Undefined,this.prev=n.Undefined}}n.Undefined=new n(void 0);class s{constructor(){this._first=n.Undefined,this._last=n.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===n.Undefined}clear(){this._first=n.Undefined,this._last=n.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new n(e);if(this._first===n.Undefined)this._first=i,this._last=i;else if(t){const e=this._last;this._last=i,i.prev=e,e.next=i}else{const e=this._first;this._first=i,i.next=e,e.prev=i}this._size+=1;let s=!1;return()=>{s||(s=!0,this._remove(i))}}shift(){if(this._first!==n.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==n.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==n.Undefined&&e.next!==n.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===n.Undefined&&e.next===n.Undefined?(this._first=n.Undefined,this._last=n.Undefined):e.next===n.Undefined?(this._last=this._last.prev,this._last.next=n.Undefined):e.prev===n.Undefined&&(this._first=this._first.next,this._first.prev=n.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;while(e!==n.Undefined)yield e.element,e=e.next}}},dd1b:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var n=i("89cd"),s=i("308f");const o={JSONContribution:"base.contributions.json"};function r(e){return e.length>0&&"#"===e.charAt(e.length-1)?e.substring(0,e.length-1):e}class a{constructor(){this._onDidChangeSchema=new s["a"],this.schemasById={}}registerSchema(e,t){this.schemasById[r(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}}const l=new a;n["a"].add(o.JSONContribution,l)},dff7:function(e,t,i){"use strict";function n(e,t){let i;return i=0===t.length?e:e.replace(/\{(\d+)\}/g,(function(e,i){const n=i[0];return"undefined"!==typeof t[n]?t[n]:e})),i}function s(e,t,...i){return n(t,i)}i.d(t,"a",(function(){return s}))},e1b5:function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var n=i("b707");class s{constructor(e,t){this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t}equals(e){return e instanceof s&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,i){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const n=t<<1,s=n+(i<<1);for(let o=n;o<s;o++)if(this._tokens[o]!==e._tokens[o])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(e){return e>0?this._tokens[e-1<<1]:0}getMetadata(e){const t=this._tokens[1+(e<<1)];return t}getLanguageId(e){const t=this._tokens[1+(e<<1)];return n["z"].getLanguageId(t)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return n["z"].getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return n["z"].getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return n["z"].getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[1+(e<<1)];return n["z"].getInlineStyleFromMetadata(i,t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return s.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new o(this,e,t,i)}static convertToEndOffset(e,t){const i=e.length>>>1,n=i-1;for(let s=0;s<n;s++)e[s<<1]=e[s+1<<1];e[n<<1]=t}static findIndexInTokensArray(e,t){if(e.length<=2)return 0;let i=0,n=(e.length>>>1)-1;while(i<n){const s=i+Math.floor((n-i)/2),o=e[s<<1];if(o===t)return s+1;o<t?i=s+1:o>t&&(n=s)}return i}}class o{constructor(e,t,i,n){this._source=e,this._startOffset=t,this._endOffset=i,this._deltaOffset=n,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let s=this._firstTokenIndex,o=e.getCount();s<o;s++){const t=e.getStartOffset(s);if(t>=i)break;this._tokensCount++}}equals(e){return e instanceof o&&(this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount))}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}},e2b8:function(e,t,i){},e32d:function(e,t,i){"use strict";i.d(t,"a",(function(){return s})),i.d(t,"b",(function(){return o}));var n=i("308f");const s=(e,t,i)=>{const s=e=>o.fire(e),o=new n["a"]({onFirstListenerAdd:()=>{e.addEventListener(t,s,i)},onLastListenerRemove:()=>{e.removeEventListener(t,s,i)}});return o.event};function o(e){return e.preventDefault(),e.stopPropagation(),e}},e58e:function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var n=i("30db");const s=n["b"].performance&&"function"===typeof n["b"].performance.now;class o{constructor(e){this._highResolution=s&&e,this._startTime=this._now(),this._stopTime=-1}static create(e=!0){return new o(e)}stop(){this._stopTime=this._now()}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?n["b"].performance.now():Date.now()}}},e6793:function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return a}));var n=i("1e93"),s=i("7ab3");function o(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class r{constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${o(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${o(this.oldText)}")`:`(replace@${this.oldPosition} "${o(this.oldText)}" with "${o(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const s=t.length;n["f"](e,s,i),i+=4;for(let o=0;o<s;o++)n["e"](e,t.charCodeAt(o),i),i+=2;return i}static _readString(e,t){const i=n["c"](e,t);return t+=4,Object(s["b"])(e,t,i)}writeSize(){return 8+r._writeStringSize(this.oldText)+r._writeStringSize(this.newText)}write(e,t){return n["f"](e,this.oldPosition,t),t+=4,n["f"](e,this.newPosition,t),t+=4,t=r._writeString(e,this.oldText,t),t=r._writeString(e,this.newText,t),t}static read(e,t,i){const s=n["c"](e,t);t+=4;const o=n["c"](e,t);t+=4;const a=r._readString(e,t);t+=r._writeStringSize(a);const l=r._readString(e,t);return t+=r._writeStringSize(l),i.push(new r(s,a,o,l)),t}}function a(e,t){if(null===e||0===e.length)return t;const i=new l(e,t);return i.compress()}class l{constructor(e,t){this._prevEdits=e,this._currEdits=t,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let e=0,t=0,i=this._getPrev(e),n=this._getCurr(t);while(e<this._prevLen||t<this._currLen){if(null===i){this._acceptCurr(n),n=this._getCurr(++t);continue}if(null===n){this._acceptPrev(i),i=this._getPrev(++e);continue}if(n.oldEnd<=i.newPosition){this._acceptCurr(n),n=this._getCurr(++t);continue}if(i.newEnd<=n.oldPosition){this._acceptPrev(i),i=this._getPrev(++e);continue}if(n.oldPosition<i.newPosition){const[e,t]=l._splitCurr(n,i.newPosition-n.oldPosition);this._acceptCurr(e),n=t;continue}if(i.newPosition<n.oldPosition){const[e,t]=l._splitPrev(i,n.oldPosition-i.newPosition);this._acceptPrev(e),i=t;continue}let s,o;if(n.oldEnd===i.newEnd)s=i,o=n,i=this._getPrev(++e),n=this._getCurr(++t);else if(n.oldEnd<i.newEnd){const[e,r]=l._splitPrev(i,n.oldLength);s=e,o=n,i=r,n=this._getCurr(++t)}else{const[t,r]=l._splitCurr(n,i.newLength);s=i,o=t,i=this._getPrev(++e),n=r}this._result[this._resultLen++]=new r(s.oldPosition,s.oldText,o.newPosition,o.newText),this._prevDeltaOffset+=s.newLength-s.oldLength,this._currDeltaOffset+=o.newLength-o.oldLength}const s=l._merge(this._result),o=l._removeNoOps(s);return o}_acceptCurr(e){this._result[this._resultLen++]=l._rebaseCurr(this._prevDeltaOffset,e),this._currDeltaOffset+=e.newLength-e.oldLength}_getCurr(e){return e<this._currLen?this._currEdits[e]:null}_acceptPrev(e){this._result[this._resultLen++]=l._rebasePrev(this._currDeltaOffset,e),this._prevDeltaOffset+=e.newLength-e.oldLength}_getPrev(e){return e<this._prevLen?this._prevEdits[e]:null}static _rebaseCurr(e,t){return new r(t.oldPosition-e,t.oldText,t.newPosition,t.newText)}static _rebasePrev(e,t){return new r(t.oldPosition,t.oldText,t.newPosition+e,t.newText)}static _splitPrev(e,t){const i=e.newText.substr(0,t),n=e.newText.substr(t);return[new r(e.oldPosition,e.oldText,e.newPosition,i),new r(e.oldEnd,"",e.newPosition+t,n)]}static _splitCurr(e,t){const i=e.oldText.substr(0,t),n=e.oldText.substr(t);return[new r(e.oldPosition,i,e.newPosition,e.newText),new r(e.oldPosition+t,n,e.newEnd,"")]}static _merge(e){if(0===e.length)return e;let t=[],i=0,n=e[0];for(let s=1;s<e.length;s++){const o=e[s];n.oldEnd===o.oldPosition?n=new r(n.oldPosition,n.oldText+o.oldText,n.newPosition,n.newText+o.newText):(t[i++]=n,n=o)}return t[i++]=n,t}static _removeNoOps(e){if(0===e.length)return e;let t=[],i=0;for(let n=0;n<e.length;n++){const s=e[n];s.oldText!==s.newText&&(t[i++]=s)}return t}}},e6ff:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i("3170");class s extends n["a"]{constructor(e){super(0);for(let t=0,i=e.length;t<i;t++)this.set(e.charCodeAt(t),2);this.set(32,1),this.set(9,1)}}function o(e){let t={};return i=>(t.hasOwnProperty(i)||(t[i]=e(i)),t[i])}const r=o(e=>new s(e))},e750:function(e,t,i){},e757:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));let n=!1,s=null;function o(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,i=e.parent.location;if("null"!==t.origin&&"null"!==i.origin&&(t.protocol!==i.protocol||t.hostname!==i.hostname||t.port!==i.port))return n=!0,null}catch(t){return n=!0,null}return e.parent}class r{static getSameOriginWindowChain(){if(!s){s=[];let e,t=window;do{e=o(t),e?s.push({window:t,iframeElement:t.frameElement||null}):s.push({window:t,iframeElement:null}),t=e}while(t)}return s.slice(0)}static hasDifferentOriginAncestor(){return s||this.getSameOriginWindowChain(),n}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0,s=this.getSameOriginWindowChain();for(const o of s){if(i+=o.window.scrollY,n+=o.window.scrollX,o.window===t)break;if(!o.iframeElement)break;let e=o.iframeElement.getBoundingClientRect();i+=e.top,n+=e.left}return{top:i,left:n}}}},e75b:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));i("f0b2");const n="monaco-mouse-cursor-text"},e8e3:function(e,t,i){"use strict";function n(e,t=0){return e[e.length-(1+t)]}function s(e){if(0===e.length)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]}function o(e,t,i=((e,t)=>e===t)){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let n=0,s=e.length;n<s;n++)if(!i(e[n],t[n]))return!1;return!0}function r(e,t,i){let n=0,s=e.length-1;while(n<=s){const o=(n+s)/2|0,r=i(e[o],t);if(r<0)n=o+1;else{if(!(r>0))return o;s=o-1}}return-(n+1)}function a(e,t){let i=0,n=e.length;if(0===n)return 0;while(i<n){const s=Math.floor((i+n)/2);t(e[s])?n=s:i=s+1}return i}function l(e,t,i){if(e|=0,e>=t.length)throw new TypeError("invalid index");let n=t[Math.floor(t.length*Math.random())],s=[],o=[],r=[];for(let a of t){const e=i(a,n);e<0?s.push(a):e>0?o.push(a):r.push(a)}return e<s.length?l(e,s,i):e<s.length+r.length?r[0]:l(e-(s.length+r.length),o,i)}function h(e,t){return d(e,t,0,e.length-1,[]),e}function c(e,t,i,n,s,o){let r=i,a=n+1;for(let l=i;l<=s;l++)o[l]=e[l];for(let l=i;l<=s;l++)r>n?e[l]=o[a++]:a>s?e[l]=o[r++]:t(o[a],o[r])<0?e[l]=o[a++]:e[l]=o[r++]}function d(e,t,i,n,s){if(n<=i)return;const o=i+(n-i)/2|0;d(e,t,i,o,s),d(e,t,o+1,n,s),t(e[o],e[o+1])<=0||c(e,t,i,o,n,s)}function u(e,t){const i=[];let n=void 0;for(const s of h(e.slice(0),t))n&&0===t(n[0],s)?n.push(s):(n=[s],i.push(n));return i}function g(e){return e.filter(e=>!!e)}function p(e){return!Array.isArray(e)||0===e.length}function m(e){return Array.isArray(e)&&e.length>0}function f(e,t){if(!t)return e.filter((t,i)=>e.indexOf(t)===i);const i=Object.create(null);return e.filter(e=>{const n=t(e);return!i[n]&&(i[n]=!0,!0)})}function _(e){const t=new Set;return e.filter(e=>!t.has(e)&&(t.add(e),!0))}function b(e,t){return e.length>0?e[0]:t}function v(e){return[].concat(...e)}function C(e,t){let i="number"===typeof t?e:0;"number"===typeof t?i=e:(i=0,t=e);const n=[];if(i<=t)for(let s=i;s<t;s++)n.push(s);else for(let s=i;s>t;s--)n.push(s);return n}function w(e,t,i){const n=e.slice(0,t),s=e.slice(t);return n.concat(i,s)}function S(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.unshift(t))}function y(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.push(t))}function D(e){return Array.isArray(e)?e:[e]}i.d(t,"s",(function(){return n})),i.d(t,"t",(function(){return s})),i.d(t,"g",(function(){return o})),i.d(t,"c",(function(){return r})),i.d(t,"h",(function(){return a})),i.d(t,"q",(function(){return l})),i.d(t,"n",(function(){return h})),i.d(t,"k",(function(){return u})),i.d(t,"d",(function(){return g})),i.d(t,"l",(function(){return p})),i.d(t,"m",(function(){return m})),i.d(t,"e",(function(){return f})),i.d(t,"f",(function(){return _})),i.d(t,"i",(function(){return b})),i.d(t,"j",(function(){return v})),i.d(t,"r",(function(){return C})),i.d(t,"a",(function(){return w})),i.d(t,"p",(function(){return S})),i.d(t,"o",(function(){return y})),i.d(t,"b",(function(){return D}))},ec60:function(e,t,i){},eda7:function(e,t,i){"use strict";i.d(t,"b",(function(){return s})),i.d(t,"c",(function(){return l})),i.d(t,"a",(function(){return m}));var n=i("3742");function s(e){return o(e,0)}function o(e,t){switch(typeof e){case"object":return null===e?r(349,t):Array.isArray(e)?h(e,t):c(e,t);case"string":return l(e,t);case"boolean":return a(e,t);case"number":return r(e,t);case"undefined":return r(937,t);default:return r(617,t)}}function r(e,t){return(t<<5)-t+e|0}function a(e,t){return r(e?433:863,t)}function l(e,t){t=r(149417,t);for(let i=0,n=e.length;i<n;i++)t=r(e.charCodeAt(i),t);return t}function h(e,t){return t=r(104579,t),e.reduce((e,t)=>o(t,e),t)}function c(e,t){return t=r(181387,t),Object.keys(e).sort().reduce((t,i)=>(t=l(i,t),o(e[i],t)),t)}function d(e,t,i=32){const n=i-t,s=~((1<<n)-1);return(e<<t|(s&e)>>>n)>>>0}function u(e,t=0,i=e.byteLength,n=0){for(let s=0;s<i;s++)e[t+s]=n}function g(e,t,i="0"){while(e.length<t)e=i+e;return e}function p(e,t=32){return e instanceof ArrayBuffer?Array.from(new Uint8Array(e)).map(e=>e.toString(16).padStart(2,"0")).join(""):g((e>>>0).toString(16),t/4)}class m{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const i=this._buff;let s,o,r=this._buffLen,a=this._leftoverHighSurrogate;0!==a?(s=a,o=-1,a=0):(s=e.charCodeAt(0),o=0);while(1){let l=s;if(n["E"](s)){if(!(o+1<t)){a=s;break}{const t=e.charCodeAt(o+1);n["F"](t)?(o++,l=n["j"](s,t)):l=65533}}else n["F"](s)&&(l=65533);if(r=this._push(i,r,l),o++,!(o<t))break;s=e.charCodeAt(o)}this._buffLen=r,this._leftoverHighSurrogate=a}_push(e,t,i){return i<128?e[t++]=i:i<2048?(e[t++]=192|(1984&i)>>>6,e[t++]=128|(63&i)>>>0):i<65536?(e[t++]=224|(61440&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0):(e[t++]=240|(1835008&i)>>>18,e[t++]=128|(258048&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),p(this._h0)+p(this._h1)+p(this._h2)+p(this._h3)+p(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,u(this._buff,this._buffLen),this._buffLen>56&&(this._step(),u(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=m._bigBlock32,t=this._buffDV;for(let c=0;c<64;c+=4)e.setUint32(c,t.getUint32(c,!1),!1);for(let c=64;c<320;c+=4)e.setUint32(c,d(e.getUint32(c-12,!1)^e.getUint32(c-32,!1)^e.getUint32(c-56,!1)^e.getUint32(c-64,!1),1),!1);let i,n,s,o=this._h0,r=this._h1,a=this._h2,l=this._h3,h=this._h4;for(let c=0;c<80;c++)c<20?(i=r&a|~r&l,n=1518500249):c<40?(i=r^a^l,n=1859775393):c<60?(i=r&a|r&l|a&l,n=2400959708):(i=r^a^l,n=3395469782),s=d(o,5)+i+h+n+e.getUint32(4*c,!1)&4294967295,h=l,l=a,a=d(r,30),r=o,o=s;this._h0=this._h0+o&4294967295,this._h1=this._h1+r&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+l&4294967295,this._h4=this._h4+h&4294967295}}m._bigBlock32=new DataView(new ArrayBuffer(320))},ee56:function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i("aa3d"),s=i("11f7"),o=i("7ddc");class r{constructor(e,t){this.supportIcons=t,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t=[],i="",s){e||(e=""),s&&(e=r.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===i&&n["d"](this.highlights,t)||(this.text=e,this.title=i,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const i of this.highlights){if(i.end===i.start)continue;if(t<i.start){const n=this.text.substring(t,i.start);e.push(s["a"]("span",void 0,...this.supportIcons?Object(o["a"])(n):[n])),t=i.end}const n=this.text.substring(i.start,i.end),r=s["a"]("span.highlight",void 0,...this.supportIcons?Object(o["a"])(n):[n]);i.extraClasses&&r.classList.add(i.extraClasses),e.push(r),t=i.end}if(t<this.text.length){const i=this.text.substring(t);e.push(s["a"]("span",void 0,...this.supportIcons?Object(o["a"])(i):[i]))}s["M"](this.domNode,...e),this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}static escapeNewLines(e,t){let i=0,n=0;return e.replace(/\r\n|\r|\n/g,(e,s)=>{n="\r\n"===e?-1:0,s+=i;for(const i of t)i.end<=s||(i.start>=s&&(i.start+=n),i.end>=s&&(i.end+=n));return i+=n,"⏎"})}}},ef377:function(e,t,i){},ef8e:function(e,t,i){"use strict";function n(e){return Array.isArray(e)}function s(e){return"string"===typeof e}function o(e){return"object"===typeof e&&null!==e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}function r(e){return"number"===typeof e&&!isNaN(e)}function a(e){return!0===e||!1===e}function l(e){return"undefined"===typeof e}function h(e){return l(e)||null===e}function c(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function d(e){return"function"===typeof e}function u(e,t){const i=Math.min(e.length,t.length);for(let n=0;n<i;n++)g(e[n],t[n])}function g(e,t){if(s(t)){if(typeof e!==t)throw new Error("argument does not match constraint: typeof "+t)}else if(d(t)){try{if(e instanceof t)return}catch(i){}if(!h(e)&&e.constructor===t)return;if(1===t.length&&!0===t.call(void 0,e))return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function p(e){let t=[],i=Object.getPrototypeOf(e);while(Object.prototype!==i)t=t.concat(Object.getOwnPropertyNames(i)),i=Object.getPrototypeOf(i);return t}function m(e){const t=[];for(const i of p(e))"function"===typeof e[i]&&t.push(i);return t}function f(e,t){const i=e=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)};let n={};for(const s of e)n[s]=i(s);return n}function _(e){return null===e?void 0:e}i.d(t,"d",(function(){return n})),i.d(t,"i",(function(){return s})),i.d(t,"h",(function(){return o})),i.d(t,"g",(function(){return r})),i.d(t,"e",(function(){return a})),i.d(t,"j",(function(){return l})),i.d(t,"k",(function(){return h})),i.d(t,"a",(function(){return c})),i.d(t,"f",(function(){return d})),i.d(t,"l",(function(){return u})),i.d(t,"c",(function(){return m})),i.d(t,"b",(function(){return f})),i.d(t,"m",(function(){return _}))},efdb:function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var n=i("0a0f");const s=Object(n["c"])("markerDecorationsService")},eff2:function(e,t,i){"use strict";i.d(t,"b",(function(){return u})),i.d(t,"a",(function(){return g}));i("c84a");var n=i("30db"),s=i("dff7"),o=i("a666"),r=i("f070"),a=i("ef8e"),l=i("a60f"),h=i("650e"),c=i("0f70"),d=i("11f7");class u extends o["a"]{constructor(e,t,i={}){super(),this.options=i,this._context=e||this,this._action=t,t instanceof r["a"]&&this._register(t.onDidChange(e=>{this.element&&this.handleActionChangeEvent(e)}))}handleActionChangeEvent(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new r["b"])),this._actionRunner}set actionRunner(e){this._actionRunner=e}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(l["b"].addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,c["i"]&&this._register(Object(d["g"])(e,d["d"].DRAG_START,e=>{var t;return null===(t=e.dataTransfer)||void 0===t?void 0:t.setData(h["a"].TEXT,this._action.label)}))),this._register(Object(d["g"])(t,l["a"].Tap,e=>this.onClick(e))),this._register(Object(d["g"])(t,d["d"].MOUSE_DOWN,e=>{i||d["c"].stop(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")})),n["f"]&&this._register(Object(d["g"])(t,d["d"].CONTEXT_MENU,e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)})),this._register(Object(d["g"])(t,d["d"].CLICK,e=>{d["c"].stop(e,!0),this.options&&this.options.isMenu||n["k"](()=>this.onClick(e))})),this._register(Object(d["g"])(t,d["d"].DBLCLICK,e=>{d["c"].stop(e,!0)})),[d["d"].MOUSE_UP,d["d"].MOUSE_OUT].forEach(e=>{this._register(Object(d["g"])(t,e,e=>{d["c"].stop(e),t.classList.remove("active")}))})}onClick(e){var t;d["c"].stop(e,!0);const i=a["k"](this._context)?(null===(t=this.options)||void 0===t?void 0:t.useEventAsContext)?e:void 0:this._context;this.actionRunner.run(this._action,i)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}updateTooltip(){}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}class g extends u{constructor(e,t,i={}){super(e,t,i),this.options=i,this.options.icon=void 0!==i.icon&&i.icon,this.options.label=void 0===i.label||i.label,this.cssClass=""}render(e){super.render(e),this.element&&(this.label=Object(d["m"])(this.element,Object(d["a"])("a.action-label"))),this.label&&(this._action.id===r["d"].ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&(Object(d["m"])(this.element,Object(d["a"])("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.getAction().label)}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=s["a"]({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.label&&(this.label.title=e)}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label&&this.label.classList.remove("codicon")}updateEnabled(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element&&this.element.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element&&this.element.classList.add("disabled"))}updateChecked(){this.label&&(this.getAction().checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}},f070:function(e,t,i){"use strict";i.d(t,"a",(function(){return a})),i.d(t,"b",(function(){return l})),i.d(t,"d",(function(){return h})),i.d(t,"e",(function(){return c})),i.d(t,"c",(function(){return d}));var n=i("dff7"),s=i("a666"),o=i("308f"),r=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class a extends s["a"]{constructor(e,t="",i="",n=!0,s){super(),this._onDidChange=this._register(new o["a"]),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._checked=!1,this._id=e,this._label=t,this._cssClass=i,this._enabled=n,this._actionCallback=s}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}run(e,t){return this._actionCallback?this._actionCallback(e):Promise.resolve(!0)}}class l extends s["a"]{constructor(){super(...arguments),this._onBeforeRun=this._register(new o["a"]),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new o["a"]),this.onDidRun=this._onDidRun.event}run(e,t){return r(this,void 0,void 0,(function*(){if(!e.enabled)return Promise.resolve(null);this._onBeforeRun.fire({action:e});try{const i=yield this.runAction(e,t);this._onDidRun.fire({action:e,result:i})}catch(i){this._onDidRun.fire({action:e,error:i})}}))}runAction(e,t){const i=t?e.run(t):e.run();return Promise.resolve(i)}}class h extends a{constructor(e){super(h.ID,e,e?"separator text":"separator"),this.checked=!1,this.enabled=!1}}h.ID="vs.actions.separator";class c{constructor(e,t,i,n){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=e,this.label=t,this.class=n,this._actions=i}dispose(){}get actions(){return this._actions}run(){return r(this,void 0,void 0,(function*(){}))}}class d extends a{constructor(){super(d.ID,n["a"]("submenu.empty","(empty)"),void 0,!1)}}d.ID="vs.actions.empty"},f07b:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));class n{constructor(...e){this._entries=new Map;for(let[t,i]of e)this.set(t,i)}set(e,t){const i=this._entries.get(e);return this._entries.set(e,t),i}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}}},f0b2:function(e,t,i){},f20b:function(e,t,i){},f2d2:function(e,t,i){},f33e:function(e,t,i){"use strict";i.r(t),i.d(t,"CancellationTokenSource",(function(){return jg})),i.d(t,"Emitter",(function(){return Hg})),i.d(t,"KeyCode",(function(){return zg})),i.d(t,"KeyMod",(function(){return Ug})),i.d(t,"Position",(function(){return Kg})),i.d(t,"Range",(function(){return $g})),i.d(t,"Selection",(function(){return qg})),i.d(t,"SelectionDirection",(function(){return Gg})),i.d(t,"MarkerSeverity",(function(){return Yg})),i.d(t,"MarkerTag",(function(){return Zg})),i.d(t,"Uri",(function(){return Xg})),i.d(t,"Token",(function(){return Qg})),i.d(t,"editor",(function(){return Jg})),i.d(t,"languages",(function(){return ep}));var n,s,o,r,a,l,h,c,d,u,g,p,m,f,_,b,v,C,w,S,y,D,L,x,k,E,N,O,I,T,M,A,R,F,P=i("fd49"),B=i("2504"),W=i("308f"),V=i("fe45"),j=i("6d8e"),H=i("7061"),z=i("6a89"),U=i("8025"),K=i("4dc7");(function(e){e[e["Unknown"]=0]="Unknown",e[e["Disabled"]=1]="Disabled",e[e["Enabled"]=2]="Enabled"})(n||(n={})),function(e){e[e["KeepWhitespace"]=1]="KeepWhitespace",e[e["InsertAsSnippet"]=4]="InsertAsSnippet"}(s||(s={})),function(e){e[e["Method"]=0]="Method",e[e["Function"]=1]="Function",e[e["Constructor"]=2]="Constructor",e[e["Field"]=3]="Field",e[e["Variable"]=4]="Variable",e[e["Class"]=5]="Class",e[e["Struct"]=6]="Struct",e[e["Interface"]=7]="Interface",e[e["Module"]=8]="Module",e[e["Property"]=9]="Property",e[e["Event"]=10]="Event",e[e["Operator"]=11]="Operator",e[e["Unit"]=12]="Unit",e[e["Value"]=13]="Value",e[e["Constant"]=14]="Constant",e[e["Enum"]=15]="Enum",e[e["EnumMember"]=16]="EnumMember",e[e["Keyword"]=17]="Keyword",e[e["Text"]=18]="Text",e[e["Color"]=19]="Color",e[e["File"]=20]="File",e[e["Reference"]=21]="Reference",e[e["Customcolor"]=22]="Customcolor",e[e["Folder"]=23]="Folder",e[e["TypeParameter"]=24]="TypeParameter",e[e["User"]=25]="User",e[e["Issue"]=26]="Issue",e[e["Snippet"]=27]="Snippet"}(o||(o={})),function(e){e[e["Deprecated"]=1]="Deprecated"}(r||(r={})),function(e){e[e["Invoke"]=0]="Invoke",e[e["TriggerCharacter"]=1]="TriggerCharacter",e[e["TriggerForIncompleteCompletions"]=2]="TriggerForIncompleteCompletions"}(a||(a={})),function(e){e[e["EXACT"]=0]="EXACT",e[e["ABOVE"]=1]="ABOVE",e[e["BELOW"]=2]="BELOW"}(l||(l={})),function(e){e[e["NotSet"]=0]="NotSet",e[e["ContentFlush"]=1]="ContentFlush",e[e["RecoverFromMarkers"]=2]="RecoverFromMarkers",e[e["Explicit"]=3]="Explicit",e[e["Paste"]=4]="Paste",e[e["Undo"]=5]="Undo",e[e["Redo"]=6]="Redo"}(h||(h={})),function(e){e[e["LF"]=1]="LF",e[e["CRLF"]=2]="CRLF"}(c||(c={})),function(e){e[e["Text"]=0]="Text",e[e["Read"]=1]="Read",e[e["Write"]=2]="Write"}(d||(d={})),function(e){e[e["None"]=0]="None",e[e["Keep"]=1]="Keep",e[e["Brackets"]=2]="Brackets",e[e["Advanced"]=3]="Advanced",e[e["Full"]=4]="Full"}(u||(u={})),function(e){e[e["acceptSuggestionOnCommitCharacter"]=0]="acceptSuggestionOnCommitCharacter",e[e["acceptSuggestionOnEnter"]=1]="acceptSuggestionOnEnter",e[e["accessibilitySupport"]=2]="accessibilitySupport",e[e["accessibilityPageSize"]=3]="accessibilityPageSize",e[e["ariaLabel"]=4]="ariaLabel",e[e["autoClosingBrackets"]=5]="autoClosingBrackets",e[e["autoClosingOvertype"]=6]="autoClosingOvertype",e[e["autoClosingQuotes"]=7]="autoClosingQuotes",e[e["autoIndent"]=8]="autoIndent",e[e["automaticLayout"]=9]="automaticLayout",e[e["autoSurround"]=10]="autoSurround",e[e["codeLens"]=11]="codeLens",e[e["codeLensFontFamily"]=12]="codeLensFontFamily",e[e["codeLensFontSize"]=13]="codeLensFontSize",e[e["colorDecorators"]=14]="colorDecorators",e[e["columnSelection"]=15]="columnSelection",e[e["comments"]=16]="comments",e[e["contextmenu"]=17]="contextmenu",e[e["copyWithSyntaxHighlighting"]=18]="copyWithSyntaxHighlighting",e[e["cursorBlinking"]=19]="cursorBlinking",e[e["cursorSmoothCaretAnimation"]=20]="cursorSmoothCaretAnimation",e[e["cursorStyle"]=21]="cursorStyle",e[e["cursorSurroundingLines"]=22]="cursorSurroundingLines",e[e["cursorSurroundingLinesStyle"]=23]="cursorSurroundingLinesStyle",e[e["cursorWidth"]=24]="cursorWidth",e[e["disableLayerHinting"]=25]="disableLayerHinting",e[e["disableMonospaceOptimizations"]=26]="disableMonospaceOptimizations",e[e["dragAndDrop"]=27]="dragAndDrop",e[e["emptySelectionClipboard"]=28]="emptySelectionClipboard",e[e["extraEditorClassName"]=29]="extraEditorClassName",e[e["fastScrollSensitivity"]=30]="fastScrollSensitivity",e[e["find"]=31]="find",e[e["fixedOverflowWidgets"]=32]="fixedOverflowWidgets",e[e["folding"]=33]="folding",e[e["foldingStrategy"]=34]="foldingStrategy",e[e["foldingHighlight"]=35]="foldingHighlight",e[e["unfoldOnClickAfterEndOfLine"]=36]="unfoldOnClickAfterEndOfLine",e[e["fontFamily"]=37]="fontFamily",e[e["fontInfo"]=38]="fontInfo",e[e["fontLigatures"]=39]="fontLigatures",e[e["fontSize"]=40]="fontSize",e[e["fontWeight"]=41]="fontWeight",e[e["formatOnPaste"]=42]="formatOnPaste",e[e["formatOnType"]=43]="formatOnType",e[e["glyphMargin"]=44]="glyphMargin",e[e["gotoLocation"]=45]="gotoLocation",e[e["hideCursorInOverviewRuler"]=46]="hideCursorInOverviewRuler",e[e["highlightActiveIndentGuide"]=47]="highlightActiveIndentGuide",e[e["hover"]=48]="hover",e[e["inDiffEditor"]=49]="inDiffEditor",e[e["letterSpacing"]=50]="letterSpacing",e[e["lightbulb"]=51]="lightbulb",e[e["lineDecorationsWidth"]=52]="lineDecorationsWidth",e[e["lineHeight"]=53]="lineHeight",e[e["lineNumbers"]=54]="lineNumbers",e[e["lineNumbersMinChars"]=55]="lineNumbersMinChars",e[e["linkedEditing"]=56]="linkedEditing",e[e["links"]=57]="links",e[e["matchBrackets"]=58]="matchBrackets",e[e["minimap"]=59]="minimap",e[e["mouseStyle"]=60]="mouseStyle",e[e["mouseWheelScrollSensitivity"]=61]="mouseWheelScrollSensitivity",e[e["mouseWheelZoom"]=62]="mouseWheelZoom",e[e["multiCursorMergeOverlapping"]=63]="multiCursorMergeOverlapping",e[e["multiCursorModifier"]=64]="multiCursorModifier",e[e["multiCursorPaste"]=65]="multiCursorPaste",e[e["occurrencesHighlight"]=66]="occurrencesHighlight",e[e["overviewRulerBorder"]=67]="overviewRulerBorder",e[e["overviewRulerLanes"]=68]="overviewRulerLanes",e[e["padding"]=69]="padding",e[e["parameterHints"]=70]="parameterHints",e[e["peekWidgetDefaultFocus"]=71]="peekWidgetDefaultFocus",e[e["definitionLinkOpensInPeek"]=72]="definitionLinkOpensInPeek",e[e["quickSuggestions"]=73]="quickSuggestions",e[e["quickSuggestionsDelay"]=74]="quickSuggestionsDelay",e[e["readOnly"]=75]="readOnly",e[e["renameOnType"]=76]="renameOnType",e[e["renderControlCharacters"]=77]="renderControlCharacters",e[e["renderIndentGuides"]=78]="renderIndentGuides",e[e["renderFinalNewline"]=79]="renderFinalNewline",e[e["renderLineHighlight"]=80]="renderLineHighlight",e[e["renderLineHighlightOnlyWhenFocus"]=81]="renderLineHighlightOnlyWhenFocus",e[e["renderValidationDecorations"]=82]="renderValidationDecorations",e[e["renderWhitespace"]=83]="renderWhitespace",e[e["revealHorizontalRightPadding"]=84]="revealHorizontalRightPadding",e[e["roundedSelection"]=85]="roundedSelection",e[e["rulers"]=86]="rulers",e[e["scrollbar"]=87]="scrollbar",e[e["scrollBeyondLastColumn"]=88]="scrollBeyondLastColumn",e[e["scrollBeyondLastLine"]=89]="scrollBeyondLastLine",e[e["scrollPredominantAxis"]=90]="scrollPredominantAxis",e[e["selectionClipboard"]=91]="selectionClipboard",e[e["selectionHighlight"]=92]="selectionHighlight",e[e["selectOnLineNumbers"]=93]="selectOnLineNumbers",e[e["showFoldingControls"]=94]="showFoldingControls",e[e["showUnused"]=95]="showUnused",e[e["snippetSuggestions"]=96]="snippetSuggestions",e[e["smartSelect"]=97]="smartSelect",e[e["smoothScrolling"]=98]="smoothScrolling",e[e["stickyTabStops"]=99]="stickyTabStops",e[e["stopRenderingLineAfter"]=100]="stopRenderingLineAfter",e[e["suggest"]=101]="suggest",e[e["suggestFontSize"]=102]="suggestFontSize",e[e["suggestLineHeight"]=103]="suggestLineHeight",e[e["suggestOnTriggerCharacters"]=104]="suggestOnTriggerCharacters",e[e["suggestSelection"]=105]="suggestSelection",e[e["tabCompletion"]=106]="tabCompletion",e[e["tabIndex"]=107]="tabIndex",e[e["unusualLineTerminators"]=108]="unusualLineTerminators",e[e["useTabStops"]=109]="useTabStops",e[e["wordSeparators"]=110]="wordSeparators",e[e["wordWrap"]=111]="wordWrap",e[e["wordWrapBreakAfterCharacters"]=112]="wordWrapBreakAfterCharacters",e[e["wordWrapBreakBeforeCharacters"]=113]="wordWrapBreakBeforeCharacters",e[e["wordWrapColumn"]=114]="wordWrapColumn",e[e["wordWrapOverride1"]=115]="wordWrapOverride1",e[e["wordWrapOverride2"]=116]="wordWrapOverride2",e[e["wrappingIndent"]=117]="wrappingIndent",e[e["wrappingStrategy"]=118]="wrappingStrategy",e[e["showDeprecated"]=119]="showDeprecated",e[e["inlineHints"]=120]="inlineHints",e[e["editorClassName"]=121]="editorClassName",e[e["pixelRatio"]=122]="pixelRatio",e[e["tabFocusMode"]=123]="tabFocusMode",e[e["layoutInfo"]=124]="layoutInfo",e[e["wrappingInfo"]=125]="wrappingInfo"}(g||(g={})),function(e){e[e["TextDefined"]=0]="TextDefined",e[e["LF"]=1]="LF",e[e["CRLF"]=2]="CRLF"}(p||(p={})),function(e){e[e["LF"]=0]="LF",e[e["CRLF"]=1]="CRLF"}(m||(m={})),function(e){e[e["None"]=0]="None",e[e["Indent"]=1]="Indent",e[e["IndentOutdent"]=2]="IndentOutdent",e[e["Outdent"]=3]="Outdent"}(f||(f={})),function(e){e[e["Other"]=0]="Other",e[e["Type"]=1]="Type",e[e["Parameter"]=2]="Parameter"}(_||(_={})),function(e){e[e["Unknown"]=0]="Unknown",e[e["Backspace"]=1]="Backspace",e[e["Tab"]=2]="Tab",e[e["Enter"]=3]="Enter",e[e["Shift"]=4]="Shift",e[e["Ctrl"]=5]="Ctrl",e[e["Alt"]=6]="Alt",e[e["PauseBreak"]=7]="PauseBreak",e[e["CapsLock"]=8]="CapsLock",e[e["Escape"]=9]="Escape",e[e["Space"]=10]="Space",e[e["PageUp"]=11]="PageUp",e[e["PageDown"]=12]="PageDown",e[e["End"]=13]="End",e[e["Home"]=14]="Home",e[e["LeftArrow"]=15]="LeftArrow",e[e["UpArrow"]=16]="UpArrow",e[e["RightArrow"]=17]="RightArrow",e[e["DownArrow"]=18]="DownArrow",e[e["Insert"]=19]="Insert",e[e["Delete"]=20]="Delete",e[e["KEY_0"]=21]="KEY_0",e[e["KEY_1"]=22]="KEY_1",e[e["KEY_2"]=23]="KEY_2",e[e["KEY_3"]=24]="KEY_3",e[e["KEY_4"]=25]="KEY_4",e[e["KEY_5"]=26]="KEY_5",e[e["KEY_6"]=27]="KEY_6",e[e["KEY_7"]=28]="KEY_7",e[e["KEY_8"]=29]="KEY_8",e[e["KEY_9"]=30]="KEY_9",e[e["KEY_A"]=31]="KEY_A",e[e["KEY_B"]=32]="KEY_B",e[e["KEY_C"]=33]="KEY_C",e[e["KEY_D"]=34]="KEY_D",e[e["KEY_E"]=35]="KEY_E",e[e["KEY_F"]=36]="KEY_F",e[e["KEY_G"]=37]="KEY_G",e[e["KEY_H"]=38]="KEY_H",e[e["KEY_I"]=39]="KEY_I",e[e["KEY_J"]=40]="KEY_J",e[e["KEY_K"]=41]="KEY_K",e[e["KEY_L"]=42]="KEY_L",e[e["KEY_M"]=43]="KEY_M",e[e["KEY_N"]=44]="KEY_N",e[e["KEY_O"]=45]="KEY_O",e[e["KEY_P"]=46]="KEY_P",e[e["KEY_Q"]=47]="KEY_Q",e[e["KEY_R"]=48]="KEY_R",e[e["KEY_S"]=49]="KEY_S",e[e["KEY_T"]=50]="KEY_T",e[e["KEY_U"]=51]="KEY_U",e[e["KEY_V"]=52]="KEY_V",e[e["KEY_W"]=53]="KEY_W",e[e["KEY_X"]=54]="KEY_X",e[e["KEY_Y"]=55]="KEY_Y",e[e["KEY_Z"]=56]="KEY_Z",e[e["Meta"]=57]="Meta",e[e["ContextMenu"]=58]="ContextMenu",e[e["F1"]=59]="F1",e[e["F2"]=60]="F2",e[e["F3"]=61]="F3",e[e["F4"]=62]="F4",e[e["F5"]=63]="F5",e[e["F6"]=64]="F6",e[e["F7"]=65]="F7",e[e["F8"]=66]="F8",e[e["F9"]=67]="F9",e[e["F10"]=68]="F10",e[e["F11"]=69]="F11",e[e["F12"]=70]="F12",e[e["F13"]=71]="F13",e[e["F14"]=72]="F14",e[e["F15"]=73]="F15",e[e["F16"]=74]="F16",e[e["F17"]=75]="F17",e[e["F18"]=76]="F18",e[e["F19"]=77]="F19",e[e["NumLock"]=78]="NumLock",e[e["ScrollLock"]=79]="ScrollLock",e[e["US_SEMICOLON"]=80]="US_SEMICOLON",e[e["US_EQUAL"]=81]="US_EQUAL",e[e["US_COMMA"]=82]="US_COMMA",e[e["US_MINUS"]=83]="US_MINUS",e[e["US_DOT"]=84]="US_DOT",e[e["US_SLASH"]=85]="US_SLASH",e[e["US_BACKTICK"]=86]="US_BACKTICK",e[e["US_OPEN_SQUARE_BRACKET"]=87]="US_OPEN_SQUARE_BRACKET",e[e["US_BACKSLASH"]=88]="US_BACKSLASH",e[e["US_CLOSE_SQUARE_BRACKET"]=89]="US_CLOSE_SQUARE_BRACKET",e[e["US_QUOTE"]=90]="US_QUOTE",e[e["OEM_8"]=91]="OEM_8",e[e["OEM_102"]=92]="OEM_102",e[e["NUMPAD_0"]=93]="NUMPAD_0",e[e["NUMPAD_1"]=94]="NUMPAD_1",e[e["NUMPAD_2"]=95]="NUMPAD_2",e[e["NUMPAD_3"]=96]="NUMPAD_3",e[e["NUMPAD_4"]=97]="NUMPAD_4",e[e["NUMPAD_5"]=98]="NUMPAD_5",e[e["NUMPAD_6"]=99]="NUMPAD_6",e[e["NUMPAD_7"]=100]="NUMPAD_7",e[e["NUMPAD_8"]=101]="NUMPAD_8",e[e["NUMPAD_9"]=102]="NUMPAD_9",e[e["NUMPAD_MULTIPLY"]=103]="NUMPAD_MULTIPLY",e[e["NUMPAD_ADD"]=104]="NUMPAD_ADD",e[e["NUMPAD_SEPARATOR"]=105]="NUMPAD_SEPARATOR",e[e["NUMPAD_SUBTRACT"]=106]="NUMPAD_SUBTRACT",e[e["NUMPAD_DECIMAL"]=107]="NUMPAD_DECIMAL",e[e["NUMPAD_DIVIDE"]=108]="NUMPAD_DIVIDE",e[e["KEY_IN_COMPOSITION"]=109]="KEY_IN_COMPOSITION",e[e["ABNT_C1"]=110]="ABNT_C1",e[e["ABNT_C2"]=111]="ABNT_C2",e[e["MAX_VALUE"]=112]="MAX_VALUE"}(b||(b={})),function(e){e[e["Hint"]=1]="Hint",e[e["Info"]=2]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=8]="Error"}(v||(v={})),function(e){e[e["Unnecessary"]=1]="Unnecessary",e[e["Deprecated"]=2]="Deprecated"}(C||(C={})),function(e){e[e["Inline"]=1]="Inline",e[e["Gutter"]=2]="Gutter"}(w||(w={})),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"}(S||(S={})),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"}(y||(y={})),function(e){e[e["Left"]=1]="Left",e[e["Center"]=2]="Center",e[e["Right"]=4]="Right",e[e["Full"]=7]="Full"}(D||(D={})),function(e){e[e["Off"]=0]="Off",e[e["On"]=1]="On",e[e["Relative"]=2]="Relative",e[e["Interval"]=3]="Interval",e[e["Custom"]=4]="Custom"}(L||(L={})),function(e){e[e["None"]=0]="None",e[e["Text"]=1]="Text",e[e["Blocks"]=2]="Blocks"}(x||(x={})),function(e){e[e["Smooth"]=0]="Smooth",e[e["Immediate"]=1]="Immediate"}(k||(k={})),function(e){e[e["Auto"]=1]="Auto",e[e["Hidden"]=2]="Hidden",e[e["Visible"]=3]="Visible"}(E||(E={})),function(e){e[e["LTR"]=0]="LTR",e[e["RTL"]=1]="RTL"}(N||(N={})),function(e){e[e["Invoke"]=1]="Invoke",e[e["TriggerCharacter"]=2]="TriggerCharacter",e[e["ContentChange"]=3]="ContentChange"}(O||(O={})),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"}(I||(I={})),function(e){e[e["Deprecated"]=1]="Deprecated"}(T||(T={})),function(e){e[e["Hidden"]=0]="Hidden",e[e["Blink"]=1]="Blink",e[e["Smooth"]=2]="Smooth",e[e["Phase"]=3]="Phase",e[e["Expand"]=4]="Expand",e[e["Solid"]=5]="Solid"}(M||(M={})),function(e){e[e["Line"]=1]="Line",e[e["Block"]=2]="Block",e[e["Underline"]=3]="Underline",e[e["LineThin"]=4]="LineThin",e[e["BlockOutline"]=5]="BlockOutline",e[e["UnderlineThin"]=6]="UnderlineThin"}(A||(A={})),function(e){e[e["AlwaysGrowsWhenTypingAtEdges"]=0]="AlwaysGrowsWhenTypingAtEdges",e[e["NeverGrowsWhenTypingAtEdges"]=1]="NeverGrowsWhenTypingAtEdges",e[e["GrowsOnlyWhenTypingBefore"]=2]="GrowsOnlyWhenTypingBefore",e[e["GrowsOnlyWhenTypingAfter"]=3]="GrowsOnlyWhenTypingAfter"}(R||(R={})),function(e){e[e["None"]=0]="None",e[e["Same"]=1]="Same",e[e["Indent"]=2]="Indent",e[e["DeepIndent"]=3]="DeepIndent"}(F||(F={}));class ${static chord(e,t){return Object(V["a"])(e,t)}}function q(){return{editor:void 0,languages:void 0,CancellationTokenSource:B["b"],Emitter:W["a"],KeyCode:b,KeyMod:$,Position:H["a"],Range:z["a"],Selection:U["a"],SelectionDirection:N,MarkerSeverity:v,MarkerTag:C,Uri:j["a"],Token:K["a"]}}$.CtrlCmd=2048,$.Shift=1024,$.Alt=512,$.WinCtrl=256;i("b223");var G,Y=i("5717b"),Z=i("11f7"),X=i("db88"),Q=i("4035"),J=i("438a"),ee=i("b589"),te=i("82c9"),ie=i("9e74");(function(e){e[e["API"]=0]="API",e[e["USER"]=1]="USER"})(G||(G={}));var ne=i("5bd7"),se=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},oe=function(e,t){return function(i,n){t(i,n,e)}},re=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let ae=class{constructor(e){this._commandService=e}open(e){return re(this,void 0,void 0,(function*(){if(!Object(ne["b"])(e,ee["c"].command))return!1;"string"===typeof e&&(e=j["a"].parse(e));let t=[];try{t=Object(J["a"])(decodeURIComponent(e.query))}catch(i){try{t=Object(J["a"])(e.query)}catch(n){}}return Array.isArray(t)||(t=[t]),yield this._commandService.executeCommand(e.path,...t),!0}))}};ae=se([oe(0,ie["b"])],ae);let le=class{constructor(e){this._editorService=e}open(e,t){return re(this,void 0,void 0,(function*(){"string"===typeof e&&(e=j["a"].parse(e));let i=void 0;const n=/^L?(\d+)(?:,(\d+))?/.exec(e.fragment);return n&&(i={startLineNumber:parseInt(n[1]),startColumn:n[2]?parseInt(n[2]):1},e=e.with({fragment:""})),e.scheme===ee["c"].file&&(e=Object(te["e"])(e)),yield this._editorService.openCodeEditor({resource:e,options:Object.assign({selection:i,context:(null===t||void 0===t?void 0:t.fromUserGesture)?G.USER:G.API},null===t||void 0===t?void 0:t.editorOptions)},this._editorService.getFocusedCodeEditor(),null===t||void 0===t?void 0:t.openToSide),!0}))}};le=se([oe(0,Y["a"])],le);let he=class{constructor(e,t){this._openers=new X["a"],this._validators=new X["a"],this._resolvers=new X["a"],this._resolvedUriTargets=new Q["b"](e=>e.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new X["a"],this._defaultExternalOpener={openExternal:e=>re(this,void 0,void 0,(function*(){return Object(ne["b"])(e,ee["c"].http)||Object(ne["b"])(e,ee["c"].https)?Z["U"](e):window.location.href=e,!0}))},this._openers.push({open:(e,t)=>re(this,void 0,void 0,(function*(){return!!((null===t||void 0===t?void 0:t.openExternal)||Object(ne["b"])(e,ee["c"].mailto)||Object(ne["b"])(e,ee["c"].http)||Object(ne["b"])(e,ee["c"].https))&&(yield this._doOpenExternal(e,t),!0)}))}),this._openers.push(new ae(t)),this._openers.push(new le(e))}registerOpener(e){const t=this._openers.unshift(e);return{dispose:t}}registerValidator(e){const t=this._validators.push(e);return{dispose:t}}registerExternalUriResolver(e){const t=this._resolvers.push(e);return{dispose:t}}setDefaultExternalOpener(e){this._defaultExternalOpener=e}registerExternalOpener(e){const t=this._externalOpeners.push(e);return{dispose:t}}open(e,t){var i;return re(this,void 0,void 0,(function*(){const n="string"===typeof e?j["a"].parse(e):e,s=null!==(i=this._resolvedUriTargets.get(n))&&void 0!==i?i:n;for(const e of this._validators)if(!(yield e.shouldOpen(s)))return!1;for(const i of this._openers){const n=yield i.open(e,t);if(n)return!0}return!1}))}resolveExternalUri(e,t){return re(this,void 0,void 0,(function*(){for(const i of this._resolvers){const n=yield i.resolveExternalUri(e,t);if(n)return this._resolvedUriTargets.has(n.resolved)||this._resolvedUriTargets.set(n.resolved,e),n}return{resolved:e,dispose:()=>{}}}))}_doOpenExternal(e,t){return re(this,void 0,void 0,(function*(){const i="string"===typeof e?j["a"].parse(e):e,{resolved:n}=yield this.resolveExternalUri(i,t);let s;if(s="string"===typeof e&&i.toString()===n.toString()?e:encodeURI(n.toString(!0)),null===t||void 0===t?void 0:t.allowContributedOpeners){const e="string"===typeof(null===t||void 0===t?void 0:t.allowContributedOpeners)?null===t||void 0===t?void 0:t.allowContributedOpeners:void 0;for(const t of this._externalOpeners){const n=yield t.openExternal(s,{sourceUri:i,preferredOpenerId:e},B["a"].None);if(n)return!0}}return this._defaultExternalOpener.openExternal(s,{sourceUri:i},B["a"].None)}))}dispose(){this._validators.clear()}};he=se([oe(0,Y["a"]),oe(1,ie["b"])],he);var ce=i("1569"),de=i("a666"),ue=i("aa3d");const ge={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class pe extends de["a"]{constructor(e,t={}){super(),this._onDidUpdate=this._register(new W["a"]),this._editor=e,this._options=ue["f"](t,ge,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidDispose(()=>this.dispose())),this._register(this._editor.onDidUpdateDiff(()=>this._onDiffUpdated())),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition(e=>{this.ignoreSelectionChange||(this.nextIdx=-1)})),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel(e=>{this.revealFirst=!0})),this._init()}_init(){this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(e){this.ranges=[],e&&e.forEach(e=>{!this._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach(e=>{this.ranges.push({rhs:!0,range:new z["a"](e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})}):this.ranges.push({rhs:!0,range:new z["a"](e.modifiedStartLineNumber,1,e.modifiedStartLineNumber,1)})}),this.ranges.sort((e,t)=>e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?-1:t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition())?1:0),this._onDidUpdate.fire(this)}_initIdx(e){let t=!1,i=this._editor.getPosition();if(i){for(let n=0,s=this.ranges.length;n<s&&!t;n++){let s=this.ranges[n].range;i.isBeforeOrEqual(s.getStartPosition())&&(this.nextIdx=n+(e?0:-1),t=!0)}t||(this.nextIdx=e?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}else this.nextIdx=0}_move(e,t){if(ce["a"](!this.disposed,"Illegal State - diff navigator has been disposed"),!this.canNavigate())return;-1===this.nextIdx?this._initIdx(e):e?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));let i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{let e=i.range.getStartPosition();this._editor.setPosition(e),this._editor.revealPositionInCenter(e,t)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this._move(!0,e)}previous(e=0){this._move(!1,e)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}var me=i("fb71"),fe=i("8ae8"),_e=i("3352"),be=i("b707"),ve=i("8bf1"),Ce=i("a40b"),we=i("5818"),Se=i("b78f"),ye=i("5fe7"),De=i("fdcc"),Le=i("30db"),xe=i("ef8e");const ke="$initialize";let Ee=!1;function Ne(e){Le["i"]&&(Ee||(Ee=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(e.message))}class Oe{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(e){this._workerId=e}sendMessage(e,t){let i=String(++this._lastSentReq);return new Promise((n,s)=>{this._pendingReplies[i]={resolve:n,reject:s},this._send({vsWorker:this._workerId,req:i,method:e,args:t})})}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}_handleMessage(e){if(e.seq){let t=e;if(!this._pendingReplies[t.seq])return void console.warn("Got reply to unknown seq");let i=this._pendingReplies[t.seq];if(delete this._pendingReplies[t.seq],t.err){let e=t.err;return t.err.$isError&&(e=new Error,e.name=t.err.name,e.message=t.err.message,e.stack=t.err.stack),void i.reject(e)}return void i.resolve(t.res)}let t=e,i=t.req,n=this._handler.handleMessage(t.method,t.args);n.then(e=>{this._send({vsWorker:this._workerId,seq:i,res:e,err:void 0})},e=>{e.detail instanceof Error&&(e.detail=Object(De["g"])(e.detail)),this._send({vsWorker:this._workerId,seq:i,res:void 0,err:Object(De["g"])(e)})})}_send(e){let t=[];if(e.req){const i=e;for(let e=0;e<i.args.length;e++)i.args[e]instanceof ArrayBuffer&&t.push(i.args[e])}else{const i=e;i.res instanceof ArrayBuffer&&t.push(i.res)}this._handler.sendMessage(e,t)}}class Ie extends de["a"]{constructor(e,t,i){super();let n=null;this._worker=this._register(e.create("vs/base/common/worker/simpleWorker",e=>{this._protocol.handleMessage(e)},e=>{n&&n(e)})),this._protocol=new Oe({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t)=>{if("function"!==typeof i[e])return Promise.reject(new Error("Missing method "+e+" on main thread host."));try{return Promise.resolve(i[e].apply(i,t))}catch(n){return Promise.reject(n)}}}),this._protocol.setWorkerId(this._worker.getId());let s=null;"undefined"!==typeof self.require&&"function"===typeof self.require.getConfig?s=self.require.getConfig():"undefined"!==typeof self.requirejs&&(s=self.requirejs.s.contexts._.config);const o=xe["c"](i);this._onModuleLoaded=this._protocol.sendMessage(ke,[this._worker.getId(),JSON.parse(JSON.stringify(s)),t,o]);const r=(e,t)=>this._request(e,t);this._lazyProxy=new Promise((e,i)=>{n=i,this._onModuleLoaded.then(t=>{e(xe["b"](t,r))},e=>{i(e),this._onError("Worker failed to load "+t,e)})})}getProxyObject(){return this._lazyProxy}_request(e,t){return new Promise((i,n)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(e,t).then(i,n)},n)})}_onError(e,t){console.error(e),console.info(t)}}var Te;const Me=null===(Te=window.trustedTypes)||void 0===Te?void 0:Te.createPolicy("defaultWorkerFactory",{createScriptURL:e=>e});function Ae(e,t){if(Le["b"].MonacoEnvironment){if("function"===typeof Le["b"].MonacoEnvironment.getWorker)return Le["b"].MonacoEnvironment.getWorker(e,t);if("function"===typeof Le["b"].MonacoEnvironment.getWorkerUrl){const i=Le["b"].MonacoEnvironment.getWorkerUrl(e,t);return new Worker(Me?Me.createScriptURL(i):i,{name:t})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function Re(e){return"function"===typeof e.then}class Fe{constructor(e,t,i,n,s){this.id=t;const o=Ae("workerMain.js",i);Re(o)?this.worker=o:this.worker=Promise.resolve(o),this.postMessage(e,[]),this.worker.then(e=>{e.onmessage=function(e){n(e.data)},e.onmessageerror=s,"function"===typeof e.addEventListener&&e.addEventListener("error",s)})}getId(){return this.id}postMessage(e,t){this.worker&&this.worker.then(i=>i.postMessage(e,t))}dispose(){this.worker&&this.worker.then(e=>e.terminate()),this.worker=null}}class Pe{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,i){let n=++Pe.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new Fe(e,n,this._label||"anonymous"+n,t,e=>{Ne(e),this._webWorkerFailedBeforeError=e,i(e)})}}Pe.LAST_WORKER_ID=0;var Be=i("70cb"),We=i("e8e3");class Ve{constructor(e,t,i,n){this.originalStart=e,this.originalLength=t,this.modifiedStart=i,this.modifiedLength=n}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}var je=i("eda7");class He{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let i=0,n=e.length;i<n;i++)t[i]=e.charCodeAt(i);return t}}function ze(e,t,i){return new qe(new He(e),new He(t)).ComputeDiff(i).changes}class Ue{static Assert(e,t){if(!e)throw new Error(t)}}class Ke{static Copy(e,t,i,n,s){for(let o=0;o<s;o++)i[n+o]=e[t+o]}static Copy2(e,t,i,n,s){for(let o=0;o<s;o++)i[n+o]=e[t+o]}}class $e{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new Ve(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class qe{constructor(e,t,i=null){this.ContinueProcessingPredicate=i;const[n,s,o]=qe._getElements(e),[r,a,l]=qe._getElements(t);this._hasStrings=o&&l,this._originalStringElements=n,this._originalElementsOrHash=s,this._modifiedStringElements=r,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"===typeof e[0]}static _getElements(e){const t=e.getElements();if(qe._isStringArray(t)){const e=new Int32Array(t.length);for(let i=0,n=t.length;i<n;i++)e[i]=Object(je["c"])(t[i],0);return[t,e,!0]}return t instanceof Int32Array?[[],t,!1]:[[],new Int32Array(t),!1]}ElementsAreEqual(e,t){return this._originalElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._modifiedStringElements[t])}OriginalElementsAreEqual(e,t){return this._originalElementsOrHash[e]===this._originalElementsOrHash[t]&&(!this._hasStrings||this._originalStringElements[e]===this._originalStringElements[t])}ModifiedElementsAreEqual(e,t){return this._modifiedElementsOrHash[e]===this._modifiedElementsOrHash[t]&&(!this._hasStrings||this._modifiedStringElements[e]===this._modifiedStringElements[t])}ComputeDiff(e){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,e)}_ComputeDiff(e,t,i,n,s){const o=[!1];let r=this.ComputeDiffRecursive(e,t,i,n,o);return s&&(r=this.PrettifyChanges(r)),{quitEarly:o[0],changes:r}}ComputeDiffRecursive(e,t,i,n,s){s[0]=!1;while(e<=t&&i<=n&&this.ElementsAreEqual(e,i))e++,i++;while(t>=e&&n>=i&&this.ElementsAreEqual(t,n))t--,n--;if(e>t||i>n){let s;return i<=n?(Ue.Assert(e===t+1,"originalStart should only be one more than originalEnd"),s=[new Ve(e,0,i,n-i+1)]):e<=t?(Ue.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),s=[new Ve(e,t-e+1,i,0)]):(Ue.Assert(e===t+1,"originalStart should only be one more than originalEnd"),Ue.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),s=[]),s}const o=[0],r=[0],a=this.ComputeRecursionPoint(e,t,i,n,o,r,s),l=o[0],h=r[0];if(null!==a)return a;if(!s[0]){const o=this.ComputeDiffRecursive(e,l,i,h,s);let r=[];return r=s[0]?[new Ve(l+1,t-(l+1)+1,h+1,n-(h+1)+1)]:this.ComputeDiffRecursive(l+1,t,h+1,n,s),this.ConcatenateChanges(o,r)}return[new Ve(e,t-e+1,i,n-i+1)]}WALKTRACE(e,t,i,n,s,o,r,a,l,h,c,d,u,g,p,m,f,_){let b=null,v=null,C=new $e,w=t,S=i,y=u[0]-m[0]-n,D=-1073741824,L=this.m_forwardHistory.length-1;do{const t=y+e;t===w||t<S&&l[t-1]<l[t+1]?(c=l[t+1],g=c-y-n,c<D&&C.MarkNextChange(),D=c,C.AddModifiedElement(c+1,g),y=t+1-e):(c=l[t-1]+1,g=c-y-n,c<D&&C.MarkNextChange(),D=c-1,C.AddOriginalElement(c,g+1),y=t-1-e),L>=0&&(l=this.m_forwardHistory[L],e=l[0],w=1,S=l.length-1)}while(--L>=-1);if(b=C.getReverseChanges(),_[0]){let e=u[0]+1,t=m[0]+1;if(null!==b&&b.length>0){const i=b[b.length-1];e=Math.max(e,i.getOriginalEnd()),t=Math.max(t,i.getModifiedEnd())}v=[new Ve(e,d-e+1,t,p-t+1)]}else{C=new $e,w=o,S=r,y=u[0]-m[0]-a,D=1073741824,L=f?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=y+s;e===w||e<S&&h[e-1]>=h[e+1]?(c=h[e+1]-1,g=c-y-a,c>D&&C.MarkNextChange(),D=c+1,C.AddOriginalElement(c+1,g+1),y=e+1-s):(c=h[e-1],g=c-y-a,c>D&&C.MarkNextChange(),D=c,C.AddModifiedElement(c+1,g+1),y=e-1-s),L>=0&&(h=this.m_reverseHistory[L],s=h[0],w=1,S=h.length-1)}while(--L>=-1);v=C.getChanges()}return this.ConcatenateChanges(b,v)}ComputeRecursionPoint(e,t,i,n,s,o,r){let a=0,l=0,h=0,c=0,d=0,u=0;e--,i--,s[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const g=t-e+(n-i),p=g+1,m=new Int32Array(p),f=new Int32Array(p),_=n-i,b=t-e,v=e-i,C=t-n,w=b-_,S=w%2===0;m[_]=e,f[b]=t,r[0]=!1;for(let y=1;y<=g/2+1;y++){let g=0,w=0;h=this.ClipDiagonalBound(_-y,y,_,p),c=this.ClipDiagonalBound(_+y,y,_,p);for(let e=h;e<=c;e+=2){a=e===h||e<c&&m[e-1]<m[e+1]?m[e+1]:m[e-1]+1,l=a-(e-_)-v;const i=a;while(a<t&&l<n&&this.ElementsAreEqual(a+1,l+1))a++,l++;if(m[e]=a,a+l>g+w&&(g=a,w=l),!S&&Math.abs(e-b)<=y-1&&a>=f[e])return s[0]=a,o[0]=l,i<=f[e]&&y<=1448?this.WALKTRACE(_,h,c,v,b,d,u,C,m,f,a,t,s,l,n,o,S,r):null}const D=(g-e+(w-i)-y)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(g,D))return r[0]=!0,s[0]=g,o[0]=w,D>0&&y<=1448?this.WALKTRACE(_,h,c,v,b,d,u,C,m,f,a,t,s,l,n,o,S,r):(e++,i++,[new Ve(e,t-e+1,i,n-i+1)]);d=this.ClipDiagonalBound(b-y,y,b,p),u=this.ClipDiagonalBound(b+y,y,b,p);for(let p=d;p<=u;p+=2){a=p===d||p<u&&f[p-1]>=f[p+1]?f[p+1]-1:f[p-1],l=a-(p-b)-C;const g=a;while(a>e&&l>i&&this.ElementsAreEqual(a,l))a--,l--;if(f[p]=a,S&&Math.abs(p-_)<=y&&a<=m[p])return s[0]=a,o[0]=l,g>=m[p]&&y<=1448?this.WALKTRACE(_,h,c,v,b,d,u,C,m,f,a,t,s,l,n,o,S,r):null}if(y<=1447){let e=new Int32Array(c-h+2);e[0]=_-h+1,Ke.Copy2(m,h,e,1,c-h+1),this.m_forwardHistory.push(e),e=new Int32Array(u-d+2),e[0]=b-d+1,Ke.Copy2(f,d,e,1,u-d+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(_,h,c,v,b,d,u,C,m,f,a,t,s,l,n,o,S,r)}PrettifyChanges(e){for(let t=0;t<e.length;t++){const i=e[t],n=t<e.length-1?e[t+1].originalStart:this._originalElementsOrHash.length,s=t<e.length-1?e[t+1].modifiedStart:this._modifiedElementsOrHash.length,o=i.originalLength>0,r=i.modifiedLength>0;while(i.originalStart+i.originalLength<n&&i.modifiedStart+i.modifiedLength<s&&(!o||this.OriginalElementsAreEqual(i.originalStart,i.originalStart+i.originalLength))&&(!r||this.ModifiedElementsAreEqual(i.modifiedStart,i.modifiedStart+i.modifiedLength)))i.originalStart++,i.modifiedStart++;let a=[null];t<e.length-1&&this.ChangesOverlap(e[t],e[t+1],a)&&(e[t]=a[0],e.splice(t+1,1),t--)}for(let t=e.length-1;t>=0;t--){const i=e[t];let n=0,s=0;if(t>0){const i=e[t-1];i.originalLength>0&&(n=i.originalStart+i.originalLength),i.modifiedLength>0&&(s=i.modifiedStart+i.modifiedLength)}const o=i.originalLength>0,r=i.modifiedLength>0;let a=0,l=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let e=1;;e++){const t=i.originalStart-e,h=i.modifiedStart-e;if(t<n||h<s)break;if(o&&!this.OriginalElementsAreEqual(t,t+i.originalLength))break;if(r&&!this.ModifiedElementsAreEqual(h,h+i.modifiedLength))break;const c=this._boundaryScore(t,i.originalLength,h,i.modifiedLength);c>l&&(l=c,a=e)}i.originalStart-=a,i.modifiedStart-=a}if(this._hasStrings)for(let t=1,i=e.length;t<i;t++){const i=e[t-1],n=e[t],s=n.originalStart-i.originalStart-i.originalLength,o=i.originalStart,r=n.originalStart+n.originalLength,a=r-o,l=i.modifiedStart,h=n.modifiedStart+n.modifiedLength,c=h-l;if(s<5&&a<20&&c<20){const e=this._findBetterContiguousSequence(o,a,l,c,s);if(e){const[t,o]=e;t===i.originalStart+i.originalLength&&o===i.modifiedStart+i.modifiedLength||(i.originalLength=t-i.originalStart,i.modifiedLength=o-i.modifiedStart,n.originalStart=t+s,n.modifiedStart=o+s,n.originalLength=r-n.originalStart,n.modifiedLength=h-n.modifiedStart)}}}return e}_findBetterContiguousSequence(e,t,i,n,s){if(t<s||n<s)return null;const o=e+t-s+1,r=i+n-s+1;let a=0,l=0,h=0;for(let c=e;c<o;c++)for(let e=i;e<r;e++){const t=this._contiguousSequenceScore(c,e,s);t>0&&t>a&&(a=t,l=c,h=e)}return a>0?[l,h]:null}_contiguousSequenceScore(e,t,i){let n=0;for(let s=0;s<i;s++){if(!this.ElementsAreEqual(e+s,t+s))return 0;n+=this._originalStringElements[e+s].length}return n}_OriginalIsBoundary(e){return e<=0||e>=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(e,t,i,n){const s=this._OriginalRegionIsBoundary(e,t)?1:0,o=this._ModifiedRegionIsBoundary(i,n)?1:0;return s+o}ConcatenateChanges(e,t){let i=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],i)){const n=new Array(e.length+t.length-1);return Ke.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],Ke.Copy(t,1,n,e.length,t.length-1),n}{const i=new Array(e.length+t.length);return Ke.Copy(e,0,i,0,e.length),Ke.Copy(t,0,i,e.length,t.length),i}}ChangesOverlap(e,t,i){if(Ue.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),Ue.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){const n=e.originalStart;let s=e.originalLength;const o=e.modifiedStart;let r=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(r=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new Ve(n,s,o,r),!0}return i[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&e<n)return e;const s=i,o=n-i-1,r=t%2===0;if(e<0){const e=s%2===0;return r===e?0:1}{const e=o%2===0;return r===e?n-1:n-2}}}var Ge=i("3742");const Ye=3;function Ze(e,t,i,n){const s=new qe(e,t,i);return s.ComputeDiff(n)}class Xe{constructor(e){const t=[],i=[];for(let n=0,s=e.length;n<s;n++)t[n]=nt(e[n],1),i[n]=st(e[n],1);this.lines=e,this._startColumns=t,this._endColumns=i}getElements(){const e=[];for(let t=0,i=this.lines.length;t<i;t++)e[t]=this.lines[t].substring(this._startColumns[t]-1,this._endColumns[t]-1);return e}getStartLineNumber(e){return e+1}getEndLineNumber(e){return e+1}createCharSequence(e,t,i){const n=[],s=[],o=[];let r=0;for(let a=t;a<=i;a++){const t=this.lines[a],i=e?this._startColumns[a]:1,l=e?this._endColumns[a]:t.length+1;for(let e=i;e<l;e++)n[r]=t.charCodeAt(e-1),s[r]=a+1,o[r]=e,r++}return new Qe(n,s,o)}}class Qe{constructor(e,t,i){this._charCodes=e,this._lineNumbers=t,this._columns=i}getElements(){return this._charCodes}getStartLineNumber(e){return this._lineNumbers[e]}getStartColumn(e){return this._columns[e]}getEndLineNumber(e){return this._lineNumbers[e]}getEndColumn(e){return this._columns[e]+1}}class Je{constructor(e,t,i,n,s,o,r,a){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=i,this.originalEndColumn=n,this.modifiedStartLineNumber=s,this.modifiedStartColumn=o,this.modifiedEndLineNumber=r,this.modifiedEndColumn=a}static createFromDiffChange(e,t,i){let n,s,o,r,a,l,h,c;return 0===e.originalLength?(n=0,s=0,o=0,r=0):(n=t.getStartLineNumber(e.originalStart),s=t.getStartColumn(e.originalStart),o=t.getEndLineNumber(e.originalStart+e.originalLength-1),r=t.getEndColumn(e.originalStart+e.originalLength-1)),0===e.modifiedLength?(a=0,l=0,h=0,c=0):(a=i.getStartLineNumber(e.modifiedStart),l=i.getStartColumn(e.modifiedStart),h=i.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),c=i.getEndColumn(e.modifiedStart+e.modifiedLength-1)),new Je(n,s,o,r,a,l,h,c)}}function et(e){if(e.length<=1)return e;const t=[e[0]];let i=t[0];for(let n=1,s=e.length;n<s;n++){const s=e[n],o=s.originalStart-(i.originalStart+i.originalLength),r=s.modifiedStart-(i.modifiedStart+i.modifiedLength),a=Math.min(o,r);a<Ye?(i.originalLength=s.originalStart+s.originalLength-i.originalStart,i.modifiedLength=s.modifiedStart+s.modifiedLength-i.modifiedStart):(t.push(s),i=s)}return t}class tt{constructor(e,t,i,n,s){this.originalStartLineNumber=e,this.originalEndLineNumber=t,this.modifiedStartLineNumber=i,this.modifiedEndLineNumber=n,this.charChanges=s}static createFromDiffResult(e,t,i,n,s,o,r){let a,l,h,c,d=void 0;if(0===t.originalLength?(a=i.getStartLineNumber(t.originalStart)-1,l=0):(a=i.getStartLineNumber(t.originalStart),l=i.getEndLineNumber(t.originalStart+t.originalLength-1)),0===t.modifiedLength?(h=n.getStartLineNumber(t.modifiedStart)-1,c=0):(h=n.getStartLineNumber(t.modifiedStart),c=n.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),o&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&s()){const o=i.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=n.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);let l=Ze(o,a,s,!0).changes;r&&(l=et(l)),d=[];for(let e=0,t=l.length;e<t;e++)d.push(Je.createFromDiffChange(l[e],o,a))}return new tt(a,l,h,c,d)}}class it{constructor(e,t,i){this.shouldComputeCharChanges=i.shouldComputeCharChanges,this.shouldPostProcessCharChanges=i.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=i.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=i.shouldMakePrettyDiff,this.originalLines=e,this.modifiedLines=t,this.original=new Xe(e),this.modified=new Xe(t),this.continueLineDiff=ot(i.maxComputationTime),this.continueCharDiff=ot(0===i.maxComputationTime?0:Math.min(i.maxComputationTime,5e3))}computeDiff(){if(1===this.original.lines.length&&0===this.original.lines[0].length)return 1===this.modified.lines.length&&0===this.modified.lines[0].length?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};if(1===this.modified.lines.length&&0===this.modified.lines[0].length)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};const e=Ze(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),t=e.changes,i=e.quitEarly;if(this.shouldIgnoreTrimWhitespace){const e=[];for(let i=0,n=t.length;i<n;i++)e.push(tt.createFromDiffResult(this.shouldIgnoreTrimWhitespace,t[i],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:i,changes:e}}const n=[];let s=0,o=0;for(let r=-1,a=t.length;r<a;r++){const e=r+1<a?t[r+1]:null,i=e?e.originalStart:this.originalLines.length,l=e?e.modifiedStart:this.modifiedLines.length;while(s<i&&o<l){const e=this.originalLines[s],t=this.modifiedLines[o];if(e!==t){{let i=nt(e,1),r=nt(t,1);while(i>1&&r>1){const n=e.charCodeAt(i-2),s=t.charCodeAt(r-2);if(n!==s)break;i--,r--}(i>1||r>1)&&this._pushTrimWhitespaceCharChange(n,s+1,1,i,o+1,1,r)}{let i=st(e,1),r=st(t,1);const a=e.length+1,l=t.length+1;while(i<a&&r<l){const t=e.charCodeAt(i-1),n=e.charCodeAt(r-1);if(t!==n)break;i++,r++}(i<a||r<l)&&this._pushTrimWhitespaceCharChange(n,s+1,i,a,o+1,r,l)}}s++,o++}e&&(n.push(tt.createFromDiffResult(this.shouldIgnoreTrimWhitespace,e,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),s+=e.originalLength,o+=e.modifiedLength)}return{quitEarly:i,changes:n}}_pushTrimWhitespaceCharChange(e,t,i,n,s,o,r){if(this._mergeTrimWhitespaceCharChange(e,t,i,n,s,o,r))return;let a=void 0;this.shouldComputeCharChanges&&(a=[new Je(t,i,t,n,s,o,s,r)]),e.push(new tt(t,t,s,s,a))}_mergeTrimWhitespaceCharChange(e,t,i,n,s,o,r){const a=e.length;if(0===a)return!1;const l=e[a-1];return 0!==l.originalEndLineNumber&&0!==l.modifiedEndLineNumber&&(l.originalEndLineNumber+1===t&&l.modifiedEndLineNumber+1===s&&(l.originalEndLineNumber=t,l.modifiedEndLineNumber=s,this.shouldComputeCharChanges&&l.charChanges&&l.charChanges.push(new Je(t,i,t,n,s,o,s,r)),!0))}}function nt(e,t){const i=Ge["v"](e);return-1===i?t:i+1}function st(e,t){const i=Ge["I"](e);return-1===i?t:i+2}function ot(e){if(0===e)return()=>!0;const t=Date.now();return()=>Date.now()-t<e}var rt=i("2de5");class at{constructor(e,t,i,n){this._uri=e,this._lines=t,this._eol=i,this._versionId=n,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const i of t)this._acceptDeleteRange(i.range),this._acceptInsertText(new H["a"](i.range.startLineNumber,i.range.startColumn),i.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,i=new Uint32Array(t);for(let n=0;n<t;n++)i[n]=this._lines[n].length+e;this._lineStarts=new rt["a"](i)}}_setLineText(e,t){this._lines[e]=t,this._lineStarts&&this._lineStarts.changeValue(e,this._lines[e].length+this._eol.length)}_acceptDeleteRange(e){if(e.startLineNumber!==e.endLineNumber)this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber);else{if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1))}}_acceptInsertText(e,t){if(0===t.length)return;let i=Object(Ge["Q"])(t);if(1===i.length)return void this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+i[0]+this._lines[e.lineNumber-1].substring(e.column-1));i[i.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+i[0]);let n=new Uint32Array(i.length-1);for(let s=1;s<i.length;s++)this._lines.splice(e.lineNumber+s-1,0,i[s]),n[s-1]=i[s].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,n)}}var lt=i("d093"),ht=i("3170");class ct{constructor(e,t,i){const n=new Uint8Array(e*t);for(let s=0,o=e*t;s<o;s++)n[s]=i;this._data=n,this.rows=e,this.cols=t}get(e,t){return this._data[e*this.cols+t]}set(e,t,i){this._data[e*this.cols+t]=i}}class dt{constructor(e){let t=0,i=0;for(let s=0,o=e.length;s<o;s++){let[n,o,r]=e[s];o>t&&(t=o),n>i&&(i=n),r>i&&(i=r)}t++,i++;let n=new ct(i,t,0);for(let s=0,o=e.length;s<o;s++){let[t,i,o]=e[s];n.set(t,i,o)}this._states=n,this._maxCharCode=t}nextState(e,t){return t<0||t>=this._maxCharCode?0:this._states.get(e,t)}}let ut=null;function gt(){return null===ut&&(ut=new dt([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),ut}let pt=null;function mt(){if(null===pt){pt=new ht["a"](0);const e=" \t<>'\"、。｡､，．：；‘“〈《「『【〔（［｛｢｣｝］）〕】』」》〉”’｀～…";for(let i=0;i<e.length;i++)pt.set(e.charCodeAt(i),1);const t=".,;";for(let i=0;i<t.length;i++)pt.set(t.charCodeAt(i),2)}return pt}class ft{static _createLink(e,t,i,n,s){let o=s-1;do{const i=t.charCodeAt(o),n=e.get(i);if(2!==n)break;o--}while(o>n);if(n>0){const e=t.charCodeAt(n-1),i=t.charCodeAt(o);(40===e&&41===i||91===e&&93===i||123===e&&125===i)&&o--}return{range:{startLineNumber:i,startColumn:n+1,endLineNumber:i,endColumn:o+2},url:t.substring(n,o+1)}}static computeLinks(e,t=gt()){const i=mt();let n=[];for(let s=1,o=e.getLineCount();s<=o;s++){const o=e.getLineContent(s),r=o.length;let a=0,l=0,h=0,c=1,d=!1,u=!1,g=!1,p=!1;while(a<r){let e=!1;const r=o.charCodeAt(a);if(13===c){let t;switch(r){case 40:d=!0,t=0;break;case 41:t=d?0:1;break;case 91:g=!0,u=!0,t=0;break;case 93:g=!1,t=u?0:1;break;case 123:p=!0,t=0;break;case 125:t=p?0:1;break;case 39:t=34===h||96===h?0:1;break;case 34:t=39===h||96===h?0:1;break;case 96:t=39===h||34===h?0:1;break;case 42:t=42===h?1:0;break;case 124:t=124===h?1:0;break;case 32:t=g?0:1;break;default:t=i.get(r)}1===t&&(n.push(ft._createLink(i,o,s,l,a)),e=!0)}else if(12===c){let t;91===r?(u=!0,t=0):t=i.get(r),1===t?e=!0:c=13}else c=t.nextState(c,r),0===c&&(e=!0);e&&(c=1,d=!1,u=!1,p=!1,l=a+1,h=r),a++}13===c&&n.push(ft._createLink(i,o,s,l,r))}return n}}function _t(e){return e&&"function"===typeof e.getLineCount&&"function"===typeof e.getLineContent?ft.computeLinks(e):[]}class bt{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(e,t,i,n,s){if(e&&t){let i=this.doNavigateValueSet(t,s);if(i)return{range:e,value:i}}if(i&&n){let e=this.doNavigateValueSet(n,s);if(e)return{range:i,value:e}}return null}doNavigateValueSet(e,t){let i=this.numberReplace(e,t);return null!==i?i:this.textReplace(e,t)}numberReplace(e,t){let i=Math.pow(10,e.length-(e.lastIndexOf(".")+1)),n=Number(e),s=parseFloat(e);return isNaN(n)||isNaN(s)||n!==s?null:0!==n||t?(n=Math.floor(n*i),n+=t?i:-i,String(n/i)):null}textReplace(e,t){return this.valueSetsReplace(this._defaultValueSet,e,t)}valueSetsReplace(e,t,i){let n=null;for(let s=0,o=e.length;null===n&&s<o;s++)n=this.valueSetReplace(e[s],t,i);return n}valueSetReplace(e,t,i){let n=e.indexOf(t);return n>=0?(n+=i?1:-1,n<0?n=e.length-1:n%=e.length,e[n]):null}}bt.INSTANCE=new bt;var vt=i("e58e"),Ct=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class wt extends at{get uri(){return this._uri}get version(){return this._versionId}get eol(){return this._eol}getValue(){return this.getText()}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(e){return this._lines[e-1]}getWordAtPosition(e,t){let i=Object(lt["d"])(e.column,Object(lt["c"])(t),this._lines[e.lineNumber-1],0);return i?new z["a"](e.lineNumber,i.startColumn,e.lineNumber,i.endColumn):null}words(e){const t=this._lines,i=this._wordenize.bind(this);let n=0,s="",o=0,r=[];return{*[Symbol.iterator](){while(1)if(o<r.length){const e=s.substring(r[o].start,r[o].end);o+=1,yield e}else{if(!(n<t.length))break;s=t[n],r=i(s,e),o=0,n+=1}}}}getLineWords(e,t){let i=this._lines[e-1],n=this._wordenize(i,t),s=[];for(const o of n)s.push({word:i.substring(o.start,o.end),startColumn:o.start+1,endColumn:o.end+1});return s}_wordenize(e,t){const i=[];let n;t.lastIndex=0;while(n=t.exec(e)){if(0===n[0].length)break;i.push({start:n.index,end:n.index+n[0].length})}return i}getValueInRange(e){if(e=this._validateRange(e),e.startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);let t=this._eol,i=e.startLineNumber-1,n=e.endLineNumber-1,s=[];s.push(this._lines[i].substring(e.startColumn-1));for(let o=i+1;o<n;o++)s.push(this._lines[o]);return s.push(this._lines[n].substring(0,e.endColumn-1)),s.join(t)}offsetAt(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getAccumulatedValue(e.lineNumber-2)+(e.column-1)}positionAt(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();let t=this._lineStarts.getIndexOf(e),i=this._lines[t.index].length;return{lineNumber:1+t.index,column:1+Math.min(t.remainder,i)}}_validateRange(e){const t=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),i=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return t.lineNumber!==e.startLineNumber||t.column!==e.startColumn||i.lineNumber!==e.endLineNumber||i.column!==e.endColumn?{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:i.lineNumber,endColumn:i.column}:e}_validatePosition(e){if(!H["a"].isIPosition(e))throw new Error("bad position");let{lineNumber:t,column:i}=e,n=!1;if(t<1)t=1,i=1,n=!0;else if(t>this._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{let e=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>e&&(i=e,n=!0)}return n?{lineNumber:t,column:i}:e}}class St{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){let e=[];return Object.keys(this._models).forEach(t=>e.push(this._models[t])),e}acceptNewModel(e){this._models[e.url]=new wt(j["a"].parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){if(!this._models[e])return;let i=this._models[e];i.onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}computeDiff(e,t,i,n){return Ct(this,void 0,void 0,(function*(){const s=this._getModel(e),o=this._getModel(t);if(!s||!o)return null;const r=s.getLinesContent(),a=o.getLinesContent(),l=new it(r,a,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:i,shouldMakePrettyDiff:!0,maxComputationTime:n}),h=l.computeDiff(),c=!(h.changes.length>0)&&this._modelsAreIdentical(s,o);return{quitEarly:h.quitEarly,identical:c,changes:h.changes}}))}_modelsAreIdentical(e,t){const i=e.getLineCount(),n=t.getLineCount();if(i!==n)return!1;for(let s=1;s<=i;s++){const i=e.getLineContent(s),n=t.getLineContent(s);if(i!==n)return!1}return!0}computeMoreMinimalEdits(e,t){return Ct(this,void 0,void 0,(function*(){const i=this._getModel(e);if(!i)return t;const n=[];let s=void 0;t=Object(We["n"])(t,(e,t)=>{if(e.range&&t.range)return z["a"].compareRangesUsingStarts(e.range,t.range);let i=e.range?0:1,n=t.range?0:1;return i-n});for(let{range:e,text:o,eol:r}of t){if("number"===typeof r&&(s=r),z["a"].isEmpty(e)&&!o)continue;const t=i.getValueInRange(e);if(o=o.replace(/\r\n|\n|\r/g,i.eol),t===o)continue;if(Math.max(o.length,t.length)>St._diffLimit){n.push({range:e,text:o});continue}const a=ze(t,o,!1),l=i.offsetAt(z["a"].lift(e).getStartPosition());for(const e of a){const t=i.positionAt(l+e.originalStart),s=i.positionAt(l+e.originalStart+e.originalLength),r={text:o.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:s.lineNumber,endColumn:s.column}};i.getValueInRange(r.range)!==r.text&&n.push(r)}}return"number"===typeof s&&n.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),n}))}computeLinks(e){return Ct(this,void 0,void 0,(function*(){let t=this._getModel(e);return t?_t(t):null}))}textualSuggest(e,t,i,n){return Ct(this,void 0,void 0,(function*(){const s=new vt["a"](!0),o=new RegExp(i,n),r=new Set;e:for(let i of e){const e=this._getModel(i);if(e)for(let i of e.words(o))if(i!==t&&isNaN(Number(i))&&(r.add(i),r.size>St._suggestionsLimit))break e}return{words:Array.from(r),duration:s.elapsed()}}))}computeWordRanges(e,t,i,n){return Ct(this,void 0,void 0,(function*(){let s=this._getModel(e);if(!s)return Object.create(null);const o=new RegExp(i,n),r=Object.create(null);for(let e=t.startLineNumber;e<t.endLineNumber;e++){let t=s.getLineWords(e,o);for(const i of t){if(!isNaN(Number(i.word)))continue;let t=r[i.word];t||(t=[],r[i.word]=t),t.push({startLineNumber:e,startColumn:i.startColumn,endLineNumber:e,endColumn:i.endColumn})}}return r}))}navigateValueSet(e,t,i,n,s){return Ct(this,void 0,void 0,(function*(){let o=this._getModel(e);if(!o)return null;let r=new RegExp(n,s);t.startColumn===t.endColumn&&(t={startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn+1});let a=o.getValueInRange(t),l=o.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn},r);if(!l)return null;let h=o.getValueInRange(l),c=bt.INSTANCE.navigateValueSet(t,a,l,h,i);return c}))}loadForeignModule(e,t,i){const n=(e,t)=>this._host.fhr(e,t),s=xe["b"](i,n);let o={host:s,getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(o,t),Promise.resolve(xe["c"](this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||"function"!==typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(i){return Promise.reject(i)}}}St._diffLimit=1e5,St._suggestionsLimit=1e4,"function"===typeof importScripts&&(Le["b"].monaco=q());var yt=i("1b69"),Dt=i("0a0f");const Lt=Object(Dt["c"])("textResourceConfigurationService"),xt=Object(Dt["c"])("textResourcePropertiesService");var kt=i("d3d7"),Et=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Nt=function(e,t){return function(i,n){t(i,n,e)}},Ot=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const It=6e4,Tt=3e5;function Mt(e,t){let i=e.getModel(t);return!!i&&!i.isTooLargeForSyncing()}let At=class extends de["a"]{constructor(e,t,i){super(),this._modelService=e,this._workerManager=this._register(new Ft(this._modelService)),this._logService=i,this._register(be["s"].register("*",{provideLinks:(e,t)=>Mt(this._modelService,e.uri)?this._workerManager.withWorker().then(t=>t.computeLinks(e.uri)).then(e=>e&&{links:e}):Promise.resolve({links:[]})})),this._register(be["d"].register("*",new Rt(this._workerManager,t,this._modelService)))}dispose(){super.dispose()}canComputeDiff(e,t){return Mt(this._modelService,e)&&Mt(this._modelService,t)}computeDiff(e,t,i,n){return this._workerManager.withWorker().then(s=>s.computeDiff(e,t,i,n))}computeMoreMinimalEdits(e,t){if(Object(We["m"])(t)){if(!Mt(this._modelService,e))return Promise.resolve(t);const i=vt["a"].create(!0),n=this._workerManager.withWorker().then(i=>i.computeMoreMinimalEdits(e,t));return n.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),i.elapsed())),Promise.race([n,Object(ye["k"])(1e3).then(()=>t)])}return Promise.resolve(void 0)}canNavigateValueSet(e){return Mt(this._modelService,e)}navigateValueSet(e,t,i){return this._workerManager.withWorker().then(n=>n.navigateValueSet(e,t,i))}canComputeWordRanges(e){return Mt(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then(i=>i.computeWordRanges(e,t))}};At=Et([Nt(0,yt["a"]),Nt(1,Lt),Nt(2,kt["b"])],At);class Rt{constructor(e,t,i){this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i}provideCompletionItems(e,t){return Ot(this,void 0,void 0,(function*(){const i=this._configurationService.getValue(e.uri,t,"editor");if(!i.wordBasedSuggestions)return;const n=[];if("currentDocument"===i.wordBasedSuggestionsMode)Mt(this._modelService,e.uri)&&n.push(e.uri);else for(const t of this._modelService.getModels())Mt(this._modelService,t.uri)&&(t===e?n.unshift(t.uri):"allDocuments"!==i.wordBasedSuggestionsMode&&t.getLanguageIdentifier().id!==e.getLanguageIdentifier().id||n.push(t.uri));if(0===n.length)return;const s=Be["a"].getWordDefinition(e.getLanguageIdentifier().id),o=e.getWordAtPosition(t),r=o?new z["a"](t.lineNumber,o.startColumn,t.lineNumber,o.endColumn):z["a"].fromPositions(t),a=r.setEndPosition(t.lineNumber,t.column),l=yield this._workerManager.withWorker(),h=yield l.textualSuggest(n,null===o||void 0===o?void 0:o.word,s);return h?{duration:h.duration,suggestions:h.words.map(e=>({kind:18,label:e,insertText:e,range:{insert:a,replace:r}}))}:void 0}))}}class Ft extends de["a"]{constructor(e){super(),this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=(new Date).getTime();let t=this._register(new ye["c"]);t.cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(Tt/2)),this._register(this._modelService.onModelRemoved(e=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;let e=this._modelService.getModels();0===e.length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;let e=(new Date).getTime()-this._lastWorkerUsedTime;e>Tt&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new Vt(this._modelService,!1,"editorWorkerService")),Promise.resolve(this._editorWorkerClient)}}class Pt extends de["a"]{constructor(e,t,i){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!i){let e=new ye["c"];e.cancelAndSet(()=>this._checkStopModelSync(),Math.round(It/2)),this._register(e)}}dispose(){for(let e in this._syncedModels)Object(de["f"])(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e){for(const t of e){let e=t.toString();this._syncedModels[e]||this._beginModelSync(t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){let e=(new Date).getTime(),t=[];for(let i in this._syncedModelsLastUsedTime){let n=e-this._syncedModelsLastUsedTime[i];n>It&&t.push(i)}for(const i of t)this._stopModelSync(i)}_beginModelSync(e){let t=this._modelService.getModel(e);if(!t)return;if(t.isTooLargeForSyncing())return;let i=e.toString();this._proxy.acceptNewModel({url:t.uri.toString(),lines:t.getLinesContent(),EOL:t.getEOL(),versionId:t.getVersionId()});const n=new de["b"];n.add(t.onDidChangeContent(e=>{this._proxy.acceptModelChanged(i.toString(),e)})),n.add(t.onWillDispose(()=>{this._stopModelSync(i)})),n.add(Object(de["h"])(()=>{this._proxy.acceptRemovedModel(i)})),this._syncedModels[i]=n}_stopModelSync(e){let t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],Object(de["f"])(t)}}class Bt{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class Wt{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class Vt extends de["a"]{constructor(e,t,i){super(),this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new Pe(i),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new Ie(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new Wt(this)))}catch(e){Ne(e),this._worker=new Bt(new St(new Wt(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,e=>(Ne(e),this._worker=new Bt(new St(new Wt(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new Pt(e,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(e){return this._disposed?Promise.reject(Object(De["a"])()):this._getProxy().then(t=>(this._getOrCreateModelManager(t).ensureSyncedResources(e),t))}computeDiff(e,t,i,n){return this._withSyncedResources([e,t]).then(s=>s.computeDiff(e.toString(),t.toString(),i,n))}computeMoreMinimalEdits(e,t){return this._withSyncedResources([e]).then(i=>i.computeMoreMinimalEdits(e.toString(),t))}computeLinks(e){return this._withSyncedResources([e]).then(t=>t.computeLinks(e.toString()))}textualSuggest(e,t,i){return Ot(this,void 0,void 0,(function*(){const n=yield this._withSyncedResources(e),s=i.source,o=Object(Ge["M"])(i);return n.textualSuggest(e.map(e=>e.toString()),t,s,o)}))}computeWordRanges(e,t){return this._withSyncedResources([e]).then(i=>{let n=this._modelService.getModel(e);if(!n)return Promise.resolve(null);let s=Be["a"].getWordDefinition(n.getLanguageIdentifier().id),o=s.source,r=Object(Ge["M"])(s);return i.computeWordRanges(e.toString(),t,o,r)})}navigateValueSet(e,t,i){return this._withSyncedResources([e]).then(n=>{let s=this._modelService.getModel(e);if(!s)return null;let o=Be["a"].getWordDefinition(s.getLanguageIdentifier().id),r=o.source,a=Object(Ge["M"])(o);return n.navigateValueSet(e.toString(),t,i,r,a)})}dispose(){super.dispose(),this._disposed=!0}}function jt(e,t){return new Ht(e,t)}class Ht extends Vt{constructor(e,t){super(e,t.keepIdleModels||!1,t.label),this._foreignModuleId=t.moduleId,this._foreignModuleCreateData=t.createData||null,this._foreignModuleHost=t.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||"function"!==typeof this._foreignModuleHost[e])return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(i){return Promise.reject(i)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(e=>{const t=this._foreignModuleHost?xe["c"](this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then(t=>{this._foreignModuleCreateData=null;const i=(t,i)=>e.fmr(t,i),n=(e,t)=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)};let s={};for(const e of t)s[e]=n(e,i);return s})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then(e=>this.getProxy())}}var zt=i("e1b5"),Ut=i("6da2"),Kt=i("a8d0");function $t(e){return Array.isArray(e)}function qt(e){return!$t(e)}function Gt(e){return"string"===typeof e}function Yt(e){return!Gt(e)}function Zt(e){return!e}function Xt(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function Qt(e){return e.replace(/[&<>'"_]/g,"-")}function Jt(e,t){console.log(`${e.languageId}: ${t}`)}function ei(e,t){return new Error(`${e.languageId}: ${t}`)}function ti(e,t,i,n,s){const o=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let r=null;return t.replace(o,(function(t,o,a,l,h,c,d,u,g){return Zt(a)?Zt(l)?!Zt(h)&&h<n.length?Xt(e,n[h]):!Zt(d)&&e&&"string"===typeof e[d]?e[d]:(null===r&&(r=s.split("."),r.unshift(s)),!Zt(c)&&c<r.length?Xt(e,r[c]):""):Xt(e,i):"$"}))}function ii(e,t){let i=t;while(i&&i.length>0){const t=e.tokenizer[i];if(t)return t;const n=i.lastIndexOf(".");i=n<0?null:i.substr(0,n)}return null}function ni(e,t){let i=t;while(i&&i.length>0){const t=e.stateNames[i];if(t)return!0;const n=i.lastIndexOf(".");i=n<0?null:i.substr(0,n)}return!1}const si=5;class oi{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new ri(e,t);let i=ri.getStackElementId(e);i.length>0&&(i+="|"),i+=t;let n=this._entries[i];return n||(n=new ri(e,t),this._entries[i]=n,n)}}oi._INSTANCE=new oi(si);class ri{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";while(null!==e)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){while(null!==e&&null!==t){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return null===e&&null===t}equals(e){return ri._equals(this,e)}push(e){return oi.create(this,e)}pop(){return this.parent}popall(){let e=this;while(e.parent)e=e.parent;return e}switchTo(e){return oi.create(this.parent,e)}}class ai{constructor(e,t){this.modeId=e,this.state=t}equals(e){return this.modeId===e.modeId&&this.state.equals(e.state)}clone(){let e=this.state.clone();return e===this.state?this:new ai(this.modeId,this.state)}}class li{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(null!==t)return new hi(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new hi(e,t);let i=ri.getStackElementId(e),n=this._entries[i];return n||(n=new hi(e,null),this._entries[i]=n,n)}}li._INSTANCE=new li(si);class hi{constructor(e,t){this.stack=e,this.embeddedModeData=t}clone(){let e=this.embeddedModeData?this.embeddedModeData.clone():null;return e===this.embeddedModeData?this:li.create(this.stack,this.embeddedModeData)}equals(e){return e instanceof hi&&(!!this.stack.equals(e.stack)&&(null===this.embeddedModeData&&null===e.embeddedModeData||null!==this.embeddedModeData&&null!==e.embeddedModeData&&this.embeddedModeData.equals(e.embeddedModeData)))}}class ci{constructor(){this._tokens=[],this._language=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterMode(e,t){this._language=t}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._language||(this._lastTokenType=t,this._lastTokenLanguage=this._language,this._tokens.push(new K["a"](e,t,this._language)))}nestedModeTokenize(e,t,i,n){const s=i.modeId,o=i.state,r=be["A"].get(s);if(!r)return this.enterMode(n,s),this.emit(n,""),o;let a=r.tokenize(e,t,o,n);return this._tokens=this._tokens.concat(a.tokens),this._lastTokenType=null,this._lastTokenLanguage=null,this._language=null,a.endState}finalize(e){return new K["b"](this._tokens,e)}}class di{constructor(e,t){this._modeService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterMode(e,t){this._currentLanguageId=this._modeService.getLanguageIdentifier(t).id}emit(e,t){let i=this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==i&&(this._lastTokenMetadata=i,this._tokens.push(e),this._tokens.push(i))}static _merge(e,t,i){let n=null!==e?e.length:0,s=t.length,o=null!==i?i.length:0;if(0===n&&0===s&&0===o)return new Uint32Array(0);if(0===n&&0===s)return i;if(0===s&&0===o)return e;let r=new Uint32Array(n+s+o);null!==e&&r.set(e);for(let a=0;a<s;a++)r[n+a]=t[a];return null!==i&&r.set(i,n+s),r}nestedModeTokenize(e,t,i,n){const s=i.modeId,o=i.state,r=be["A"].get(s);if(!r)return this.enterMode(n,s),this.emit(n,""),o;let a=r.tokenize2(e,t,o,n);return this._prependTokens=di._merge(this._prependTokens,this._tokens,a.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,a.endState}finalize(e){return new K["c"](di._merge(this._prependTokens,this._tokens,null),e)}}class ui{constructor(e,t,i,n){this._modeService=e,this._standaloneThemeService=t,this._modeId=i,this._lexer=n,this._embeddedModes=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let s=!1;this._tokenizationRegistryListener=be["A"].onDidChange(e=>{if(s)return;let t=!1;for(let i=0,n=e.changedLanguages.length;i<n;i++){let n=e.changedLanguages[i];if(this._embeddedModes[n]){t=!0;break}}t&&(s=!0,be["A"].fire([this._modeId]),s=!1)})}dispose(){this._tokenizationRegistryListener.dispose()}getLoadStatus(){let e=[];for(let t in this._embeddedModes){const i=be["A"].get(t);if(i){if(i instanceof ui){const t=i.getLoadStatus();!1===t.loaded&&e.push(t.promise)}continue}const n=be["A"].getPromise(t);n&&e.push(n)}return 0===e.length?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then(e=>{})}}getInitialState(){let e=oi.create(null,this._lexer.start);return li.create(e,null)}tokenize(e,t,i,n){let s=new ci,o=this._tokenize(e,t,i,n,s);return s.finalize(o)}tokenize2(e,t,i,n){let s=new di(this._modeService,this._standaloneThemeService.getColorTheme().tokenTheme),o=this._tokenize(e,t,i,n,s);return s.finalize(o)}_tokenize(e,t,i,n,s){return i.embeddedModeData?this._nestedTokenize(e,t,i,n,s):this._myTokenize(e,t,i,n,s)}_findLeavingNestedModeOffset(e,t){let i=this._lexer.tokenizer[t.stack.state];if(!i&&(i=ii(this._lexer,t.stack.state),!i))throw ei(this._lexer,"tokenizer state is not defined: "+t.stack.state);let n=-1,s=!1;for(const o of i){if(!Yt(o.action)||"@pop"!==o.action.nextEmbedded)continue;s=!0;let t=o.regex,i=o.regex.source;if("^(?:"===i.substr(0,4)&&")"===i.substr(i.length-1,1)){let e=(t.ignoreCase?"i":"")+(t.unicode?"u":"");t=new RegExp(i.substr(4,i.length-5),e)}let r=e.search(t);-1===r||0!==r&&o.matchOnlyAtLineStart||(-1===n||r<n)&&(n=r)}if(!s)throw ei(this._lexer,'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: '+t.stack.state);return n}_nestedTokenize(e,t,i,n,s){let o=this._findLeavingNestedModeOffset(e,i);if(-1===o){let o=s.nestedModeTokenize(e,t,i.embeddedModeData,n);return li.create(i.stack,new ai(i.embeddedModeData.modeId,o))}let r=e.substring(0,o);r.length>0&&s.nestedModeTokenize(r,!1,i.embeddedModeData,n);let a=e.substring(o);return this._myTokenize(a,t,i,n+o,s)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,i,n,s){s.enterMode(n,this._modeId);const o=e.length,r=t&&this._lexer.includeLF?e+"\n":e,a=r.length;let l=i.embeddedModeData,h=i.stack,c=0,d=null,u=!0;while(u||c<a){const i=c,g=h.depth,p=d?d.groups.length:0,m=h.state;let f=null,_=null,b=null,v=null,C=null;if(d){f=d.matches;const e=d.groups.shift();_=e.matched,b=e.action,v=d.rule,0===d.groups.length&&(d=null)}else{if(!u&&c>=a)break;u=!1;let e=this._lexer.tokenizer[m];if(!e&&(e=ii(this._lexer,m),!e))throw ei(this._lexer,"tokenizer state is not defined: "+m);let t=r.substr(c);for(const i of e)if((0===c||!i.matchOnlyAtLineStart)&&(f=t.match(i.regex),f)){_=f[0],b=i.action;break}}if(f||(f=[""],_=""),b||(c<a&&(f=[r.charAt(c)],_=f[0]),b=this._lexer.defaultToken),null===_)break;c+=_.length;while(qt(b)&&Yt(b)&&b.test)b=b.test(_,f,m,c===a);let w=null;if("string"===typeof b||Array.isArray(b))w=b;else if(b.group)w=b.group;else if(null!==b.token&&void 0!==b.token){if(w=b.tokenSubst?ti(this._lexer,b.token,_,f,m):b.token,b.nextEmbedded)if("@pop"===b.nextEmbedded){if(!l)throw ei(this._lexer,"cannot pop embedded mode if not inside one");l=null}else{if(l)throw ei(this._lexer,"cannot enter embedded mode from within an embedded mode");C=ti(this._lexer,b.nextEmbedded,_,f,m)}if(b.goBack&&(c=Math.max(0,c-b.goBack)),b.switchTo&&"string"===typeof b.switchTo){let e=ti(this._lexer,b.switchTo,_,f,m);if("@"===e[0]&&(e=e.substr(1)),!ii(this._lexer,e))throw ei(this._lexer,"trying to switch to a state '"+e+"' that is undefined in rule: "+this._safeRuleName(v));h=h.switchTo(e)}else{if(b.transform&&"function"===typeof b.transform)throw ei(this._lexer,"action.transform not supported");if(b.next)if("@push"===b.next){if(h.depth>=this._lexer.maxStack)throw ei(this._lexer,"maximum tokenizer stack size reached: ["+h.state+","+h.parent.state+",...]");h=h.push(m)}else if("@pop"===b.next){if(h.depth<=1)throw ei(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(v));h=h.pop()}else if("@popall"===b.next)h=h.popall();else{let e=ti(this._lexer,b.next,_,f,m);if("@"===e[0]&&(e=e.substr(1)),!ii(this._lexer,e))throw ei(this._lexer,"trying to set a next state '"+e+"' that is undefined in rule: "+this._safeRuleName(v));h=h.push(e)}}b.log&&"string"===typeof b.log&&Jt(this._lexer,this._lexer.languageId+": "+ti(this._lexer,b.log,_,f,m))}if(null===w)throw ei(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(v));const S=i=>{let o=this._modeService.getModeIdForLanguageName(i);o&&(i=o);const r=this._getNestedEmbeddedModeData(i);if(c<a){const i=e.substr(c);return this._nestedTokenize(i,t,li.create(h,r),n+c,s)}return li.create(h,r)};if(Array.isArray(w)){if(d&&d.groups.length>0)throw ei(this._lexer,"groups cannot be nested: "+this._safeRuleName(v));if(f.length!==w.length+1)throw ei(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(v));let e=0;for(let t=1;t<f.length;t++)e+=f[t].length;if(e!==_.length)throw ei(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(v));d={rule:v,matches:f,groups:[]};for(let t=0;t<w.length;t++)d.groups[t]={action:w[t],matched:f[t+1]};c-=_.length}else{{if("@rematch"===w&&(c-=_.length,_="",f=null,w="",null!==C))return S(C);if(0===_.length){if(0===a||g!==h.depth||m!==h.state||(d?d.groups.length:0)!==p)continue;throw ei(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(v))}let e=null;if(Gt(w)&&0===w.indexOf("@brackets")){let t=w.substr("@brackets".length),i=gi(this._lexer,_);if(!i)throw ei(this._lexer,"@brackets token returned but no bracket defined as: "+_);e=Qt(i.token+t)}else{let t=""===w?"":w+this._lexer.tokenPostfix;e=Qt(t)}i<o&&s.emit(i+n,e)}if(null!==C)return S(C)}}return li.create(h,l)}_getNestedEmbeddedModeData(e){let t=this._locateMode(e);if(t){let e=be["A"].get(t);if(e)return new ai(t,e.getInitialState())}return new ai(t||ve["b"],ve["c"])}_locateMode(e){if(!e||!this._modeService.isRegisteredMode(e))return null;if(e===this._modeId)return e;let t=this._modeService.getModeId(e);return t&&(this._modeService.triggerMode(t),this._embeddedModes[t]=!0),t}}function gi(e,t){if(!t)return null;t=Xt(e,t);let i=e.brackets;for(const n of i){if(n.open===t)return{token:n.token,bracketType:1};if(n.close===t)return{token:n.token,bracketType:-1}}return null}function pi(e,t,i,n){return new ui(e,t,i,n)}var mi;const fi=null===(mi=window.trustedTypes)||void 0===mi?void 0:mi.createPolicy("standaloneColorizer",{createHTML:e=>e});class _i{static colorizeElement(e,t,i,n){n=n||{};let s=n.theme||"vs",o=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!o)return console.error("Mode not detected"),Promise.resolve();e.setTheme(s);let r=i.firstChild?i.firstChild.nodeValue:"";i.className+=" "+s;let a=e=>{var t;const n=null!==(t=null===fi||void 0===fi?void 0:fi.createHTML(e))&&void 0!==t?t:e;i.innerHTML=n};return this.colorize(t,r||"",o,n).then(a,e=>console.error(e))}static colorize(e,t,i,n){let s=4;n&&"number"===typeof n.tabSize&&(s=n.tabSize),Ge["S"](t)&&(t=t.substr(1));let o=Ge["Q"](t),r=e.getModeId(i);if(!r)return Promise.resolve(vi(o,s));e.triggerMode(r);const a=be["A"].get(r);if(a)return bi(o,s,a);const l=be["A"].getPromise(r);return new Promise(l?(e,t)=>{l.then(i=>{bi(o,s,i).then(e,t)},t)}:(e,t)=>{let i=null,n=null;const a=()=>{i&&(i.dispose(),i=null),n&&(n.dispose(),n=null);const a=be["A"].get(r);a?bi(o,s,a).then(e,t):e(vi(o,s))};n=new ye["g"],n.cancelAndSet(a,500),i=be["A"].onDidChange(e=>{e.changedLanguages.indexOf(r)>=0&&a()})})}static colorizeLine(e,t,i,n,s=4){const o=Kt["e"].isBasicASCII(e,t),r=Kt["e"].containsRTL(e,o,i);let a=Object(Ut["e"])(new Ut["c"](!1,!0,e,!1,o,r,0,n,[],s,0,0,0,0,-1,"none",!1,!1,null));return a.html}static colorizeModelLine(e,t,i=4){let n=e.getLineContent(t);e.forceTokenization(t);let s=e.getLineTokens(t),o=s.inflate();return this.colorizeLine(n,e.mightContainNonBasicASCII(),e.mightContainRTL(),o,i)}}function bi(e,t,i){return new Promise((n,s)=>{const o=()=>{const r=Ci(e,t,i);if(i instanceof ui){const e=i.getLoadStatus();if(!1===e.loaded)return void e.promise.then(o,s)}n(r)};o()})}function vi(e,t){let i=[];const n=16793600,s=new Uint32Array(2);s[0]=0,s[1]=n;for(let o=0,r=e.length;o<r;o++){let n=e[o];s[0]=n.length;const r=new zt["a"](s,n),a=Kt["e"].isBasicASCII(n,!0),l=Kt["e"].containsRTL(n,a,!0);let h=Object(Ut["e"])(new Ut["c"](!1,!0,n,!1,a,l,0,r,[],t,0,0,0,0,-1,"none",!1,!1,null));i=i.concat(h.html),i.push("<br/>")}return i.join("")}function Ci(e,t,i){let n=[],s=i.getInitialState();for(let o=0,r=e.length;o<r;o++){let r=e[o],a=i.tokenize2(r,!0,s,0);zt["a"].convertToEndOffset(a.tokens,r.length);let l=new zt["a"](a.tokens,r);const h=Kt["e"].isBasicASCII(r,!0),c=Kt["e"].containsRTL(r,h,!0);let d=Object(Ut["e"])(new Ut["c"](!1,!0,r,!1,h,c,0,l.inflate(),[],t,0,0,0,0,-1,"none",!1,!1,null));n=n.concat(d.html),n.push("<br/>"),s=a.endState}return n.join("")}var wi=i("b835"),Si=i("4b76");function yi(e){return!(!e||"function"!==typeof e.getEditorType)&&e.getEditorType()===fe["a"].ICodeEditor}const Di=Object(Dt["c"])("IWorkspaceEditService");function Li(e){return Object(xe["h"])(e)&&(Boolean(e.newUri)||Boolean(e.oldUri))}function xi(e){return Object(xe["h"])(e)&&j["a"].isUri(e.resource)&&Object(xe["h"])(e.edit)}class ki{constructor(e){this.metadata=e}static convert(e){return e.edits.map(e=>{if(xi(e))return new Ei(e.resource,e.edit,e.modelVersionId,e.metadata);if(Li(e))return new Ni(e.oldUri,e.newUri,e.options,e.metadata);throw new Error("Unsupported edit")})}}class Ei extends ki{constructor(e,t,i,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i,this.metadata=n}}class Ni extends ki{constructor(e,t,i,n){super(n),this.oldResource=e,this.newResource=t,this.options=i,this.metadata=n}}var Oi=i("8830"),Ii=i("d3f4"),Ti=i("fbba"),Mi=i("0910");class Ai{constructor(e={},t=[],i=[]){this._contents=e,this._keys=t,this._overrides=i,this.isFrozen=!1}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}getValue(e){return e?Object(Ti["d"])(this.contents,e):this.contents}override(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||"object"!==typeof t||!Object.keys(t).length)return this;let i={};for(const n of We["e"]([...Object.keys(this.contents),...Object.keys(t)])){let e=this.contents[n],s=t[n];s&&("object"===typeof e&&"object"===typeof s?(e=ue["b"](e),this.mergeContents(e,s)):e=s),i[n]=e}return new Ai(i,this.keys,this.overrides)}merge(...e){const t=ue["b"](this.contents),i=ue["b"](this.overrides),n=[...this.keys];for(const s of e){this.mergeContents(t,s.contents);for(const e of s.overrides){const[t]=i.filter(t=>We["g"](t.identifiers,e.identifiers));t?this.mergeContents(t.contents,e.contents):i.push(ue["b"](e))}for(const e of s.keys)-1===n.indexOf(e)&&n.push(e)}return new Ai(t,n,i)}freeze(){return this.isFrozen=!0,this}mergeContents(e,t){for(const i of Object.keys(t))i in e&&xe["h"](e[i])&&xe["h"](t[i])?this.mergeContents(e[i],t[i]):e[i]=ue["b"](t[i])}checkAndFreeze(e){return this.isFrozen&&!Object.isFrozen(e)?ue["c"](e):e}getContentsForOverrideIdentifer(e){for(const t of this.overrides)if(-1!==t.identifiers.indexOf(e))return t.contents;return null}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.addKey(e),Object(Ti["b"])(this.contents,e,t,e=>{throw new Error(e)})}removeValue(e){this.removeKey(e)&&Object(Ti["f"])(this.contents,e)}addKey(e){let t=this.keys.length;for(let i=0;i<t;i++)0===e.indexOf(this.keys[i])&&(t=i);this.keys.splice(t,1,e)}removeKey(e){let t=this.keys.indexOf(e);return-1!==t&&(this.keys.splice(t,1),!0)}}class Ri extends Ai{constructor(){const e=Object(Ti["e"])(),t=Object(Ti["c"])(),i=[];for(const n of Object.keys(e))Mi["b"].test(n)&&i.push({identifiers:[Object(Mi["c"])(n).trim()],keys:Object.keys(e[n]),contents:Object(Ti["g"])(e[n],e=>console.error("Conflict in default settings file: "+e))});super(e,t,i)}}class Fi{constructor(e,t,i=new Ai,n=new Ai,s=new Q["b"],o=new Ai,r=new Q["b"],a=!0){this._defaultConfiguration=e,this._localUserConfiguration=t,this._remoteUserConfiguration=i,this._workspaceConfiguration=n,this._folderConfigurations=s,this._memoryConfiguration=o,this._memoryConfigurationByResource=r,this._freeze=a,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new Q["b"],this._userConfiguration=null}getValue(e,t,i){const n=this.getConsolidateConfigurationModel(t,i);return n.getValue(e)}updateValue(e,t,i={}){let n;i.resource?(n=this._memoryConfigurationByResource.get(i.resource),n||(n=new Ai,this._memoryConfigurationByResource.set(i.resource,n))):n=this._memoryConfiguration,void 0===t?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}getConsolidateConfigurationModel(e,t){let i=this.getConsolidatedConfigurationModelForResource(e,t);return e.overrideIdentifier?i.override(e.overrideIdentifier):i}getConsolidatedConfigurationModelForResource({resource:e},t){let i=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const n=t.getFolder(e);n&&(i=this.getFolderConsolidatedConfiguration(n.uri)||i);const s=this._memoryConfigurationByResource.get(e);s&&(i=i.merge(s))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const i=this.getWorkspaceConsolidatedConfiguration(),n=this._folderConfigurations.get(e);n?(t=i.merge(n),this._freeze&&(t=t.freeze()),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((e,t)=>{const{contents:i,overrides:n,keys:s}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:s}]),e},[])}}static parse(e){const t=this.parseConfigurationModel(e.defaults),i=this.parseConfigurationModel(e.user),n=this.parseConfigurationModel(e.workspace),s=e.folders.reduce((e,t)=>(e.set(j["a"].revive(t[0]),this.parseConfigurationModel(t[1])),e),new Q["b"]);return new Fi(t,i,new Ai,n,s,new Ai,new Q["b"],!1)}static parseConfigurationModel(e){return new Ai(e.contents,e.keys,e.overrides).freeze()}}class Pi{constructor(e,t,i,n){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this._previousConfiguration=void 0;const s=new Set;e.keys.forEach(e=>s.add(e)),e.overrides.forEach(([,e])=>e.forEach(e=>s.add(e))),this.affectedKeys=[...s.values()];const o=new Ai;this.affectedKeys.forEach(e=>o.setValue(e,{})),this.affectedKeysTree=o.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=Fi.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var i;if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,e)){if(t){const n=this.previousConfiguration?this.previousConfiguration.getValue(e,t,null===(i=this.previous)||void 0===i?void 0:i.workspace):void 0,s=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!ue["d"](n,s)}return!0}return!1}doesAffectedKeysTreeContains(e,t){let i,n=Object(Ti["g"])({[t]:!0},()=>{});while("object"===typeof n&&(i=Object.keys(n)[0])){if(e=e[i],!e)return!1;n=n[i]}return!0}}var Bi=i("dff7");class Wi extends de["a"]{constructor(e,t,i,n,s){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=s,this._onDidUpdateKeybindings=this._register(new W["a"]),this._currentChord=null,this._currentChordChecker=new ye["c"],this._currentChordStatusMessage=null,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new ye["g"],this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:W["b"].None}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info("[KeybindingService]: "+e)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e){const t=this._getResolver().lookupPrimaryKeybinding(e);if(t)return t.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){const i=this.resolveKeyboardEvent(e);if(i.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;const[n]=i.getDispatchParts();if(null===n)return null;const s=this._contextKeyService.getContext(t),o=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(s,o,n)}_enterChordMode(e,t){this._currentChord={keypress:e,label:t},this._currentChordStatusMessage=this._notificationService.status(Bi["a"]("first.chord","({0}) was pressed. Waiting for second key of chord...",t));const i=Date.now();this._currentChordChecker.cancelAndSet(()=>{this._documentHasFocus()?Date.now()-i>5e3&&this._leaveChordMode():this._leaveChordMode()},500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchParts();return null!==n&&null===this._currentSingleModifier?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):null!==n&&n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,t,!0)):(this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1)}_doDispatch(e,t,i=!1){let n=!1;if(e.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;let s=null,o=null;if(i){const[t]=e.getSingleModifierDispatchParts();s=t,o=t}else[s]=e.getDispatchParts(),o=this._currentChord?this._currentChord.keypress:null;if(null===s)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),n;const r=this._contextKeyService.getContext(t),a=e.getLabel(),l=this._getResolver().resolve(r,o,s);return this._logService.trace("KeybindingService#dispatch",a,null===l||void 0===l?void 0:l.commandId),l&&l.enterChord?(n=!0,this._enterChordMode(s,a),n):(this._currentChord&&(l&&l.commandId||(this._notificationService.status(Bi["a"]("missing.chord","The key combination ({0}, {1}) is not a command.",this._currentChord.label,a),{hideAfter:1e4}),n=!0)),this._leaveChordMode(),l&&l.commandId&&(l.bubble||(n=!0),"undefined"===typeof l.commandArgs?this._commandService.executeCommand(l.commandId).then(void 0,e=>this._notificationService.warn(e)):this._commandService.executeCommand(l.commandId,l.commandArgs).then(void 0,e=>this._notificationService.warn(e)),this._telemetryService.publicLog2("workbenchActionExecuted",{id:l.commandId,from:"keybinding"})),n)}mightProducePrintableCharacter(e){return!e.ctrlKey&&!e.metaKey&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30)}}class Vi{constructor(e,t,i){this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(let n=0,s=e.length;n<s;n++){const t=e[n].command;t&&this._defaultBoundCommands.set(t,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=Vi.combine(e,t);for(let n=0,s=this._keybindings.length;n<s;n++){let e=this._keybindings[n];0!==e.keypressParts.length&&(e.when&&0===e.when.type||this._addKeyPress(e.keypressParts[0],e))}}static _isTargetedForRemoval(e,t,i,n,s){if(e.command!==n)return!1;if(t&&e.keypressParts[0]!==t)return!1;if(i&&e.keypressParts[1]!==i)return!1;if(s){if(!e.when)return!1;if(!s.equals(e.when))return!1}return!0}static combine(e,t){e=e.slice(0);let i=[];for(const n of t){if(!n.command||0===n.command.length||"-"!==n.command.charAt(0)){i.push(n);continue}const t=n.command.substr(1),s=n.keypressParts[0],o=n.keypressParts[1],r=n.when;for(let i=e.length-1;i>=0;i--)this._isTargetedForRemoval(e[i],s,o,t,r)&&e.splice(i,1)}return e.concat(i)}_addKeyPress(e,t){const i=this._map.get(e);if("undefined"===typeof i)return this._map.set(e,[t]),void this._addToLookupMap(t);for(let n=i.length-1;n>=0;n--){let e=i[n];if(e.command===t.command)continue;const s=e.keypressParts.length>1,o=t.keypressParts.length>1;s&&o&&e.keypressParts[1]!==t.keypressParts[1]||Vi.whenIsEntirelyIncluded(e.when,t.when)&&this._removeFromLookupMap(e)}i.push(t),this._addToLookupMap(t)}_addToLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);"undefined"===typeof t?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);if("undefined"!==typeof t)for(let i=0,n=t.length;i<n;i++)if(t[i]===e)return void t.splice(i,1)}static whenIsEntirelyIncluded(e,t){return!t||!!e&&this._implies(e,t)}static _implies(e,t){const i=e.negate(),n=e=>9===e.type?e.expr:[e];let s=n(i).concat(n(t));for(let o=0;o<s.length;o++){const e=s[o],t=e.negate();for(let i=o+1;i<s.length;i++){const e=s[i];if(t.equals(e))return!0}}return!1}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(e){let t=this._lookupMap.get(e);return"undefined"===typeof t||0===t.length?null:t[t.length-1]}resolve(e,t,i){this._log(`| Resolving ${i}${t?" chorded from "+t:""}`);let n=null;if(null!==t){const e=this._map.get(t);if("undefined"===typeof e)return this._log("\\ No keybinding entries."),null;n=[];for(let t=0,s=e.length;t<s;t++){let s=e[t];s.keypressParts[1]===i&&n.push(s)}}else{const e=this._map.get(i);if("undefined"===typeof e)return this._log("\\ No keybinding entries."),null;n=e}let s=this._findCommand(e,n);return s?null===t&&s.keypressParts.length>1&&null!==s.keypressParts[1]?(this._log(`\\ From ${n.length} keybinding entries, matched chord, when: ${ji(s.when)}, source: ${Hi(s)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${n.length} keybinding entries, matched ${s.command}, when: ${ji(s.when)}, source: ${Hi(s)}.`),{enterChord:!1,leaveChord:s.keypressParts.length>1,commandId:s.command,commandArgs:s.commandArgs,bubble:s.bubble}):(this._log(`\\ From ${n.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(e,t){for(let i=t.length-1;i>=0;i--){let n=t[i];if(Vi.contextMatchesRules(e,n.when))return n}return null}static contextMatchesRules(e,t){return!t||t.evaluate(e)}}function ji(e){return e?""+e.serialize():"no when condition"}function Hi(e){return e.extensionId?e.isBuiltinExtension?"built-in extension "+e.extensionId:"user extension "+e.extensionId:e.isDefault?"built-in":"user"}var zi=i("9eb8");class Ui{constructor(e,t,i,n,s,o,r){this.resolvedKeybinding=e,this.keypressParts=e?Ki(e.getDispatchParts()):[],e&&0===this.keypressParts.length&&(this.keypressParts=Ki(e.getSingleModifierDispatchParts())),this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=s,this.extensionId=o,this.isBuiltinExtension=r}}function Ki(e){let t=[];for(let i=0,n=e.length;i<n;i++){const n=e[i];if(!n)return t;t.push(n)}return t}class $i{constructor(e,t,i=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=i}toLabel(e,t,i){if(0===t.length)return null;const n=[];for(let s=0,o=t.length;s<o;s++){const o=t[s],r=i(o);if(null===r)return null;n[s]=Yi(o,r,this.modifierLabels[e])}return n.join(" ")}}const qi=new $i({ctrlKey:"⌃",shiftKey:"⇧",altKey:"⌥",metaKey:"⌘",separator:""},{ctrlKey:Bi["a"]({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:Bi["a"]({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:Bi["a"]({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:Bi["a"]({key:"windowsKey",comment:["This is the short form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:Bi["a"]({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:Bi["a"]({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:Bi["a"]({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:Bi["a"]({key:"superKey",comment:["This is the short form for the Super key on the keyboard"]},"Super"),separator:"+"}),Gi=new $i({ctrlKey:Bi["a"]({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:Bi["a"]({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:Bi["a"]({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:Bi["a"]({key:"cmdKey.long",comment:["This is the long form for the Command key on the keyboard"]},"Command"),separator:"+"},{ctrlKey:Bi["a"]({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:Bi["a"]({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:Bi["a"]({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:Bi["a"]({key:"windowsKey.long",comment:["This is the long form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:Bi["a"]({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:Bi["a"]({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:Bi["a"]({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:Bi["a"]({key:"superKey.long",comment:["This is the long form for the Super key on the keyboard"]},"Super"),separator:"+"});function Yi(e,t,i){if(null===t)return"";const n=[];return e.ctrlKey&&n.push(i.ctrlKey),e.shiftKey&&n.push(i.shiftKey),e.altKey&&n.push(i.altKey),e.metaKey&&n.push(i.metaKey),""!==t&&n.push(t),n.join(i.separator)}class Zi extends V["c"]{constructor(e,t){if(super(),0===t.length)throw Object(De["b"])("parts");this._os=e,this._parts=t}getLabel(){return qi.toLabel(this._os,this._parts,e=>this._getLabel(e))}getAriaLabel(){return Gi.toLabel(this._os,this._parts,e=>this._getAriaLabel(e))}isChord(){return this._parts.length>1}getParts(){return this._parts.map(e=>this._getPart(e))}_getPart(e){return new V["d"](e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchParts(){return this._parts.map(e=>this._getDispatchPart(e))}getSingleModifierDispatchParts(){return this._parts.map(e=>this._getSingleModifierDispatchPart(e))}}class Xi extends Zi{constructor(e,t){super(t,e.parts)}_keyCodeToUILabel(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return V["b"].toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":V["b"].toString(e.keyCode)}_getDispatchPart(e){return Xi.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=V["b"].toString(e.keyCode),t}_getSingleModifierDispatchPart(e){return 5!==e.keyCode||e.shiftKey||e.altKey||e.metaKey?4!==e.keyCode||e.ctrlKey||e.altKey||e.metaKey?6!==e.keyCode||e.ctrlKey||e.shiftKey||e.metaKey?57!==e.keyCode||e.ctrlKey||e.shiftKey||e.altKey?null:"meta":"alt":"shift":"ctrl"}}var Qi,Ji,en,tn,nn,sn,on,rn,an,ln=i("b0cd"),hn=i("1165");(function(e){e.noSelection=Bi["a"]("noSelection","No selection"),e.singleSelectionRange=Bi["a"]("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),e.singleSelection=Bi["a"]("singleSelection","Line {0}, Column {1}"),e.multiSelectionRange=Bi["a"]("multiSelectionRange","{0} selections ({1} characters selected)"),e.multiSelection=Bi["a"]("multiSelection","{0} selections"),e.emergencyConfOn=Bi["a"]("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'."),e.openingDocs=Bi["a"]("openingDocs","Now opening the Editor Accessibility documentation page."),e.readonlyDiffEditor=Bi["a"]("readonlyDiffEditor"," in a read-only pane of a diff editor."),e.editableDiffEditor=Bi["a"]("editableDiffEditor"," in a pane of a diff editor."),e.readonlyEditor=Bi["a"]("readonlyEditor"," in a read-only code editor"),e.editableEditor=Bi["a"]("editableEditor"," in a code editor"),e.changeConfigToOnMac=Bi["a"]("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),e.changeConfigToOnWinLinux=Bi["a"]("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),e.auto_on=Bi["a"]("auto_on","The editor is configured to be optimized for usage with a Screen Reader."),e.auto_off=Bi["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."),e.tabFocusModeOnMsg=Bi["a"]("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),e.tabFocusModeOnMsgNoKb=Bi["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."),e.tabFocusModeOffMsg=Bi["a"]("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),e.tabFocusModeOffMsgNoKb=Bi["a"]("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),e.openDocMac=Bi["a"]("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."),e.openDocWinLinux=Bi["a"]("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility."),e.outroMsg=Bi["a"]("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),e.showAccessibilityHelpAction=Bi["a"]("showAccessibilityHelpAction","Show Accessibility Help")})(Qi||(Qi={})),function(e){e.inspectTokensAction=Bi["a"]("inspectTokens","Developer: Inspect Tokens")}(Ji||(Ji={})),function(e){e.gotoLineActionLabel=Bi["a"]("gotoLineActionLabel","Go to Line/Column...")}(en||(en={})),function(e){e.helpQuickAccessActionLabel=Bi["a"]("helpQuickAccess","Show all Quick Access Providers")}(tn||(tn={})),function(e){e.quickCommandActionLabel=Bi["a"]("quickCommandActionLabel","Command Palette"),e.quickCommandHelp=Bi["a"]("quickCommandActionHelp","Show And Run Commands")}(nn||(nn={})),function(e){e.quickOutlineActionLabel=Bi["a"]("quickOutlineActionLabel","Go to Symbol..."),e.quickOutlineByCategoryActionLabel=Bi["a"]("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")}(sn||(sn={})),function(e){e.editorViewAccessibleLabel=Bi["a"]("editorViewAccessibleLabel","Editor content"),e.accessibilityHelpMessage=Bi["a"]("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")}(on||(on={})),function(e){e.toggleHighContrast=Bi["a"]("toggleHighContrast","Toggle High Contrast Theme")}(rn||(rn={})),function(e){e.bulkEditServiceSummary=Bi["a"]("bulkEditServiceSummary","Made {0} edits in {1} files")}(an||(an={}));var cn=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},dn=function(e,t){return function(i,n){t(i,n,e)}},un=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class gn{constructor(e){this.disposed=!1,this.model=e,this._onDispose=new W["a"]}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onDispose.fire()}}function pn(e,t,i){return yi(e)?t(e):i(e)}let mn=class{constructor(e){this.modelService=e}setEditor(e){this.editor=e}createModelReference(e){let t=null;return this.editor&&(t=pn(this.editor,t=>this.findModel(t,e),t=>this.findModel(t.getOriginalEditor(),e)||this.findModel(t.getModifiedEditor(),e))),t?Promise.resolve(new de["c"](new gn(t))):Promise.reject(new Error("Model not found"))}findModel(e,t){let i=this.modelService.getModel(t);return i&&i.uri.toString()!==t.toString()?null:i}};mn=cn([dn(0,yt["a"])],mn);class fn{show(){return fn.NULL_PROGRESS_RUNNER}showWhile(e,t){return un(this,void 0,void 0,(function*(){yield e}))}}fn.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class _n{confirm(e){return this.doConfirm(e).then(e=>({confirmed:e,checkboxChecked:!1}))}doConfirm(e){let t=e.message;return e.detail&&(t=t+"\n\n"+e.detail),Promise.resolve(window.confirm(t))}show(e,t,i,n){return Promise.resolve({choice:0})}}class bn{info(e){return this.notify({severity:Si["a"].Info,message:e})}warn(e){return this.notify({severity:Si["a"].Warning,message:e})}error(e){return this.notify({severity:Si["a"].Error,message:e})}notify(e){switch(e.severity){case Si["a"].Error:console.error(e.message);break;case Si["a"].Warning:console.warn(e.message);break;default:console.log(e.message);break}return bn.NO_OP}status(e,t){return de["a"].None}}bn.NO_OP=new ln["b"];class vn{constructor(e){this._onWillExecuteCommand=new W["a"],this._onDidExecuteCommand=new W["a"],this._instantiationService=e}executeCommand(e,...t){const i=ie["a"].getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(n){return Promise.reject(n)}}}class Cn extends Wi{constructor(e,t,i,n,s,o){super(e,t,i,n,s),this._cachedResolver=null,this._dynamicKeybindings=[],this._register(Z["g"](o,Z["d"].KEY_DOWN,e=>{const t=new wi["a"](e),i=this._dispatch(t,t.target);i&&(t.preventDefault(),t.stopPropagation())})),this._register(Z["g"](window,Z["d"].KEY_UP,e=>{const t=new wi["a"](e),i=this._singleModifierDispatch(t,t.target);i&&t.preventDefault()}))}addDynamicKeybinding(e,t,i,n){const s=Object(V["f"])(t,Le["a"]),o=new de["b"];return s&&(this._dynamicKeybindings.push({keybinding:s,command:e,when:n,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}),o.add(Object(de["h"])(()=>{for(let t=0;t<this._dynamicKeybindings.length;t++){let i=this._dynamicKeybindings[t];if(i.command===e)return this._dynamicKeybindings.splice(t,1),void this.updateResolver({source:1})}}))),o.add(ie["a"].registerCommand(e,i)),this.updateResolver({source:1}),o}updateResolver(e){this._cachedResolver=null,this._onDidUpdateKeybindings.fire(e)}_getResolver(){if(!this._cachedResolver){const e=this._toNormalizedKeybindingItems(zi["a"].getDefaultKeybindings(),!0),t=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new Vi(e,t,e=>this._log(e))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,t){let i=[],n=0;for(const s of e){const e=s.when||void 0,o=s.keybinding;if(o){const r=this.resolveKeybinding(o);for(const o of r)i[n++]=new Ui(o,s.command,s.commandArgs,e,t,null,!1)}else i[n++]=new Ui(void 0,s.command,s.commandArgs,e,t,null,!1)}return i}resolveKeybinding(e){return[new Xi(e,Le["a"])]}resolveKeyboardEvent(e){let t=new V["e"](e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode).toChord();return new Xi(t,Le["a"])}}function wn(e){return e&&"object"===typeof e&&(!e.overrideIdentifier||"string"===typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof j["a"])}class Sn{constructor(){this._onDidChangeConfiguration=new W["a"],this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new Fi(new Ri,new Ai)}getValue(e,t){const i="string"===typeof e?e:void 0,n=wn(e)?e:wn(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()};let i=[];for(const n of e){const[e,t]=n;this.getValue(e)!==t&&(this._configuration.updateValue(e,t),i.push(e))}if(i.length>0){const e=new Pi({keys:i,overrides:[]},t,this._configuration);e.source=7,e.sourceConfig=null,this._onDidChangeConfiguration.fire(e)}return Promise.resolve()}}class yn{constructor(e){this.configurationService=e,this._onDidChangeConfiguration=new W["a"],this.configurationService.onDidChangeConfiguration(e=>{this._onDidChangeConfiguration.fire({affectedKeys:e.affectedKeys,affectsConfiguration:(t,i)=>e.affectsConfiguration(i)})})}getValue(e,t,i){const n=H["a"].isIPosition(t)?t:null,s=n?"string"===typeof i?i:void 0:"string"===typeof t?t:void 0;return"undefined"===typeof s?this.configurationService.getValue():this.configurationService.getValue(s)}}let Dn=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&"auto"!==i?i:Le["d"]||Le["f"]?"\n":"\r\n"}};Dn=cn([dn(0,Ti["a"])],Dn);class Ln{publicLog(e,t){return Promise.resolve(void 0)}publicLog2(e,t){return this.publicLog(e,t)}}class xn{constructor(){const e=j["a"].from({scheme:xn.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new hn["b"]({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}}function kn(e,t,i){if(!t)return;if(!(e instanceof Sn))return;let n=[];Object.keys(t).forEach(e=>{Object(Oi["c"])(e)&&n.push(["editor."+e,t[e]]),i&&Object(Oi["b"])(e)&&n.push(["diffEditor."+e,t[e]])}),n.length>0&&e.updateValues(n)}xn.SCHEME="inmemory";class En{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return un(this,void 0,void 0,(function*(){const t=new Map;for(let s of e){if(!(s instanceof Ei))throw new Error("bad edit - only text edits are supported");const e=this._modelService.getModel(s.resource);if(!e)throw new Error("bad edit - model not found");if("number"===typeof s.versionId&&e.getVersionId()!==s.versionId)throw new Error("bad state - model changed in the meantime");let i=t.get(e);i||(i=[],t.set(e,i)),i.push(Ii["a"].replaceMove(z["a"].lift(s.textEdit.range),s.textEdit.text))}let i=0,n=0;for(const[e,s]of t)e.pushStackElement(),e.pushEditOperations([],s,()=>[]),e.pushStackElement(),n+=1,i+=s.length;return{ariaSummary:Ge["w"](an.bulkEditServiceSummary,i,n)}}))}}class Nn{getUriLabel(e,t){return"file"===e.scheme?e.fsPath:e.path}}class On{constructor(e,t){this._codeEditorService=e,this._container=t,this.onDidLayout=W["b"].None}get dimension(){return this._dimension||(this._dimension=Z["v"](window.document.body)),this._dimension}get container(){return this._container}focus(){var e;null===(e=this._codeEditorService.getFocusedCodeEditor())||void 0===e||e.focus()}}var In,Tn=i("3813"),Mn=i("9c1d"),An=(i("94a7"),i("6653")),Rn=i("70c3"),Fn=i("1ddc"),Pn=i("bc04"),Bn=(i("0d30"),i("5aa5")),Wn=i("1898"),Vn=i("f070"),jn=i("b2cc"),Hn=i("918c"),zn=i("4fc3"),Un=i("303e"),Kn=i("b7d0"),$n=i("561a"),qn=i("bf5b");const Gn=3;class Yn{constructor(e,t,i,n){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=i,this.modifiedLineEnd=n}getType(){return 0===this.originalLineStart?1:0===this.modifiedLineStart?2:0}}class Zn{constructor(e){this.entries=e}}const Xn=Object(qn["b"])("diff-review-insert",$n["b"].add,Bi["a"]("diffReviewInsertIcon","Icon for 'Insert' in diff review.")),Qn=Object(qn["b"])("diff-review-remove",$n["b"].remove,Bi["a"]("diffReviewRemoveIcon","Icon for 'Remove' in diff review.")),Jn=Object(qn["b"])("diff-review-close",$n["b"].close,Bi["a"]("diffReviewCloseIcon","Icon for 'Close' in diff review."));class es extends de["a"]{constructor(e){super(),this._width=0,this._diffEditor=e,this._isVisible=!1,this.shadow=Object(An["b"])(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=Object(An["b"])(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new Bn["a"](this.actionBarContainer.domNode)),this._actionBar.push(new Vn["a"]("diffreview.close",Bi["a"]("label.close","Close"),"close-diff-review "+Kn["d"].asClassName(Jn),!0,()=>(this.hide(),Promise.resolve(null))),{label:!1,icon:!0}),this.domNode=Object(An["b"])(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=Object(An["b"])(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new Wn["a"](this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(e.onDidUpdateDiff(()=>{this._isVisible&&(this._diffs=this._compute(),this._render())})),this._register(e.getModifiedEditor().onDidChangeCursorPosition(()=>{this._isVisible&&this._render()})),this._register(Z["k"](this.domNode.domNode,"click",e=>{e.preventDefault();let t=Z["t"](e.target,"diff-review-row");t&&this._goToRow(t)})),this._register(Z["k"](this.domNode.domNode,"keydown",e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._goToRow(this._getNextRow())),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._goToRow(this._getPrevRow())),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),this.hide()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),this.accept())})),this._diffs=[],this._currentDiff=null}prev(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let t=-1;for(let e=0,i=this._diffs.length;e<i;e++)if(this._diffs[e]===this._currentDiff){t=e;break}e=this._diffs.length+t-1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(0===this._diffs.length)return;e%=this._diffs.length;const t=this._diffs[e].entries;this._diffEditor.setPosition(new H["a"](t[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:t[0].modifiedLineStart,endColumn:1073741824,endLineNumber:t[t.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}next(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let t=-1;for(let e=0,i=this._diffs.length;e<i;e++)if(this._diffs[e]===this._currentDiff){t=e;break}e=t+1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(0===this._diffs.length)return;e%=this._diffs.length;const t=this._diffs[e].entries;this._diffEditor.setPosition(new H["a"](t[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:t[0].modifiedLineStart,endColumn:1073741824,endLineNumber:t[t.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}accept(){let e=-1,t=this._getCurrentFocusedRow();if(t){let i=parseInt(t.getAttribute("data-line"),10);isNaN(i)||(e=i)}this.hide(),-1!==e&&(this._diffEditor.setPosition(new H["a"](e,1)),this._diffEditor.revealPosition(new H["a"](e,1),1))}hide(){this._isVisible=!1,this._diffEditor.updateOptions({readOnly:!1}),this._diffEditor.focus(),this._diffEditor.doLayout(),this._render()}_getPrevRow(){let e=this._getCurrentFocusedRow();return e?e.previousElementSibling?e.previousElementSibling:e:this._getFirstRow()}_getNextRow(){let e=this._getCurrentFocusedRow();return e?e.nextElementSibling?e.nextElementSibling:e:this._getFirstRow()}_getFirstRow(){return this.domNode.domNode.querySelector(".diff-review-row")}_getCurrentFocusedRow(){let e=document.activeElement;return e&&/diff-review-row/.test(e.className)?e:null}_goToRow(e){let t=this._getCurrentFocusedRow();e.tabIndex=0,e.focus(),t&&t!==e&&(t.tabIndex=-1),this.scrollbar.scanDomNode()}isVisible(){return this._isVisible}layout(e,t,i){this._width=t,this.shadow.setTop(e-6),this.shadow.setWidth(t),this.shadow.setHeight(this._isVisible?6:0),this.domNode.setTop(e),this.domNode.setWidth(t),this.domNode.setHeight(i),this._content.setHeight(i),this._content.setWidth(t),this._isVisible?(this.actionBarContainer.setAttribute("aria-hidden","false"),this.actionBarContainer.setDisplay("block")):(this.actionBarContainer.setAttribute("aria-hidden","true"),this.actionBarContainer.setDisplay("none"))}_compute(){const e=this._diffEditor.getLineChanges();if(!e||0===e.length)return[];const t=this._diffEditor.getOriginalEditor().getModel(),i=this._diffEditor.getModifiedEditor().getModel();return t&&i?es._mergeAdjacent(e,t.getLineCount(),i.getLineCount()):[]}static _mergeAdjacent(e,t,i){if(!e||0===e.length)return[];let n=[],s=0;for(let l=0,h=e.length;l<h;l++){const o=e[l],r=o.originalStartLineNumber,a=o.originalEndLineNumber,c=o.modifiedStartLineNumber,d=o.modifiedEndLineNumber;let u=[],g=0;{const t=0===a?r:r-1,i=0===d?c:c-1;let n=1,s=1;if(l>0){const t=e[l-1];n=0===t.originalEndLineNumber?t.originalStartLineNumber+1:t.originalEndLineNumber+1,s=0===t.modifiedEndLineNumber?t.modifiedStartLineNumber+1:t.modifiedEndLineNumber+1}let o=t-Gn+1,h=i-Gn+1;if(o<n){const e=n-o;o+=e,h+=e}if(h<s){const e=s-h;o+=e,h+=e}u[g++]=new Yn(o,t,h,i)}0!==a&&(u[g++]=new Yn(r,a,0,0)),0!==d&&(u[g++]=new Yn(0,0,c,d));{const n=0===a?r+1:a+1,s=0===d?c+1:d+1;let o=t,p=i;if(l+1<h){const t=e[l+1];o=0===t.originalEndLineNumber?t.originalStartLineNumber:t.originalStartLineNumber-1,p=0===t.modifiedEndLineNumber?t.modifiedStartLineNumber:t.modifiedStartLineNumber-1}let m=n+Gn-1,f=s+Gn-1;if(m>o){const e=o-m;m+=e,f+=e}if(f>p){const e=p-f;m+=e,f+=e}u[g++]=new Yn(n,m,s,f)}n[s++]=new Zn(u)}let o=n[0].entries,r=[],a=0;for(let l=1,h=n.length;l<h;l++){const e=n[l].entries,t=o[o.length-1],i=e[0];0===t.getType()&&0===i.getType()&&i.originalLineStart<=t.originalLineEnd?(o[o.length-1]=new Yn(t.originalLineStart,i.originalLineEnd,t.modifiedLineStart,i.modifiedLineEnd),o=o.concat(e.slice(1))):(r[a++]=new Zn(o),o=e)}return r[a++]=new Zn(o),r}_findDiffIndex(e){const t=e.lineNumber;for(let i=0,n=this._diffs.length;i<n;i++){const e=this._diffs[i].entries,n=e[e.length-1].modifiedLineEnd;if(t<=n)return i}return 0}_render(){const e=this._diffEditor.getOriginalEditor().getOptions(),t=this._diffEditor.getModifiedEditor().getOptions(),i=this._diffEditor.getOriginalEditor().getModel(),n=this._diffEditor.getModifiedEditor().getModel(),s=i.getOptions(),o=n.getOptions();if(!this._isVisible||!i||!n)return Z["p"](this._content.domNode),this._currentDiff=null,void this.scrollbar.scanDomNode();this._diffEditor.updateOptions({readOnly:!0});const r=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs[r]===this._currentDiff)return;this._currentDiff=this._diffs[r];const a=this._diffs[r].entries;let l=document.createElement("div");l.className="diff-review-table",l.setAttribute("role","list"),l.setAttribute("aria-label",'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands'),Fn["a"].applyFontInfoSlow(l,t.get(38));let h=0,c=0,d=0,u=0;for(let S=0,y=a.length;S<y;S++){const e=a[S],t=e.originalLineStart,i=e.originalLineEnd,n=e.modifiedLineStart,s=e.modifiedLineEnd;0!==t&&(0===h||t<h)&&(h=t),0!==i&&(0===c||i>c)&&(c=i),0!==n&&(0===d||n<d)&&(d=n),0!==s&&(0===u||s>u)&&(u=s)}let g=document.createElement("div");g.className="diff-review-row";let p=document.createElement("div");p.className="diff-review-cell diff-review-summary";const m=c-h+1,f=u-d+1;p.appendChild(document.createTextNode(`${r+1}/${this._diffs.length}: @@ -${h},${m} +${d},${f} @@`)),g.setAttribute("data-line",String(d));const _=e=>0===e?Bi["a"]("no_lines_changed","no lines changed"):1===e?Bi["a"]("one_line_changed","1 line changed"):Bi["a"]("more_lines_changed","{0} lines changed",e),b=_(m),v=_(f);g.setAttribute("aria-label",Bi["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 changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",r+1,this._diffs.length,h,b,d,v)),g.appendChild(p),g.setAttribute("role","listitem"),l.appendChild(g);const C=t.get(53);let w=d;for(let S=0,y=a.length;S<y;S++){const r=a[S];es._renderSection(l,r,w,C,this._width,e,i,s,t,n,o),0!==r.modifiedLineStart&&(w=r.modifiedLineEnd)}Z["p"](this._content.domNode),this._content.domNode.appendChild(l),this.scrollbar.scanDomNode()}static _renderSection(e,t,i,n,s,o,r,a,l,h,c){const d=t.getType();let u="diff-review-row",g="";const p="diff-review-spacer";let m=null;switch(d){case 1:u="diff-review-row line-insert",g=" char-insert",m=Xn;break;case 2:u="diff-review-row line-delete",g=" char-delete",m=Qn;break}const f=t.originalLineStart,_=t.originalLineEnd,b=t.modifiedLineStart,v=t.modifiedLineEnd,C=Math.max(v-b,_-f),w=o.get(124),S=w.glyphMarginWidth+w.lineNumbersWidth,y=l.get(124),D=10+y.glyphMarginWidth+y.lineNumbersWidth;for(let L=0;L<=C;L++){const t=0===f?0:f+L,_=0===b?0:b+L,v=document.createElement("div");v.style.minWidth=s+"px",v.className=u,v.setAttribute("role","listitem"),0!==_&&(i=_),v.setAttribute("data-line",String(i));let C=document.createElement("div");C.className="diff-review-cell",C.style.height=n+"px",v.appendChild(C);const w=document.createElement("span");w.style.width=S+"px",w.style.minWidth=S+"px",w.className="diff-review-line-number"+g,0!==t?w.appendChild(document.createTextNode(String(t))):w.innerText=" ",C.appendChild(w);const y=document.createElement("span");y.style.width=D+"px",y.style.minWidth=D+"px",y.style.paddingRight="10px",y.className="diff-review-line-number"+g,0!==_?y.appendChild(document.createTextNode(String(_))):y.innerText=" ",C.appendChild(y);const x=document.createElement("span");if(x.className=p,m){const e=document.createElement("span");e.className=Kn["d"].asClassName(m),e.innerText="  ",x.appendChild(e)}else x.innerText="  ";let k;if(C.appendChild(x),0!==_){let e=this._renderLine(h,l,c.tabSize,_);es._ttPolicy&&(e=es._ttPolicy.createHTML(e)),C.insertAdjacentHTML("beforeend",e),k=h.getLineContent(_)}else{let e=this._renderLine(r,o,a.tabSize,t);es._ttPolicy&&(e=es._ttPolicy.createHTML(e)),C.insertAdjacentHTML("beforeend",e),k=r.getLineContent(t)}0===k.length&&(k=Bi["a"]("blankLine","blank"));let E="";switch(d){case 0:E=t===_?Bi["a"]({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",k,t):Bi["a"]("equalLine","{0} original line {1} modified line {2}",k,t,_);break;case 1:E=Bi["a"]("insertLine","+ {0} modified line {1}",k,_);break;case 2:E=Bi["a"]("deleteLine","- {0} original line {1}",k,t);break}v.setAttribute("aria-label",E),e.appendChild(v)}}static _renderLine(e,t,i,n){const s=e.getLineContent(n),o=t.get(38),r=16793600,a=new Uint32Array(2);a[0]=s.length,a[1]=r;const l=new zt["a"](a,s),h=Kt["e"].isBasicASCII(s,e.mightContainNonBasicASCII()),c=Kt["e"].containsRTL(s,h,e.mightContainRTL()),d=Object(Ut["e"])(new Ut["c"](o.isMonospace&&!t.get(26),o.canUseHalfwidthRightwardsArrow,s,!1,h,c,0,l,[],i,0,o.spaceWidth,o.middotWidth,o.wsmiddotWidth,t.get(100),t.get(83),t.get(77),t.get(39)!==P["e"].OFF,null));return d.html}}es._ttPolicy=null===(In=window.trustedTypes)||void 0===In?void 0:In.createPolicy("diffReview",{createHTML:e=>e}),Object(Kn["f"])((e,t)=>{const i=e.getColor(Hn["h"]);i&&t.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${i}; }`);const n=e.getColor(Un["Yb"]);n&&t.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${n} 0 -6px 6px -6px inset; }`)});class ts extends jn["b"]{constructor(){super({id:"editor.action.diffReview.next",label:Bi["a"]("editor.action.diffReview.next","Go to Next Difference"),alias:"Go to Next Difference",precondition:zn["a"].has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(e,t){const i=ns(e);i&&i.diffReviewNext()}}class is extends jn["b"]{constructor(){super({id:"editor.action.diffReview.prev",label:Bi["a"]("editor.action.diffReview.prev","Go to Previous Difference"),alias:"Go to Previous Difference",precondition:zn["a"].has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})}run(e,t){const i=ns(e);i&&i.diffReviewPrev()}}function ns(e){const t=e.get(Y["a"]),i=t.listDiffEditors(),n=t.getActiveCodeEditor();if(!n)return null;for(let s=0,o=i.length;s<o;s++){const e=i[s];if(e.getModifiedEditor().getId()===n.getId()||e.getOriginalEditor().getId()===n.getId())return e}return null}Object(jn["i"])(ts),Object(jn["i"])(is);var ss=i("7ab3"),os=i("b57f"),rs=i("32f2"),as=i("7416"),ls=i("f07b"),hs=i("533b"),cs=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class ds extends de["a"]{constructor(e,t,i,n,s,o){super(),this._viewZoneId=e,this._marginDomNode=t,this.editor=i,this.diff=n,this._contextMenuService=s,this._clipboardService=o,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=$n["b"].lightBulb.classNames+" lightbulb-glyph",this._diffActions.style.position="absolute";const r=i.getOption(53),a=i.getModel().getEOL();this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=r+"px",this._diffActions.style.lineHeight=r+"px",this._marginDomNode.appendChild(this._diffActions);const l=[];l.push(new Vn["a"]("diff.clipboard.copyDeletedContent",n.originalEndLineNumber>n.modifiedStartLineNumber?Bi["a"]("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):Bi["a"]("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"),void 0,!0,()=>cs(this,void 0,void 0,(function*(){const e=new z["a"](n.originalStartLineNumber,1,n.originalEndLineNumber+1,1),t=n.originalModel.getValueInRange(e);yield this._clipboardService.writeText(t)}))));let h=0,c=void 0;n.originalEndLineNumber>n.modifiedStartLineNumber&&(c=new Vn["a"]("diff.clipboard.copyDeletedLineContent",Bi["a"]("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber),void 0,!0,()=>cs(this,void 0,void 0,(function*(){const e=n.originalModel.getLineContent(n.originalStartLineNumber+h);yield this._clipboardService.writeText(e)}))),l.push(c));const d=i.getOption(75);d||l.push(new Vn["a"]("diff.inline.revertChange",Bi["a"]("diff.inline.revertChange.label","Revert this change"),void 0,!0,()=>cs(this,void 0,void 0,(function*(){const e=new z["a"](n.originalStartLineNumber,1,n.originalEndLineNumber,n.originalModel.getLineMaxColumn(n.originalEndLineNumber)),t=n.originalModel.getValueInRange(e);if(0===n.modifiedEndLineNumber){const e=i.getModel().getLineMaxColumn(n.modifiedStartLineNumber);i.executeEdits("diffEditor",[{range:new z["a"](n.modifiedStartLineNumber,e,n.modifiedStartLineNumber,e),text:a+t}])}else{const e=i.getModel().getLineMaxColumn(n.modifiedEndLineNumber);i.executeEdits("diffEditor",[{range:new z["a"](n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,e),text:t}])}}))));const u=(e,t)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:e,y:t}),getActions:()=>(c&&(c.label=Bi["a"]("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber+h)),l),autoSelectFirstItem:!0})};this._register(Z["k"](this._diffActions,"mousedown",e=>{const{top:t,height:i}=Z["z"](this._diffActions);let n=Math.floor(r/3);e.preventDefault(),u(e.posx,t+i+n)})),this._register(i.onMouseMove(e=>{if(8===e.target.type||5===e.target.type){const t=e.target.detail.viewZoneId;t===this._viewZoneId?(this.visibility=!0,h=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,r)):this.visibility=!1}else this.visibility=!1})),this._register(i.onMouseDown(e=>{if(e.event.rightButton&&(8===e.target.type||5===e.target.type)){const t=e.target.detail.viewZoneId;t===this._viewZoneId&&(e.event.preventDefault(),h=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,r),u(e.event.posx,e.event.posy+r))}}))}get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}_updateLightBulbPosition(e,t,i){const{top:n}=Z["z"](e),s=t-n,o=Math.floor(s/i),r=o*i;if(this._diffActions.style.top=r+"px",this.diff.viewLineCounts){let e=0;for(let t=0;t<this.diff.viewLineCounts.length;t++)if(e+=this.diff.viewLineCounts[t],o<e)return t}return o}}var us=i("f577");class gs{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}gs.None=Object.freeze({report(){}});const ps=Object(Dt["c"])("editorProgressService");var ms,fs=i("a37f"),_s=i("e75b"),bs=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},vs=function(e,t){return function(i,n){t(i,n,e)}};class Cs{constructor(e,t){this._contextMenuService=e,this._clipboardService=t,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(e){return e.filter(e=>!this._zonesMap[String(e.id)])}clean(e){this._zones.length>0&&e.changeViewZones(e=>{for(const t of this._zones)e.removeZone(t)}),this._zones=[],this._zonesMap={},this._decorations=e.deltaDecorations(this._decorations,[])}apply(e,t,i,n){const s=n?Pn["b"].capture(e):null;e.changeViewZones(t=>{for(const e of this._zones)t.removeZone(e);for(const e of this._inlineDiffMargins)e.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let n=0,s=i.zones.length;n<s;n++){const s=i.zones[n];s.suppressMouseDown=!0;const o=t.addZone(s);this._zones.push(o),this._zonesMap[String(o)]=!0,i.zones[n].diff&&s.marginDomNode&&(s.suppressMouseDown=!1,this._inlineDiffMargins.push(new ds(o,s.marginDomNode,e,i.zones[n].diff,this._contextMenuService,this._clipboardService)))}}),s&&s.restore(e),this._decorations=e.deltaDecorations(this._decorations,i.decorations),t&&t.setZones(i.overviewZones)}}let ws=0;const Ss=Object(qn["b"])("diff-insert",$n["b"].add,Bi["a"]("diffInsertIcon","Line decoration for inserts in the diff editor.")),ys=Object(qn["b"])("diff-remove",$n["b"].remove,Bi["a"]("diffRemoveIcon","Line decoration for removals in the diff editor.")),Ds=null===(ms=window.trustedTypes)||void 0===ms?void 0:ms.createPolicy("diffEditorWidget",{createHTML:e=>e});let Ls=class e extends de["a"]{constructor(t,i,n,s,o,r,a,l,h,c,d,u){super(),this._editorProgressService=u,this._onDidDispose=this._register(new W["a"]),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new W["a"]),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new W["a"]),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=o,this._codeEditorService=l,this._contextKeyService=this._register(r.createScoped(t)),this._instantiationService=a.createChild(new ls["a"]([zn["b"],this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=h,this._notificationService=c,this._id=++ws,this._state=0,this._updatingDiffProgress=null,this._domElement=t,i=i||{},this._renderSideBySide=!0,"undefined"!==typeof i.renderSideBySide&&(this._renderSideBySide=i.renderSideBySide),this._maxComputationTime=5e3,"undefined"!==typeof i.maxComputationTime&&(this._maxComputationTime=i.maxComputationTime),this._ignoreTrimWhitespace=!0,"undefined"!==typeof i.ignoreTrimWhitespace&&(this._ignoreTrimWhitespace=i.ignoreTrimWhitespace),this._renderIndicators=!0,"undefined"!==typeof i.renderIndicators&&(this._renderIndicators=i.renderIndicators),this._originalIsEditable=Object(P["k"])(i.originalEditable,!1),this._diffCodeLens=Object(P["k"])(i.diffCodeLens,!1),this._diffWordWrap=Rs(i.diffWordWrap,"inherit"),"undefined"!==typeof i.isInEmbeddedEditor?this._contextKeyService.createKey("isInEmbeddedDiffEditor",i.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._renderOverviewRuler=!0,"undefined"!==typeof i.renderOverviewRuler&&(this._renderOverviewRuler=Boolean(i.renderOverviewRuler)),this._updateDecorationsRunner=this._register(new ye["e"](()=>this._updateDecorations(),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=Object(An["b"])(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(Z["k"](this._overviewDomElement,"mousedown",e=>{this._modifiedEditor.delegateVerticalScrollbarMouseDown(e)})),this._renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new Cs(d,s),this._modifiedEditorState=new Cs(d,s),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new fs["a"](this._containerDomElement,i.dimension,()=>this._onDidContainerSizeChanged())),i.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(i,n.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(i,n.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=new es(this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._enableSplitViewResizing=!0,"undefined"!==typeof i.enableSplitViewResizing&&(this._enableSplitViewResizing=i.enableSplitViewResizing),this._renderSideBySide?this._setStrategy(new Is(this._createDataSource(),this._enableSplitViewResizing)):this._setStrategy(new Ms(this._createDataSource(),this._enableSplitViewResizing)),this._register(h.onDidColorThemeChange(t=>{this._strategy&&this._strategy.applyColors(t)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._renderSideBySide)}));const g=jn["d"].getDiffEditorContributions();for(const e of g)try{this._register(a.createInstance(e.ctor,this))}catch(p){Object(De["e"])(p)}this._codeEditorService.addDiffEditor(this)}_setState(e){this._state!==e&&(this._state=e,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),1===this._state&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(e,t){let i="monaco-diff-editor monaco-editor-background ";return t&&(i+="side-by-side "),i+=Object(Kn["e"])(e.type),i}_recreateOverviewRulers(){this._renderOverviewRuler&&(this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(t,i){const n=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(t),i);this._register(n.onDidScrollChange(e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(n.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(n.onDidChangeConfiguration(e=>{n.getModel()&&(e.hasChanged(38)&&this._updateDecorationsRunner.schedule(),e.hasChanged(125)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(n.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}));const s=this._contextKeyService.createKey("isInDiffLeftEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget(()=>s.set(!0))),this._register(n.onDidBlurEditorWidget(()=>s.set(!1))),this._register(n.onDidContentSizeChange(t=>{const i=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,n=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:n,contentWidth:i,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})})),n}_createRightHandSideEditor(t,i){const n=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(t),i);this._register(n.onDidScrollChange(e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(n.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(n.onDidChangeConfiguration(e=>{n.getModel()&&(e.hasChanged(38)&&this._updateDecorationsRunner.schedule(),e.hasChanged(125)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(n.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})),this._register(n.onDidChangeModelOptions(e=>{e.tabSize&&this._updateDecorationsRunner.schedule()}));const s=this._contextKeyService.createKey("isInDiffRightEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget(()=>s.set(!0))),this._register(n.onDidBlurEditorWidget(()=>s.set(!1))),this._register(n.onDidContentSizeChange(t=>{const i=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,n=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:n,contentWidth:i,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})})),n}_createInnerEditor(e,t,i,n){return e.createInstance(Mn["a"],t,i,n)}dispose(){this._codeEditorService.removeDiffEditor(this),-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._renderOverviewRuler&&this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this._originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this._modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return fe["a"].IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(t){let i=!1;"undefined"!==typeof t.renderSideBySide&&this._renderSideBySide!==t.renderSideBySide&&(this._renderSideBySide=t.renderSideBySide,i=!0),"undefined"!==typeof t.maxComputationTime&&(this._maxComputationTime=t.maxComputationTime,this._isVisible&&this._beginUpdateDecorationsSoon());let n=!1;"undefined"!==typeof t.ignoreTrimWhitespace&&this._ignoreTrimWhitespace!==t.ignoreTrimWhitespace&&(this._ignoreTrimWhitespace=t.ignoreTrimWhitespace,n=!0),"undefined"!==typeof t.renderIndicators&&this._renderIndicators!==t.renderIndicators&&(this._renderIndicators=t.renderIndicators,n=!0),n&&this._beginUpdateDecorations(),this._originalIsEditable=Object(P["k"])(t.originalEditable,this._originalIsEditable),this._diffCodeLens=Object(P["k"])(t.diffCodeLens,this._diffCodeLens),this._diffWordWrap=Rs(t.diffWordWrap,this._diffWordWrap),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(t)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(t)),"undefined"!==typeof t.enableSplitViewResizing&&(this._enableSplitViewResizing=t.enableSplitViewResizing),this._strategy.setEnableSplitViewResizing(this._enableSplitViewResizing),i&&(this._renderSideBySide?this._setStrategy(new Is(this._createDataSource(),this._enableSplitViewResizing)):this._setStrategy(new Ms(this._createDataSource(),this._enableSplitViewResizing)),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._renderSideBySide)),"undefined"!==typeof t.renderOverviewRuler&&this._renderOverviewRuler!==t.renderOverviewRuler&&(this._renderOverviewRuler=t.renderOverviewRuler,this._renderOverviewRuler?this._containerDomElement.appendChild(this._overviewDomElement):this._containerDomElement.removeChild(this._overviewDomElement))}getModel(){return{original:this._originalEditor.getModel(),modified:this._modifiedEditor.getModel()}}setModel(e){if(e&&(!e.original||!e.modified))throw new Error(e.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._originalEditor.setModel(e?e.original:null),this._modifiedEditor.setModel(e?e.modified:null),this._updateDecorationsRunner.cancel(),e&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),e&&(this._recreateOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getDomNode(){return this._domElement}getVisibleColumnFromPosition(e){return this._modifiedEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(e){this._modifiedEditor.setPosition(e)}revealLine(e,t=0){this._modifiedEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._modifiedEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._modifiedEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._modifiedEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._modifiedEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._modifiedEditor.revealPositionNearTop(e,t)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(e){this._modifiedEditor.setSelection(e)}setSelections(e){this._modifiedEditor.setSelections(e)}revealLines(e,t,i=0){this._modifiedEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._modifiedEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._modifiedEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._modifiedEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._modifiedEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._modifiedEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._modifiedEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){const e=this._originalEditor.saveViewState(),t=this._modifiedEditor.saveViewState();return{original:e,modified:t}}restoreViewState(e){if(e&&e.original&&e.modified){const t=e;this._originalEditor.restoreViewState(t.original),this._modifiedEditor.restoreViewState(t.modified)}}layout(e){this._elementSizeObserver.observe(e)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}trigger(e,t,i){this._modifiedEditor.trigger(e,t,i)}changeDecorations(e){return this._modifiedEditor.changeDecorations(e)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._renderOverviewRuler)return;if(!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const t=this._elementSizeObserver.getHeight(),i=this._getReviewHeight(),n=e.ENTIRE_DIFF_OVERVIEW_WIDTH-2*e.ONE_OVERVIEW_WIDTH,s=this._modifiedEditor.getLayoutInfo();s&&(this._originalOverviewRuler.setLayout({top:0,width:e.ONE_OVERVIEW_WIDTH,right:n+e.ONE_OVERVIEW_WIDTH,height:t-i}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:e.ONE_OVERVIEW_WIDTH,height:t-i}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(()=>this._beginUpdateDecorations(),e.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(e,t){return!e&&!t||!(!e||!t)&&e.toString()===t.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const t=this._originalEditor.getModel(),i=this._modifiedEditor.getModel();if(!t||!i)return;this._diffComputationToken++;const n=this._diffComputationToken;this._setState(1),this._editorWorkerService.canComputeDiff(t.uri,i.uri)?this._editorWorkerService.computeDiff(t.uri,i.uri,this._ignoreTrimWhitespace,this._maxComputationTime).then(e=>{n===this._diffComputationToken&&t===this._originalEditor.getModel()&&i===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=e,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())},e=>{n===this._diffComputationToken&&t===this._originalEditor.getModel()&&i===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())}):e._equals(t.uri,this._lastOriginalWarning)&&e._equals(i.uri,this._lastModifiedWarning)||(this._lastOriginalWarning=t.uri,this._lastModifiedWarning=i.uri,this._notificationService.warn(Bi["a"]("diff.tooLarge","Cannot compare files because one file is too large.")))}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const e=this._diffComputationResult?this._diffComputationResult.changes:[],t=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),i=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),n=this._strategy.getEditorsDiffDecorations(e,this._ignoreTrimWhitespace,this._renderIndicators,t,i);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,n.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,n.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(e){const t=Object.assign({},e);return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar=Object.assign({},t.scrollbar||{}),t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=this._diffCodeLens,t.fixedOverflowWidgets=!0,t.minimap=Object.assign({},t.minimap||{}),t.minimap.enabled=!1,t}_adjustOptionsForLeftHandSide(e){const t=this._adjustOptionsForSubEditor(e);return this._renderSideBySide?t.wordWrapOverride1=this._diffWordWrap:t.wordWrapOverride1="off",e.originalAriaLabel&&(t.ariaLabel=e.originalAriaLabel),t.readOnly=!this._originalIsEditable,t.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(t){const i=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(i.ariaLabel=t.modifiedAriaLabel),i.wordWrapOverride1=this._diffWordWrap,i.revealHorizontalRightPadding=P["g"].revealHorizontalRightPadding.defaultValue+e.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},i),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const t=this._elementSizeObserver.getWidth(),i=this._elementSizeObserver.getHeight(),n=this._getReviewHeight(),s=this._strategy.layout();this._originalDomNode.style.width=s+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=t-s+"px",this._modifiedDomNode.style.left=s+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=i-n+"px",this._overviewDomElement.style.width=e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=t-e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(e.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:s,height:i-n}),this._modifiedEditor.layout({width:t-s-(this._renderOverviewRuler?e.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:i-n}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(i-n,t,n),this._layoutOverviewViewport()}_layoutOverviewViewport(){const e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const e=this._modifiedEditor.getLayoutInfo();if(!e)return null;const t=this._modifiedEditor.getScrollTop(),i=this._modifiedEditor.getScrollHeight(),n=Math.max(0,e.height),s=Math.max(0,n-0),o=i>0?s/i:0,r=Math.max(0,Math.floor(e.height*o)),a=Math.floor(t*o);return{height:r,top:a}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(e,t){const i=this._diffComputationResult?this._diffComputationResult.changes:[];if(0===i.length||e<t(i[0]))return null;let n=0,s=i.length-1;while(n<s){const o=Math.floor((n+s)/2),r=t(i[o]),a=o+1<=s?t(i[o+1]):1073741824;e<r?s=o-1:e>=a?n=o+1:(n=o,s=o)}return i[n]}_getEquivalentLineForOriginalLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,e=>e.originalStartLineNumber);if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),s=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,o=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,r=e-i;return r<=s?n+Math.min(r,o):n+o-s+r}_getEquivalentLineForModifiedLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,e=>e.modifiedStartLineNumber);if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),s=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,o=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,r=e-n;return r<=o?i+Math.min(r,s):i+s-o+r}getDiffLineInformationForOriginal(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null}getDiffLineInformationForModified(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null}};Ls.ONE_OVERVIEW_WIDTH=15,Ls.ENTIRE_DIFF_OVERVIEW_WIDTH=30,Ls.UPDATE_DIFF_DECORATIONS_DELAY=200,Ls=bs([vs(3,us["a"]),vs(4,Ce["a"]),vs(5,zn["b"]),vs(6,Dt["a"]),vs(7,Y["a"]),vs(8,Kn["b"]),vs(9,ln["a"]),vs(10,hs["a"]),vs(11,ps)],Ls);class xs extends de["a"]{constructor(e){super(),this._dataSource=e,this._insertColor=null,this._removeColor=null}applyColors(e){const t=(e.getColor(Un["m"])||Un["i"]).transparent(2),i=(e.getColor(Un["o"])||Un["j"]).transparent(2),n=!t.equals(this._insertColor)||!i.equals(this._removeColor);return this._insertColor=t,this._removeColor=i,n}getEditorsDiffDecorations(e,t,i,n,s){s=s.sort((e,t)=>e.afterLineNumber-t.afterLineNumber),n=n.sort((e,t)=>e.afterLineNumber-t.afterLineNumber);const o=this._getViewZones(e,n,s,i),r=this._getOriginalEditorDecorations(e,t,i),a=this._getModifiedEditorDecorations(e,t,i);return{original:{decorations:r.decorations,overviewZones:r.overviewZones,zones:o.original},modified:{decorations:a.decorations,overviewZones:a.overviewZones,zones:o.modified}}}}class ks{constructor(e){this._source=e,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._index<this._source.length?this.current=this._source[this._index]:this.current=null}}class Es{constructor(e,t,i,n,s){this._lineChanges=e,this._originalForeignVZ=t,this._modifiedForeignVZ=i,this._originalEditor=n,this._modifiedEditor=s}static _getViewLineCount(e,t,i){const n=e.getModel(),s=e._getViewModel();if(n&&s){const e=Ws(n,s,t,i);return e.endLineNumber-e.startLineNumber+1}return i-t+1}getViewZones(){const e=this._originalEditor.getOption(53),t=this._modifiedEditor.getOption(53),i=-1!==this._originalEditor.getOption(125).wrappingColumn,n=-1!==this._modifiedEditor.getOption(125).wrappingColumn,s=i||n,o=this._originalEditor.getModel(),r=this._originalEditor._getViewModel().coordinatesConverter,a=this._modifiedEditor._getViewModel().coordinatesConverter,l={original:[],modified:[]};let h=0,c=0,d=0,u=0,g=0,p=0;const m=(e,t)=>e.afterLineNumber-t.afterLineNumber,f=(e,t)=>{if(null===t.domNode&&e.length>0){const i=e[e.length-1];if(i.afterLineNumber===t.afterLineNumber&&null===i.domNode)return void(i.heightInLines+=t.heightInLines)}e.push(t)},_=new ks(this._modifiedForeignVZ),b=new ks(this._originalForeignVZ);let v=1,C=1;for(let w=0,S=this._lineChanges.length;w<=S;w++){const i=w<S?this._lineChanges[w]:null;null!==i?(d=i.originalStartLineNumber+(i.originalEndLineNumber>0?-1:0),u=i.modifiedStartLineNumber+(i.modifiedEndLineNumber>0?-1:0),c=i.originalEndLineNumber>0?Es._getViewLineCount(this._originalEditor,i.originalStartLineNumber,i.originalEndLineNumber):0,h=i.modifiedEndLineNumber>0?Es._getViewLineCount(this._modifiedEditor,i.modifiedStartLineNumber,i.modifiedEndLineNumber):0,g=Math.max(i.originalStartLineNumber,i.originalEndLineNumber),p=Math.max(i.modifiedStartLineNumber,i.modifiedEndLineNumber)):(d+=1e7+c,u+=1e7+h,g=d,p=u);let n=[],y=[];if(s){let e;e=i?i.originalEndLineNumber>0?i.originalStartLineNumber-v:i.modifiedStartLineNumber-C:o.getLineCount()-v;for(let t=0;t<e;t++){const e=v+t,i=C+t,s=r.getModelLineViewLineCount(e),o=a.getModelLineViewLineCount(i);s<o?n.push({afterLineNumber:e,heightInLines:o-s,domNode:null,marginDomNode:null}):s>o&&y.push({afterLineNumber:i,heightInLines:s-o,domNode:null,marginDomNode:null})}i&&(v=(i.originalEndLineNumber>0?i.originalEndLineNumber:i.originalStartLineNumber)+1,C=(i.modifiedEndLineNumber>0?i.modifiedEndLineNumber:i.modifiedStartLineNumber)+1)}while(_.current&&_.current.afterLineNumber<=p){let e;e=_.current.afterLineNumber<=u?d-u+_.current.afterLineNumber:g;let s=null;i&&i.modifiedStartLineNumber<=_.current.afterLineNumber&&_.current.afterLineNumber<=i.modifiedEndLineNumber&&(s=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),n.push({afterLineNumber:e,heightInLines:_.current.height/t,domNode:null,marginDomNode:s}),_.advance()}while(b.current&&b.current.afterLineNumber<=g){let t;t=b.current.afterLineNumber<=d?u-d+b.current.afterLineNumber:p,y.push({afterLineNumber:t,heightInLines:b.current.height/e,domNode:null}),b.advance()}if(null!==i&&Fs(i)){const e=this._produceOriginalFromDiff(i,c,h);e&&n.push(e)}if(null!==i&&Ps(i)){const e=this._produceModifiedFromDiff(i,c,h);e&&y.push(e)}let D=0,L=0;n=n.sort(m),y=y.sort(m);while(D<n.length&&L<y.length){const e=n[D],t=y[L],i=e.afterLineNumber-d,s=t.afterLineNumber-u;i<s?(f(l.original,e),D++):s<i?(f(l.modified,t),L++):e.shouldNotShrink?(f(l.original,e),D++):t.shouldNotShrink?(f(l.modified,t),L++):e.heightInLines>=t.heightInLines?(e.heightInLines-=t.heightInLines,L++):(t.heightInLines-=e.heightInLines,D++)}while(D<n.length)f(l.original,n[D]),D++;while(L<y.length)f(l.modified,y[L]),L++}return{original:Es._ensureDomNodes(l.original),modified:Es._ensureDomNodes(l.modified)}}static _ensureDomNodes(e){return e.map(e=>(e.domNode||(e.domNode=Bs()),e))}}function Ns(e,t,i,n,s){return{range:new z["a"](e,t,i,n),options:s}}const Os={charDelete:os["a"].register({className:"char-delete"}),charDeleteWholeLine:os["a"].register({className:"char-delete",isWholeLine:!0}),charInsert:os["a"].register({className:"char-insert"}),charInsertWholeLine:os["a"].register({className:"char-insert",isWholeLine:!0}),lineInsert:os["a"].register({className:"line-insert",marginClassName:"line-insert",isWholeLine:!0}),lineInsertWithSign:os["a"].register({className:"line-insert",linesDecorationsClassName:"insert-sign "+Kn["d"].asClassName(Ss),marginClassName:"line-insert",isWholeLine:!0}),lineDelete:os["a"].register({className:"line-delete",marginClassName:"line-delete",isWholeLine:!0}),lineDeleteWithSign:os["a"].register({className:"line-delete",linesDecorationsClassName:"delete-sign "+Kn["d"].asClassName(ys),marginClassName:"line-delete",isWholeLine:!0}),lineDeleteMargin:os["a"].register({marginClassName:"line-delete"})};class Is extends xs{constructor(e,t){super(e),this._disableSash=!1===t,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new Rn["b"](this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart(()=>this._onSashDragStart()),this._sash.onDidChange(e=>this._onSashDrag(e)),this._sash.onDidEnd(()=>this._onSashDragEnd()),this._sash.onDidReset(()=>this._onSashReset())}setEnableSplitViewResizing(e){const t=!1===e;this._disableSash!==t&&(this._disableSash=t,this._sash.state=this._disableSash?0:3)}layout(e=this._sashRatio){const t=this._dataSource.getWidth(),i=t-(this._dataSource.getOptions().renderOverviewRuler?Ls.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let n=Math.floor((e||.5)*i);const s=Math.floor(.5*i);return n=this._disableSash?s:n||s,i>2*Is.MINIMUM_EDITOR_WIDTH?(n<Is.MINIMUM_EDITOR_WIDTH&&(n=Is.MINIMUM_EDITOR_WIDTH),n>i-Is.MINIMUM_EDITOR_WIDTH&&(n=i-Is.MINIMUM_EDITOR_WIDTH)):n=s,this._sashPosition!==n&&(this._sashPosition=n,this._sash.layout()),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(e){const t=this._dataSource.getWidth(),i=t-(this._dataSource.getOptions().renderOverviewRuler?Ls.ENTIRE_DIFF_OVERVIEW_WIDTH:0),n=this.layout((this._startSashPosition+(e.currentX-e.startX))/i);this._sashRatio=n/i,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(e){return 0}getVerticalSashLeft(e){return this._sashPosition}getVerticalSashHeight(e){return this._dataSource.getHeight()}_getViewZones(e,t,i){const n=this._dataSource.getOriginalEditor(),s=this._dataSource.getModifiedEditor(),o=new Ts(e,t,i,n,s);return o.getViewZones()}_getOriginalEditorDecorations(e,t,i){const n=this._dataSource.getOriginalEditor(),s=String(this._removeColor),o={decorations:[],overviewZones:[]},r=n.getModel(),a=n._getViewModel();for(const l of e)if(Ps(l)){o.decorations.push({range:new z["a"](l.originalStartLineNumber,1,l.originalEndLineNumber,1073741824),options:i?Os.lineDeleteWithSign:Os.lineDelete}),Fs(l)&&l.charChanges||o.decorations.push(Ns(l.originalStartLineNumber,1,l.originalEndLineNumber,1073741824,Os.charDeleteWholeLine));const e=Ws(r,a,l.originalStartLineNumber,l.originalEndLineNumber);if(o.overviewZones.push(new rs["a"](e.startLineNumber,e.endLineNumber,s)),l.charChanges)for(const i of l.charChanges)if(Ps(i))if(t)for(let e=i.originalStartLineNumber;e<=i.originalEndLineNumber;e++){let t,n;t=e===i.originalStartLineNumber?i.originalStartColumn:r.getLineFirstNonWhitespaceColumn(e),n=e===i.originalEndLineNumber?i.originalEndColumn:r.getLineLastNonWhitespaceColumn(e),o.decorations.push(Ns(e,t,e,n,Os.charDelete))}else o.decorations.push(Ns(i.originalStartLineNumber,i.originalStartColumn,i.originalEndLineNumber,i.originalEndColumn,Os.charDelete))}return o}_getModifiedEditorDecorations(e,t,i){const n=this._dataSource.getModifiedEditor(),s=String(this._insertColor),o={decorations:[],overviewZones:[]},r=n.getModel(),a=n._getViewModel();for(const l of e)if(Fs(l)){o.decorations.push({range:new z["a"](l.modifiedStartLineNumber,1,l.modifiedEndLineNumber,1073741824),options:i?Os.lineInsertWithSign:Os.lineInsert}),Ps(l)&&l.charChanges||o.decorations.push(Ns(l.modifiedStartLineNumber,1,l.modifiedEndLineNumber,1073741824,Os.charInsertWholeLine));const e=Ws(r,a,l.modifiedStartLineNumber,l.modifiedEndLineNumber);if(o.overviewZones.push(new rs["a"](e.startLineNumber,e.endLineNumber,s)),l.charChanges)for(const i of l.charChanges)if(Fs(i))if(t)for(let e=i.modifiedStartLineNumber;e<=i.modifiedEndLineNumber;e++){let t,n;t=e===i.modifiedStartLineNumber?i.modifiedStartColumn:r.getLineFirstNonWhitespaceColumn(e),n=e===i.modifiedEndLineNumber?i.modifiedEndColumn:r.getLineLastNonWhitespaceColumn(e),o.decorations.push(Ns(e,t,e,n,Os.charInsert))}else o.decorations.push(Ns(i.modifiedStartLineNumber,i.modifiedStartColumn,i.modifiedEndLineNumber,i.modifiedEndColumn,Os.charInsert))}return o}}Is.MINIMUM_EDITOR_WIDTH=100;class Ts extends Es{constructor(e,t,i,n,s){super(e,t,i,n,s)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(e,t,i){return i>t?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i-t,domNode:null}:null}_produceModifiedFromDiff(e,t,i){return t>i?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-i,domNode:null}:null}}class Ms extends xs{constructor(e,t){super(e),this._decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(e.getOriginalEditor().onDidLayoutChange(t=>{this._decorationsLeft!==t.decorationsLeft&&(this._decorationsLeft=t.decorationsLeft,e.relayoutEditors())}))}setEnableSplitViewResizing(e){}_getViewZones(e,t,i,n){const s=this._dataSource.getOriginalEditor(),o=this._dataSource.getModifiedEditor(),r=new As(e,t,i,s,o,n);return r.getViewZones()}_getOriginalEditorDecorations(e,t,i){const n=String(this._removeColor),s={decorations:[],overviewZones:[]},o=this._dataSource.getOriginalEditor(),r=o.getModel(),a=o._getViewModel();for(const l of e)if(Ps(l)){s.decorations.push({range:new z["a"](l.originalStartLineNumber,1,l.originalEndLineNumber,1073741824),options:Os.lineDeleteMargin});const e=Ws(r,a,l.originalStartLineNumber,l.originalEndLineNumber);s.overviewZones.push(new rs["a"](e.startLineNumber,e.endLineNumber,n))}return s}_getModifiedEditorDecorations(e,t,i){const n=this._dataSource.getModifiedEditor(),s=String(this._insertColor),o={decorations:[],overviewZones:[]},r=n.getModel(),a=n._getViewModel();for(const l of e)if(Fs(l)){o.decorations.push({range:new z["a"](l.modifiedStartLineNumber,1,l.modifiedEndLineNumber,1073741824),options:i?Os.lineInsertWithSign:Os.lineInsert});const e=Ws(r,a,l.modifiedStartLineNumber,l.modifiedEndLineNumber);if(o.overviewZones.push(new rs["a"](e.startLineNumber,e.endLineNumber,s)),l.charChanges){for(const i of l.charChanges)if(Fs(i))if(t)for(let e=i.modifiedStartLineNumber;e<=i.modifiedEndLineNumber;e++){let t,n;t=e===i.modifiedStartLineNumber?i.modifiedStartColumn:r.getLineFirstNonWhitespaceColumn(e),n=e===i.modifiedEndLineNumber?i.modifiedEndColumn:r.getLineLastNonWhitespaceColumn(e),o.decorations.push(Ns(e,t,e,n,Os.charInsert))}else o.decorations.push(Ns(i.modifiedStartLineNumber,i.modifiedStartColumn,i.modifiedEndLineNumber,i.modifiedEndColumn,Os.charInsert))}else o.decorations.push(Ns(l.modifiedStartLineNumber,1,l.modifiedEndLineNumber,1073741824,Os.charInsertWholeLine))}return o}layout(){return Math.max(5,this._decorationsLeft)}}class As extends Es{constructor(e,t,i,n,s,o){super(e,t,i,n,s),this._originalModel=n.getModel(),this._renderIndicators=o,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const e=super.getViewZones();return this._finalize(e),e}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const e=document.createElement("div");return e.className="inline-added-margin-view-zone",e}_produceOriginalFromDiff(e,t,i){const n=document.createElement("div");return n.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i,domNode:document.createElement("div"),marginDomNode:n}}_produceModifiedFromDiff(e,t,i){const n=document.createElement("div");n.className="view-lines line-delete "+_s["a"];const s=document.createElement("div");s.className="inline-deleted-margin-view-zone";const o={shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:0,domNode:n,marginDomNode:s,diff:{originalStartLineNumber:e.originalStartLineNumber,originalEndLineNumber:e.originalEndLineNumber,modifiedStartLineNumber:e.modifiedStartLineNumber,modifiedEndLineNumber:e.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let r=e.originalStartLineNumber;r<=e.originalEndLineNumber;r++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(r),null);return this._pendingLineChange.push(e),this._pendingViewZones.push(o),o}_finalize(e){const t=this._modifiedEditor.getOptions(),i=this._modifiedEditor.getModel().getOptions().tabSize,n=t.get(38),s=t.get(26),o=n.typicalHalfwidthCharacterWidth,r=t.get(88),a=this._originalModel.mightContainNonBasicASCII(),l=this._originalModel.mightContainRTL(),h=t.get(53),c=t.get(124),d=c.decorationsWidth,u=t.get(100),g=t.get(83),p=t.get(77),m=t.get(39),f=this._lineBreaksComputer.finalize();let _=0;for(let b=0;b<this._pendingLineChange.length;b++){const t=this._pendingLineChange[b],c=this._pendingViewZones[b],v=c.domNode;Fn["a"].applyFontInfoSlow(v,n);const C=c.marginDomNode;Fn["a"].applyFontInfoSlow(C,n);const w=[];if(t.charChanges)for(const e of t.charChanges)Ps(e)&&w.push(new Kt["a"](new z["a"](e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn),"char-delete",0));const S=w.length>0,y=Object(ss["a"])(1e4);let D=0,L=0,x=null;for(let o=t.originalStartLineNumber;o<=t.originalEndLineNumber;o++){const r=o-t.originalStartLineNumber,b=this._originalModel.getLineTokens(o),v=b.getLineContent(),k=f[_++],E=as["a"].filter(w,o,1,v.length+1);if(k){let t=0;for(const e of k.breakOffsets){const o=b.sliceAndInflate(t,e,0),r=v.substring(t,e);D=Math.max(D,this._renderOriginalLine(L++,r,o,as["a"].extractWrapped(E,t,e),S,a,l,n,s,h,d,u,g,p,m,i,y,C)),t=e}x||(x=[]);while(x.length<r)x[x.length]=1;x[r]=k.breakOffsets.length,c.heightInLines+=k.breakOffsets.length-1;const f=document.createElement("div");f.className="line-delete",e.original.push({afterLineNumber:o,afterColumn:0,heightInLines:k.breakOffsets.length-1,domNode:Bs(),marginDomNode:f})}else D=Math.max(D,this._renderOriginalLine(L++,v,b,E,S,a,l,n,s,h,d,u,g,p,m,i,y,C))}D+=r;const k=y.build(),E=Ds?Ds.createHTML(k):k;if(v.innerHTML=E,c.minWidthInPx=D*o,x){const e=t.originalEndLineNumber-t.originalStartLineNumber;while(x.length<=e)x[x.length]=1}c.diff.viewLineCounts=x}e.original.sort((e,t)=>e.afterLineNumber-t.afterLineNumber)}_renderOriginalLine(e,t,i,n,s,o,r,a,l,h,c,d,u,g,p,m,f,_){f.appendASCIIString('<div class="view-line'),s||f.appendASCIIString(" char-delete"),f.appendASCIIString('" style="top:'),f.appendASCIIString(String(e*h)),f.appendASCIIString('px;width:1000000px;">');const b=Kt["e"].isBasicASCII(t,o),v=Kt["e"].containsRTL(t,b,r),C=Object(Ut["d"])(new Ut["c"](a.isMonospace&&!l,a.canUseHalfwidthRightwardsArrow,t,!1,b,v,0,i,n,m,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,d,u,g,p!==P["e"].OFF,null),f);if(f.appendASCIIString("</div>"),this._renderIndicators){const t=document.createElement("div");t.className="delete-sign "+Kn["d"].asClassName(ys),t.setAttribute("style",`position:absolute;top:${e*h}px;width:${c}px;height:${h}px;right:0;`),_.appendChild(t)}const w=C.characterMapping.getAbsoluteOffsets();return w.length>0?w[w.length-1]:0}}function Rs(e,t){return Object(P["n"])(e,t,["off","on","inherit"])}function Fs(e){return e.modifiedEndLineNumber>0}function Ps(e){return e.originalEndLineNumber>0}function Bs(){const e=document.createElement("div");return e.className="diagonal-fill",e}function Ws(e,t,i,n){const s=e.getLineCount();return i=Math.min(s,Math.max(1,i)),n=Math.min(s,Math.max(1,n)),t.coordinatesConverter.convertModelRangeToViewRange(new z["a"](i,e.getLineMinColumn(i),n,e.getLineMaxColumn(n)))}Object(Kn["f"])((e,t)=>{const i=e.getColor(Un["m"]);i&&(t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ${i}; }`),t.addRule(`.monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ${i}; }`),t.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${i}; }`));const n=e.getColor(Un["o"]);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}; }`));const s=e.getColor(Un["n"]);s&&t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${"hc"===e.type?"dashed":"solid"} ${s}; }`);const o=e.getColor(Un["p"]);o&&t.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${"hc"===e.type?"dashed":"solid"} ${o}; }`);const r=e.getColor(Un["Yb"]);r&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${r}; }`);const a=e.getColor(Un["k"]);a&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${a}; }`);const l=e.getColor(Un["ac"]);l&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport {\n\t\t\t\tbackground: ${l};\n\t\t\t}\n\t\t`);const h=e.getColor(Un["bc"]);h&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:hover {\n\t\t\t\tbackground: ${h};\n\t\t\t}\n\t\t`);const c=e.getColor(Un["Zb"]);c&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:active {\n\t\t\t\tbackground: ${c};\n\t\t\t}\n\t\t`);const d=e.getColor(Un["l"]);t.addRule(`\n\t.monaco-editor .diagonal-fill {\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t${d} 12.5%,\n\t\t\t#0000 12.5%, #0000 50%,\n\t\t\t${d} 50%, ${d} 62.5%,\n\t\t\t#0000 62.5%, #0000 100%\n\t\t);\n\t\tbackground-size: 8px 8px;\n\t}\n\t`)});var Vs=i("f58f");const js=Object(Dt["c"])("themeService");var Hs=i("7e32"),zs=i("6dec"),Us=i("4779"),Ks=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},$s=function(e,t){return function(i,n){t(i,n,e)}};let qs=0,Gs=!1;function Ys(){Gs||(Gs=!0,Tn["b"](document.body))}let Zs=class extends Mn["a"]{constructor(e,t,i,n,s,o,r,a,l,h){const c=Object.assign({},t);c.ariaLabel=c.ariaLabel||on.editorViewAccessibleLabel,c.ariaLabel=c.ariaLabel+";"+on.accessibilityHelpMessage,super(e,c,{},i,n,s,o,a,l,h),this._standaloneKeybindingService=r instanceof Cn?r:null,Ys()}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;let n="DYNAMIC_"+ ++qs,s=zn["a"].deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,s),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if("string"!==typeof e.id||"string"!==typeof e.label||"function"!==typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),de["a"].None;const t=e.id,i=e.label,n=zn["a"].and(zn["a"].equals("editorId",this.getId()),zn["a"].deserialize(e.precondition)),s=e.keybindings,o=zn["a"].and(n,zn["a"].deserialize(e.keybindingContext)),r=e.contextMenuGroupId||null,a=e.contextMenuOrder||0,l=(t,...i)=>Promise.resolve(e.run(this,...i)),h=new de["b"],c=this.getId()+":"+t;if(h.add(ie["a"].registerCommand(c,l)),r){let e={command:{id:c,title:i},when:n,group:r,order:a};h.add(Hs["d"].appendMenuItem(Hs["b"].EditorContext,e))}if(Array.isArray(s))for(const u of s)h.add(this._standaloneKeybindingService.addDynamicKeybinding(c,u,l,o));let d=new Vs["a"](c,i,i,n,l,this._contextKeyService);return this._actions[t]=d,h.add(Object(de["h"])(()=>{delete this._actions[t]})),h}};Zs=Ks([$s(2,Dt["a"]),$s(3,Y["a"]),$s(4,ie["b"]),$s(5,zn["b"]),$s(6,zs["a"]),$s(7,Kn["b"]),$s(8,ln["a"]),$s(9,Us["b"])],Zs);let Xs=class extends Zs{constructor(e,t,i,n,s,o,r,a,l,h,c,d,u,g,p){const m=Object.assign({},t);kn(d,m,!1);const f=h.registerEditorContainer(e);"string"===typeof m.theme&&h.setTheme(m.theme),"undefined"!==typeof m.autoDetectHighContrast&&h.setAutoDetectHighContrast(Boolean(m.autoDetectHighContrast));let _,b=m.model;if(delete m.model,super(e,m,n,s,o,r,a,h,c,u),this._contextViewService=l,this._configurationService=d,this._standaloneThemeService=h,this._register(i),this._register(f),"undefined"===typeof b?(_=Js(g,p,m.value||"",m.language||"text/plain",void 0),this._ownsModel=!0):(_=b,this._ownsModel=!1),this._attachModel(_),_){let e={oldModelUrl:null,newModelUrl:_.uri};this._onDidChangeModel.fire(e)}}dispose(){super.dispose()}updateOptions(e){kn(this._configurationService,e,!1),"string"===typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),"undefined"!==typeof e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_attachModel(e){super._attachModel(e),this._modelData&&this._contextViewService.setContainer(this._modelData.view.domNode.domNode)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};Xs=Ks([$s(3,Dt["a"]),$s(4,Y["a"]),$s(5,ie["b"]),$s(6,zn["b"]),$s(7,zs["a"]),$s(8,hs["b"]),$s(9,js),$s(10,ln["a"]),$s(11,Ti["a"]),$s(12,Us["b"]),$s(13,yt["a"]),$s(14,we["a"])],Xs);let Qs=class extends Ls{constructor(e,t,i,n,s,o,r,a,l,h,c,d,u,g,p){const m=Object.assign({},t);kn(d,m,!0);const f=h.registerEditorContainer(e);"string"===typeof m.theme&&h.setTheme(m.theme),"undefined"!==typeof m.autoDetectHighContrast&&h.setAutoDetectHighContrast(Boolean(m.autoDetectHighContrast)),super(e,m,{},p,a,s,n,l,h,c,u,g),this._contextViewService=r,this._configurationService=d,this._standaloneThemeService=h,this._register(i),this._register(f),this._contextViewService.setContainer(this._containerDomElement)}dispose(){super.dispose()}updateOptions(e){kn(this._configurationService,e,!0),"string"===typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),"undefined"!==typeof e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(Zs,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};function Js(e,t,i,n,s){if(i=i||"",!n){const n=i.indexOf("\n");let o=i;return-1!==n&&(o=i.substring(0,n)),eo(e,i,t.createByFilepathOrFirstLine(s||null,o),s)}return eo(e,i,t.create(n),s)}function eo(e,t,i,n){return e.createModel(t,i,n)}Qs=Ks([$s(3,Dt["a"]),$s(4,zn["b"]),$s(5,zs["a"]),$s(6,hs["b"]),$s(7,Ce["a"]),$s(8,Y["a"]),$s(9,js),$s(10,ln["a"]),$s(11,Ti["a"]),$s(12,hs["a"]),$s(13,ps),$s(14,us["a"])],Qs);class to{constructor(e){this._languageIdentifier=e}getId(){return this._languageIdentifier.language}}var io=i("32b8"),no=i("9768");const so="text/plain",oo="application/unknown";let ro=[],ao=[],lo=[];function ho(e,t=!1){const i=co(e);ro.push(i),i.userConfigured?lo.push(i):ao.push(i),t&&!i.userConfigured&&ro.forEach(e=>{e.mime===i.mime||e.userConfigured||(i.extension&&e.extension===i.extension&&console.warn(`Overwriting extension <<${i.extension}>> to now point to mime <<${i.mime}>>`),i.filename&&e.filename===i.filename&&console.warn(`Overwriting filename <<${i.filename}>> to now point to mime <<${i.mime}>>`),i.filepattern&&e.filepattern===i.filepattern&&console.warn(`Overwriting filepattern <<${i.filepattern}>> to now point to mime <<${i.mime}>>`),i.firstline&&e.firstline===i.firstline&&console.warn(`Overwriting firstline <<${i.firstline}>> to now point to mime <<${i.mime}>>`))})}function co(e){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:e.userConfigured,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?e.filepattern.toLowerCase():void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(io["e"].sep)>=0}}function uo(e,t){let i;if(e)switch(e.scheme){case ee["c"].file:i=e.fsPath;break;case ee["c"].data:const t=te["a"].parseMetaData(e);i=t.get(te["a"].META_DATA_LABEL);break;default:i=e.path}if(!i)return[oo];i=i.toLowerCase();const n=Object(io["a"])(i),s=go(i,n,lo);if(s)return[s,so];const o=go(i,n,ao);if(o)return[o,so];if(t){const e=po(t);if(e)return[e,so]}return[oo]}function go(e,t,i){let n=null,s=null,o=null;for(let r=i.length-1;r>=0;r--){const a=i[r];if(t===a.filenameLowercase){n=a;break}if(a.filepattern&&(!s||a.filepattern.length>s.filepattern.length)){const i=a.filepatternOnPath?e:t;Object(no["a"])(a.filepatternLowercase,i)&&(s=a)}a.extension&&(!o||a.extension.length>o.extension.length)&&t.endsWith(a.extensionLowercase)&&(o=a)}return n?n.mime:s?s.mime:o?o.mime:null}function po(e){if(Object(Ge["S"])(e)&&(e=e.substr(1)),e.length>0)for(let t=ro.length-1;t>=0;t--){const i=ro[t];if(!i.firstline)continue;const n=e.match(i.firstline);if(n&&n.length>0)return i.mime}return null}var mo=i("32a4"),fo=i("89cd");const _o=Object.prototype.hasOwnProperty;class bo extends de["a"]{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new W["a"]),this.onDidChange=this._onDidChange.event,this._warnOnOverwrite=t,this._nextLanguageId2=1,this._languageIdToLanguage=[],this._languageToLanguageId=Object.create(null),this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(mo["a"].onDidChangeLanguages(e=>this._initializeFromRegistry())))}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={};const e=mo["a"].getLanguages();this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(e=>{let t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach(e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier}),t.mimetypes.forEach(e=>{this._mimeTypesMap[e]=t.identifier})}),fo["a"].as(Mi["a"].Configuration).registerOverrideIdentifiers(mo["a"].getLanguages().map(e=>e.id)),this._onDidChange.fire()}_getLanguageId(e){if(this._languageToLanguageId[e])return this._languageToLanguageId[e];const t=this._nextLanguageId2++;return this._languageIdToLanguage[t]=e,this._languageToLanguageId[e]=t,t}_registerLanguage(e){const t=e.id;let i;if(_o.call(this._languages,t))i=this._languages[t];else{const e=this._getLanguageId(t);i={identifier:new be["r"](t,e),name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[]},this._languages[t]=i}this._mergeLanguage(i,e)}_mergeLanguage(e,t){const i=t.id;let n=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),n=t.mimetypes[0]),n||(n="text/x-"+i,e.mimetypes.push(n)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(let e of t.extensions)ho({id:i,mime:n,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(let a of t.filenames)ho({id:i,mime:n,filename:a},this._warnOnOverwrite),e.filenames.push(a);if(Array.isArray(t.filenamePatterns))for(let a of t.filenamePatterns)ho({id:i,mime:n,filepattern:a},this._warnOnOverwrite);if("string"===typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{let t=new RegExp(e);Ge["N"](t)||ho({id:i,mime:n,firstline:t},this._warnOnOverwrite)}catch(r){Object(De["e"])(r)}}e.aliases.push(i);let s=null;if("undefined"!==typeof t.aliases&&Array.isArray(t.aliases)&&(s=0===t.aliases.length?[null]:t.aliases),null!==s)for(const a of s)a&&0!==a.length&&e.aliases.push(a);let o=null!==s&&s.length>0;if(o&&null===s[0]);else{let t=(o?s[0]:null)||i;!o&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration)}isRegisteredMode(e){return!!_o.call(this._mimeTypesMap,e)||_o.call(this._languages,e)}getModeIdForLanguageNameLowercase(e){return _o.call(this._lowercaseNameMap,e)?this._lowercaseNameMap[e].language:null}extractModeIds(e){return e?e.split(",").map(e=>e.trim()).map(e=>_o.call(this._mimeTypesMap,e)?this._mimeTypesMap[e].language:e).filter(e=>_o.call(this._languages,e)):[]}getLanguageIdentifier(e){if(e===ve["b"]||0===e)return ve["a"];let t;if("string"===typeof e)t=e;else if(t=this._languageIdToLanguage[e],!t)return null;return _o.call(this._languages,t)?this._languages[t].identifier:null}getModeIdsFromFilepathOrFirstLine(e,t){if(!e&&!t)return[];let i=uo(e,t);return this.extractModeIds(i.join(","))}}class vo extends de["a"]{constructor(e,t){super(),this._onDidChange=this._register(new W["a"]),this.onDidChange=this._onDidChange.event,this._selector=t,this.languageIdentifier=this._selector(),this._register(e(()=>this._evaluate()))}_evaluate(){let e=this._selector();e.id!==this.languageIdentifier.id&&(this.languageIdentifier=e,this._onDidChange.fire(this.languageIdentifier))}}class Co extends de["a"]{constructor(e=!1){super(),this._onDidCreateMode=this._register(new W["a"]),this.onDidCreateMode=this._onDidCreateMode.event,this._onLanguagesMaybeChanged=this._register(new W["a"]),this.onLanguagesMaybeChanged=this._onLanguagesMaybeChanged.event,this._instantiatedModes={},this._registry=this._register(new bo(!0,e)),this._register(this._registry.onDidChange(()=>this._onLanguagesMaybeChanged.fire()))}isRegisteredMode(e){return this._registry.isRegisteredMode(e)}getModeIdForLanguageName(e){return this._registry.getModeIdForLanguageNameLowercase(e)}getModeIdByFilepathOrFirstLine(e,t){const i=this._registry.getModeIdsFromFilepathOrFirstLine(e,t);return Object(We["i"])(i,null)}getModeId(e){const t=this._registry.extractModeIds(e);return Object(We["i"])(t,null)}getLanguageIdentifier(e){return this._registry.getLanguageIdentifier(e)}create(e){return new vo(this.onLanguagesMaybeChanged,()=>{const t=this.getModeId(e);return this._createModeAndGetLanguageIdentifier(t)})}createByFilepathOrFirstLine(e,t){return new vo(this.onLanguagesMaybeChanged,()=>{const i=this.getModeIdByFilepathOrFirstLine(e,t);return this._createModeAndGetLanguageIdentifier(i)})}_createModeAndGetLanguageIdentifier(e){const t=this.getLanguageIdentifier(e||"plaintext")||ve["a"];return this._getOrCreateMode(t.language),t}triggerMode(e){const t=this.getModeId(e);this._getOrCreateMode(t||"plaintext")}_getOrCreateMode(e){if(!this._instantiatedModes.hasOwnProperty(e)){let t=this.getLanguageIdentifier(e)||ve["a"];this._instantiatedModes[e]=new to(t),this._onDidCreateMode.fire(this._instantiatedModes[e])}return this._instantiatedModes[e]}}const wo=Object(Dt["c"])("undoRedoService");class So{constructor(e,t){this.resource=e,this.elements=t}}class yo{constructor(){this.id=yo._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}yo._ID=0,yo.None=new yo;class Do{constructor(){this.id=Do._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}Do._ID=0,Do.None=new Do;var Lo=i("a054"),xo=i("4111");class ko{constructor(e,t,i){this._legend=e,this._themeService=t,this._logService=i,this._hashTable=new Oo,this._hasWarnedOverlappingTokens=!1}getMetadata(e,t,i){const n=this._hashTable.get(e,t,i.id);let s;if(n)s=n.metadata,this._logService.getLevel()===kt["c"].Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${be["z"].getForeground(s)}, fontStyle ${be["z"].getFontStyle(s).toString(2)}`);else{let n=this._legend.tokenTypes[e];const o=[];if(n){let e=t;for(let t=0;e>0&&t<this._legend.tokenModifiers.length;t++)1&e&&o.push(this._legend.tokenModifiers[t]),e>>=1;e>0&&this._logService.getLevel()===kt["c"].Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),o.push("not-in-legend"));const r=this._themeService.getColorTheme().getTokenStyleMetadata(n,o,i.language);if("undefined"===typeof r)s=2147483647;else{if(s=0,"undefined"!==typeof r.italic){const e=(r.italic?1:0)<<11;s|=1|e}if("undefined"!==typeof r.bold){const e=(r.bold?2:0)<<11;s|=2|e}if("undefined"!==typeof r.underline){const e=(r.underline?4:0)<<11;s|=4|e}if(r.foreground){const e=r.foreground<<14;s|=8|e}0===s&&(s=2147483647)}}else this._logService.getLevel()===kt["c"].Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),s=2147483647,n="not-in-legend";this._hashTable.add(e,t,i.id,s),this._logService.getLevel()===kt["c"].Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${n}) / ${t} (${o.join(" ")}): foreground ${be["z"].getForeground(s)}, fontStyle ${be["z"].getFontStyle(s).toString(2)}`)}return s}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}}function Eo(e,t,i){const n=e.data,s=e.data.length/5|0,o=Math.max(Math.ceil(s/1024),400),r=[];let a=0,l=1,h=0;while(a<s){const e=a;let c=Math.min(e+o,s);if(c<s){let t=c;while(t-1>e&&0===n[5*t])t--;if(t-1===e){let e=c;while(e+1<s&&0===n[5*e])e++;c=e}else c=t}let d=new Uint32Array(4*(c-e)),u=0,g=0,p=0,m=0,f=0;while(a<c){const e=5*a,s=n[e],o=n[e+1],r=l+s,c=0===s?h+o:o,_=n[e+2],b=n[e+3],v=n[e+4],C=t.getMetadata(b,v,i);2147483647!==C&&(0===g&&(g=r),p===r&&f>c&&(t.warnOverlappingSemanticTokens(r,c+1),m<c?d[u-4+2]=c:u-=4),d[u]=r-g,d[u+1]=c,d[u+2]=c+_,d[u+3]=C,u+=4,p=r,m=c,f=c+_),l=r,h=c,a++}u!==d.length&&(d=d.subarray(0,u));const _=new xo["a"](g,new xo["c"](d));r.push(_)}return r}class No{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}class Oo{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=Oo._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<Oo._SIZES.length?2/3*this._currentLength:0),this._elements=[],Oo._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(e,t){for(let i=0;i<t;i++)e[i]=null}_hash2(e,t){return(e<<5)-e+t|0}_hashFunc(e,t,i){return this._hash2(this._hash2(e,t),i)%this._currentLength}get(e,t,i){const n=this._hashFunc(e,t,i);let s=this._elements[n];while(s){if(s.tokenTypeIndex===e&&s.tokenModifierSet===t&&s.languageId===i)return s;s=s.next}return null}add(e,t,i,n){if(this._elementsCount++,0!==this._growCount&&this._elementsCount>=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=Oo._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<Oo._SIZES.length?2/3*this._currentLength:0),this._elements=[],Oo._nullOutEntries(this._elements,this._currentLength);for(const t of e){let e=t;while(e){const t=e.next;e.next=null,this._add(e),e=t}}}this._add(new No(e,t,i,n))}_add(e){const t=this._hashFunc(e.tokenTypeIndex,e.tokenModifierSet,e.languageId);e.next=this._elements[t],this._elements[t]=e}}Oo._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143];var Io=i("1e93");function To(e){for(let t=0,i=e.length;t<i;t+=4){const i=e[t+0],n=e[t+1],s=e[t+2],o=e[t+3];e[t+0]=o,e[t+1]=s,e[t+2]=n,e[t+3]=i}}function Mo(e){const t=new Uint8Array(e.buffer,e.byteOffset,4*e.length);return Le["e"]()||To(t),Io["a"].wrap(t)}function Ao(e){const t=new Uint32Array(Ro(e));let i=0;if(t[i++]=e.id,"full"===e.type)t[i++]=1,t[i++]=e.data.length,t.set(e.data,i),i+=e.data.length;else{t[i++]=2,t[i++]=e.deltas.length;for(const n of e.deltas)t[i++]=n.start,t[i++]=n.deleteCount,n.data?(t[i++]=n.data.length,t.set(n.data,i),i+=n.data.length):t[i++]=0}return Mo(t)}function Ro(e){let t=0;if(t+=2,"full"===e.type)t+=1+e.data.length;else{t+=1,t+=3*e.deltas.length;for(const i of e.deltas)i.data&&(t+=i.data.length)}return t}var Fo=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function Po(e){return e&&!!e.data}function Bo(e){return e&&Array.isArray(e.edits)}function Wo(e,t,i){const n=Vo(e);return n?{provider:n,request:Promise.resolve(n.provideDocumentSemanticTokens(e,t,i))}:null}function Vo(e){const t=be["k"].ordered(e);return t.length>0?t[0]:null}function jo(e){const t=be["j"].ordered(e);return t.length>0?t[0]:null}ie["a"].registerCommand("_provideDocumentSemanticTokensLegend",(e,...t)=>Fo(void 0,void 0,void 0,(function*(){const[i]=t;Object(xe["a"])(i instanceof j["a"]);const n=e.get(yt["a"]).getModel(i);if(!n)return;const s=Vo(n);return s?s.getLegend():e.get(ie["b"]).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)}))),ie["a"].registerCommand("_provideDocumentSemanticTokens",(e,...t)=>Fo(void 0,void 0,void 0,(function*(){const[i]=t;Object(xe["a"])(i instanceof j["a"]);const n=e.get(yt["a"]).getModel(i);if(!n)return;const s=Wo(n,null,B["a"].None);if(!s)return e.get(ie["b"]).executeCommand("_provideDocumentRangeSemanticTokens",i,n.getFullModelRange());const{provider:o,request:r}=s;let a;try{a=yield r}catch(h){return void Object(De["f"])(h)}if(!a||!Po(a))return;const l=Ao({id:0,type:"full",data:a.data});return a.resultId&&o.releaseDocumentSemanticTokens(a.resultId),l}))),ie["a"].registerCommand("_provideDocumentRangeSemanticTokensLegend",(e,...t)=>Fo(void 0,void 0,void 0,(function*(){const[i]=t;Object(xe["a"])(i instanceof j["a"]);const n=e.get(yt["a"]).getModel(i);if(!n)return;const s=jo(n);return s?s.getLegend():void 0}))),ie["a"].registerCommand("_provideDocumentRangeSemanticTokens",(e,...t)=>Fo(void 0,void 0,void 0,(function*(){const[i,n]=t;Object(xe["a"])(i instanceof j["a"]),Object(xe["a"])(z["a"].isIRange(n));const s=e.get(yt["a"]).getModel(i);if(!s)return;const o=jo(s);if(!o)return;let r;try{r=yield o.provideDocumentRangeSemanticTokens(s,z["a"].lift(n),B["a"].None)}catch(a){return void Object(De["f"])(a)}return r&&Po(r)?Ao({id:0,type:"full",data:r.data}):void 0})));var Ho=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},zo=function(e,t){return function(i,n){t(i,n,e)}};function Uo(e){return e.toString()}function Ko(e){const t=new je["a"],i=e.createSnapshot();let n;while(n=i.read())t.update(n);return t.digest()}class $o{constructor(e,t,i){this._modelEventListeners=new de["b"],this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(t=>i(e,t)))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null),this._languageSelection&&(this._languageSelection.dispose(),this._languageSelection=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(e){this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange(()=>this.model.setMode(e.languageIdentifier)),this.model.setMode(e.languageIdentifier)}}const qo=Le["d"]||Le["f"]?1:2;class Go{constructor(e,t,i,n,s,o,r,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=s,this.sha1=o,this.versionId=r,this.alternativeVersionId=a}}function Yo(e){return e.scheme===ee["c"].file||e.scheme===ee["c"].vscodeRemote||e.scheme===ee["c"].userData||"fake-fs"===e.scheme}let Zo=class e extends de["a"]{constructor(e,t,i,n,s){super(),this._configurationService=e,this._resourcePropertiesService=t,this._themeService=i,this._logService=n,this._undoRedoService=s,this._onModelAdded=this._register(new W["a"]),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new W["a"]),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new W["a"]),this.onModelModeChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new er(this._themeService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration(()=>this._updateModelOptions())),this._updateModelOptions(),this._register(new Jo(this,this._themeService,this._configurationService,this._semanticStyling))}static _readModelOptions(e,t){let i=P["d"].tabSize;if(e.editor&&"undefined"!==typeof e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(i=t),i<1&&(i=1)}let n=i;if(e.editor&&"undefined"!==typeof e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let s=P["d"].insertSpaces;e.editor&&"undefined"!==typeof e.editor.insertSpaces&&(s="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let o=qo;const r=e.eol;"\r\n"===r?o=2:"\n"===r&&(o=1);let a=P["d"].trimAutoWhitespace;e.editor&&"undefined"!==typeof e.editor.trimAutoWhitespace&&(a="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let l=P["d"].detectIndentation;e.editor&&"undefined"!==typeof e.editor.detectIndentation&&(l="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let h=P["d"].largeFileOptimizations;return e.editor&&"undefined"!==typeof e.editor.largeFileOptimizations&&(h="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations)),{isForSimpleWidget:t,tabSize:i,indentSize:n,insertSpaces:s,detectIndentation:l,defaultEOL:o,trimAutoWhitespace:a,largeFileOptimizations:h}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&"auto"!==i?i:3===Le["a"]||2===Le["a"]?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!==typeof e||e}getCreationOptions(t,i,n){let s=this._modelCreationOptionsByLanguageAndResource[t+i];if(!s){const o=this._configurationService.getValue("editor",{overrideIdentifier:t,resource:i}),r=this._getEOL(i,t);s=e._readModelOptions({editor:o,eol:r},n),this._modelCreationOptionsByLanguageAndResource[t+i]=s}return s}_updateModelOptions(){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let n=0,s=i.length;n<s;n++){const s=i[n],o=this._models[s],r=o.model.getLanguageIdentifier().language,a=o.model.uri,l=t[r+a],h=this.getCreationOptions(r,a,o.model.isForSimpleWidget);e._setModelOptionsForModel(o.model,h,l)}}static _setModelOptionsForModel(e,t,i){i&&i.defaultEOL!==t.defaultEOL&&1===e.getLineCount()&&e.setEOL(1===t.defaultEOL?0:1),i&&i.detectIndentation===t.detectIndentation&&i.insertSpaces===t.insertSpaces&&i.tabSize===t.tabSize&&i.indentSize===t.indentSize&&i.trimAutoWhitespace===t.trimAutoWhitespace||(t.detectIndentation?(e.detectIndentation(t.insertSpaces,t.tabSize),e.updateOptions({trimAutoWhitespace:t.trimAutoWhitespace})):e.updateOptions({insertSpaces:t.insertSpaces,tabSize:t.tabSize,indentSize:t.indentSize,trimAutoWhitespace:t.trimAutoWhitespace}))}_insertDisposedModel(e){this._disposedModels.set(Uo(e.uri),e),this._disposedModelsHeapSize+=e.heapSize}_removeDisposedModel(e){const t=this._disposedModels.get(Uo(e));return t&&(this._disposedModelsHeapSize-=t.heapSize),this._disposedModels.delete(Uo(e)),t}_ensureDisposedModelsHeapSize(e){if(this._disposedModelsHeapSize>e){const t=[];this._disposedModels.forEach(e=>{e.sharesUndoRedoStack||t.push(e)}),t.sort((e,t)=>e.time-t.time);while(t.length>0&&this._disposedModelsHeapSize>e){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const s=this.getCreationOptions(t.language,i,n),o=new os["b"](e,s,t,i,this._undoRedoService);if(i&&this._disposedModels.has(Uo(i))){const e=this._removeDisposedModel(i),t=this._undoRedoService.getElements(i),n=Ko(o)===e.sha1;if(n||e.sharesUndoRedoStack){for(const e of t.past)Object(Lo["b"])(e)&&e.matchesResource(i)&&e.setModel(o);for(const e of t.future)Object(Lo["b"])(e)&&e.matchesResource(i)&&e.setModel(o);this._undoRedoService.setElementsValidFlag(i,!0,e=>Object(Lo["b"])(e)&&e.matchesResource(i)),n&&(o._overwriteVersionId(e.versionId),o._overwriteAlternativeVersionId(e.alternativeVersionId),o._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const r=Uo(o.uri);if(this._models[r])throw new Error("ModelService: Cannot add model because it already exists!");const a=new $o(o,e=>this._onWillDispose(e),(e,t)=>this._onDidChangeLanguage(e,t));return this._models[r]=a,a}createModel(e,t,i,n=!1){let s;return t?(s=this._createModelData(e,t.languageIdentifier,i,n),this.setMode(s.model,t)):s=this._createModelData(e,mo["b"],i,n),this._onModelAdded.fire(s.model),s.model}setMode(e,t){if(!t)return;const i=this._models[Uo(e.uri)];i&&i.setLanguage(t)}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i<n;i++){const n=t[i];e.push(this._models[n].model)}return e}getModel(e){const t=Uo(e),i=this._models[t];return i?i.model:null}getSemanticTokensProviderStyling(e){return this._semanticStyling.get(e)}_onWillDispose(t){const i=Uo(t.uri),n=this._models[i],s=this._undoRedoService.getUriComparisonKey(t.uri)!==t.uri.toString();let o=!1,r=0;if(s||this._shouldRestoreUndoStack()&&Yo(t.uri)){const e=this._undoRedoService.getElements(t.uri);if(e.past.length>0||e.future.length>0){for(const i of e.past)Object(Lo["b"])(i)&&i.matchesResource(t.uri)&&(o=!0,r+=i.heapSize(t.uri),i.setModel(t.uri));for(const i of e.future)Object(Lo["b"])(i)&&i.matchesResource(t.uri)&&(o=!0,r+=i.heapSize(t.uri),i.setModel(t.uri))}}const a=e.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(o)if(!s&&r>a){const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else this._ensureDisposedModelsHeapSize(a-r),this._undoRedoService.setElementsValidFlag(t.uri,!1,e=>Object(Lo["b"])(e)&&e.matchesResource(t.uri)),this._insertDisposedModel(new Go(t.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),s,r,Ko(t),t.getVersionId(),t.getAlternativeVersionId()));else if(!s){const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[i],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[t.getLanguageIdentifier().language+t.uri],this._onModelRemoved.fire(t)}_onDidChangeLanguage(t,i){const n=i.oldLanguage,s=t.getLanguageIdentifier().language,o=this.getCreationOptions(n,t.uri,t.isForSimpleWidget),r=this.getCreationOptions(s,t.uri,t.isForSimpleWidget);e._setModelOptionsForModel(t,r,o),this._onModelModeChanged.fire({model:t,oldModeId:n})}};Zo.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520,Zo=Ho([zo(0,Ti["a"]),zo(1,xt),zo(2,Kn["b"]),zo(3,kt["b"]),zo(4,wo)],Zo);const Xo="editor.semanticHighlighting";function Qo(e,t,i){var n;const s=null===(n=i.getValue(Xo,{overrideIdentifier:e.getLanguageIdentifier().language,resource:e.uri}))||void 0===n?void 0:n.enabled;return"boolean"===typeof s?s:t.getColorTheme().semanticHighlighting}class Jo extends de["a"]{constructor(e,t,i,n){super(),this._watchers=Object.create(null),this._semanticStyling=n;const s=e=>{this._watchers[e.uri.toString()]=new ir(e,t,this._semanticStyling)},o=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},r=()=>{for(let n of e.getModels()){const e=this._watchers[n.uri.toString()];Qo(n,t,i)?e||s(n):e&&o(n,e)}};this._register(e.onModelAdded(e=>{Qo(e,t,i)&&s(e)})),this._register(e.onModelRemoved(e=>{const t=this._watchers[e.uri.toString()];t&&o(e,t)})),this._register(i.onDidChangeConfiguration(e=>{e.affectsConfiguration(Xo)&&r()})),this._register(t.onDidColorThemeChange(r))}}class er extends de["a"]{constructor(e,t){super(),this._themeService=e,this._logService=t,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}get(e){return this._caches.has(e)||this._caches.set(e,new ko(e.getLegend(),this._themeService,this._logService)),this._caches.get(e)}}class tr{constructor(e,t,i){this._provider=e,this.resultId=t,this.data=i}dispose(){this._provider.releaseDocumentSemanticTokens(this.resultId)}}class ir extends de["a"]{constructor(e,t,i){super(),this._isDisposed=!1,this._model=e,this._semanticStyling=i,this._fetchDocumentSemanticTokens=this._register(new ye["e"](()=>this._fetchDocumentSemanticTokensNow(),ir.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule()}));const n=()=>{Object(de["f"])(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const t of be["k"].all(e))"function"===typeof t.onDidChange&&this._documentProvidersChangeListeners.push(t.onDidChange(()=>this._fetchDocumentSemanticTokens.schedule(0)))};n(),this._register(be["k"].onDidChange(()=>{n(),this._fetchDocumentSemanticTokens.schedule()})),this._register(t.onDidColorThemeChange(e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule()})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;const e=new B["b"],t=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,i=Wo(this._model,t,e.token);if(!i)return void(this._currentDocumentResponse&&this._model.setSemanticTokens(null,!1));const{provider:n,request:s}=i;this._currentDocumentRequestCancellationTokenSource=e;const o=[],r=this._model.onDidChangeContent(e=>{o.push(e)}),a=this._semanticStyling.get(n);s.then(e=>{this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),this._setDocumentSemanticTokens(n,e||null,a,o)},e=>{const t=e&&(De["d"](e)||"string"===typeof e.message&&-1!==e.message.indexOf("busy"));t||De["e"](e),this._currentDocumentRequestCancellationTokenSource=null,r.dispose(),o.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule())})}static _copy(e,t,i,n,s){for(let o=0;o<s;o++)i[n+o]=e[t+o]}_setDocumentSemanticTokens(e,t,i,n){const s=this._currentDocumentResponse,o=()=>{n.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule()};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed)e&&t&&e.releaseDocumentSemanticTokens(t.resultId);else if(e&&i){if(!t)return this._model.setSemanticTokens(null,!0),void o();if(Bo(t)){if(!s)return void this._model.setSemanticTokens(null,!0);if(0===t.edits.length)t={resultId:t.resultId,data:s.data};else{let e=0;for(const s of t.edits)e+=(s.data?s.data.length:0)-s.deleteCount;const i=s.data,n=new Uint32Array(i.length+e);let o=i.length,r=n.length;for(let s=t.edits.length-1;s>=0;s--){const e=t.edits[s],a=o-(e.start+e.deleteCount);a>0&&(ir._copy(i,o-a,n,r-a,a),r-=a),e.data&&(ir._copy(e.data,0,n,r-e.data.length,e.data.length),r-=e.data.length),o=e.start}o>0&&ir._copy(i,0,n,0,o),t={resultId:t.resultId,data:n}}}if(Po(t)){this._currentDocumentResponse=new tr(e,t.resultId,t.data);const s=Eo(t,i,this._model.getLanguageIdentifier());if(n.length>0)for(const e of n)for(const t of s)for(const i of e.changes)t.applyEdit(i.range,i.text);this._model.setSemanticTokens(s,!0)}else this._model.setSemanticTokens(null,!0);o()}else this._model.setSemanticTokens(null,!1)}}ir.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY=300;class nr extends de["a"]{constructor(){super(),this._onCodeEditorAdd=this._register(new W["a"]),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new W["a"]),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new W["a"]),this._onDiffEditorRemove=this._register(new W["a"]),this._onDecorationTypeRegistered=this._register(new W["a"]),this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null)}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map(e=>this._codeEditors[e])}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}removeDiffEditor(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map(e=>this._diffEditors[e])}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const i of t){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}setModelProperty(e,t,i){const n=e.toString();let s;this._modelProperties.has(n)?s=this._modelProperties.get(n):(s=new Map,this._modelProperties.set(n,s)),s.set(t,i)}getModelProperty(e,t){const i=e.toString();if(this._modelProperties.has(i)){const e=this._modelProperties.get(i);return e.get(t)}}}var sr=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},or=function(e,t){return function(i,n){t(i,n,e)}};class rr{constructor(e,t,i){this._parent=e,this._editorId=t,this._styleSheet=i,this._refCount=0}ref(){this._refCount++}unref(){var e;this._refCount--,0===this._refCount&&(null===(e=this._styleSheet.parentNode)||void 0===e||e.removeChild(this._styleSheet),this._parent._removeEditorStyleSheets(this._editorId))}insertRule(e,t){const i=this._styleSheet.sheet;i.insertRule(e,t)}removeRulesContainingSelector(e){Z["L"](e,this._styleSheet)}}class ar{constructor(e){this._styleSheet=e}ref(){}unref(){}insertRule(e,t){const i=this._styleSheet.sheet;i.insertRule(e,t)}removeRulesContainingSelector(e){Z["L"](e,this._styleSheet)}}let lr=class extends nr{constructor(e,t){super(),this._decorationOptionProviders=new Map,this._editorStyleSheets=new Map,this._globalStyleSheet=e||null,this._themeService=t}_getOrCreateGlobalStyleSheet(){return this._globalStyleSheet||(this._globalStyleSheet=new ar(Z["s"]())),this._globalStyleSheet}_getOrCreateStyleSheet(e){if(!e)return this._getOrCreateGlobalStyleSheet();const t=e.getContainerDomNode();if(!Z["K"](t))return this._getOrCreateGlobalStyleSheet();const i=e.getId();if(!this._editorStyleSheets.has(i)){const e=new rr(this,i,Z["s"](t));this._editorStyleSheets.set(i,e)}return this._editorStyleSheets.get(i)}_removeEditorStyleSheets(e){this._editorStyleSheets.delete(e)}registerDecorationType(e,t,i,n){let s=this._decorationOptionProviders.get(e);if(!s){const o=this._getOrCreateStyleSheet(n),r={styleSheet:o,key:e,parentTypeKey:i,options:t||Object.create(null)};s=i?new hr(this._themeService,o,r):new cr(this._themeService,o,r),this._decorationOptionProviders.set(e,s),this._onDecorationTypeRegistered.fire(e)}s.refCount++}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach(t=>t.removeDecorations(e))))}resolveDecorationOptions(e,t){const i=this._decorationOptionProviders.get(e);if(!i)throw new Error("Unknown decoration type key: "+e);return i.getOptions(this,t)}};lr=sr([or(1,Kn["b"])],lr);class hr{constructor(e,t,i){this._styleSheet=t,this._styleSheet.ref(),this._parentTypeKey=i.parentTypeKey,this.refCount=0,this._beforeContentRules=new ur(3,i,e),this._afterContentRules=new ur(4,i,e)}getOptions(e,t){const i=e.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(i.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(i.afterContentClassName=this._afterContentRules.className),i}dispose(){this._beforeContentRules&&(this._beforeContentRules.dispose(),this._beforeContentRules=null),this._afterContentRules&&(this._afterContentRules.dispose(),this._afterContentRules=null),this._styleSheet.unref()}}class cr{constructor(e,t,i){this._disposables=new de["b"],this._styleSheet=t,this._styleSheet.ref(),this.refCount=0;const n=t=>{const n=new ur(t,i,e);if(this._disposables.add(n),n.hasContent)return n.className},s=t=>{const n=new ur(t,i,e);return this._disposables.add(n),n.hasContent?{className:n.className,hasLetterSpacing:n.hasLetterSpacing}:null};this.className=n(0);const o=s(1);o&&(this.inlineClassName=o.className,this.inlineClassNameAffectsLetterSpacing=o.hasLetterSpacing),this.beforeContentClassName=n(3),this.afterContentClassName=n(4),this.glyphMarginClassName=n(2);const r=i.options;this.isWholeLine=Boolean(r.isWholeLine),this.stickiness=r.rangeBehavior;const a=r.light&&r.light.overviewRulerColor||r.overviewRulerColor,l=r.dark&&r.dark.overviewRulerColor||r.overviewRulerColor;"undefined"===typeof a&&"undefined"===typeof l||(this.overviewRuler={color:a||l,darkColor:l||a,position:r.overviewRulerLane||_e["d"].Center})}getOptions(e,t){return t?{inlineClassName:this.inlineClassName,beforeContentClassName:this.beforeContentClassName,afterContentClassName:this.afterContentClassName,className:this.className,glyphMarginClassName:this.glyphMarginClassName,isWholeLine:this.isWholeLine,overviewRuler:this.overviewRuler,stickiness:this.stickiness}:this}dispose(){this._disposables.dispose(),this._styleSheet.unref()}}const dr={color:"color:{0} !important;",opacity:"opacity:{0};",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",fontStyle:"font-style:{0};",fontWeight:"font-weight:{0};",fontSize:"font-size:{0};",fontFamily:"font-family:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:{0} center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:{0};",margin:"margin:{0};",padding:"padding:{0};",width:"width:{0};",height:"height:{0};"};class ur{constructor(e,t,i){this._theme=i.getColorTheme(),this._ruleType=e,this._providerArgs=t,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;let n=gr.getClassName(this._providerArgs.key,e);this._providerArgs.parentTypeKey&&(n=n+" "+gr.getClassName(this._providerArgs.parentTypeKey,e)),this._className=n,this._unThemedSelector=gr.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,e),this._buildCSS(),this._usesThemeColors?this._themeListener=i.onDidColorThemeChange(e=>{this._theme=i.getColorTheme(),this._removeCSS(),this._buildCSS()}):this._themeListener=null}dispose(){this._hasContent&&(this._removeCSS(),this._hasContent=!1),this._themeListener&&(this._themeListener.dispose(),this._themeListener=null)}get hasContent(){return this._hasContent}get hasLetterSpacing(){return this._hasLetterSpacing}get className(){return this._className}_buildCSS(){const e=this._providerArgs.options;let t,i,n;switch(this._ruleType){case 0:t=this.getCSSTextForModelDecorationClassName(e),i=this.getCSSTextForModelDecorationClassName(e.light),n=this.getCSSTextForModelDecorationClassName(e.dark);break;case 1:t=this.getCSSTextForModelDecorationInlineClassName(e),i=this.getCSSTextForModelDecorationInlineClassName(e.light),n=this.getCSSTextForModelDecorationInlineClassName(e.dark);break;case 2:t=this.getCSSTextForModelDecorationGlyphMarginClassName(e),i=this.getCSSTextForModelDecorationGlyphMarginClassName(e.light),n=this.getCSSTextForModelDecorationGlyphMarginClassName(e.dark);break;case 3:t=this.getCSSTextForModelDecorationContentClassName(e.before),i=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.before),n=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.before);break;case 4:t=this.getCSSTextForModelDecorationContentClassName(e.after),i=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.after),n=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.after);break;default:throw new Error("Unknown rule type: "+this._ruleType)}const s=this._providerArgs.styleSheet;let o=!1;t.length>0&&(s.insertRule(`${this._unThemedSelector} {${t}}`,0),o=!0),i.length>0&&(s.insertRule(`.vs${this._unThemedSelector} {${i}}`,0),o=!0),n.length>0&&(s.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${n}}`,0),o=!0),this._hasContent=o}_removeCSS(){this._providerArgs.styleSheet.removeRulesContainingSelector(this._unThemedSelector)}getCSSTextForModelDecorationClassName(e){if(!e)return"";const t=[];return this.collectCSSText(e,["backgroundColor"],t),this.collectCSSText(e,["outline","outlineColor","outlineStyle","outlineWidth"],t),this.collectBorderSettingsCSSText(e,t),t.join("")}getCSSTextForModelDecorationInlineClassName(e){if(!e)return"";const t=[];return this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],t),e.letterSpacing&&(this._hasLetterSpacing=!0),t.join("")}getCSSTextForModelDecorationContentClassName(e){if(!e)return"";const t=[];if("undefined"!==typeof e){if(this.collectBorderSettingsCSSText(e,t),"undefined"!==typeof e.contentIconPath&&t.push(Ge["w"](dr.contentIconPath,Z["o"](j["a"].revive(e.contentIconPath)))),"string"===typeof e.contentText){const i=e.contentText.match(/^.*$/m)[0],n=i.replace(/['\\]/g,"\\$&");t.push(Ge["w"](dr.contentText,n))}this.collectCSSText(e,["fontStyle","fontWeight","fontSize","fontFamily","textDecoration","color","opacity","backgroundColor","margin","padding"],t),this.collectCSSText(e,["width","height"],t)&&t.push("display:inline-block;")}return t.join("")}getCSSTextForModelDecorationGlyphMarginClassName(e){if(!e)return"";const t=[];return"undefined"!==typeof e.gutterIconPath&&(t.push(Ge["w"](dr.gutterIconPath,Z["o"](j["a"].revive(e.gutterIconPath)))),"undefined"!==typeof e.gutterIconSize&&t.push(Ge["w"](dr.gutterIconSize,e.gutterIconSize))),t.join("")}collectBorderSettingsCSSText(e,t){return!!this.collectCSSText(e,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],t)&&(t.push(Ge["w"]("box-sizing: border-box;")),!0)}collectCSSText(e,t,i){const n=i.length;for(let s of t){const t=this.resolveValue(e[s]);"string"===typeof t&&i.push(Ge["w"](dr[s],t))}return i.length!==n}resolveValue(e){if(Object(fe["b"])(e)){this._usesThemeColors=!0;const t=this._theme.getColor(e.id);return t?t.toString():"transparent"}return e}}class gr{static getClassName(e,t){return"ced-"+e+"-"+t}static getSelector(e,t,i){let n=".monaco-editor ."+this.getClassName(e,i);return t&&(n=n+"."+this.getClassName(t,i)),3===i?n+="::before":4===i&&(n+="::after"),n}}var pr=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},mr=function(e,t){return function(i,n){t(i,n,e)}};let fr=class extends lr{constructor(e,t,i){super(e,i),this.onCodeEditorAdd(()=>this._checkContextKey()),this.onCodeEditorRemove(()=>this._checkContextKey()),this._editorIsOpen=t.createKey("editorIsOpen",!1)}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}getActiveCodeEditor(){return null}openCodeEditor(e,t,i){return t?Promise.resolve(this.doOpenEditor(t,e)):Promise.resolve(null)}doOpenEditor(e,t){const i=this.findModel(e,t.resource);if(!i){if(t.resource){const i=t.resource.scheme;if(i===ee["c"].http||i===ee["c"].https)return Object(Z["U"])(t.resource.toString()),e}return null}const n=t.options?t.options.selection:null;if(n)if("number"===typeof n.endLineNumber&&"number"===typeof n.endColumn)e.setSelection(n),e.revealRangeInCenter(n,1);else{const t={lineNumber:n.startLineNumber,column:n.startColumn};e.setPosition(t),e.revealPositionInCenter(t,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};fr=pr([mr(1,zn["b"]),mr(2,Kn["b"])],fr);var _r=i("ceb8");class br{constructor(e,t,i,n,s){this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=s}}function vr(e){if(!e||!Array.isArray(e))return[];let t=[],i=0;for(let n=0,s=e.length;n<s;n++){let s=e[n],o=-1;if("string"===typeof s.fontStyle){o=0;let e=s.fontStyle.split(" ");for(let t=0,i=e.length;t<i;t++){let i=e[t];switch(i){case"italic":o|=1;break;case"bold":o|=2;break;case"underline":o|=4;break}}}let r=null;"string"===typeof s.foreground&&(r=s.foreground);let a=null;"string"===typeof s.background&&(a=s.background),t[i++]=new br(s.token||"",n,o,r,a)}return t}function Cr(e,t){e.sort((e,t)=>{let i=xr(e.token,t.token);return 0!==i?i:e.index-t.index});let i=0,n="000000",s="ffffff";while(e.length>=1&&""===e[0].token){let t=e.shift();-1!==t.fontStyle&&(i=t.fontStyle),null!==t.foreground&&(n=t.foreground),null!==t.background&&(s=t.background)}let o=new Sr;for(let c of t)o.getId(c);let r=o.getId(n),a=o.getId(s),l=new kr(i,r,a),h=new Er(l);for(let c=0,d=e.length;c<d;c++){let t=e[c];h.insert(t.token,t.fontStyle,o.getId(t.foreground),o.getId(t.background))}return new yr(o,h)}const wr=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class Sr{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(null===e)return 0;const t=e.match(wr);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let i=this._color2id.get(e);return i||(i=++this._lastColorId,this._color2id.set(e,i),this._id2color[i]=_r["a"].fromHex("#"+e),i)}getColorMap(){return this._id2color.slice(0)}}class yr{constructor(e,t){this._colorMap=e,this._root=t,this._cache=new Map}static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(vr(e),t)}static createFromParsedTokenTheme(e,t){return Cr(e,t)}getColorMap(){return this._colorMap.getColorMap()}_match(e){return this._root.match(e)}match(e,t){let i=this._cache.get(t);if("undefined"===typeof i){let e=this._match(t),n=Lr(t);i=(e.metadata|n<<8)>>>0,this._cache.set(t,i)}return(i|e<<0)>>>0}}const Dr=/\b(comment|string|regex|regexp)\b/;function Lr(e){let t=e.match(Dr);if(!t)return 0;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 4;case"regexp":return 4}throw new Error("Unexpected match for standard token type!")}function xr(e,t){return e<t?-1:e>t?1:0}class kr{constructor(e,t,i){this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}clone(){return new kr(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==i&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}}class Er{constructor(e){this._mainRule=e,this._children=new Map}match(e){if(""===e)return this._mainRule;let t,i,n=e.indexOf(".");-1===n?(t=e,i=""):(t=e.substring(0,n),i=e.substring(n+1));let s=this._children.get(t);return"undefined"!==typeof s?s.match(i):this._mainRule}insert(e,t,i,n){if(""===e)return void this._mainRule.acceptOverwrite(t,i,n);let s,o,r=e.indexOf(".");-1===r?(s=e,o=""):(s=e.substring(0,r),o=e.substring(r+1));let a=this._children.get(s);"undefined"===typeof a&&(a=new Er(this._mainRule.clone()),this._children.set(s,a)),a.insert(o,t,i,n)}}function Nr(e){let t=[];for(let i=1,n=e.length;i<n;i++){let n=e[i];t[i]=`.mtk${i} { color: ${n}; }`}return t.push(".mtki { font-style: italic; }"),t.push(".mtkb { font-weight: bold; }"),t.push(".mtku { text-decoration: underline; text-underline-position: under; }"),t.join("\n")}const Or={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[Un["q"]]:"#FFFFFE",[Un["A"]]:"#000000",[Un["D"]]:"#E5EBF1",[Hn["e"]]:"#D3D3D3",[Hn["a"]]:"#939393",[Un["J"]]:"#ADD6FF4D"}},Ir={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Un["q"]]:"#1E1E1E",[Un["A"]]:"#D4D4D4",[Un["D"]]:"#3A3D41",[Hn["e"]]:"#404040",[Hn["a"]]:"#707070",[Un["J"]]:"#ADD6FF26"}},Tr={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Un["q"]]:"#000000",[Un["A"]]:"#FFFFFF",[Hn["e"]]:"#FFFFFF",[Hn["a"]]:"#FFFFFF"}};var Mr=i("9c41");function Ar(){const e=new W["a"],t=Object(qn["a"])();return t.onDidChange(()=>e.fire()),{onDidChange:e.event,getCSS(){const e={},i=i=>{let n=i.defaults;while(Kn["d"].isThemeIcon(n)){const e=t.getIcon(n.id);if(!e)return;n=e.defaults}const s=n.fontId;if(s){const o=t.getIconFont(s);if(o)return e[s]=o,`.codicon-${i.id}:before { content: '${n.fontCharacter}'; font-family: ${Object(Z["n"])(s)}; }`}return`.codicon-${i.id}:before { content: '${n.fontCharacter}'; }`},n=[];for(let s of t.getIcons()){const e=i(s);e&&n.push(e)}for(let t in e){const i=e[t],s=i.definition.src.map(e=>`${Object(Z["o"])(e.location)} format('${e.format}')`).join(", ");n.push(`@font-face { src: ${s}; font-family: ${Object(Z["n"])(t)}; }`)}return n.join("\n")}}}const Rr="vs",Fr="vs-dark",Pr="hc-black",Br=fo["a"].as(Un["a"].ColorContribution),Wr=fo["a"].as(Kn["a"].ThemingContribution);class Vr{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;let i=t.base;e.length>0?(jr(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(let t in this.themeData.colors)e.set(t,_r["a"].fromHex(this.themeData.colors[t]));if(this.themeData.inherit){let t=Hr(this.themeData.base);for(let i in t.colors)e.has(i)||e.set(i,_r["a"].fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){const i=this.getColors().get(e);return i||(!1!==t?this.getDefault(e):void 0)}getDefault(e){let t=this.defaultColors[e];return t||(t=Br.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)}get type(){switch(this.base){case Rr:return Mr["a"].LIGHT;case Pr:return Mr["a"].HIGH_CONTRAST;default:return Mr["a"].DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){let i=Hr(this.themeData.base);e=i.rules,i.encodedTokensColors&&(t=i.encodedTokensColors)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=yr.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const n=this.tokenTheme._match([e].concat(t).join(".")),s=n.metadata,o=be["z"].getForeground(s),r=be["z"].getFontStyle(s);return{foreground:o,italic:Boolean(1&r),bold:Boolean(2&r),underline:Boolean(4&r)}}}function jr(e){return e===Rr||e===Fr||e===Pr}function Hr(e){switch(e){case Rr:return Or;case Fr:return Ir;case Pr:return Tr}}function zr(e){let t=Hr(e);return new Vr(e,t)}class Ur extends de["a"]{constructor(){super(),this._onColorThemeChange=this._register(new W["a"]),this.onDidColorThemeChange=this._onColorThemeChange.event,this._environment=Object.create(null),this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(Rr,zr(Rr)),this._knownThemes.set(Fr,zr(Fr)),this._knownThemes.set(Pr,zr(Pr));const e=Ar();this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(Rr),e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()}),window.matchMedia("(forced-colors: active)").addEventListener("change",()=>{this._updateActualTheme()})}registerEditorContainer(e){return Z["K"](e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=Z["s"](),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),de["a"].None}_registerShadowDomContainer(e){const t=Z["s"](e);return t.className="monaco-colors",t.textContent=this._allCSS,this._styleElements.push(t),{dispose:()=>{for(let e=0;e<this._styleElements.length;e++)if(this._styleElements[e]===t)return void this._styleElements.splice(e,1)}}}defineTheme(e,t){if(!/^[a-z0-9\-]+$/i.test(e))throw new Error("Illegal theme name!");if(!jr(t.base)&&!jr(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new Vr(e,t)),jr(e)&&this._knownThemes.forEach(t=>{t.base===e&&t.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(Rr),this._desiredTheme=t,this._updateActualTheme()}_updateActualTheme(){const e=this._autoDetectHighContrast&&window.matchMedia("(forced-colors: active)").matches?this._knownThemes.get(Pr):this._desiredTheme;this._theme!==e&&(this._theme=e,this._updateThemeOrColorMap())}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._updateActualTheme()}_updateThemeOrColorMap(){let e=[],t={},i={addRule:i=>{t[i]||(e.push(i),t[i]=!0)}};Wr.getThemingParticipants().forEach(e=>e(this._theme,i,this._environment));const n=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(Nr(n)),this._themeCSS=e.join("\n"),this._updateCSS(),be["A"].setColorMap(n),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}}var Kr=i("258a"),$r=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},qr=function(e,t){return function(i,n){t(i,n,e)}};const Gr="data-keybinding-context";class Yr{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value["_contextId"]=e}setValue(e,t){return this._value[e]!==t&&(this._value[e]=t,!0)}removeValue(e){return e in this._value&&(delete this._value[e],!0)}getValue(e){const t=this._value[e];return"undefined"===typeof t&&this._parent?this._parent.getValue(e):t}}class Zr extends Yr{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}Zr.INSTANCE=new Zr;class Xr extends Yr{constructor(e,t,i){super(e,null),this._configurationService=t,this._values=Q["c"].forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(e=>{if(6===e.source){const e=Array.from(Kr["a"].map(this._values,([e])=>e));this._values.clear(),i.fire(new ea(e))}else{const t=[];for(const i of e.affectedKeys){const e="config."+i,n=this._values.findSuperstr(e);void 0!==n&&(t.push(...Kr["a"].map(n,([e])=>e)),this._values.deleteSuperstr(e)),this._values.has(e)&&(t.push(e),this._values.delete(e))}i.fire(new ea(t))}})}dispose(){this._listener.dispose()}getValue(e){if(0!==e.indexOf(Xr._keyPrefix))return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(Xr._keyPrefix.length),i=this._configurationService.getValue(t);let n=void 0;switch(typeof i){case"number":case"boolean":case"string":n=i;break;default:n=Array.isArray(i)?JSON.stringify(i):i}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}Xr._keyPrefix="config.";class Qr{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){"undefined"===typeof this._defaultValue?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class Jr{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}}class ea{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}}class ta{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}}class ia{constructor(e){this._onDidChangeContext=new W["d"]({merge:e=>new ta(e)}),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new Qr(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new sa(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId),i=Vi.contextMatchesRules(t,e);return i}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const i=this.getContextValuesContainer(this._myContextId);i&&i.setValue(e,t)&&this._onDidChangeContext.fire(new Jr(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new Jr(e))}getContext(e){return this._isDisposed?Zr.INSTANCE:this.getContextValuesContainer(oa(e))}}let na=class extends ia{constructor(e){super(0),this._contexts=new Map,this._toDispose=new de["b"],this._lastContextId=0;const t=new Xr(this._myContextId,e,this._onDidChangeContext);this._contexts.set(this._myContextId,t),this._toDispose.add(t)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(e){return this._isDisposed?Zr.INSTANCE:this._contexts.get(e)||Zr.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let t=++this._lastContextId;return this._contexts.set(t,new Yr(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};na=$r([qr(0,Ti["a"])],na);class sa extends ia{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=new de["d"],this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(Gr)){let e="";this._domNode.classList&&(e=Array.from(this._domNode.classList.values()).join(", ")),console.error("Element already has context attribute"+(e?": "+e:""))}this._domNode.setAttribute(Gr,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(this._onDidChangeContext.fire,this._onDidChangeContext)}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(Gr),this._isDisposed=!0)}getContextValuesContainer(e){return this._isDisposed?Zr.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}function oa(e){while(e){if(e.hasAttribute(Gr)){const t=e.getAttribute(Gr);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}ie["a"].registerCommand(zn["d"],(function(e,t,i){e.get(zn["b"]).createKey(String(t),i)})),ie["a"].registerCommand({id:"getContextKeyInfo",handler(){return[...zn["c"].all()].sort((e,t)=>e.key.localeCompare(t.key))},description:{description:Object(Bi["a"])("getContextKeyInfo","A command that returns information about context keys"),args:[]}}),ie["a"].registerCommand("_generateContextKeyInfo",(function(){const e=[],t=new Set;for(let i of zn["c"].all())t.has(i.key)||(t.add(i.key),e.push(i));e.sort((e,t)=>e.key.localeCompare(t.key)),console.log(JSON.stringify(e,void 0,2))}));i("7a2c"),i("4d3d");var ra,aa=i("9ee1"),la=i("0a31");function ha(e,t,i){const n=i.mode===ra.ALIGN?i.offset:i.offset+i.size,s=i.mode===ra.ALIGN?i.offset+i.size:i.offset;return 0===i.position?t<=e-n?n:t<=s?s-t:Math.max(e-t,0):t<=s?s-t:t<=e-n?n:0}(function(e){e[e["AVOID"]=0]="AVOID",e[e["ALIGN"]=1]="ALIGN"})(ra||(ra={}));class ca extends de["a"]{constructor(e,t){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=de["a"].None,this.toDisposeOnSetContainer=de["a"].None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=Z["a"](".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,Z["G"](this.view),this.setContainer(e,t),this._register(Object(de["h"])(()=>this.setContainer(null,1)))}setContainer(e,t){var i;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,null===(i=this.shadowRootHostElement)||void 0===i||i.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e){if(this.container=e,this.useFixedPosition=1!==t,this.useShadowDOM=3===t,this.useShadowDOM){this.shadowRootHostElement=Z["a"](".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const e=document.createElement("style");e.textContent=da,this.shadowRoot.appendChild(e),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(Z["a"]("slot"))}else this.container.appendChild(this.view);const i=new de["b"];ca.BUBBLE_UP_EVENTS.forEach(e=>{i.add(Z["k"](this.container,e,e=>{this.onDOMEvent(e,!1)}))}),ca.BUBBLE_DOWN_EVENTS.forEach(e=>{i.add(Z["k"](this.container,e,e=>{this.onDOMEvent(e,!0)},!0))}),this.toDisposeOnSetContainer=i}}show(e){this.isVisible()&&this.hide(),Z["p"](this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2500",this.view.style.position=this.useFixedPosition?"fixed":"absolute",Z["R"](this.view),this.toDisposeOnClean=e.render(this.view)||de["a"].None,this.delegate=e,this.doLayout(),this.delegate.focus&&this.delegate.focus()}getViewElement(){return this.view}layout(){this.isVisible()&&(!1!==this.delegate.canRelayout||Le["c"]&&la["a"].pointerEvents?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())}doLayout(){if(!this.isVisible())return;let e,t=this.delegate.getAnchor();if(Z["I"](t)){let i=Z["z"](t);e={top:i.top,left:i.left,width:i.width,height:i.height}}else e={top:t.y,left:t.x,width:t.width||1,height:t.height||2};const i=Z["E"](this.view),n=Z["D"](this.view),s=this.delegate.anchorPosition||0,o=this.delegate.anchorAlignment||0,r=this.delegate.anchorAxisAlignment||0;let a,l;if(0===r){const t={offset:e.top-window.pageYOffset,size:e.height,position:0===s?0:1},r={offset:e.left,size:e.width,position:0===o?0:1,mode:ra.ALIGN};a=ha(window.innerHeight,n,t)+window.pageYOffset,aa["a"].intersects({start:a,end:a+n},{start:t.offset,end:t.offset+t.size})&&(r.mode=ra.AVOID),l=ha(window.innerWidth,i,r)}else{const t={offset:e.left,size:e.width,position:0===o?0:1},r={offset:e.top,size:e.height,position:0===s?0:1,mode:ra.ALIGN};l=ha(window.innerWidth,i,t),aa["a"].intersects({start:l,end:l+i},{start:t.offset,end:t.offset+t.size})&&(r.mode=ra.AVOID),a=ha(window.innerHeight,n,r)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(0===s?"bottom":"top"),this.view.classList.add(0===o?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const h=Z["z"](this.container);this.view.style.top=a-(this.useFixedPosition?Z["z"](this.view).top:h.top)+"px",this.view.style.left=l-(this.useFixedPosition?Z["z"](this.view).left:h.left)+"px",this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,(null===t||void 0===t?void 0:t.onHide)&&t.onHide(e),this.toDisposeOnClean.dispose(),Z["G"](this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!Z["H"](e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}ca.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],ca.BUBBLE_DOWN_EVENTS=["click"];let da='\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t@font-face {\n\t\tfont-family: "codicon";\n\t\tsrc: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype");\n\t}\n\n\t.codicon[class*=\'codicon-\'] {\n\t\tfont: normal normal normal 16px/1 codicon;\n\t\tdisplay: inline-block;\n\t\ttext-decoration: none;\n\t\ttext-rendering: auto;\n\t\ttext-align: center;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tuser-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t}\n\n\t:host {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t}\n\n\t:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n\t:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }\n\t:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }\n\t:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }\n\t:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }\n\n\t:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }\n\t:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }\n\t:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }\n\t:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }\n\t:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }\n\n\t:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }\n';var ua=i("eff2"),ga=i("b9db"),pa=i("0f70"),ma=i("5d28"),fa=i("1097");const _a=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,ba=/(&amp;)?(&amp;)([^\s&])/g,va=Object($n["d"])("menu-selection",$n["b"].check),Ca=Object($n["d"])("menu-submenu",$n["b"].chevronRight);var wa;(function(e){e[e["Right"]=0]="Right",e[e["Left"]=1]="Left"})(wa||(wa={}));class Sa extends Bn["a"]{constructor(e,t,i={}){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const n=document.createElement("div");n.classList.add("monaco-menu"),n.setAttribute("role","presentation"),super(n,{orientation:2,actionViewItemProvider:e=>this.doGetActionViewItem(e,i,s),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...Le["f"]||Le["d"]?[10]:[]],keyDown:!0}}),this.menuElement=n,this.actionsList.setAttribute("role","menu"),this.actionsList.tabIndex=0,this.menuDisposables=this._register(new de["b"]),this.initializeStyleSheet(e),Object(Z["g"])(n,Z["d"].KEY_DOWN,e=>{const t=new wi["a"](e);t.equals(2)&&e.preventDefault()}),i.enableMnemonics&&this.menuDisposables.add(Object(Z["g"])(n,Z["d"].KEY_DOWN,e=>{const t=e.key.toLocaleLowerCase();if(this.mnemonics.has(t)){Z["c"].stop(e,!0);const i=this.mnemonics.get(t);if(1===i.length&&(i[0]instanceof Da&&i[0].container&&this.focusItemByElement(i[0].container),i[0].onClick(e)),i.length>1){const e=i.shift();e&&e.container&&(this.focusItemByElement(e.container),i.push(e)),this.mnemonics.set(t,i)}}})),Le["d"]&&this._register(Object(Z["g"])(n,Z["d"].KEY_DOWN,e=>{const t=new wi["a"](e);t.equals(14)||t.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),Z["c"].stop(e,!0)):(t.equals(13)||t.equals(12))&&(this.focusedItem=0,this.focusPrevious(),Z["c"].stop(e,!0))})),this._register(Object(Z["g"])(this.domNode,Z["d"].MOUSE_OUT,e=>{let t=e.relatedTarget;Object(Z["H"])(t,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),e.stopPropagation())})),this._register(Object(Z["g"])(this.actionsList,Z["d"].MOUSE_OVER,e=>{let t=e.target;if(t&&Object(Z["H"])(t,this.actionsList)&&t!==this.actionsList){while(t.parentElement!==this.actionsList&&null!==t.parentElement)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}}));let s={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new Wn["a"](n,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const o=this.scrollableElement.getDomNode();o.style.position="",this._register(Object(Z["g"])(o,Z["d"].MOUSE_UP,e=>{e.preventDefault()})),n.style.maxHeight=Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)+"px",t=t.filter(e=>{var t;return!(null===(t=i.submenuIds)||void 0===t?void 0:t.has(e.id))||(console.warn("Found submenu cycle: "+e.id),!1)}),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(e=>!(e instanceof La)).forEach((e,t,i)=>{e.updatePositionInSet(t+1,i.length)})}initializeStyleSheet(e){Object(Z["K"])(e)?(this.styleSheet=Object(Z["s"])(e),this.styleSheet.textContent=ka):(Sa.globalStyleSheet||(Sa.globalStyleSheet=Object(Z["s"])(),Sa.globalStyleSheet.textContent=ka),this.styleSheet=Sa.globalStyleSheet)}style(e){const t=this.getContainer(),i=e.foregroundColor?""+e.foregroundColor:"",n=e.backgroundColor?""+e.backgroundColor:"",s=e.borderColor?"1px solid "+e.borderColor:"",o=e.shadowColor?"0 2px 4px "+e.shadowColor:"";t.style.border=s,this.domNode.style.color=i,this.domNode.style.backgroundColor=n,t.style.boxShadow=o,this.viewItems&&this.viewItems.forEach(t=>{(t instanceof ya||t instanceof La)&&t.style(e)})}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t<this.actionsList.children.length;t++){let i=this.actionsList.children[t];if(e===i){this.focusedItem=t;break}}}updateFocus(e){super.updateFocus(e,!0),"undefined"!==typeof this.focusedItem&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(e,t,i){if(e instanceof Vn["d"])return new La(t.context,e,{icon:!0});if(e instanceof Vn["e"]){const n=new Da(e,e.actions,i,Object.assign(Object.assign({},t),{submenuIds:new Set([...t.submenuIds||[],e.id])}));if(t.enableMnemonics){const e=n.getMnemonic();if(e&&n.isEnabled()){let t=[];this.mnemonics.has(e)&&(t=this.mnemonics.get(e)),t.push(n),this.mnemonics.set(e,t)}}return n}{const i={enableMnemonics:t.enableMnemonics,useEventAsContext:t.useEventAsContext};if(t.getKeyBinding){const n=t.getKeyBinding(e);if(n){const e=n.getLabel();e&&(i.keybinding=e)}}const n=new ya(t.context,e,i);if(t.enableMnemonics){const e=n.getMnemonic();if(e&&n.isEnabled()){let t=[];this.mnemonics.has(e)&&(t=this.mnemonics.get(e)),t.push(n),this.mnemonics.set(e,t)}}return n}}}class ya extends ua["b"]{constructor(e,t,i={}){if(i.isMenu=!0,super(t,t,i),this.options=i,this.options.icon=void 0!==i.icon&&i.icon,this.options.label=void 0===i.label||i.label,this.cssClass="",this.options.label&&i.enableMnemonics){let e=this.getAction().label;if(e){let t=_a.exec(e);t&&(this.mnemonic=(t[1]?t[1]:t[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new ye["e"](()=>{this.element&&(this._register(Object(Z["g"])(this.element,Z["d"].MOUSE_UP,e=>{if(Z["c"].stop(e,!0),pa["i"]){const t=new ma["a"](e);if(t.rightButton)return;this.onClick(e)}else setTimeout(()=>{this.onClick(e)},0)})),this._register(Object(Z["g"])(this.element,Z["d"].CONTEXT_MENU,e=>{Z["c"].stop(e,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=Object(Z["m"])(this.element,Object(Z["a"])("a.action-menu-item")),this._action.id===Vn["d"].ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",""+this.mnemonic)),this.check=Object(Z["m"])(this.item,Object(Z["a"])("span.menu-item-check"+va.cssSelector)),this.check.setAttribute("role","none"),this.label=Object(Z["m"])(this.item,Object(Z["a"])("span.action-label")),this.options.label&&this.options.keybinding&&(Object(Z["m"])(this.item,Object(Z["a"])("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item&&this.item.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",""+e),this.item.setAttribute("aria-setsize",""+t))}updateLabel(){if(this.label&&this.options.label){Object(Z["p"])(this.label);let e=Object(fa["e"])(this.getAction().label);if(e){const t=xa(e);this.options.enableMnemonics||(e=t),this.label.setAttribute("aria-label",t.replace(/&&/g,"&"));const i=_a.exec(e);if(i){e=Ge["t"](e),ba.lastIndex=0;let t=ba.exec(e);while(t&&t[1])t=ba.exec(e);const n=e=>e.replace(/&amp;&amp;/g,"&amp;");t?this.label.append(Ge["J"](n(e.substr(0,t.index))," "),Object(Z["a"])("u",{"aria-hidden":"true"},t[3]),Ge["O"](n(e.substr(t.index+t[0].length))," ")):this.label.innerText=n(e).trim(),this.item&&this.item.setAttribute("aria-keyshortcuts",(i[1]?i[1]:i[3]).toLocaleLowerCase())}else this.label.innerText=e.replace(/&&/g,"&").trim()}}}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=Bi["a"]({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.item&&(this.item.title=e)}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.getAction().class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.getAction().enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){this.item&&(this.getAction().checked?(this.item.classList.add("checked"),this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked","true")):(this.item.classList.remove("checked"),this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked","false")))}getMnemonic(){return this.mnemonic}applyStyle(){if(!this.menuStyle)return;const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,n=e&&this.menuStyle.selectionBorderColor?"thin solid "+this.menuStyle.selectionBorderColor:"";this.item&&(this.item.style.color=t?t.toString():"",this.item.style.backgroundColor=i?i.toString():""),this.check&&(this.check.style.color=t?t.toString():""),this.container&&(this.container.style.border=n)}style(e){this.menuStyle=e,this.applyStyle()}}class Da extends ya{constructor(e,t,i,n){super(e,e,n),this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new de["b"]),this.mouseOver=!1,this.expandDirection=n&&void 0!==n.expandDirection?n.expandDirection:wa.Right,this.showScheduler=new ye["e"](()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new ye["e"](()=>{this.element&&!Object(Z["H"])(Object(Z["u"])(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=Object(Z["m"])(this.item,Object(Z["a"])("span.submenu-indicator"+Ca.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(Object(Z["g"])(this.element,Z["d"].KEY_UP,e=>{let t=new wi["a"](e);(t.equals(17)||t.equals(3))&&(Z["c"].stop(e,!0),this.createSubmenu(!0))})),this._register(Object(Z["g"])(this.element,Z["d"].KEY_DOWN,e=>{let t=new wi["a"](e);Object(Z["u"])()===this.item&&(t.equals(17)||t.equals(3))&&Z["c"].stop(e,!0)})),this._register(Object(Z["g"])(this.element,Z["d"].MOUSE_OVER,e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(Object(Z["g"])(this.element,Z["d"].MOUSE_LEAVE,e=>{this.mouseOver=!1})),this._register(Object(Z["g"])(this.element,Z["d"].FOCUS_OUT,e=>{this.element&&!Object(Z["H"])(Object(Z["u"])(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!1)})))}updateEnabled(){}onClick(e){Z["c"].stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch(t){}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,i,n){const s={top:0,left:0};return s.left=ha(e.width,t.width,{position:n===wa.Right?0:1,offset:i.left,size:i.width}),s.left>=i.left&&s.left<i.left+i.width&&(i.left+10+t.width<=e.width&&(s.left=i.left+10),i.top+=10,i.height=0),s.top=ha(e.height,t.height,{position:0,offset:i.top,size:0}),s.top+t.height===i.top&&s.top+i.height+t.height<=e.height&&(s.top+=i.height),s}createSubmenu(e=!0){if(this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=Object(Z["m"])(this.element,Object(Z["a"])("div.monaco-submenu")),this.submenuContainer.classList.add("menubar-menu-items-holder","context-view");const t=getComputedStyle(this.parentData.parent.domNode),i=parseFloat(t.paddingTop||"0")||0;this.submenuContainer.style.zIndex="1",this.submenuContainer.style.position="fixed",this.submenuContainer.style.top="0",this.submenuContainer.style.left="0",this.parentData.submenu=new Sa(this.submenuContainer,this.submenuActions.length?this.submenuActions:[new Vn["c"]],this.submenuOptions),this.menuStyle&&this.parentData.submenu.style(this.menuStyle);const n=this.element.getBoundingClientRect(),s={top:n.top-i,left:n.left,height:n.height+2*i,width:n.width},o=this.submenuContainer.getBoundingClientRect(),{top:r,left:a}=this.calculateSubmenuMenuLayout(new Z["b"](window.innerWidth,window.innerHeight),Z["b"].lift(o),s,this.expandDirection);this.submenuContainer.style.left=a+"px",this.submenuContainer.style.top=r+"px",this.submenuDisposables.add(Object(Z["g"])(this.submenuContainer,Z["d"].KEY_UP,e=>{let t=new wi["a"](e);t.equals(15)&&(Z["c"].stop(e,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(Object(Z["g"])(this.submenuContainer,Z["d"].KEY_DOWN,e=>{let t=new wi["a"](e);t.equals(15)&&Z["c"].stop(e,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&(null===(t=this.item)||void 0===t||t.setAttribute("aria-expanded",e))}applyStyle(){if(super.applyStyle(),!this.menuStyle)return;const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=t?""+t:""),this.parentData.submenu&&this.parentData.submenu.style(this.menuStyle)}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class La extends ua["a"]{style(e){this.label&&(this.label.style.borderBottomColor=e.separatorColor?""+e.separatorColor:"")}}function xa(e){const t=_a,i=t.exec(e);if(!i)return e;const n=!i[1];return e.replace(t,n?"$2$3":"").trim()}let ka=`\n.monaco-menu {\n\tfont-size: 13px;\n\n}\n\n${Object(ga["a"])(va)}\n${Object(ga["a"])(Ca)}\n\n.monaco-menu .monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-menu .monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-menu .monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\ttransition: transform 50ms ease;\n\tposition: relative;  /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-menu .monaco-action-bar.animated .action-item.active {\n\ttransform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */\n}\n\n.monaco-menu .monaco-action-bar .action-item .icon,\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label,\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {\n\topacity: 0.4;\n}\n\n/* Vertical actions */\n\n.monaco-menu .monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid #bbb;\n\tpadding-top: 1px;\n\tmargin-left: .8em;\n\tmargin-right: .8em;\n}\n\n.monaco-menu .secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-menu .monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\ttransform: none;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n\tposition: relative;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {\n\tfont-size: 16px !important;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {\n\tmargin-left: auto;\n\tmargin-right: -20px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tposition: static;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {\n\tposition: absolute;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tpadding: 0.5em 0 0 0;\n\tmargin-bottom: 0.5em;\n\twidth: 100%;\n\theight: 0px !important;\n\tmargin-left: .8em !important;\n\tmargin-right: .8em !important;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tposition: absolute;\n\tvisibility: hidden;\n\twidth: 1em;\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {\n\tvisibility: visible;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\toutline: 0;\n\tborder: none;\n\tanimation: fadeIn 0.083s linear;\n\t-webkit-app-region: no-drag;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tborder: thin solid transparent; /* prevents jumping behaviour on hover or focus */\n}\n\n\n/* High Contrast Theming */\n:host-context(.hc-black) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n}\n\n/* Vertical Action Bar Styles */\n\n.monaco-menu .monaco-action-bar.vertical {\n\tpadding: .5em 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 1.8em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),\n.monaco-menu .monaco-action-bar.vertical .keybinding {\n\tfont-size: inherit;\n\tpadding: 0 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tfont-size: inherit;\n\twidth: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tfont-size: inherit;\n\tpadding: 0.2em 0 0 0;\n\tmargin-bottom: 0.2em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tfont-size: 60%;\n\tpadding: 0 1.8em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n\tmask-size: 10px 10px;\n\t-webkit-mask-size: 10px 10px;\n}\n\n.monaco-menu .action-item {\n\tcursor: default;\n}\n\n/* Arrows */\n.monaco-scrollable-element > .scrollbar > .scra {\n\tcursor: pointer;\n\tfont-size: 11px !important;\n}\n\n.monaco-scrollable-element > .visible {\n\topacity: 1;\n\n\t/* Background rule added for IE9 - to allow clicks on dom node */\n\tbackground:rgba(0,0,0,0);\n\n\ttransition: opacity 100ms linear;\n}\n.monaco-scrollable-element > .invisible {\n\topacity: 0;\n\tpointer-events: none;\n}\n.monaco-scrollable-element > .invisible.fade {\n\ttransition: opacity 800ms linear;\n}\n\n/* Scrollable Content Inset Shadow */\n.monaco-scrollable-element > .shadow {\n\tposition: absolute;\n\tdisplay: none;\n}\n.monaco-scrollable-element > .shadow.top {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 3px;\n\theight: 3px;\n\twidth: 100%;\n\tbox-shadow: #DDD 0 6px 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.left {\n\tdisplay: block;\n\ttop: 3px;\n\tleft: 0;\n\theight: 100%;\n\twidth: 3px;\n\tbox-shadow: #DDD 6px 0 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.top-left-corner {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 0;\n\theight: 3px;\n\twidth: 3px;\n}\n.monaco-scrollable-element > .shadow.top.left {\n\tbox-shadow: #DDD 6px 6px 6px -6px inset;\n}\n\n/* ---------- Default Style ---------- */\n\n:host-context(.vs) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(100, 100, 100, .4);\n}\n:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(121, 121, 121, .4);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(111, 195, 223, .6);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(100, 100, 100, .7);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(111, 195, 223, .8);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(0, 0, 0, .6);\n}\n:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(191, 191, 191, .4);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(111, 195, 223, 1);\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.left {\n\tbox-shadow: #000 6px 0 6px -6px inset;\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: #000 6px 6px 6px -6px inset;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.left {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: none;\n}\n`;var Ea=i("a6d7"),Na=i("e32d");class Oa{constructor(e,t,i,n,s){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.themeService=s,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;let i;this.focusToReturn=document.activeElement;let n=Object(Z["I"])(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:n=>{let s=e.getMenuClassName?e.getMenuClassName():"";s&&(n.className+=" "+s),this.options.blockMouse&&(this.block=n.appendChild(Object(Z["a"])(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",Object(Na["a"])(this.block,Z["d"].MOUSE_DOWN)(e=>e.stopPropagation()));const o=new de["b"],r=e.actionRunner||new Vn["b"];return r.onBeforeRun(this.onActionRun,this,o),r.onDidRun(this.onDidActionRun,this,o),i=new Sa(n,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:r,getKeyBinding:e.getKeyBinding?e.getKeyBinding:e=>this.keybindingService.lookupKeybinding(e.id)}),o.add(Object(Ea["b"])(i,this.themeService)),i.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,o),i.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,o),Object(Na["a"])(window,Z["d"].BLUR)(()=>{this.contextViewService.hideContextView(!0)},null,o),Object(Na["a"])(window,Z["d"].MOUSE_DOWN)(e=>{if(e.defaultPrevented)return;let t=new ma["a"](e),i=t.target;if(!t.rightButton){while(i){if(i===n)return;i=i.parentElement}this.contextViewService.hideContextView(!0)}},null,o),Object(de["e"])(o,i)},focus:()=>{i&&i.focus(!!e.autoSelectFirstItem)},onHide:t=>{e.onHide&&e.onHide(!!t),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},n,!!n)}onActionRun(e){this.telemetryService&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(e){e.error&&this.notificationService.error(e.error)}}var Ia=i("5d75"),Ta=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Ma=function(e,t){return function(i,n){t(i,n,e)}};let Aa=class extends de["a"]{constructor(e,t,i,n,s){super(),this.contextMenuHandler=new Oa(i,e,t,n,s)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){this.contextMenuHandler.showContextMenu(e),Z["e"].getInstance().resetKeyStatus()}};Aa=Ta([Ma(0,Ia["a"]),Ma(1,ln["a"]),Ma(2,hs["b"]),Ma(3,zs["a"]),Ma(4,Kn["b"])],Aa);const Ra=Object(Dt["c"])("layoutService");var Fa=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Pa=function(e,t){return function(i,n){t(i,n,e)}};let Ba=class extends de["a"]{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=de["a"].None,this.container=e.container,this.contextView=this._register(new ca(this.container,1)),this.layout(),this._register(e.onDidLayout(()=>this.layout()))}setContainer(e,t){this.contextView.setContainer(e,t||1)}showContextView(e,t,i){t?t!==this.container&&(this.container=t,this.setContainer(t,i?3:2)):this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.contextView.show(e);const n=Object(de["h"])(()=>{this.currentViewDisposable===n&&this.hideContextView()});return this.currentViewDisposable=n,n}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}};Ba=Fa([Pa(0,Ra)],Ba);const Wa=Object(Dt["c"])("dialogService");class Va{constructor(e){this.incoming=new Map,this.outgoing=new Map,this.data=e}}class ja{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(let t of this._nodes.values())0===t.outgoing.size&&e.push(t);return e}insertEdge(e,t){const i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing.set(this._hashFn(t),n),n.incoming.set(this._hashFn(e),i)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(let i of this._nodes.values())i.outgoing.delete(t),i.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let i=this._nodes.get(t);return i||(i=new Va(e),this._nodes.set(t,i)),i}isEmpty(){return 0===this._nodes.size}toString(){let e=[];for(let[t,i]of this._nodes)e.push(`${t}, (incoming)[${[...i.incoming.keys()].join(", ")}], (outgoing)[${[...i.outgoing.keys()].join(",")}]`);return e.join("\n")}}var Ha=i("af40");const za=!1;class Ua extends Error{constructor(e){super("cyclic dependency between services"),this.message=e.toString()}}class Ka{constructor(e=new ls["a"],t=!1,i){this._activeInstantiations=new Set,this._services=e,this._strict=t,this._parent=i,this._services.set(Dt["a"],this)}createChild(e){return new Ka(e,this._strict,this)}invokeFunction(e,...t){let i=$a.traceInvocation(e),n=!1;try{const s={get:(e,t)=>{if(n)throw Object(De["c"])("service accessor is only valid during the invocation of its target method");const s=this._getOrCreateServiceInstance(e,i);if(!s&&t!==Dt["d"])throw new Error(`[invokeFunction] unknown service '${e}'`);return s}};return e(s,...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return e instanceof Ha["a"]?(i=$a.traceCreation(e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=$a.traceCreation(e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){let n=Dt["b"].getServiceDependencies(e).sort((e,t)=>e.index-t.index),s=[];for(const r of n){let t=this._getOrCreateServiceInstance(r.id,i);if(!t&&this._strict&&!r.optional)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${r.id}.`);s.push(t)}let o=n.length>0?n[0].index:t.length;if(t.length!==o){console.warn(`[createInstance] First service dependency of ${e.name} at position ${o+1} conflicts with ${t.length} static arguments`);let i=o-t.length;t=i>0?t.concat(new Array(i)):t.slice(0,o)}return new e(...[...t,...s])}_setServiceInstance(e,t){if(this._services.get(e)instanceof Ha["a"])this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setServiceInstance(e,t)}}_getServiceInstanceOrDescriptor(e){let t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){let i=this._getServiceInstanceOrDescriptor(e);return i instanceof Ha["a"]?this._safeCreateAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_safeCreateAndCacheServiceInstance(e,t,i){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,i)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,i){const n=new ja(e=>e.id.toString());let s=0;const o=[{id:e,desc:t,_trace:i}];while(o.length){const t=o.pop();if(n.lookupOrInsertNode(t),s++>1e3)throw new Ua(n);for(let i of Dt["b"].getServiceDependencies(t.desc.ctor)){let s=this._getServiceInstanceOrDescriptor(i.id);if(s||i.optional||console.warn(`[createInstance] ${e} depends on ${i.id} which is NOT registered.`),s instanceof Ha["a"]){const e={id:i.id,desc:s,_trace:t._trace.branch(i.id,!0)};n.insertEdge(t,e),o.push(e)}}}while(1){const e=n.roots();if(0===e.length){if(!n.isEmpty())throw new Ua(n);break}for(const{data:t}of e){const e=this._getServiceInstanceOrDescriptor(t.id);if(e instanceof Ha["a"]){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setServiceInstance(t.id,e)}n.removeNode(t)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,s){if(this._services.get(e)instanceof Ha["a"])return this._createServiceInstance(t,i,n,s);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,s);throw new Error("illegalState - creating UNKNOWN service instance "+t.name)}_createServiceInstance(e,t=[],i,n){if(i){const i=new ye["b"](()=>this._createInstance(e,t,n));return new Proxy(Object.create(null),{get(e,t){if(t in e)return e[t];let n=i.value,s=n[t];return"function"!==typeof s||(s=s.bind(n),e[t]=s),s},set(e,t,n){return i.value[t]=n,!0}})}return this._createInstance(e,t,n)}}class $a{constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return za?new $a(1,e.name||e.toString().substring(0,42).replace(/\n/g,"")):$a._None}static traceCreation(e){return za?new $a(0,e.name):$a._None}branch(e,t){let i=new $a(2,e.toString());return this._dep.push([e,t,i]),i}stop(){let e=Date.now()-this._start;$a._totals+=e;let t=!1;function i(e,n){let s=[],o=new Array(e+1).join("\t");for(const[r,a,l]of n._dep)if(a&&l){t=!0,s.push(`${o}CREATES -> ${r}`);let n=i(e+1,l);n&&s.push(n)}else s.push(`${o}uses -> ${r}`);return s.join("\n")}let n=[`${0===this.type?"CREATE":"CALL"} ${this.name}`,""+i(1,this),`DONE, took ${e.toFixed(2)}ms (grand total ${$a._totals.toFixed(2)}ms)`];(e>2||t)&&console.log(n.join("\n"))}}$a._None=new class extends $a{constructor(){super(-1,null)}stop(){}branch(){return this}},$a._totals=0;var qa=i("47cb"),Ga=(i("e2b8"),i("72a7"));class Ya{constructor(e,t){this.renderer=e,this.modelProvider=t}get templateId(){return this.renderer.templateId}renderTemplate(e){const t=this.renderer.renderTemplate(e);return{data:t,disposable:de["a"].None}}renderElement(e,t,i,n){if(i.disposable&&i.disposable.dispose(),!i.data)return;const s=this.modelProvider();if(s.isResolved(e))return this.renderer.renderElement(s.get(e),e,i.data,n);const o=new B["b"],r=s.resolve(e,o.token);i.disposable={dispose:()=>o.cancel()},this.renderer.renderPlaceholder(e,i.data),r.then(t=>this.renderer.renderElement(t,e,i.data,n))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class Za{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}function Xa(e,t){return Object.assign(Object.assign({},t),{accessibilityProvider:t.accessibilityProvider&&new Za(e,t.accessibilityProvider)})}class Qa{constructor(e,t,i,n,s={}){const o=()=>this.model,r=n.map(e=>new Ya(e,o));this.list=new Ga["c"](e,t,i,r,Xa(o,s))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return W["b"].map(this.list.onMouseDblClick,({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i}))}get onPointer(){return W["b"].map(this.list.onPointer,({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i}))}get onDidChangeFocus(){return W["b"].map(this.list.onDidChangeFocus,({elements:e,indexes:t,browserEvent:i})=>({elements:e.map(e=>this._model.get(e)),indexes:t,browserEvent:i}))}get onDidChangeSelection(){return W["b"].map(this.list.onDidChangeSelection,({elements:e,indexes:t,browserEvent:i})=>({elements:e.map(e=>this._model.get(e)),indexes:t,browserEvent:i}))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,Object(We["r"])(e.length))}getFocus(){return this.list.getFocus()}setSelection(e,t){this.list.setSelection(e,t)}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(e=>this.model.get(e))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}new zn["c"]("isWindows",Le["j"],Object(Bi["a"])("isWindows","Whether the operating system is Windows"));const Ja="inputFocus";var el;i("d95f");(function(e){e[e["Unknown"]=0]="Unknown",e[e["Twistie"]=1]="Twistie",e[e["Element"]=2]="Element"})(el||(el={}));class tl extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class il{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}var nl=i("650e"),sl=i("7de1"),ol=i("7e93");function rl(e){return"object"===typeof e&&"visibility"in e&&"data"in e}function al(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function ll(e){return"boolean"===typeof e.collapsible}class hl{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new W["c"],this._onDidChangeCollapseState=new W["a"],this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new W["a"],this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new W["a"],this.onDidSplice=this._onDidSplice.event,this.collapseByDefault="undefined"!==typeof n.collapseByDefault&&n.collapseByDefault,this.filter=n.filter,this.autoExpandSingleChildren="undefined"!==typeof n.autoExpandSingleChildren&&n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=Kr["a"].empty(),n={}){if(0===e.length)throw new tl(this.user,"Invalid tree location");n.diffIdentityProvider?this.spliceSmart(n.diffIdentityProvider,e,t,i,n):this.spliceSimple(e,t,i,n)}spliceSmart(e,t,i,n,s,o){var r;void 0===n&&(n=Kr["a"].empty()),void 0===o&&(o=null!==(r=s.diffDepth)&&void 0!==r?r:0);const{parentNode:a}=this.getParentNodeWithListIndex(t),l=[...n],h=t[t.length-1],c=new qe({getElements:()=>a.children.map(t=>e.getId(t.element).toString())},{getElements:()=>[...a.children.slice(0,h),...l,...a.children.slice(h+i)].map(t=>e.getId(t.element).toString())}).ComputeDiff(!1);if(c.quitEarly)return this.spliceSimple(t,i,l,s);const d=t.slice(0,-1),u=(t,i,n)=>{if(o>0)for(let r=0;r<n;r++)t--,i--,this.spliceSmart(e,[...d,t,0],Number.MAX_SAFE_INTEGER,l[i].children,s,o-1)};let g=Math.min(a.children.length,h+i),p=l.length;for(const m of c.changes.sort((e,t)=>t.originalStart-e.originalStart))u(g,p,g-(m.originalStart+m.originalLength)),g=m.originalStart,p=m.modifiedStart-h,this.spliceSimple([...d,g],m.originalLength,Kr["a"].slice(l,p,p+m.modifiedLength),s);u(g,p,g)}spliceSimple(e,t,i=Kr["a"].empty(),{onDidCreateNode:n,onDidDeleteNode:s}){const{parentNode:o,listIndex:r,revealed:a,visible:l}=this.getParentNodeWithListIndex(e),h=[],c=Kr["a"].map(i,e=>this.createTreeNode(e,o,o.visible?1:0,a,h,n)),d=e[e.length-1],u=o.children.length>0;let g=0;for(let w=d;w>=0&&w<o.children.length;w--){const e=o.children[w];if(e.visible){g=e.visibleChildIndex;break}}const p=[];let m=0,f=0;for(const w of c)p.push(w),f+=w.renderNodeCount,w.visible&&(w.visibleChildIndex=g+m++);const _=o.children.splice(d,t,...p);let b=0;for(const w of _)w.visible&&b++;if(0!==b)for(let w=d+p.length;w<o.children.length;w++){const e=o.children[w];e.visible&&(e.visibleChildIndex-=b)}if(o.visibleChildrenCount+=m-b,a&&l){const e=_.reduce((e,t)=>e+(t.visible?t.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(o,f-e),this.list.splice(r,e,h)}if(_.length>0&&s){const e=t=>{s(t),t.children.forEach(e)};_.forEach(e)}const v=o.children.length>0;u!==v&&this.setCollapsible(e.slice(0,-1),v),this._onDidSplice.fire({insertedNodes:p,deletedNodes:_});let C=o;while(C){if(2===C.visibility){this.refilter();break}C=C.parent}}rerender(e){if(0===e.length)throw new tl(this.user,"Invalid tree location");const{node:t,listIndex:i,revealed:n}=this.getTreeNodeWithListIndex(e);t.visible&&n&&this.list.splice(i,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const i=this.getTreeNode(e);"undefined"===typeof t&&(t=!i.collapsible);const n={collapsible:t};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,n))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){const n=this.getTreeNode(e);"undefined"===typeof t&&(t=!n.collapsed);const s={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(e,s))}_setCollapseState(e,t){const{node:i,listIndex:n,revealed:s}=this.getTreeNodeWithListIndex(e),o=this._setListNodeCollapseState(i,n,s,t);if(i!==this.root&&this.autoExpandSingleChildren&&o&&!ll(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let n=-1;for(let e=0;e<i.children.length;e++){const t=i.children[e];if(t.visible){if(n>-1){n=-1;break}n=e}}n>-1&&this._setCollapseState([...e,n],t)}return o}_setListNodeCollapseState(e,t,i,n){const s=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!s)return s;const o=e.renderNodeCount,r=this.updateNodeAfterCollapseChange(e),a=o-(-1===t?0:1);return this.list.splice(t+1,a,r.slice(1)),s}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(ll(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!ll(t)&&t.recursive)for(const s of e.children)n=this._setNodeCollapseState(s,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents(()=>{let t=this.getTreeNode(e);while(t.parent)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})})}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t)}createTreeNode(e,t,i,n,s,o){const r={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:"boolean"===typeof e.collapsible?e.collapsible:"undefined"!==typeof e.collapsed,collapsed:"undefined"===typeof e.collapsed?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},a=this._filterNode(r,i);r.visibility=a,n&&s.push(r);const l=e.children||Kr["a"].empty(),h=n&&0!==a&&!r.collapsed,c=Kr["a"].map(l,e=>this.createTreeNode(e,r,a,h,s,o));let d=0,u=1;for(const g of c)r.children.push(g),u+=g.renderNodeCount,g.visible&&(g.visibleChildIndex=d++);return r.collapsible=r.collapsible||r.children.length>0,r.visibleChildrenCount=d,r.visible=2===a?d>0:1===a,r.visible?r.collapsed||(r.renderNodeCount=u):(r.renderNodeCount=0,n&&s.pop()),o&&o(r),r}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(!1===e.visible)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let s;if(e!==this.root){if(s=this._filterNode(e,t),0===s)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const o=i.length;e.renderNodeCount=e===this.root?0:1;let r=!1;if(e.collapsed&&0===s)e.visibleChildrenCount=0;else{let t=0;for(const o of e.children)r=this._updateNodeAfterFilterChange(o,s,i,n&&!e.collapsed)||r,o.visible&&(o.visibleChildIndex=t++);e.visibleChildrenCount=t}return e!==this.root&&(e.visible=2===s?r:1===s),e.visible?e.collapsed||(e.renderNodeCount+=i.length-o):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(0!==t)while(e)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const i=this.filter?this.filter.filter(e.element,t):1;return"boolean"===typeof i?(e.filterData=void 0,i?1:0):rl(i)?(e.filterData=i.data,al(i.visibility)):(e.filterData=void 0,al(i))}hasTreeNode(e,t=this.root){if(!e||0===e.length)return!0;const[i,...n]=e;return!(i<0||i>t.children.length)&&this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||0===e.length)return t;const[i,...n]=e;if(i<0||i>t.children.length)throw new tl(this.user,"Invalid tree location");return this.getTreeNode(n,t.children[i])}getTreeNodeWithListIndex(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:i,revealed:n,visible:s}=this.getParentNodeWithListIndex(e),o=e[e.length-1];if(o<0||o>t.children.length)throw new tl(this.user,"Invalid tree location");const r=t.children[o];return{node:r,listIndex:i,revealed:n,visible:s&&r.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,s=!0){const[o,...r]=e;if(o<0||o>t.children.length)throw new tl(this.user,"Invalid tree location");for(let a=0;a<o;a++)i+=t.children[a].renderNodeCount;return n=n&&!t.collapsed,s=s&&t.visible,0===r.length?{parentNode:t,listIndex:i,revealed:n,visible:s}:this.getParentNodeWithListIndex(r,t.children[o],i+1,n,s)}getNode(e=[]){return this.getTreeNode(e)}getNodeLocation(e){const t=[];let i=e;while(i.parent)t.push(i.parent.children.indexOf(i)),i=i.parent;return t.reverse()}getParentNodeLocation(e){return 0===e.length?void 0:1===e.length?[]:Object(We["t"])(e)[0]}}var cl=i("49d9"),dl=i("be5f");const ul=Object($n["d"])("tree-item-expanded",$n["b"].chevronDown),gl=Object($n["d"])("tree-filter-on-type-on",$n["b"].listFilter),pl=Object($n["d"])("tree-filter-on-type-off",$n["b"].listSelection),ml=Object($n["d"])("tree-filter-clear",$n["b"].close),fl=Object($n["d"])("tree-item-loading",$n["b"].loading);class _l extends sl["a"]{constructor(e){super(e.elements.map(e=>e.element)),this.data=e}}function bl(e){return e instanceof sl["a"]?new _l(e):e}class vl{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=de["a"].None}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(e=>e.element),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(bl(e),t)}onDragOver(e,t,i,n,s=!0){const o=this.dnd.onDragOver(bl(e),t&&t.element,i,n),r=this.autoExpandNode!==t;if(r&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),"undefined"===typeof t)return o;if(r&&"boolean"!==typeof o&&o.autoExpand&&(this.autoExpandDisposable=Object(ye["i"])(()=>{const e=this.modelProvider(),i=e.getNodeLocation(t);e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0},500)),"boolean"===typeof o||!o.accept||"undefined"===typeof o.bubble||o.feedback){if(!s){const e="boolean"===typeof o?o:o.accept,t="boolean"===typeof o?void 0:o.effect;return{accept:e,effect:t,feedback:[i]}}return o}if(1===o.bubble){const i=this.modelProvider(),s=i.getNodeLocation(t),o=i.getParentNodeLocation(s),r=i.getNode(o),a=o&&i.getListIndex(o);return this.onDragOver(e,r,a,n,!1)}const a=this.modelProvider(),l=a.getNodeLocation(t),h=a.getListIndex(l),c=a.getListRenderCount(l);return Object.assign(Object.assign({},o),{feedback:Object(We["r"])(h,h+c)})}drop(e,t,i,n){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(bl(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}function Cl(e,t){return t&&Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId(e){return t.identityProvider.getId(e.element)}},dnd:t.dnd&&new vl(e,t.dnd),multipleSelectionController:t.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return t.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},isSelectionRangeChangeEvent(e){return t.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))}},accessibilityProvider:t.accessibilityProvider&&Object.assign(Object.assign({},t.accessibilityProvider),{getSetSize(t){const i=e(),n=i.getNodeLocation(t),s=i.getParentNodeLocation(n),o=i.getNode(s);return o.visibleChildrenCount},getPosInSet(e){return e.visibleChildIndex+1},isChecked:t.accessibilityProvider&&t.accessibilityProvider.isChecked?e=>t.accessibilityProvider.isChecked(e.element):void 0,getRole:t.accessibilityProvider&&t.accessibilityProvider.getRole?e=>t.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel(e){return t.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return t.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:t.accessibilityProvider&&t.accessibilityProvider.getWidgetRole?()=>t.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:t.accessibilityProvider&&t.accessibilityProvider.getAriaLevel?e=>t.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:t.accessibilityProvider.getActiveDescendantId&&(e=>t.accessibilityProvider.getActiveDescendantId(e.element))}),keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(e){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}}),enableKeyboardNavigation:t.simpleKeyboardNavigation})}class wl{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){this.delegate.setDynamicHeight&&this.delegate.setDynamicHeight(e.element,t)}}var Sl;(function(e){e["None"]="none",e["OnHover"]="onHover",e["Always"]="always"})(Sl||(Sl={}));class yl{constructor(e,t=[]){this._elements=t,this.onDidChange=W["b"].forEach(e,e=>this._elements=e)}get elements(){return this._elements}}class Dl{constructor(e,t,i,n,s={}){this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=Dl.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new dl["a"],this.activeIndentNodes=new Set,this.indentGuidesDisposable=de["a"].None,this.disposables=new de["b"],this.templateId=e.templateId,this.updateOptions(s),W["b"].map(i,e=>e.node)(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState&&e.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if("undefined"!==typeof e.indent&&(this.indent=Object(cl["b"])(e.indent,0,40)),"undefined"!==typeof e.renderIndentGuides){const t=e.renderIndentGuides!==Sl.None;if(t!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=t,this.indentGuidesDisposable.dispose(),t)){const e=new de["b"];this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}"undefined"!==typeof e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=Object(Z["m"])(e,Object(Z["a"])(".monaco-tl-row")),i=Object(Z["m"])(t,Object(Z["a"])(".monaco-tl-indent")),n=Object(Z["m"])(t,Object(Z["a"])(".monaco-tl-twistie")),s=Object(Z["m"])(t,Object(Z["a"])(".monaco-tl-contents")),o=this.renderer.renderTemplate(s);return{container:e,indent:i,twistie:n,indentGuidesDisposable:de["a"].None,templateData:o}}renderElement(e,t,i,n){"number"===typeof n&&(this.renderedNodes.set(e,{templateData:i,height:n}),this.renderedElements.set(e.element,e));const s=Dl.DefaultIndent+(e.depth-1)*this.indent;i.twistie.style.paddingLeft=s+"px",i.indent.style.width=s+this.indent-16+"px",this.renderTwistie(e,i),"number"===typeof n&&this.renderIndentGuides(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){i.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&this.renderer.disposeElement(e,t,i.templateData,n),"number"===typeof n&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this.renderTwistie(e,t.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(e,t.templateData))}renderTwistie(e,t){t.twistie.classList.remove(...ul.classNamesArray);let i=!1;this.renderer.renderTwistie&&(i=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(i||t.twistie.classList.add(...ul.classNamesArray),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded")}renderIndentGuides(e,t){if(Object(Z["p"])(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new de["b"],n=this.modelProvider();let s=e;while(1){const e=n.getNodeLocation(s),o=n.getParentNodeLocation(e);if(!o)break;const r=n.getNode(o),a=Object(Z["a"])(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(r)&&a.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(a):t.indent.insertBefore(a,t.indent.firstElementChild),this.renderedIndentGuides.add(r,a),i.add(Object(de["h"])(()=>this.renderedIndentGuides.delete(r,a))),s=r}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,i=this.modelProvider();e.forEach(e=>{const n=i.getNodeLocation(e);try{const s=i.getParentNodeLocation(n);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):s&&t.add(i.getNode(s))}catch(s){}}),this.activeIndentNodes.forEach(e=>{t.has(e)||this.renderedIndentGuides.forEach(e,e=>e.classList.remove("active"))}),t.forEach(e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,e=>e.classList.add("active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),Object(de["f"])(this.disposables)}}Dl.DefaultIndent=8;class Ll{constructor(e,t,i){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new de["b"],e.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(e){this._pattern=e,this._lowercasePattern=e.toLowerCase()}filter(e,t){if(this._filter){const i=this._filter.filter(e,t);if(this.tree.options.simpleKeyboardNavigation)return i;let n;if(n="boolean"===typeof i?i?1:0:rl(i)?al(i.visibility):i,0===n)return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:ol["a"].Default,visibility:!0};const i=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),n=Array.isArray(i)?i:[i];for(const s of n){const e=s&&s.toString();if("undefined"===typeof e)return{data:ol["a"].Default,visibility:!0};const t=Object(ol["d"])(this._pattern,this._lowercasePattern,0,e,e.toLowerCase(),0,!0);if(t)return this._matchCount++,1===n.length?{data:t,visibility:!0}:{data:{label:e,score:t},visibility:!0}}return this.tree.options.filterOnType?2:{data:ol["a"].Default,visibility:!0}}reset(){this._totalCount=0,this._matchCount=0}dispose(){Object(de["f"])(this.disposables)}}class xl{constructor(e,t,i,n,s){this.tree=e,this.view=i,this.filter=n,this.keyboardNavigationDelegate=s,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new W["a"],this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new W["a"],this.enabledDisposables=new de["b"],this.disposables=new de["b"],this.domNode=Object(Z["a"])(".monaco-list-type-filter."+this.positionClassName),this.domNode.draggable=!0,Object(Na["a"])(this.domNode,"dragstart")(this.onDragStart,this,this.disposables),this.messageDomNode=Object(Z["m"])(i.getHTMLElement(),Object(Z["a"])(".monaco-list-type-filter-message")),this.labelDomNode=Object(Z["m"])(this.domNode,Object(Z["a"])("span.label"));const o=Object(Z["m"])(this.domNode,Object(Z["a"])(".controls"));this._filterOnType=!!e.options.filterOnType,this.filterOnTypeDomNode=Object(Z["m"])(o,Object(Z["a"])("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),Object(Na["a"])(this.filterOnTypeDomNode,"input")(this.onDidChangeFilterOnType,this,this.disposables),this.clearDomNode=Object(Z["m"])(o,Object(Z["a"])("button.clear"+ml.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=Object(Bi["a"])("clear","Clear"),this.keyboardNavigationEventFilter=e.options.keyboardNavigationEventFilter,t.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(e.options)}get enabled(){return this._enabled}get pattern(){return this._pattern}get filterOnType(){return this._filterOnType}updateOptions(e){e.simpleKeyboardNavigation?this.disable():this.enable(),"undefined"!==typeof e.filterOnType&&(this._filterOnType=!!e.filterOnType,this.filterOnTypeDomNode.checked=this._filterOnType),"undefined"!==typeof e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation),this.tree.refilter(),this.render(),this.automaticKeyboardNavigation||this.onEventOrInput("")}enable(){if(this._enabled)return;const e=W["b"].chain(Object(Na["a"])(this.view.getHTMLElement(),"keydown")).filter(e=>!Object(Ga["e"])(e.target)||e.target===this.filterOnTypeDomNode).filter(e=>"Dead"!==e.key&&!/^Media/.test(e.key)).map(e=>new wi["a"](e)).filter(this.keyboardNavigationEventFilter||(()=>!0)).filter(()=>this.automaticKeyboardNavigation||this.triggered).filter(e=>this.keyboardNavigationDelegate.mightProducePrintableCharacter(e)&&!(18===e.keyCode||16===e.keyCode||15===e.keyCode||17===e.keyCode)||(this.pattern.length>0||this.triggered)&&(9===e.keyCode||1===e.keyCode)&&!e.altKey&&!e.ctrlKey&&!e.metaKey||1===e.keyCode&&(Le["f"]?e.altKey&&!e.metaKey:e.ctrlKey)&&!e.shiftKey).forEach(e=>{e.stopPropagation(),e.preventDefault()}).event,t=Object(Na["a"])(this.clearDomNode,"click");W["b"].chain(W["b"].any(e,t)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}disable(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1)}onEventOrInput(e){"string"===typeof e?this.onInput(e):e instanceof MouseEvent||9===e.keyCode||1===e.keyCode&&(Le["f"]?e.altKey:e.ctrlKey)?this.onInput(""):1===e.keyCode?this.onInput(0===this.pattern.length?"":this.pattern.substr(0,this.pattern.length-1)):this.onInput(this.pattern+e.browserEvent.key)}onInput(e){const t=this.view.getHTMLElement();e&&!this.domNode.parentElement?t.append(this.domNode):!e&&this.domNode.parentElement&&(this.domNode.remove(),this.tree.domFocus()),this._pattern=e,this._onDidChangePattern.fire(e),this.filter.pattern=e,this.tree.refilter(),e&&this.tree.focusNext(0,!0,void 0,e=>!ol["a"].isDefault(e.filterData));const i=this.tree.getFocus();if(i.length>0){const e=i[0];null===this.tree.getRelativeTop(e)&&this.tree.reveal(e,.5)}this.render(),e||(this.triggered=!1)}onDragStart(){const e=this.view.getHTMLElement(),{left:t}=Object(Z["z"])(e),i=e.clientWidth,n=i/2,s=this.domNode.clientWidth,o=new de["b"];let r=this.positionClassName;const a=()=>{switch(r){case"nw":this.domNode.style.top="4px",this.domNode.style.left="4px";break;case"ne":this.domNode.style.top="4px",this.domNode.style.left=i-s-6+"px";break}},l=e=>{e.preventDefault();const i=e.clientX-t;e.dataTransfer&&(e.dataTransfer.dropEffect="none"),r=i<n?"nw":"ne",a()},h=()=>{this.positionClassName=r,this.domNode.className="monaco-list-type-filter "+this.positionClassName,this.domNode.style.top="",this.domNode.style.left="",Object(de["f"])(o)};a(),this.domNode.classList.remove(r),this.domNode.classList.add("dragging"),o.add(Object(de["h"])(()=>this.domNode.classList.remove("dragging"))),Object(Na["a"])(document,"dragover")(l,null,o),Object(Na["a"])(this.domNode,"dragend")(h,null,o),nl["c"].CurrentDragAndDropData=new nl["b"]("vscode-ui"),o.add(Object(de["h"])(()=>nl["c"].CurrentDragAndDropData=void 0))}onDidSpliceModel(){this._enabled&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}onDidChangeFilterOnType(){this.tree.updateOptions({filterOnType:this.filterOnTypeDomNode.checked}),this.tree.refilter(),this.tree.domFocus(),this.render(),this.updateFilterOnTypeTitleAndIcon()}updateFilterOnTypeTitleAndIcon(){this.filterOnType?(this.filterOnTypeDomNode.classList.remove(...pl.classNamesArray),this.filterOnTypeDomNode.classList.add(...gl.classNamesArray),this.filterOnTypeDomNode.title=Object(Bi["a"])("disable filter on type","Disable Filter on Type")):(this.filterOnTypeDomNode.classList.remove(...gl.classNamesArray),this.filterOnTypeDomNode.classList.add(...pl.classNamesArray),this.filterOnTypeDomNode.title=Object(Bi["a"])("enable filter on type","Enable Filter on Type"))}render(){const e=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&this.tree.options.filterOnType&&e?(this.messageDomNode.textContent=Object(Bi["a"])("empty","No elements found"),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),this.domNode.classList.toggle("no-matches",e),this.domNode.title=Object(Bi["a"])("found","Matched {0} out of {1} elements",this.filter.matchCount,this.filter.totalCount),this.labelDomNode.textContent=this.pattern.length>16?"…"+this.pattern.substr(this.pattern.length-16):this.pattern,this._onDidChangeEmptyState.fire(this._empty)}shouldAllowFocus(e){return!(this.enabled&&this.pattern&&!this.filterOnType)||(this.filter.totalCount>0&&this.filter.matchCount<=1||!ol["a"].isDefault(e.filterData))}dispose(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),Object(de["f"])(this.disposables)}}function kl(e){let t=el.Unknown;return Object(Z["F"])(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=el.Twistie:Object(Z["F"])(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(t=el.Element),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function El(e,t){t(e),e.children.forEach(e=>El(e,t))}class Nl{constructor(e){this.identityProvider=e,this.nodes=[],this._onDidChange=new W["a"],this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(e,t){var i;!(null===(i=t)||void 0===i?void 0:i.__forceEvent)&&Object(We["g"])(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const e=this;this._onDidChange.fire({get elements(){return e.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map(e=>e.element)),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const e=this.createNodeSet(),i=t=>e.delete(t);return t.forEach(e=>El(e,i)),void this.set([...e.values()])}const i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach(e=>El(e,n));const s=new Map,o=e=>s.set(this.identityProvider.getId(e.element).toString(),e);e.forEach(e=>El(e,o));const r=[];for(const a of this.nodes){const e=this.identityProvider.getId(a.element).toString(),t=i.has(e);if(t){const t=s.get(e);t&&r.push(t)}else r.push(a)}this._set(r,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class Ol extends Ga["d"]{constructor(e,t){super(e),this.tree=t}onViewPointer(e){if(Object(Ga["e"])(e.browserEvent.target)||Object(Ga["f"])(e.browserEvent.target))return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16;let s=!1;if(s="function"===typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick,s&&!n&&2!==e.browserEvent.detail)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&2===e.browserEvent.detail)return super.onViewPointer(e);if(t.collapsible){const i=this.tree.model,o=i.getNodeLocation(t),r=e.browserEvent.altKey;if(this.tree.setFocus([o]),i.setCollapsed(o,void 0,r),s&&n)return}super.onViewPointer(e)}onDoubleClick(e){const t=e.browserEvent.target.classList.contains("monaco-tl-twistie");!t&&this.tree.expandOnDoubleClick&&super.onDoubleClick(e)}}class Il extends Ga["c"]{constructor(e,t,i,n,s,o,r){super(e,t,i,n,r),this.focusTrait=s,this.selectionTrait=o}createMouseController(e){return new Ol(this,e.tree)}splice(e,t,i=[]){if(super.splice(e,t,i),0===i.length)return;const n=[],s=[];i.forEach((t,i)=>{this.focusTrait.has(t)&&n.push(e+i),this.selectionTrait.has(t)&&s.push(e+i)}),n.length>0&&super.setFocus(Object(We["f"])([...super.getFocus(),...n])),s.length>0&&super.setSelection(Object(We["f"])([...super.getSelection(),...s]))}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map(e=>this.element(e)),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map(e=>this.element(e)),t)}}class Tl{constructor(e,t,i,n,s={}){this._options=s,this.eventBufferer=new W["c"],this.disposables=new de["b"],this._onWillRefilter=new W["a"],this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new W["a"];const o=new wl(i),r=new W["e"],a=new W["e"],l=new yl(a.event);this.renderers=n.map(e=>new Dl(e,()=>this.model,r.event,l,s));for(let d of this.renderers)this.disposables.add(d);let h;s.keyboardNavigationLabelProvider&&(h=new Ll(this,s.keyboardNavigationLabelProvider,s.filter),s=Object.assign(Object.assign({},s),{filter:h}),this.disposables.add(h)),this.focus=new Nl(s.identityProvider),this.selection=new Nl(s.identityProvider),this.view=new Il(e,t,o,this.renderers,this.focus,this.selection,Object.assign(Object.assign({},Cl(()=>this.model,s)),{tree:this})),this.model=this.createModel(e,this.view,s),r.input=this.model.onDidChangeCollapseState;const c=W["b"].forEach(this.model.onDidSplice,e=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)})});if(c(()=>null,null,this.disposables),a.input=W["b"].chain(W["b"].any(c,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{const e=new Set;for(const t of this.focus.getNodes())e.add(t);for(const t of this.selection.getNodes())e.add(t);return[...e.values()]}).event,!1!==s.keyboardSupport){const e=W["b"].chain(this.view.onKeyDown).filter(e=>!Object(Ga["e"])(e.target)).map(e=>new wi["a"](e));e.filter(e=>15===e.keyCode).on(this.onLeftArrow,this,this.disposables),e.filter(e=>17===e.keyCode).on(this.onRightArrow,this,this.disposables),e.filter(e=>10===e.keyCode).on(this.onSpace,this,this.disposables)}if(s.keyboardNavigationLabelProvider){const e=s.keyboardNavigationDelegate||Ga["a"];this.typeFilterController=new xl(this,this.model,this.view,h,e),this.focusNavigationFilter=e=>this.typeFilterController.shouldAllowFocus(e),this.disposables.add(this.typeFilterController)}this.styleElement=Object(Z["s"])(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===Sl.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return W["b"].map(this.view.onMouseDblClick,kl)}get onPointer(){return W["b"].map(this.view.onPointer,kl)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get expandOnDoubleClick(){return"undefined"===typeof this._options.expandOnDoubleClick||this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return"undefined"===typeof this._options.expandOnlyOnTwistieClick||this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}updateOptions(e={}){this._options=Object.assign(Object.assign({},this._options),e);for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions({enableKeyboardNavigation:this._options.simpleKeyboardNavigation,automaticKeyboardNavigation:this._options.automaticKeyboardNavigation,smoothScrolling:this._options.smoothScrolling,horizontalScrolling:this._options.horizontalScrolling}),this.typeFilterController&&this.typeFilterController.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===Sl.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}domFocus(){this.view.domFocus()}layout(e,t){this.view.layout(e,t)}style(e){const t="."+this.view.domId,i=[];e.treeIndentGuidesStroke&&(i.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide  { border-color: ${e.treeIndentGuidesStroke.transparent(.4)}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=i.join("\n"),this.view.style(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){const i=e.map(e=>this.model.getNode(e));this.selection.set(i,t);const n=e.map(e=>this.model.getListIndex(e)).filter(e=>e>-1);this.view.setSelection(n,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const i=e.map(e=>this.model.getNode(e));this.focus.set(i,t);const n=e.map(e=>this.model.getListIndex(e)).filter(e=>e>-1);this.view.setFocus(n,t,!0)}focusNext(e=1,t=!1,i,n=this.focusNavigationFilter){this.view.focusNext(e,t,i,n)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);-1!==i&&this.view.reveal(i,t)}getRelativeTop(e){const t=this.model.getListIndex(e);return-1===t?null:this.view.getRelativeTop(t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),s=this.model.setCollapsed(n,!0);if(!s){const e=this.model.getParentNodeLocation(n);if(!e)return;const t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),s=this.model.setCollapsed(n,!1);if(!s){if(!i.children.some(e=>e.visible))return;const[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),s=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,s)}dispose(){Object(de["f"])(this.disposables),this.view.dispose()}}class Ml{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new hl(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare(e,t){return i.sorter.compare(e.element,t.element)}}),this.identityProvider=i.identityProvider}setChildren(e,t=Kr["a"].empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=Kr["a"].empty(),i){const n=new Set,s=new Set,o=e=>{var t;if(null===e.element)return;const o=e;if(n.add(o.element),this.nodes.set(o.element,o),this.identityProvider){const e=this.identityProvider.getId(o.element).toString();s.add(e),this.nodesByIdentity.set(e,o)}null===(t=i.onDidCreateNode)||void 0===t||t.call(i,o)},r=e=>{var t;if(null===e.element)return;const o=e;if(n.has(o.element)||this.nodes.delete(o.element),this.identityProvider){const e=this.identityProvider.getId(o.element).toString();s.has(e)||this.nodesByIdentity.delete(e)}null===(t=i.onDidDeleteNode)||void 0===t||t.call(i,o)};this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},i),{onDidCreateNode:o,onDidDeleteNode:r}))}preserveCollapseState(e=Kr["a"].empty()){return this.sorter&&(e=Object(We["n"])([...e],this.sorter.compare.bind(this.sorter))),Kr["a"].map(e,e=>{let t=this.nodes.get(e.element);if(!t&&this.identityProvider){const i=this.identityProvider.getId(e.element).toString();t=this.nodesByIdentity.get(i)}if(!t)return Object.assign(Object.assign({},e),{children:this.preserveCollapseState(e.children)});const i="boolean"===typeof e.collapsible?e.collapsible:t.collapsible,n="undefined"!==typeof e.collapsed?e.collapsed:t.collapsed;return Object.assign(Object.assign({},e),{collapsible:i,collapsed:n,children:this.preserveCollapseState(e.children)})})}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(null===e)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new tl(this.user,"Tree element not found: "+e);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new tl(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new tl(this.user,"Tree element not found: "+e);const i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i),s=this.model.getNode(n);return s.element}getElementLocation(e){if(null===e)return[];const t=this.nodes.get(e);if(!t)throw new tl(this.user,"Tree element not found: "+e);return this.model.getNodeLocation(t)}}function Al(e){const t=[e.element],i=e.incompressible||!1;return{element:{elements:t,incompressible:i},children:Kr["a"].map(Kr["a"].from(e.children),Al),collapsible:e.collapsible,collapsed:e.collapsed}}function Rl(e){const t=[e.element],i=e.incompressible||!1;let n,s;while(1){if([s,n]=Kr["a"].consume(Kr["a"].from(e.children),2),1!==s.length)break;if(s[0].incompressible)break;e=s[0],t.push(e.element)}return{element:{elements:t,incompressible:i},children:Kr["a"].map(Kr["a"].concat(s,n),Rl),collapsible:e.collapsible,collapsed:e.collapsed}}function Fl(e,t=0){let i;return i=t<e.element.elements.length-1?[Fl(e,t+1)]:Kr["a"].map(Kr["a"].from(e.children),e=>Fl(e,0)),0===t&&e.element.incompressible?{element:e.element.elements[t],children:i,incompressible:!0,collapsible:e.collapsible,collapsed:e.collapsed}:{element:e.element.elements[t],children:i,collapsible:e.collapsible,collapsed:e.collapsed}}function Pl(e){return Fl(e,0)}function Bl(e,t,i){return e.element===t?Object.assign(Object.assign({},e),{children:i}):Object.assign(Object.assign({},e),{children:Kr["a"].map(Kr["a"].from(e.children),e=>Bl(e,t,i))})}const Wl=e=>({getId(t){return t.elements.map(t=>e.getId(t).toString()).join("\0")}});class Vl{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new Ml(e,t,i),this.enabled="undefined"===typeof i.compressionEnabled||i.compressionEnabled,this.identityProvider=i.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(e,t=Kr["a"].empty(),i){const n=i.diffIdentityProvider&&Wl(i.diffIdentityProvider);if(null===e){const e=Kr["a"].map(t,this.enabled?Rl:Al);return void this._setChildren(null,e,{diffIdentityProvider:n,diffDepth:1/0})}const s=this.nodes.get(e);if(!s)throw new Error("Unknown compressed tree node");const o=this.model.getNode(s),r=this.model.getParentNodeLocation(s),a=this.model.getNode(r),l=Pl(o),h=Bl(l,e,t),c=(this.enabled?Rl:Al)(h),d=a.children.map(e=>e===o?c:e);this._setChildren(a.element,d,{diffIdentityProvider:n,diffDepth:o.depth-a.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const t=this.model.getNode(),i=t.children,n=Kr["a"].map(i,Pl),s=Kr["a"].map(n,e?Rl:Al);this._setChildren(null,s,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set,s=e=>{for(const t of e.element.elements)n.add(t),this.nodes.set(t,e.element)},o=e=>{for(const t of e.element.elements)n.has(t)||this.nodes.delete(t)};this.model.setChildren(e,t,Object.assign(Object.assign({},i),{onDidCreateNode:s,onDidDeleteNode:o}))}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if("undefined"===typeof e)return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return null===i?null:i.elements[i.elements.length-1]}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(null===e)return null;const t=this.nodes.get(e);if(!t)throw new tl(this.user,"Tree element not found: "+e);return t}}const jl=e=>e[e.length-1];class Hl{constructor(e,t){this.unwrapper=e,this.node=t}get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new Hl(this.unwrapper,e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}function zl(e,t){return{splice(i,n,s){t.splice(i,n,s.map(t=>e.map(t)))},updateElementHeight(e,i){t.updateElementHeight(e,i)}}}function Ul(e,t){return Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId(i){return t.identityProvider.getId(e(i))}},sorter:t.sorter&&{compare(e,i){return t.sorter.compare(e.elements[0],i.elements[0])}},filter:t.filter&&{filter(i,n){return t.filter.filter(e(i),n)}}})}class Kl{constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||jl;const n=e=>this.elementMapper(e.elements);this.nodeMapper=new il(e=>new Hl(n,e)),this.model=new Vl(e,zl(this.nodeMapper,t),Ul(n,i))}get onDidSplice(){return W["b"].map(this.model.onDidSplice,({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map(e=>this.nodeMapper.map(e)),deletedNodes:t.map(e=>this.nodeMapper.map(e))}))}get onDidChangeCollapseState(){return W["b"].map(this.model.onDidChangeCollapseState,({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t}))}get onDidChangeRenderNodeCount(){return W["b"].map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}setChildren(e,t=Kr["a"].empty(),i={}){this.model.setChildren(e,t,i)}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var $l=i("6424"),ql=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};class Gl extends Tl{constructor(e,t,i,n,s={}){super(e,t,i,n,s)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(e,t=Kr["a"].empty(),i){this.model.setChildren(e,t,i)}rerender(e){void 0!==e?this.model.rerender(e):this.view.rerender()}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new Ml(e,t,i)}}class Yl{constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(e){const t=this.renderer.renderTemplate(e);return{compressedTreeNode:void 0,data:t}}renderElement(e,t,i,n){const s=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);1===s.element.elements.length?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=s,this.renderer.renderCompressedElements(s,t,i.data,n))}disposeElement(e,t,i,n){i.compressedTreeNode?this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(i.compressedTreeNode,t,i.data,n):this.renderer.disposeElement&&this.renderer.disposeElement(e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return!!this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)}}function Zl(e,t){return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(i){let n;try{n=e().getCompressedTreeNode(i)}catch(s){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i)}return 1===n.element.elements.length?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.element.elements)}}})}ql([$l["a"]],Yl.prototype,"compressedTreeNodeProvider",null);class Xl extends Gl{constructor(e,t,i,n,s={}){const o=()=>this,r=n.map(e=>new Yl(o,e));super(e,t,i,r,Zl(o,s))}setChildren(e,t=Kr["a"].empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new Kl(e,t,i)}updateOptions(e={}){super.updateOptions(e),"undefined"!==typeof e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var Ql=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function Jl(e){return Object.assign(Object.assign({},e),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function eh(e,t){return!!t.parent&&(t.parent===e||eh(e,t.parent))}function th(e,t){return e===t||eh(e,t)||eh(t,e)}class ih{constructor(e){this.node=e}get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new ih(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class nh{constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){const t=this.renderer.renderTemplate(e);return{templateData:t}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...fl.classNamesArray),!0):(t.classList.remove(...fl.classNamesArray),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function sh(e){return{browserEvent:e.browserEvent,elements:e.elements.map(e=>e.element)}}function oh(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class rh extends sl["a"]{constructor(e){super(e.elements.map(e=>e.element)),this.data=e}}function ah(e){return e instanceof sl["a"]?new rh(e):e}class lh{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(e=>e.element),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(ah(e),t)}onDragOver(e,t,i,n,s=!0){return this.dnd.onDragOver(ah(e),t&&t.element,i,n)}drop(e,t,i,n){this.dnd.drop(ah(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}function hh(e){return e&&Object.assign(Object.assign({},e),{collapseByDefault:!0,identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(t.element)}},dnd:e.dnd&&new lh(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(t){return e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},isSelectionRangeChangeEvent(t){return e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))}},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",isChecked:e.accessibilityProvider.isChecked?t=>{var i;return!!(null===(i=e.accessibilityProvider)||void 0===i?void 0:i.isChecked(t.element))}:void 0,getAriaLabel(t){return e.accessibilityProvider.getAriaLabel(t.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider.getAriaLevel&&(t=>e.accessibilityProvider.getAriaLevel(t.element)),getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))}),filter:e.filter&&{filter(t,i){return e.filter.filter(t.element,i)}},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}}),sorter:void 0,expandOnlyOnTwistieClick:"undefined"===typeof e.expandOnlyOnTwistieClick?void 0:"function"!==typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:t=>e.expandOnlyOnTwistieClick(t.element),additionalScrollHeight:e.additionalScrollHeight})}function ch(e,t){t(e),e.children.forEach(e=>ch(e,t))}class dh{constructor(e,t,i,n,s,o={}){this.user=e,this.dataSource=s,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new W["a"],this._onDidChangeNodeSlowState=new W["a"],this.nodeMapper=new il(e=>new ih(e)),this.disposables=new de["b"],this.identityProvider=o.identityProvider,this.autoExpandSingleChildren="undefined"!==typeof o.autoExpandSingleChildren&&o.autoExpandSingleChildren,this.sorter=o.sorter,this.collapseByDefault=o.collapseByDefault,this.tree=this.createTree(e,t,i,n,o),this.root=Jl({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}get onDidChangeFocus(){return W["b"].map(this.tree.onDidChangeFocus,sh)}get onDidChangeSelection(){return W["b"].map(this.tree.onDidChangeSelection,sh)}get onMouseDblClick(){return W["b"].map(this.tree.onMouseDblClick,oh)}get onPointer(){return W["b"].map(this.tree.onPointer,oh)}get onDidFocus(){return this.tree.onDidFocus}get onDidDispose(){return this.tree.onDidDispose}createTree(e,t,i,n,s){const o=new wl(i),r=n.map(e=>new nh(e,this.nodeMapper,this._onDidChangeNodeSlowState.event)),a=hh(s)||{};return new Gl(e,t,o,r,a)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}setInput(e,t){return Ql(this,void 0,void 0,(function*(){this.refreshPromises.forEach(e=>e.cancel()),this.refreshPromises.clear(),this.root.element=e;const i=t&&{viewState:t,focus:[],selection:[]};yield this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&"number"===typeof t.scrollTop&&(this.scrollTop=t.scrollTop)}))}_updateChildren(e=this.root.element,t=!0,i=!1,n,s){return Ql(this,void 0,void 0,(function*(){if("undefined"===typeof this.root.element)throw new tl(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield W["b"].toPromise(this._onDidRender.event));const o=this.getDataNode(e);if(yield this.refreshAndRenderNode(o,t,n,s),i)try{this.tree.rerender(o)}catch(r){}}))}rerender(e){if(void 0===e||e===this.root.element)return void this.tree.rerender();const t=this.getDataNode(e);this.tree.rerender(t)}collapse(e,t=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}expand(e,t=!1){return Ql(this,void 0,void 0,(function*(){if("undefined"===typeof this.root.element)throw new tl(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield W["b"].toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i))return!1;if(i.refreshPromise&&(yield this.root.refreshPromise,yield W["b"].toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i))return!1;const n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(yield this.root.refreshPromise,yield W["b"].toPromise(this._onDidRender.event)),n}))}setSelection(e,t){const i=e.map(e=>this.getDataNode(e));this.tree.setSelection(i,t)}getSelection(){const e=this.tree.getSelection();return e.map(e=>e.element)}setFocus(e,t){const i=e.map(e=>this.getDataNode(e));this.tree.setFocus(i,t)}getFocus(){const e=this.tree.getFocus();return e.map(e=>e.element)}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new tl(this.user,"Data tree node not found: "+e);return t}refreshAndRenderNode(e,t,i,n){return Ql(this,void 0,void 0,(function*(){yield this.refreshNode(e,t,i),this.render(e,i,n)}))}refreshNode(e,t,i){return Ql(this,void 0,void 0,(function*(){let n;return this.subTreeRefreshPromises.forEach((s,o)=>{!n&&th(o,e)&&(n=s.then(()=>this.refreshNode(e,t,i)))}),n||this.doRefreshSubTree(e,t,i)}))}doRefreshSubTree(e,t,i){return Ql(this,void 0,void 0,(function*(){let n;e.refreshPromise=new Promise(e=>n=e),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)});try{const s=yield this.doRefreshNode(e,t,i);e.stale=!1,yield ye["d"].settled(s.map(e=>this.doRefreshSubTree(e,t,i)))}finally{n()}}))}doRefreshNode(e,t,i){return Ql(this,void 0,void 0,(function*(){let n;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){const t=Object(ye["k"])(800);t.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},e=>null),n=this.doGetChildren(e).finally(()=>t.cancel())}else n=Promise.resolve(Kr["a"].empty());try{const s=yield n;return this.setChildren(e,s,t,i)}catch(s){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),Object(De["d"])(s))return[];throw s}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}))}doGetChildren(e){let t=this.refreshPromises.get(e);return t||(t=Object(ye["h"])(()=>Ql(this,void 0,void 0,(function*(){const t=yield this.dataSource.getChildren(e.element);return this.processChildren(t)}))),this.refreshPromises.set(e,t),t.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:t}){null!==e.element&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(De["e"]))}setChildren(e,t,i,n){const s=[...t];if(0===e.children.length&&0===s.length)return[];const o=new Map,r=new Map;for(const h of e.children)if(o.set(h.element,h),this.identityProvider){const e=this.tree.isCollapsed(h);r.set(h.id,{node:h,collapsed:e})}const a=[],l=s.map(t=>{const s=!!this.dataSource.hasChildren(t);if(!this.identityProvider){const i=Jl({element:t,parent:e,hasChildren:s});return s&&this.collapseByDefault&&!this.collapseByDefault(t)&&(i.collapsedByDefault=!1,a.push(i)),i}const l=this.identityProvider.getId(t).toString(),h=r.get(l);if(h){const e=h.node;return o.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=s,i?h.collapsed?(e.children.forEach(e=>ch(e,e=>this.nodes.delete(e.element))),e.children.splice(0,e.children.length),e.stale=!0):a.push(e):s&&this.collapseByDefault&&!this.collapseByDefault(t)&&(e.collapsedByDefault=!1,a.push(e)),e}const c=Jl({element:t,parent:e,id:l,hasChildren:s});return n&&n.viewState.focus&&n.viewState.focus.indexOf(l)>-1&&n.focus.push(c),n&&n.viewState.selection&&n.viewState.selection.indexOf(l)>-1&&n.selection.push(c),n&&n.viewState.expanded&&n.viewState.expanded.indexOf(l)>-1?a.push(c):s&&this.collapseByDefault&&!this.collapseByDefault(t)&&(c.collapsedByDefault=!1,a.push(c)),c});for(const h of o.values())ch(h,e=>this.nodes.delete(e.element));for(const h of l)this.nodes.set(h.element,h);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].collapsedByDefault=!1,a.push(l[0])),a}render(e,t,i){const n=e.children.map(e=>this.asTreeElement(e,t)),s=i&&Object.assign(Object.assign({},i),{diffIdentityProvider:i.diffIdentityProvider&&{getId(e){return i.diffIdentityProvider.getId(e.element)}}});this.tree.setChildren(e===this.root?null:e,n,s),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let i;return i=!(t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1)&&e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?Kr["a"].map(e.children,e=>this.asTreeElement(e,t)):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose()}}class uh{constructor(e){this.node=e}get element(){return{elements:this.node.element.elements.map(e=>e.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(e=>new uh(e))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class gh{constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){const t=this.renderer.renderTemplate(e);return{templateData:t}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...fl.classNamesArray),!0):(t.classList.remove(...fl.classNamesArray),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=Object(de["f"])(this.disposables)}}function ph(e){const t=e&&hh(e);return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(e=>e.element))}})})}class mh extends dh{constructor(e,t,i,n,s,o,r={}){super(e,t,i,s,o,r),this.compressionDelegate=n,this.compressibleNodeMapper=new il(e=>new uh(e)),this.filter=r.filter}createTree(e,t,i,n,s){const o=new wl(i),r=n.map(e=>new gh(e,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),a=ph(s)||{};return new Xl(e,t,o,r,a)}asTreeElement(e,t){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(e.element)},super.asTreeElement(e,t))}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t){if(!this.identityProvider)return super.render(e,t);const i=e=>this.identityProvider.getId(e).toString(),n=e=>{const t=new Set;for(const n of e){const e=this.tree.getCompressedTreeNode(n===this.root?null:n);if(e.element)for(const n of e.element.elements)t.add(i(n.element))}return t},s=n(this.tree.getSelection()),o=n(this.tree.getFocus());super.render(e,t);const r=this.getSelection();let a=!1;const l=this.getFocus();let h=!1;const c=e=>{const t=e.element;if(t)for(let n=0;n<t.elements.length;n++){const e=i(t.elements[n].element),c=t.elements[t.elements.length-1].element;s.has(e)&&-1===r.indexOf(c)&&(r.push(c),a=!0),o.has(e)&&-1===l.indexOf(c)&&(l.push(c),h=!0)}e.children.forEach(c)};c(this.tree.getCompressedTreeNode(e===this.root?null:e)),a&&this.setSelection(r),h&&this.setFocus(l)}processChildren(e){return this.filter&&(e=Kr["a"].filter(e,e=>{const t=this.filter.filter(e,1),i=fh(t);if(2===i)throw new Error("Recursive tree visibility not supported in async data compressed trees");return 1===i})),super.processChildren(e)}}function fh(e){return"boolean"===typeof e?e?1:0:rl(e)?al(e.visibility):al(e)}class _h extends Tl{constructor(e,t,i,n,s,o={}){super(e,t,i,n,o),this.user=e,this.dataSource=s,this.identityProvider=o.identityProvider}createModel(e,t,i){return new Ml(e,t,i)}}i("ec60"),i("e750");var bh=i("42e3");const vh={separatorBorder:_r["a"].transparent};class Ch{constructor(e,t,i,n){this.container=e,this.view=t,this.disposable=n,this._cachedVisibleSize=void 0,"number"===typeof i?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}set size(e){this._size=e}get size(){return this._size}get visible(){return"undefined"===typeof this._cachedVisibleSize}setVisible(e,t){e!==this.visible&&(e?(this.size=Object(cl["b"])(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize="number"===typeof t?t:this.size,this.size=0),this.container.classList.toggle("visible",e),this.view.setVisible&&this.view.setVisible(e))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}layout(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}dispose(){return this.disposable.dispose(),this.view}}class wh extends Ch{layoutContainer(e){this.container.style.top=e+"px",this.container.style.height=this.size+"px"}}class Sh extends Ch{layoutContainer(e){this.container.style.left=e+"px",this.container.style.width=this.size+"px"}}var yh,Dh;(function(e){e[e["Idle"]=0]="Idle",e[e["Busy"]=1]="Busy"})(yh||(yh={})),function(e){function t(e){return{type:"split",index:e}}function i(e){return{type:"invisible",cachedVisibleSize:e}}e.Distribute={type:"distribute"},e.Split=t,e.Invisible=i}(Dh||(Dh={}));class Lh extends de["a"]{constructor(e,t={}){var i,n;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=yh.Idle,this._onDidSashChange=this._register(new W["a"]),this.onDidSashChange=this._onDidSashChange.event,this._onDidSashReset=this._register(new W["a"]),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.orientation=xe["j"](t.orientation)?0:t.orientation,this.inverseAltBehavior=!!t.inverseAltBehavior,this.proportionalLayout=!!xe["j"](t.proportionalLayout)||!!t.proportionalLayout,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(0===this.orientation?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=Object(Z["m"])(this.el,Object(Z["a"])(".sash-container")),this.viewContainer=Object(Z["a"])(".split-view-container"),this.scrollable=new bh["a"](125,Z["Q"]),this.scrollableElement=this._register(new Wn["c"](this.viewContainer,{vertical:0===this.orientation?null!==(i=t.scrollbarVisibility)&&void 0!==i?i:1:2,horizontal:1===this.orientation?null!==(n=t.scrollbarVisibility)&&void 0!==n?n:1:2},this.scrollable)),this._register(this.scrollableElement.onScroll(e=>{this.viewContainer.scrollTop=e.scrollTop,this.viewContainer.scrollLeft=e.scrollLeft})),Object(Z["m"])(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||vh),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach((e,t)=>{const i=xe["j"](e.visible)||e.visible?e.size:{type:"invisible",cachedVisibleSize:e.size},n=e.view;this.doAddView(n,i,t,!0)}),this.contentSize=this.viewItems.reduce((e,t)=>e+t.size,0),this.saveProportions())}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}get startSnappingEnabled(){return this._startSnappingEnabled}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}get endSnappingEnabled(){return this._endSnappingEnabled}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,i=this.viewItems.length,n){this.doAddView(e,t,i,n)}layout(e,t){const i=Math.max(this.size,this.contentSize);if(this.size=e,this.layoutContext=t,this.proportions)for(let n=0;n<this.viewItems.length;n++){const t=this.viewItems[n];t.size=Object(cl["b"])(Math.round(this.proportions[n]*e),t.minimumSize,t.maximumSize)}else{const t=Object(We["r"])(this.viewItems.length),n=t.filter(e=>1===this.viewItems[e].priority),s=t.filter(e=>2===this.viewItems[e].priority);this.resize(this.viewItems.length-1,e-i,void 0,n,s)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(e=>e.size/this.contentSize))}onSashStart({sash:e,start:t,alt:i}){for(const r of this.viewItems)r.enabled=!1;const n=this.sashItems.findIndex(t=>t.sash===e),s=Object(de["e"])(Object(Na["a"])(document.body,"keydown")(e=>o(this.sashDragState.current,e.altKey)),Object(Na["a"])(document.body,"keyup")(()=>o(this.sashDragState.current,!1))),o=(e,t)=>{const i=this.viewItems.map(e=>e.size);let o,r,a=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(t=!t),t){const e=n===this.sashItems.length-1;if(e){const e=this.viewItems[n];a=(e.minimumSize-e.size)/2,l=(e.maximumSize-e.size)/2}else{const e=this.viewItems[n+1];a=(e.size-e.maximumSize)/2,l=(e.size-e.minimumSize)/2}}if(!t){const e=Object(We["r"])(n,-1),t=Object(We["r"])(n+1,this.viewItems.length),s=e.reduce((e,t)=>e+(this.viewItems[t].minimumSize-i[t]),0),a=e.reduce((e,t)=>e+(this.viewItems[t].viewMaximumSize-i[t]),0),l=0===t.length?Number.POSITIVE_INFINITY:t.reduce((e,t)=>e+(i[t]-this.viewItems[t].minimumSize),0),h=0===t.length?Number.NEGATIVE_INFINITY:t.reduce((e,t)=>e+(i[t]-this.viewItems[t].viewMaximumSize),0),c=Math.max(s,h),d=Math.min(l,a),u=this.findFirstSnapIndex(e),g=this.findFirstSnapIndex(t);if("number"===typeof u){const e=this.viewItems[u],t=Math.floor(e.viewMinimumSize/2);o={index:u,limitDelta:e.visible?c-t:c+t,size:e.size}}if("number"===typeof g){const e=this.viewItems[g],t=Math.floor(e.viewMinimumSize/2);r={index:g,limitDelta:e.visible?d+t:d-t,size:e.size}}}this.sashDragState={start:e,current:e,index:n,sizes:i,minDelta:a,maxDelta:l,alt:t,snapBefore:o,snapAfter:r,disposable:s}};o(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:s,minDelta:o,maxDelta:r,snapBefore:a,snapAfter:l}=this.sashDragState;this.sashDragState.current=e;const h=e-i,c=this.resize(t,h,n,void 0,void 0,o,r,a,l);if(s){const e=t===this.sashItems.length-1,i=this.viewItems.map(e=>e.size),n=e?t:t+1,s=this.viewItems[n],o=s.size-s.maximumSize,r=s.size-s.minimumSize,a=e?t-1:t+1;this.resize(a,-c,i,void 0,void 0,o,r)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const t of this.viewItems)t.enabled=!0}onViewChange(e,t){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t="number"===typeof t?t:e.size,t=Object(cl["b"])(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([i],void 0)))}resizeView(e,t){if(this.state!==yh.Idle)throw new Error("Cant modify splitview");if(this.state=yh.Busy,e<0||e>=this.viewItems.length)return;const i=Object(We["r"])(this.viewItems.length).filter(t=>t!==e),n=[...i.filter(e=>1===this.viewItems[e].priority),e],s=i.filter(e=>2===this.viewItems[e].priority),o=this.viewItems[e];t=Math.round(t),t=Object(cl["b"])(t,o.minimumSize,Math.min(o.maximumSize,this.size)),o.size=t,this.relayout(n,s),this.state=yh.Idle}distributeViewSizes(){const e=[];let t=0;for(const r of this.viewItems)r.maximumSize-r.minimumSize>0&&(e.push(r),t+=r.size);const i=Math.floor(t/e.length);for(const r of e)r.size=Object(cl["b"])(i,r.minimumSize,r.maximumSize);const n=Object(We["r"])(this.viewItems.length),s=n.filter(e=>1===this.viewItems[e].priority),o=n.filter(e=>2===this.viewItems[e].priority);this.relayout(s,o)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,i=this.viewItems.length,n){if(this.state!==yh.Idle)throw new Error("Cant modify splitview");this.state=yh.Busy;const s=Object(Z["a"])(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(s):this.viewContainer.insertBefore(s,this.viewContainer.children.item(i));const o=e.onDidChange(e=>this.onViewChange(h,e)),r=Object(de["h"])(()=>this.viewContainer.removeChild(s)),a=Object(de["e"])(o,r);let l;l="number"===typeof t?t:"split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize;const h=0===this.orientation?new wh(s,e,l,a):new Sh(s,e,l,a);if(this.viewItems.splice(i,0,h),this.viewItems.length>1){let e={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash};const t=0===this.orientation?new Rn["b"](this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:1})):new Rn["b"](this.sashContainer,{getVerticalSashLeft:e=>this.getSashPosition(e),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:0})),n=0===this.orientation?e=>({sash:t,start:e.startY,current:e.currentY,alt:e.altKey}):e=>({sash:t,start:e.startX,current:e.currentX,alt:e.altKey}),s=W["b"].map(t.onDidStart,n),o=s(this.onSashStart,this),r=W["b"].map(t.onDidChange,n),a=r(this.onSashChange,this),l=W["b"].map(t.onDidEnd,()=>this.sashItems.findIndex(e=>e.sash===t)),h=l(this.onSashEnd,this),c=t.onDidReset(()=>{const e=this.sashItems.findIndex(e=>e.sash===t),i=Object(We["r"])(e,-1),n=Object(We["r"])(e+1,this.viewItems.length),s=this.findFirstSnapIndex(i),o=this.findFirstSnapIndex(n);("number"!==typeof s||this.viewItems[s].visible)&&("number"!==typeof o||this.viewItems[o].visible)&&this._onDidSashReset.fire(e)}),d=Object(de["e"])(o,a,h,c,t),u={sash:t,disposable:d};this.sashItems.splice(i-1,0,u)}let c;s.appendChild(e.element),"number"!==typeof t&&"split"===t.type&&(c=[t.index]),n||this.relayout([i],c),this.state=yh.Idle,n||"number"===typeof t||"distribute"!==t.type||this.distributeViewSizes()}relayout(e,t){const i=this.viewItems.reduce((e,t)=>e+t.size,0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,i=this.viewItems.map(e=>e.size),n,s,o=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY,a,l){if(e<0||e>=this.viewItems.length)return 0;const h=Object(We["r"])(e,-1),c=Object(We["r"])(e+1,this.viewItems.length);if(s)for(const S of s)Object(We["p"])(h,S),Object(We["p"])(c,S);if(n)for(const S of n)Object(We["o"])(h,S),Object(We["o"])(c,S);const d=h.map(e=>this.viewItems[e]),u=h.map(e=>i[e]),g=c.map(e=>this.viewItems[e]),p=c.map(e=>i[e]),m=h.reduce((e,t)=>e+(this.viewItems[t].minimumSize-i[t]),0),f=h.reduce((e,t)=>e+(this.viewItems[t].maximumSize-i[t]),0),_=0===c.length?Number.POSITIVE_INFINITY:c.reduce((e,t)=>e+(i[t]-this.viewItems[t].minimumSize),0),b=0===c.length?Number.NEGATIVE_INFINITY:c.reduce((e,t)=>e+(i[t]-this.viewItems[t].maximumSize),0),v=Math.max(m,b,o),C=Math.min(_,f,r);let w=!1;if(a){const e=this.viewItems[a.index],i=t>=a.limitDelta;w=i!==e.visible,e.setVisible(i,a.size)}if(!w&&l){const e=this.viewItems[l.index],i=t<l.limitDelta;w=i!==e.visible,e.setVisible(i,l.size)}if(w)return this.resize(e,t,i,n,s,o,r);t=Object(cl["b"])(t,v,C);for(let S=0,y=t;S<d.length;S++){const e=d[S],t=Object(cl["b"])(u[S]+y,e.minimumSize,e.maximumSize),i=t-u[S];y-=i,e.size=t}for(let S=0,y=t;S<g.length;S++){const e=g[S],t=Object(cl["b"])(p[S]-y,e.minimumSize,e.maximumSize),i=t-p[S];y+=i,e.size=t}return t}distributeEmptySpace(e){const t=this.viewItems.reduce((e,t)=>e+t.size,0);let i=this.size-t;const n=Object(We["r"])(this.viewItems.length-1,-1),s=n.filter(e=>1===this.viewItems[e].priority),o=n.filter(e=>2===this.viewItems[e].priority);for(const r of o)Object(We["p"])(n,r);for(const r of s)Object(We["o"])(n,r);"number"===typeof e&&Object(We["o"])(n,e);for(let r=0;0!==i&&r<n.length;r++){const e=this.viewItems[n[r]],t=Object(cl["b"])(e.size+i,e.minimumSize,e.maximumSize),s=t-e.size;i-=s,e.size=t}}layoutViews(){this.contentSize=this.viewItems.reduce((e,t)=>e+t.size,0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach(e=>e.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){0===this.orientation?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map(t=>e=t.size-t.minimumSize>0||e);e=!1;const i=this.viewItems.map(t=>e=t.maximumSize-t.size>0||e),n=[...this.viewItems].reverse();e=!1;const s=n.map(t=>e=t.size-t.minimumSize>0||e).reverse();e=!1;const o=n.map(t=>e=t.maximumSize-t.size>0||e).reverse();let r=0;for(let a=0;a<this.sashItems.length;a++){const{sash:e}=this.sashItems[a],n=this.viewItems[a];r+=n.size;const l=!(t[a]&&o[a+1]),h=!(i[a]&&s[a+1]);if(l&&h){const i=Object(We["r"])(a,-1),n=Object(We["r"])(a+1,this.viewItems.length),o=this.findFirstSnapIndex(i),l=this.findFirstSnapIndex(n),h="number"===typeof o&&!this.viewItems[o].visible,c="number"===typeof l&&!this.viewItems[l].visible;h&&s[a]&&(r>0||this.startSnappingEnabled)?e.state=1:c&&t[a]&&(r<this.contentSize||this.endSnappingEnabled)?e.state=2:e.state=0}else e.state=l&&!h?1:!l&&h?2:3}}getSashPosition(e){let t=0;for(let i=0;i<this.sashItems.length;i++)if(t+=this.viewItems[i].size,this.sashItems[i].sash===e)return t;return 0}findFirstSnapIndex(e){for(const t of e){const e=this.viewItems[t];if(e.visible&&e.snap)return t}for(const t of e){const e=this.viewItems[t];if(e.visible&&e.maximumSize-e.minimumSize>0)return;if(!e.visible&&e.snap)return t}}dispose(){super.dispose(),this.viewItems.forEach(e=>e.dispose()),this.viewItems=[],this.sashItems.forEach(e=>e.disposable.dispose()),this.sashItems=[]}}class xh{constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=xh.TemplateId,this.renderedTemplates=new Set;const n=new Map(t.map(e=>[e.templateId,e]));this.renderers=[];for(const s of e){const e=n.get(s.templateId);if(!e)throw new Error(`Table cell renderer for template id ${s.templateId} not found.`);this.renderers.push(e)}}renderTemplate(e){const t=Object(Z["m"])(e,Object(Z["a"])(".monaco-table-tr")),i=[],n=[];for(let o=0;o<this.columns.length;o++){const e=this.renderers[o],s=Object(Z["m"])(t,Object(Z["a"])(".monaco-table-td",{"data-col-index":o}));s.style.width=this.getColumnSize(o)+"px",i.push(s),n.push(e.renderTemplate(s))}const s={container:e,cellContainers:i,cellTemplateData:n};return this.renderedTemplates.add(s),s}renderElement(e,t,i,n){for(let s=0;s<this.columns.length;s++){const o=this.columns[s],r=o.project(e),a=this.renderers[s];a.renderElement(r,t,i.cellTemplateData[s],n)}}disposeElement(e,t,i,n){for(let s=0;s<this.columns.length;s++){const o=this.renderers[s];if(o.disposeElement){const r=this.columns[s],a=r.project(e);o.disposeElement(a,t,i.cellTemplateData[s],n)}}}disposeTemplate(e){for(let t=0;t<this.columns.length;t++){const i=this.renderers[t];i.disposeTemplate(e.cellTemplateData[t])}Object(Z["p"])(e.container),this.renderedTemplates.delete(e)}layoutColumn(e,t){for(const{cellContainers:i}of this.renderedTemplates)i[e].style.width=t+"px"}}function kh(e){return{getHeight(t){return e.getHeight(t)},getTemplateId(){return xh.TemplateId}}}xh.TemplateId="row";class Eh{constructor(e,t){this.column=e,this.index=t,this._onDidLayout=new W["a"],this.onDidLayout=this._onDidLayout.event,this.element=Object(Z["a"])(".monaco-table-th",{"data-col-index":t,title:e.tooltip},e.label)}get minimumSize(){var e;return null!==(e=this.column.minimumWidth)&&void 0!==e?e:120}get maximumSize(){var e;return null!==(e=this.column.maximumWidth)&&void 0!==e?e:Number.POSITIVE_INFINITY}get onDidChange(){var e;return null!==(e=this.column.onDidChangeWidthConstraints)&&void 0!==e?e:W["b"].None}layout(e){this._onDidLayout.fire([this.index,e])}}class Nh{constructor(e,t,i,n,s,o){this.virtualDelegate=i,this.domId="table_id_"+ ++Nh.InstanceCount,this.cachedHeight=0,this.domNode=Object(Z["m"])(t,Object(Z["a"])(".monaco-table."+this.domId));const r=n.map((e,t)=>new Eh(e,t)),a={size:r.reduce((e,t)=>e+t.column.weight,0),views:r.map(e=>({size:e.column.weight,view:e}))};this.splitview=new Lh(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:a}),this.splitview.el.style.height=i.headerRowHeight+"px",this.splitview.el.style.lineHeight=i.headerRowHeight+"px";const l=new xh(n,s,e=>this.splitview.getViewSize(e));this.list=new Ga["c"](e,this.domNode,kh(i),[l],o),this.columnLayoutDisposable=W["b"].any(...r.map(e=>e.onDidLayout))(([e,t])=>l.layoutColumn(e,t)),this.styleElement=Object(Z["s"])(this.domNode),this.style({})}get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}updateOptions(e){this.list.updateOptions(e)}splice(e,t,i=[]){this.list.splice(e,t,i)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\ttop: ${this.virtualDelegate.headerRowHeight+1}px;\n\t\t\theight: calc(100% - ${this.virtualDelegate.headerRowHeight}px);\n\t\t}`),this.styleElement.textContent=t.join("\n"),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}setSelection(e,t){this.list.setSelection(e,t)}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.splitview.dispose(),this.list.dispose(),this.columnLayoutDisposable.dispose()}}Nh.InstanceCount=0;var Oh=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Ih=function(e,t){return function(i,n){t(i,n,e)}};const Th=Object(Dt["c"])("listService");let Mh=class{constructor(e){this._themeService=e,this.disposables=new de["b"],this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}register(e,t){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const e=new Ga["b"](Object(Z["s"])(),"");this.disposables.add(Object(Ea["a"])(e,this._themeService))}if(this.lists.some(t=>t.widget===e))throw new Error("Cannot register the same widget multiple times");const i={widget:e,extraContextKeys:t};return this.lists.push(i),e.getHTMLElement()===document.activeElement&&(this._lastFocusedWidget=e),Object(de["e"])(e.onDidFocus(()=>this._lastFocusedWidget=e),Object(de["h"])(()=>this.lists.splice(this.lists.indexOf(i),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(e=>e!==i),this._lastFocusedWidget===e&&(this._lastFocusedWidget=void 0)}))}dispose(){this.disposables.dispose()}};Mh=Oh([Ih(0,Kn["b"])],Mh);const Ah=new zn["c"]("listFocus",!0),Rh=new zn["c"]("listSupportsMultiselect",!0),Fh=(zn["a"].and(Ah,zn["a"].not(Ja)),new zn["c"]("listHasSelectionOrFocus",!1)),Ph=new zn["c"]("listDoubleSelection",!1),Bh=new zn["c"]("listMultiSelection",!1),Wh=new zn["c"]("listSupportsKeyboardNavigation",!0),Vh="listAutomaticKeyboardNavigation",jh=new zn["c"](Vh,!0);let Hh=!1;function zh(e,t){const i=e.createScoped(t.getHTMLElement());return Ah.bindTo(i),i}const Uh="workbench.list.multiSelectModifier",Kh="workbench.list.openMode",$h="workbench.list.horizontalScrolling",qh="workbench.list.keyboardNavigation",Gh="workbench.list.automaticKeyboardNavigation",Yh="workbench.tree.indent",Zh="workbench.tree.renderIndentGuides",Xh="workbench.list.smoothScrolling",Qh="workbench.tree.expandMode";function Jh(e){return"alt"===e.getValue(Uh)}class ec extends de["a"]{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=Jh(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(Uh)&&(this.useAltAsMultipleSelectionModifier=Jh(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:Object(Ga["h"])(e)}isSelectionRangeChangeEvent(e){return Object(Ga["g"])(e)}}function tc(e,t,i){const n=new de["b"],s=Object.assign({},e);if(!1!==e.multipleSelectionSupport&&!e.multipleSelectionController){const e=new ec(t);s.multipleSelectionController=e,n.add(e)}return s.keyboardNavigationDelegate={mightProducePrintableCharacter(e){return i.mightProducePrintableCharacter(e)}},s.smoothScrolling=t.getValue(Xh),[s,n]}let ic=class extends Ga["c"]{constructor(e,t,i,n,s,o,r,a,l,h){const c="undefined"!==typeof s.horizontalScrolling?s.horizontalScrolling:l.getValue($h),[d,u]=tc(s,l,h);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},Object(Ea["c"])(a.getColorTheme(),Ea["d"])),d),{horizontalScrolling:c})),this.disposables.add(u),this.contextKeyService=zh(o,this),this.themeService=a;const g=Rh.bindTo(this.contextKeyService);g.set(!(!1===s.multipleSelectionSupport)),this.listHasSelectionOrFocus=Fh.bindTo(this.contextKeyService),this.listDoubleSelection=Ph.bindTo(this.contextKeyService),this.listMultiSelection=Bh.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Jh(l),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),s.overrideStyles&&this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)})})),this.disposables.add(this.onDidChangeFocus(()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)})),this.disposables.add(l.onDidChangeConfiguration(e=>{e.affectsConfiguration(Uh)&&(this._useAltAsMultipleSelectionModifier=Jh(l));let t={};if(e.affectsConfiguration($h)&&void 0===this.horizontalScrolling){const e=l.getValue($h);t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(Xh)){const e=l.getValue(Xh);t=Object.assign(Object.assign({},t),{smoothScrolling:e})}Object.keys(t).length>0&&this.updateOptions(t)})),this.navigator=new rc(this,Object.assign({configurationService:l},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=Object(Ea["a"])(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),super.dispose()}};ic=Oh([Ih(5,zn["b"]),Ih(6,Th),Ih(7,Kn["b"]),Ih(8,Ti["a"]),Ih(9,zs["a"])],ic);let nc=class extends Qa{constructor(e,t,i,n,s,o,r,a,l,h){const c="undefined"!==typeof s.horizontalScrolling?s.horizontalScrolling:l.getValue($h),[d,u]=tc(s,l,h);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},Object(Ea["c"])(a.getColorTheme(),Ea["d"])),d),{horizontalScrolling:c})),this.disposables=new de["b"],this.disposables.add(u),this.contextKeyService=zh(o,this),this.themeService=a,this.horizontalScrolling=s.horizontalScrolling;const g=Rh.bindTo(this.contextKeyService);g.set(!(!1===s.multipleSelectionSupport)),this._useAltAsMultipleSelectionModifier=Jh(l),this.disposables.add(this.contextKeyService),this.disposables.add(r.register(this)),s.overrideStyles&&this.updateStyles(s.overrideStyles),s.overrideStyles&&this.disposables.add(Object(Ea["a"])(this,a,s.overrideStyles)),this.disposables.add(l.onDidChangeConfiguration(e=>{e.affectsConfiguration(Uh)&&(this._useAltAsMultipleSelectionModifier=Jh(l));let t={};if(e.affectsConfiguration($h)&&void 0===this.horizontalScrolling){const e=l.getValue($h);t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(Xh)){const e=l.getValue(Xh);t=Object.assign(Object.assign({},t),{smoothScrolling:e})}Object.keys(t).length>0&&this.updateOptions(t)})),this.navigator=new rc(this,Object.assign({configurationService:l},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=Object(Ea["a"])(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};nc=Oh([Ih(5,zn["b"]),Ih(6,Th),Ih(7,Kn["b"]),Ih(8,Ti["a"]),Ih(9,zs["a"])],nc);let sc=class extends Nh{constructor(e,t,i,n,s,o,r,a,l,h,c){const d="undefined"!==typeof o.horizontalScrolling?o.horizontalScrolling:h.getValue($h),[u,g]=tc(o,h,c);super(e,t,i,n,s,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},Object(Ea["c"])(l.getColorTheme(),Ea["d"])),u),{horizontalScrolling:d})),this.disposables=new de["b"],this.disposables.add(g),this.contextKeyService=zh(r,this),this.themeService=l;const p=Rh.bindTo(this.contextKeyService);p.set(!(!1===o.multipleSelectionSupport)),this.listHasSelectionOrFocus=Fh.bindTo(this.contextKeyService),this.listDoubleSelection=Ph.bindTo(this.contextKeyService),this.listMultiSelection=Bh.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=Jh(h),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),o.overrideStyles&&this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)})})),this.disposables.add(this.onDidChangeFocus(()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)})),this.disposables.add(h.onDidChangeConfiguration(e=>{e.affectsConfiguration(Uh)&&(this._useAltAsMultipleSelectionModifier=Jh(h));let t={};if(e.affectsConfiguration($h)&&void 0===this.horizontalScrolling){const e=h.getValue($h);t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(Xh)){const e=h.getValue(Xh);t=Object.assign(Object.assign({},t),{smoothScrolling:e})}Object.keys(t).length>0&&this.updateOptions(t)})),this.navigator=new ac(this,Object.assign({configurationService:h},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=Object(Ea["a"])(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};sc=Oh([Ih(6,zn["b"]),Ih(7,Th),Ih(8,Kn["b"]),Ih(9,Ti["a"]),Ih(10,zs["a"])],sc);class oc extends de["a"]{constructor(e,t){var i,n;super(),this.widget=e,this._onDidOpen=this._register(new W["a"]),this.onDidOpen=this._onDidOpen.event,this.openOnFocus=null!==(i=null===t||void 0===t?void 0:t.openOnFocus)&&void 0!==i&&i,this._register(W["b"].filter(this.widget.onDidChangeSelection,e=>e.browserEvent instanceof KeyboardEvent)(e=>this.onSelectionFromKeyboard(e))),this._register(this.widget.onPointer(e=>this.onPointer(e.element,e.browserEvent))),this._register(this.widget.onMouseDblClick(e=>this.onMouseDblClick(e.element,e.browserEvent))),this.openOnFocus&&this._register(W["b"].filter(this.widget.onDidChangeFocus,e=>e.browserEvent instanceof KeyboardEvent)(e=>this.onFocusFromKeyboard(e))),"boolean"!==typeof(null===t||void 0===t?void 0:t.openOnSingleClick)&&(null===t||void 0===t?void 0:t.configurationService)?(this.openOnSingleClick="doubleClick"!==(null===t||void 0===t?void 0:t.configurationService.getValue(Kh)),this._register(null===t||void 0===t?void 0:t.configurationService.onDidChangeConfiguration(()=>{this.openOnSingleClick="doubleClick"!==(null===t||void 0===t?void 0:t.configurationService.getValue(Kh))}))):this.openOnSingleClick=null===(n=null===t||void 0===t?void 0:t.openOnSingleClick)||void 0===n||n}onFocusFromKeyboard(e){const t=this.widget.getFocus();this.widget.setSelection(t,e.browserEvent);const i=e.browserEvent,n="boolean"!==typeof i.preserveFocus||i.preserveFocus,s="boolean"===typeof i.pinned?i.pinned:!n,o=!1;this._open(this.getSelectedElement(),n,s,o,e.browserEvent)}onSelectionFromKeyboard(e){if(1!==e.elements.length)return;const t=e.browserEvent,i="boolean"!==typeof t.preserveFocus||t.preserveFocus,n="boolean"===typeof t.pinned?t.pinned:!i,s=!1;this._open(this.getSelectedElement(),i,n,s,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick)return;const i=2===t.detail;if(i)return;const n=1===t.button,s=!0,o=n,r=t.ctrlKey||t.metaKey||t.altKey;this._open(e,s,o,r,t)}onMouseDblClick(e,t){if(!t)return;const i=!1,n=!0,s=t.ctrlKey||t.metaKey||t.altKey;this._open(e,i,n,s,t)}_open(e,t,i,n,s){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:i,revealIfVisible:!0},sideBySide:n,element:e,browserEvent:s})}}class rc extends oc{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class ac extends oc{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class lc extends oc{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){var e;return null!==(e=this.widget.getSelection()[0])&&void 0!==e?e:void 0}}function hc(e,t){let i=!1;return n=>{if(i)return i=!1,!1;const s=t.softDispatch(n,e);return s&&s.enterChord?(i=!0,!1):(i=!1,!0)}}let cc=class extends Gl{constructor(e,t,i,n,s,o,r,a,l,h,c){const{options:d,getAutomaticKeyboardNavigation:u,disposable:g}=mc(t,s,o,l,h,c);super(e,t,i,n,d),this.disposables.add(g),this.internals=new fc(this,s,u,s.overrideStyles,o,r,a,l,c),this.disposables.add(this.internals)}};cc=Oh([Ih(5,zn["b"]),Ih(6,Th),Ih(7,Kn["b"]),Ih(8,Ti["a"]),Ih(9,zs["a"]),Ih(10,Us["b"])],cc);let dc=class extends Xl{constructor(e,t,i,n,s,o,r,a,l,h,c){const{options:d,getAutomaticKeyboardNavigation:u,disposable:g}=mc(t,s,o,l,h,c);super(e,t,i,n,d),this.disposables.add(g),this.internals=new fc(this,s,u,s.overrideStyles,o,r,a,l,c),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles)}};dc=Oh([Ih(5,zn["b"]),Ih(6,Th),Ih(7,Kn["b"]),Ih(8,Ti["a"]),Ih(9,zs["a"]),Ih(10,Us["b"])],dc);let uc=class extends _h{constructor(e,t,i,n,s,o,r,a,l,h,c,d){const{options:u,getAutomaticKeyboardNavigation:g,disposable:p}=mc(t,o,r,h,c,d);super(e,t,i,n,s,u),this.disposables.add(p),this.internals=new fc(this,o,g,o.overrideStyles,r,a,l,h,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles)}};uc=Oh([Ih(6,zn["b"]),Ih(7,Th),Ih(8,Kn["b"]),Ih(9,Ti["a"]),Ih(10,zs["a"]),Ih(11,Us["b"])],uc);let gc=class extends dh{constructor(e,t,i,n,s,o,r,a,l,h,c,d){const{options:u,getAutomaticKeyboardNavigation:g,disposable:p}=mc(t,o,r,h,c,d);super(e,t,i,n,s,u),this.disposables.add(p),this.internals=new fc(this,o,g,o.overrideStyles,r,a,l,h,d),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles)}};gc=Oh([Ih(6,zn["b"]),Ih(7,Th),Ih(8,Kn["b"]),Ih(9,Ti["a"]),Ih(10,zs["a"]),Ih(11,Us["b"])],gc);let pc=class extends mh{constructor(e,t,i,n,s,o,r,a,l,h,c,d,u){const{options:g,getAutomaticKeyboardNavigation:p,disposable:m}=mc(t,r,a,c,d,u);super(e,t,i,n,s,o,g),this.disposables.add(m),this.internals=new fc(this,r,p,r.overrideStyles,a,l,h,c,u),this.disposables.add(this.internals)}};function mc(e,t,i,n,s,o){var r;Wh.bindTo(i),Hh||(jh.bindTo(i),Hh=!0);const a=()=>{let e=i.getContextKeyValue(Vh);return e&&(e=n.getValue(Gh)),e},l=o.isScreenReaderOptimized(),h=t.simpleKeyboardNavigation||l?"simple":n.getValue(qh),c=void 0!==t.horizontalScrolling?t.horizontalScrolling:n.getValue($h),[d,u]=tc(t,n,s),g=t.additionalScrollHeight;return{getAutomaticKeyboardNavigation:a,disposable:u,options:Object.assign(Object.assign({keyboardSupport:!1},d),{indent:n.getValue(Yh),renderIndentGuides:n.getValue(Zh),smoothScrolling:n.getValue(Xh),automaticKeyboardNavigation:a(),simpleKeyboardNavigation:"simple"===h,filterOnType:"filter"===h,horizontalScrolling:c,keyboardNavigationEventFilter:hc(e,s),additionalScrollHeight:g,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:null!==(r=t.expandOnlyOnTwistieClick)&&void 0!==r?r:"doubleClick"===n.getValue(Qh)})}}pc=Oh([Ih(7,zn["b"]),Ih(8,Th),Ih(9,Kn["b"]),Ih(10,Ti["a"]),Ih(11,zs["a"]),Ih(12,Us["b"])],pc);let fc=class{constructor(e,t,i,n,s,o,r,a,l){this.tree=e,this.themeService=r,this.disposables=[],this.contextKeyService=zh(s,e);const h=Rh.bindTo(this.contextKeyService);h.set(!(!1===t.multipleSelectionSupport)),this.hasSelectionOrFocus=Fh.bindTo(this.contextKeyService),this.hasDoubleSelection=Ph.bindTo(this.contextKeyService),this.hasMultiSelection=Bh.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=Jh(a);const c=new Set;c.add(Vh);const d=()=>{const t=l.isScreenReaderOptimized(),i=t?"simple":a.getValue(qh);e.updateOptions({simpleKeyboardNavigation:"simple"===i,filterOnType:"filter"===i})};this.updateStyleOverrides(n),this.disposables.push(this.contextKeyService,o.register(e),e.onDidChangeSelection(()=>{const t=e.getSelection(),i=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(t.length>0||i.length>0),this.hasMultiSelection.set(t.length>1),this.hasDoubleSelection.set(2===t.length)})}),e.onDidChangeFocus(()=>{const t=e.getSelection(),i=e.getFocus();this.hasSelectionOrFocus.set(t.length>0||i.length>0)}),a.onDidChangeConfiguration(n=>{let s={};if(n.affectsConfiguration(Uh)&&(this._useAltAsMultipleSelectionModifier=Jh(a)),n.affectsConfiguration(Yh)){const e=a.getValue(Yh);s=Object.assign(Object.assign({},s),{indent:e})}if(n.affectsConfiguration(Zh)){const e=a.getValue(Zh);s=Object.assign(Object.assign({},s),{renderIndentGuides:e})}if(n.affectsConfiguration(Xh)){const e=a.getValue(Xh);s=Object.assign(Object.assign({},s),{smoothScrolling:e})}if(n.affectsConfiguration(qh)&&d(),n.affectsConfiguration(Gh)&&(s=Object.assign(Object.assign({},s),{automaticKeyboardNavigation:i()})),n.affectsConfiguration($h)&&void 0===t.horizontalScrolling){const e=a.getValue($h);s=Object.assign(Object.assign({},s),{horizontalScrolling:e})}n.affectsConfiguration(Qh)&&void 0===t.expandOnlyOnTwistieClick&&(s=Object.assign(Object.assign({},s),{expandOnlyOnTwistieClick:"doubleClick"===a.getValue(Qh)})),Object.keys(s).length>0&&e.updateOptions(s)}),this.contextKeyService.onDidChangeContext(t=>{t.affectsSome(c)&&e.updateOptions({automaticKeyboardNavigation:i()})}),l.onDidChangeScreenReaderOptimized(()=>d())),this.navigator=new lc(e,Object.assign({configurationService:a},t)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateStyleOverrides(e){Object(de["f"])(this.styler),this.styler=e?Object(Ea["a"])(this.tree,this.themeService,e):de["a"].None}dispose(){this.disposables=Object(de["f"])(this.disposables),Object(de["f"])(this.styler),this.styler=void 0}};fc=Oh([Ih(4,zn["b"]),Ih(5,Th),Ih(6,Kn["b"]),Ih(7,Ti["a"]),Ih(8,Us["b"])],fc);const _c=fo["a"].as(Mi["a"].Configuration);var bc,vc;_c.registerConfiguration({id:"workbench",order:7,title:Object(Bi["a"])("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[Uh]:{type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[Object(Bi["a"])("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),Object(Bi["a"])("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:Object(Bi["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.")},[Kh]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:Object(Bi["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). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[$h]:{type:"boolean",default:!1,description:Object(Bi["a"])("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[Yh]:{type:"number",default:8,minimum:0,maximum:40,description:Object(Bi["a"])("tree indent setting","Controls tree indentation in pixels.")},[Zh]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:Object(Bi["a"])("render tree indent guides","Controls whether the tree should render indent guides.")},[Xh]:{type:"boolean",default:!1,description:Object(Bi["a"])("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[qh]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[Object(Bi["a"])("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),Object(Bi["a"])("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),Object(Bi["a"])("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:Object(Bi["a"])("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.")},[Gh]:{type:"boolean",default:!0,markdownDescription:Object(Bi["a"])("automatic keyboard navigation setting","Controls whether keyboard navigation in lists and trees is automatically triggered simply by typing. If set to `false`, keyboard navigation is only triggered when executing the `list.toggleKeyboardNavigation` command, for which you can assign a keyboard shortcut.")},[Qh]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:Object(Bi["a"])("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")}}}),function(e){e[e["Hint"]=1]="Hint",e[e["Info"]=2]="Info",e[e["Warning"]=4]="Warning",e[e["Error"]=8]="Error"}(bc||(bc={})),function(e){function t(e,t){return t-e}e.compare=t;const i=Object.create(null);function n(e){return i[e]||""}function s(t){switch(t){case Si["a"].Error:return e.Error;case Si["a"].Warning:return e.Warning;case Si["a"].Info:return e.Info;case Si["a"].Ignore:return e.Hint}}function o(t){switch(t){case e.Error:return Si["a"].Error;case e.Warning:return Si["a"].Warning;case e.Info:return Si["a"].Info;case e.Hint:return Si["a"].Ignore}}i[e.Error]=Object(Bi["a"])("sev.error","Error"),i[e.Warning]=Object(Bi["a"])("sev.warning","Warning"),i[e.Info]=Object(Bi["a"])("sev.info","Info"),e.toString=n,e.fromSeverity=s,e.toSeverity=o}(bc||(bc={})),function(e){const t="";function i(e){return n(e,!0)}function n(e,i){let n=[t];return e.source?n.push(e.source.replace("¦","\\¦")):n.push(t),e.code?"string"===typeof e.code?n.push(e.code.replace("¦","\\¦")):n.push(e.code.value.replace("¦","\\¦")):n.push(t),void 0!==e.severity&&null!==e.severity?n.push(bc.toString(e.severity)):n.push(t),e.message&&i?n.push(e.message.replace("¦","\\¦")):n.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?n.push(e.startLineNumber.toString()):n.push(t),void 0!==e.startColumn&&null!==e.startColumn?n.push(e.startColumn.toString()):n.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?n.push(e.endLineNumber.toString()):n.push(t),void 0!==e.endColumn&&null!==e.endColumn?n.push(e.endColumn.toString()):n.push(t),n.push(t),n.join("¦")}e.makeKey=i,e.makeKeyOptionalMessage=n}(vc||(vc={}));const Cc=Object(Dt["c"])("markerService");class wc{constructor(){this._byResource=new Q["b"],this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let s=this._byOwner.get(t);s||(s=new Q["b"],this._byOwner.set(t,s)),s.set(e,i)}get(e,t){let i=this._byResource.get(e);return null===i||void 0===i?void 0:i.get(t)}delete(e,t){let i=!1,n=!1,s=this._byResource.get(e);s&&(i=s.delete(t));let o=this._byOwner.get(t);if(o&&(n=o.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){var t,i,n,s;return"string"===typeof e?null!==(i=null===(t=this._byOwner.get(e))||void 0===t?void 0:t.values())&&void 0!==i?i:Kr["a"].empty():j["a"].isUri(e)?null!==(s=null===(n=this._byResource.get(e))||void 0===n?void 0:n.values())&&void 0!==s?s:Kr["a"].empty():Kr["a"].map(Kr["a"].concat(...this._byOwner.values()),e=>e[1])}}class Sc{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new Q["b"],this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const e=this._data.get(t);e&&this._substract(e);const i=this._resourceStats(t);this._add(i),this._data.set(t,i)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(e.scheme===ee["c"].inMemory||e.scheme===ee["c"].walkThrough||e.scheme===ee["c"].walkThroughSnippet)return t;for(const{severity:i}of this._service.read({resource:e}))i===bc.Error?t.errors+=1:i===bc.Warning?t.warnings+=1:i===bc.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class yc{constructor(){this._onMarkerChanged=new W["a"],this.onMarkerChanged=W["b"].debounce(this._onMarkerChanged.event,yc._debouncer,0),this._data=new wc,this._stats=new Sc(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if(Object(We["l"])(i)){const i=this._data.delete(t,e);i&&this._onMarkerChanged.fire([t])}else{const n=[];for(const s of i){const i=yc._toMarker(e,t,s);i&&n.push(i)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:s,message:o,source:r,startLineNumber:a,startColumn:l,endLineNumber:h,endColumn:c,relatedInformation:d,tags:u}=i;if(o)return a=a>0?a:1,l=l>0?l:1,h=h>=a?h:a,c=c>0?c:l,{resource:t,owner:e,code:n,severity:s,message:o,source:r,startLineNumber:a,startColumn:l,endLineNumber:h,endColumn:c,relatedInformation:d,tags:u}}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:s}=e;if((!s||s<0)&&(s=-1),t&&i){const e=this._data.get(i,t);if(e){const t=[];for(const i of e)if(yc._accept(i,n)){const e=t.push(i);if(s>0&&e===s)break}return t}return[]}if(t||i){const e=this._data.values(null!==i&&void 0!==i?i:t),o=[];for(const t of e)for(const e of t)if(yc._accept(e,n)){const t=o.push(e);if(s>0&&t===s)return o}return o}{const e=[];for(let t of this._data.values())for(let i of t)if(yc._accept(i,n)){const t=e.push(i);if(s>0&&t===s)return e}return e}}static _accept(e,t){return void 0===t||(t&e.severity)===e.severity}static _debouncer(e,t){e||(yc._dedupeMap=new Q["b"],e=[]);for(const i of t)yc._dedupeMap.has(i)||(yc._dedupeMap.set(i,!0),e.push(i));return e}}var Dc=i("03e8"),Lc=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},xc=function(e,t){return function(i,n){t(i,n,e)}};let kc=class{constructor(e){this._commandService=e}createMenu(e,t,i=!1){return new Ec(e,i,this._commandService,t,this)}};kc=Lc([xc(0,ie["b"])],kc);let Ec=class e{constructor(e,t,i,n,s){this._id=e,this._fireEventsForSubmenuChanges=t,this._commandService=i,this._contextKeyService=n,this._menuService=s,this._dispoables=new de["b"],this._onDidChange=new W["a"],this.onDidChange=this._onDidChange.event,this._menuGroups=[],this._contextKeys=new Set,this._build();const o=new ye["e"](()=>this._build(),50);this._dispoables.add(o),this._dispoables.add(Hs["d"].onDidChangeMenu(t=>{t.has(e)&&o.schedule()}));const r=new ye["e"](()=>this._onDidChange.fire(this),50);this._dispoables.add(r),this._dispoables.add(n.onDidChangeContext(e=>{e.affectsSome(this._contextKeys)&&r.schedule()}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear();const t=Hs["d"].getMenuItems(this._id);let i;t.sort(e._compareMenuItems);for(let e of t){const t=e.group||"";i&&i[0]===t||(i=[t,[]],this._menuGroups.push(i)),i[1].push(e),this._collectContextKeys(e)}this._onDidChange.fire(this)}_collectContextKeys(t){if(e._fillInKbExprKeys(t.when,this._contextKeys),Object(Hs["f"])(t)){if(t.command.precondition&&e._fillInKbExprKeys(t.command.precondition,this._contextKeys),t.command.toggled){const i=t.command.toggled.condition||t.command.toggled;e._fillInKbExprKeys(i,this._contextKeys)}}else this._fireEventsForSubmenuChanges&&Hs["d"].getMenuItems(t.submenu).forEach(this._collectContextKeys,this)}getActions(e){const t=[];for(let i of this._menuGroups){const[n,s]=i,o=[];for(const t of s)if(this._contextKeyService.contextMatchesRules(t.when)){const i=Object(Hs["f"])(t)?new Hs["c"](t.command,t.alt,e,this._contextKeyService,this._commandService):new Hs["e"](t,this._menuService,this._contextKeyService,e);o.push(i)}o.length>0&&t.push([n,o])}return t}static _fillInKbExprKeys(e,t){if(e)for(let i of e.keys())t.add(i)}static _compareMenuItems(t,i){let n=t.group,s=i.group;if(n!==s){if(!n)return 1;if(!s)return-1;if("navigation"===n)return-1;if("navigation"===s)return 1;let e=n.localeCompare(s);if(0!==e)return e}let o=t.order||0,r=i.order||0;return o<r?-1:o>r?1:e._compareTitles(Object(Hs["f"])(t)?t.command.title:t.title,Object(Hs["f"])(i)?i.command.title:i.title)}static _compareTitles(e,t){const i="string"===typeof e?e:e.original,n="string"===typeof t?t:t.original;return i.localeCompare(n)}};Ec=Lc([xc(2,ie["b"]),xc(3,zn["b"]),xc(4,Hs["a"])],Ec);var Nc=i("efdb"),Oc=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Ic=function(e,t){return function(i,n){t(i,n,e)}};function Tc(e){return e.toString()}class Mc extends de["a"]{constructor(e){super(),this.model=e,this._markersData=new Map,this._register(Object(de["h"])(()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()}))}update(e,t){const i=[...this._markersData.keys()];this._markersData.clear();const n=this.model.deltaDecorations(i,t);for(let s=0;s<n.length;s++)this._markersData.set(n[s],e[s]);return 0!==i.length||0!==n.length}getMarker(e){return this._markersData.get(e.id)}}let Ac=class extends de["a"]{constructor(e,t){super(),this._markerService=t,this._onDidChangeMarker=this._register(new W["a"]),this._markerDecorations=new Map,e.getModels().forEach(e=>this._onModelAdded(e)),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(e=>e.dispose()),this._markerDecorations.clear()}getMarker(e,t){const i=this._markerDecorations.get(Tc(e));return i&&i.getMarker(t)||null}_handleMarkerChange(e){e.forEach(e=>{const t=this._markerDecorations.get(Tc(e));t&&this._updateDecorations(t)})}_onModelAdded(e){const t=new Mc(e);this._markerDecorations.set(Tc(e.uri),t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(Tc(e.uri));t&&(t.dispose(),this._markerDecorations.delete(Tc(e.uri))),e.uri.scheme!==ee["c"].inMemory&&e.uri.scheme!==ee["c"].internal&&e.uri.scheme!==ee["c"].vscode||this._markerService&&this._markerService.read({resource:e.uri}).map(e=>e.owner).forEach(t=>this._markerService.remove(t,[e.uri]))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});let i=t.map(t=>({range:this._createDecorationRange(e.model,t),options:this._createDecorationOption(t)}));e.update(t,i)&&this._onDidChangeMarker.fire(e.model)}_createDecorationRange(e,t){let i=z["a"].lift(t);if(t.severity!==bc.Hint||this._hasMarkerTag(t,1)||this._hasMarkerTag(t,2)||(i=i.setEndPosition(i.startLineNumber,i.startColumn+2)),i=e.validateRange(i),i.isEmpty()){let t=e.getWordAtPosition(i.getStartPosition());if(t)i=new z["a"](i.startLineNumber,t.startColumn,i.endLineNumber,t.endColumn);else{let t=e.getLineLastNonWhitespaceColumn(i.startLineNumber)||e.getLineMaxColumn(i.startLineNumber);1===t||(i=i.endColumn>=t?new z["a"](i.startLineNumber,t-1,i.endLineNumber,t):new z["a"](i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn+1))}}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&i.startLineNumber===i.endLineNumber){let n=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);n<i.endColumn&&(i=new z["a"](i.startLineNumber,n,i.endLineNumber,i.endColumn),t.startColumn=n)}return i}_createDecorationOption(e){let t,i,n,s=void 0,o=void 0;switch(e.severity){case bc.Hint:t=this._hasMarkerTag(e,2)?void 0:this._hasMarkerTag(e,1)?"squiggly-unnecessary":"squiggly-hint",i=0;break;case bc.Warning:t="squiggly-warning",s=Object(Kn["g"])(Hn["p"]),i=20,n={color:Object(Kn["g"])(Un["Nb"]),position:_e["c"].Inline};break;case bc.Info:t="squiggly-info",s=Object(Kn["g"])(Hn["o"]),i=10;break;case bc.Error:default:t="squiggly-error",s=Object(Kn["g"])(Hn["n"]),i=30,n={color:Object(Kn["g"])(Un["Hb"]),position:_e["c"].Inline};break}return e.tags&&(-1!==e.tags.indexOf(1)&&(o="squiggly-inline-unnecessary"),-1!==e.tags.indexOf(2)&&(o="squiggly-inline-deprecated")),{stickiness:1,className:t,showIfCollapsed:!0,overviewRuler:{color:s,position:_e["d"].Right},minimap:n,zIndex:i,inlineClassName:o}}_hasMarkerTag(e,t){return!!e.tags&&e.tags.indexOf(t)>=0}};Ac=Oc([Ic(0,yt["a"]),Ic(1,Cc)],Ac);var Rc=i("f5f3"),Fc=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Pc=function(e,t){return function(i,n){t(i,n,e)}};let Bc=class extends de["a"]{constructor(e,t){super(),this._contextKeyService=e,this._configurationService=t,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new W["a"],this._accessibilityModeEnabledContext=Us["a"].bindTo(this._contextKeyService);const i=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration("editor.accessibilitySupport")&&(i(),this._onDidChangeScreenReaderOptimized.fire())})),i(),this.onDidChangeScreenReaderOptimized(()=>i())}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return"on"===e||"auto"===e&&2===this._accessibilitySupport}getAccessibilitySupport(){return this._accessibilitySupport}};Bc=Fc([Pc(0,zn["b"]),Pc(1,Ti["a"])],Bc);var Wc=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class Vc{constructor(){this.mapTextToType=new Map,this.findText=""}writeText(e,t){return Wc(this,void 0,void 0,(function*(){if(t)return void this.mapTextToType.set(t,e);try{return yield navigator.clipboard.writeText(e)}catch(s){console.error(s)}const i=document.activeElement,n=document.body.appendChild(Object(Z["a"])("textarea",{"aria-hidden":!0}));n.style.height="1px",n.style.width="1px",n.style.position="absolute",n.value=e,n.focus(),n.select(),document.execCommand("copy"),i instanceof HTMLElement&&i.focus(),document.body.removeChild(n)}))}readText(e){return Wc(this,void 0,void 0,(function*(){if(e)return this.mapTextToType.get(e)||"";try{return yield navigator.clipboard.readText()}catch(t){return console.error(t),""}}))}readFindText(){return Wc(this,void 0,void 0,(function*(){return this.findText}))}writeFindText(e){return Wc(this,void 0,void 0,(function*(){this.findText=e}))}}var jc=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},Hc=function(e,t){return function(i,n){t(i,n,e)}},zc=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Uc=!1;function Kc(e){return e.scheme===ee["c"].file?e.fsPath:e.path}let $c=0;class qc{constructor(e,t,i,n,s,o,r){this.id=++$c,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=n,this.groupOrder=s,this.sourceId=o,this.sourceOrder=r,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?"  VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class Gc{constructor(e,t){this.resourceLabel=e,this.reason=t}}class Yc{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,n]of this.elements){const i=0===n.reason?e:t;i.push(n.resourceLabel)}let i=[];return e.length>0&&i.push(Bi["a"]({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(Bi["a"]({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),i.join("\n")}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class Zc{constructor(e,t,i,n,s,o,r){this.id=++$c,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=s,this.sourceId=o,this.sourceOrder=r,this.removedResources=null,this.invalidatedResources=null}canSplit(){return"function"===typeof this.actual.split}removeResource(e,t,i){this.removedResources||(this.removedResources=new Yc),this.removedResources.has(t)||this.removedResources.set(t,new Gc(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),0===this.invalidatedResources.size&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new Yc),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new Gc(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":"  VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class Xc{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let e=[];e.push(`* ${this.strResource}:`);for(let t=0;t<this._past.length;t++)e.push("   * [UNDO] "+this._past[t]);for(let t=this._future.length-1;t>=0;t--)e.push("   * [REDO] "+this._future[t]);return e.join("\n")}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){1===e.type?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const t of this._future)1===t.type&&t.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let i=0,n=this._past.length;i<n;i++)t.push(this._past[i].id);for(let i=this._future.length-1;i>=0;i--)t.push(this._future[i].id);return new So(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,s=-1;for(let r=0,a=this._past.length;r<a;r++,n++){const o=this._past[r];i&&(n>=t||o.id!==e.elements[n])&&(i=!1,s=0),i||1!==o.type||o.removeResource(this.resourceLabel,this.strResource,0)}let o=-1;for(let r=this._future.length-1;r>=0;r--,n++){const s=this._future[r];i&&(n>=t||s.id!==e.elements[n])&&(i=!1,o=r),i||1!==s.type||s.removeResource(this.resourceLabel,this.strResource,0)}-1!==s&&(this._past=this._past.slice(0,s)),-1!==o&&(this._future=this._future.slice(o+1)),this.versionId++}getElements(){const e=[],t=[];for(const i of this._past)e.push(i.actual);for(const i of this._future)t.push(i.actual);return{past:e,future:t}}getClosestPastElement(){return 0===this._past.length?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return 0===this._future.length?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class Qc{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,i=this.editStacks.length;t<i;t++)this._versionIds[t]=this.editStacks[t].versionId}isValid(){for(let e=0,t=this.editStacks.length;e<t;e++)if(this._versionIds[e]!==this.editStacks[e].versionId)return!1;return!0}}const Jc=new Xc("","");Jc.locked=!0;let ed=class{constructor(e,t){this._dialogService=e,this._notificationService=t,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(e){for(const t of this._uriComparisonKeyComputers)if(t[0]===e.scheme)return t[1].getComparisonKey(e);return e.toString()}_print(e){console.log("------------------------------------"),console.log(`AFTER ${e}: `);let t=[];for(const i of this._editStacks)t.push(i[1].toString());console.log(t.join("\n"))}pushElement(e,t=yo.None,i=Do.None){if(0===e.type){const n=Kc(e.resource),s=this.getUriComparisonKey(e.resource);this._pushElement(new qc(e,n,s,t.id,t.nextOrder(),i.id,i.nextOrder()))}else{const n=new Set,s=[],o=[];for(const t of e.resources){const e=Kc(t),i=this.getUriComparisonKey(t);n.has(i)||(n.add(i),s.push(e),o.push(i))}1===s.length?this._pushElement(new qc(e,s[0],o[0],t.id,t.nextOrder(),i.id,i.nextOrder())):this._pushElement(new Zc(e,s,o,t.id,t.nextOrder(),i.id,i.nextOrder()))}Uc&&this._print("pushElement")}_pushElement(e){for(let t=0,i=e.strResources.length;t<i;t++){const i=e.resourceLabels[t],n=e.strResources[t];let s;this._editStacks.has(n)?s=this._editStacks.get(n):(s=new Xc(i,n),this._editStacks.set(n,s)),s.pushElement(e)}}getLastElement(e){const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const e=this._editStacks.get(t);if(e.hasFutureElements())return null;const i=e.getClosestPastElement();return i?i.actual:null}return null}_splitPastWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const s of i){const e=Kc(s.resource),t=this.getUriComparisonKey(s.resource),i=new qc(s,e,t,0,0,0,0);n.set(i.strResource,i)}for(const s of e.strResources){if(t&&t.has(s))continue;const i=this._editStacks.get(s);i.splitPastWorkspaceElement(e,n)}}_splitFutureWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const s of i){const e=Kc(s.resource),t=this.getUriComparisonKey(s.resource),i=new qc(s,e,t,0,0,0,0);n.set(i.strResource,i)}for(const s of e.strResources){if(t&&t.has(s))continue;const i=this._editStacks.get(s);i.splitFutureWorkspaceElement(e,n)}}removeElements(e){const t="string"===typeof e?e:this.getUriComparisonKey(e);if(this._editStacks.has(t)){const e=this._editStacks.get(t);e.dispose(),this._editStacks.delete(t)}Uc&&this._print("removeElements")}setElementsValidFlag(e,t,i){const n=this.getUriComparisonKey(e);if(this._editStacks.has(n)){const e=this._editStacks.get(n);e.setElementsValidFlag(t,i)}Uc&&this._print("setElementsValidFlag")}createSnapshot(e){const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const i=this._editStacks.get(t);return i.createSnapshot(e)}return new So(e,[])}restoreSnapshot(e){const t=this.getUriComparisonKey(e.resource);if(this._editStacks.has(t)){const i=this._editStacks.get(t);i.restoreSnapshot(e),i.hasPastElements()||i.hasFutureElements()||(i.dispose(),this._editStacks.delete(t))}Uc&&this._print("restoreSnapshot")}getElements(e){const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const e=this._editStacks.get(t);return e.getElements()}return{past:[],future:[]}}_findClosestUndoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const o=s.getClosestPastElement();o&&(o.sourceId===e&&(!t||o.sourceOrder>t.sourceOrder)&&(t=o,i=n))}return[t,i]}canUndo(e){if(e instanceof Do){const[,t]=this._findClosestUndoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const e=this._editStacks.get(t);return e.hasPastElements()}return!1}_onError(e,t){Object(De["e"])(e);for(const i of t.strResources)this.removeElements(i);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,s){const o=this._acquireLocks(i);let r;try{r=t()}catch(a){return o(),n.dispose(),this._onError(a,e)}return r?r.then(()=>(o(),n.dispose(),s()),t=>(o(),n.dispose(),this._onError(t,e))):(o(),n.dispose(),s())}_invokeWorkspacePrepare(e){return zc(this,void 0,void 0,(function*(){if("undefined"===typeof e.actual.prepareUndoRedo)return de["a"].None;const t=e.actual.prepareUndoRedo();return"undefined"===typeof t?de["a"].None:t}))}_invokeResourcePrepare(e,t){if(1!==e.actual.type||"undefined"===typeof e.actual.prepareUndoRedo)return t(de["a"].None);const i=e.actual.prepareUndoRedo();return i?Object(de["g"])(i)?t(i):i.then(e=>t(e)):t(de["a"].None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||Jc);return new Qc(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.info(n),new td(this._undo(e,0,!0));for(const s of t.strResources)this.removeElements(s);return this._notificationService.info(n),new td}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,Bi["a"]({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,Bi["a"]({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const s=[];for(const r of i.editStacks)r.getClosestPastElement()!==t&&s.push(r.resourceLabel);if(s.length>0)return this._tryToSplitAndUndo(e,t,null,Bi["a"]({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const o=[];for(const r of i.editStacks)r.locked&&o.push(r.resourceLabel);return o.length>0?this._tryToSplitAndUndo(e,t,null,Bi["a"]({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,o.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,t,null,Bi["a"]({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,i){const n=this._getAffectedEditStacks(t),s=this._checkWorkspaceUndo(e,t,n,!1);return s?s.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,n,i)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const i=t.getClosestPastElement();if(i){if(i===e){const i=t.getSecondClosestPastElement();if(i&&i.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(e,t,i,n){return zc(this,void 0,void 0,(function*(){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){const s=yield this._dialogService.show(Si["a"].Info,Bi["a"]("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),[Bi["a"]({key:"ok",comment:["{0} denotes a number that is > 1"]},"Undo in {0} Files",i.editStacks.length),Bi["a"]("nok","Undo this File"),Bi["a"]("cancel","Cancel")],{cancelId:2});if(2===s.choice)return;if(1===s.choice)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const o=this._checkWorkspaceUndo(e,t,i,!1);if(o)return o.returnValue;n=!0}let s;try{s=yield this._invokeWorkspacePrepare(t)}catch(r){return this._onError(r,t)}const o=this._checkWorkspaceUndo(e,t,i,!0);if(o)return s.dispose(),o.returnValue;for(const e of i.editStacks)e.moveBackward(t);return this._safeInvokeWithLocks(t,()=>t.actual.undo(),i,s,()=>this._continueUndoInGroup(t.groupId,n))}))}_resourceUndo(e,t,i){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,n=>(e.moveBackward(t),this._safeInvokeWithLocks(t,()=>t.actual.undo(),new Qc([e]),n,()=>this._continueUndoInGroup(t.groupId,i))));{const e=Bi["a"]({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.info(e)}}else e.flushAllElements()}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const o=s.getClosestPastElement();o&&(o.groupId===e&&(!t||o.groupOrder>t.groupOrder)&&(t=o,i=n))}return[t,i]}_continueUndoInGroup(e,t){if(!e)return;const[,i]=this._findClosestUndoElementInGroup(e);return i?this._undo(i,0,t):void 0}undo(e){if(e instanceof Do){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return"string"===typeof e?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,i){if(!this._editStacks.has(e))return;const n=this._editStacks.get(e),s=n.getClosestPastElement();if(!s)return;if(s.groupId){const[e,n]=this._findClosestUndoElementInGroup(s.groupId);if(s!==e&&n)return this._undo(n,t,i)}const o=s.sourceId!==t||s.confirmBeforeUndo;if(o&&!i)return this._confirmAndContinueUndo(e,t,s);try{return 1===s.type?this._workspaceUndo(e,s,i):this._resourceUndo(n,s,i)}finally{Uc&&this._print("undo")}}_confirmAndContinueUndo(e,t,i){return zc(this,void 0,void 0,(function*(){const n=yield this._dialogService.show(Si["a"].Info,Bi["a"]("confirmDifferentSource","Would you like to undo '{0}'?",i.label),[Bi["a"]("confirmDifferentSource.ok","Undo"),Bi["a"]("cancel","Cancel")],{cancelId:1});if(1!==n.choice)return this._undo(e,t,!0)}))}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const o=s.getClosestFutureElement();o&&(o.sourceId===e&&(!t||o.sourceOrder<t.sourceOrder)&&(t=o,i=n))}return[t,i]}canRedo(e){if(e instanceof Do){const[,t]=this._findClosestRedoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const e=this._editStacks.get(t);return e.hasFutureElements()}return!1}_tryToSplitAndRedo(e,t,i,n){if(t.canSplit())return this._splitFutureWorkspaceElement(t,i),this._notificationService.info(n),new td(this._redo(e));for(const s of t.strResources)this.removeElements(s);return this._notificationService.info(n),new td}_checkWorkspaceRedo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndRedo(e,t,t.removedResources,Bi["a"]({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndRedo(e,t,t.invalidatedResources,Bi["a"]({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const s=[];for(const r of i.editStacks)r.getClosestFutureElement()!==t&&s.push(r.resourceLabel);if(s.length>0)return this._tryToSplitAndRedo(e,t,null,Bi["a"]({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const o=[];for(const r of i.editStacks)r.locked&&o.push(r.resourceLabel);return o.length>0?this._tryToSplitAndRedo(e,t,null,Bi["a"]({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,o.join(", "))):i.isValid()?null:this._tryToSplitAndRedo(e,t,null,Bi["a"]({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const i=this._getAffectedEditStacks(t),n=this._checkWorkspaceRedo(e,t,i,!1);return n?n.returnValue:this._executeWorkspaceRedo(e,t,i)}_executeWorkspaceRedo(e,t,i){return zc(this,void 0,void 0,(function*(){let n;try{n=yield this._invokeWorkspacePrepare(t)}catch(o){return this._onError(o,t)}const s=this._checkWorkspaceRedo(e,t,i,!0);if(s)return n.dispose(),s.returnValue;for(const e of i.editStacks)e.moveForward(t);return this._safeInvokeWithLocks(t,()=>t.actual.redo(),i,n,()=>this._continueRedoInGroup(t.groupId))}))}_resourceRedo(e,t){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,i=>(e.moveForward(t),this._safeInvokeWithLocks(t,()=>t.actual.redo(),new Qc([e]),i,()=>this._continueRedoInGroup(t.groupId))));{const e=Bi["a"]({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.info(e)}}else e.flushAllElements()}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const o=s.getClosestFutureElement();o&&(o.groupId===e&&(!t||o.groupOrder<t.groupOrder)&&(t=o,i=n))}return[t,i]}_continueRedoInGroup(e){if(!e)return;const[,t]=this._findClosestRedoElementInGroup(e);return t?this._redo(t):void 0}redo(e){if(e instanceof Do){const[,t]=this._findClosestRedoElementWithSource(e.id);return t?this._redo(t):void 0}return"string"===typeof e?this._redo(e):this._redo(this.getUriComparisonKey(e))}_redo(e){if(!this._editStacks.has(e))return;const t=this._editStacks.get(e),i=t.getClosestFutureElement();if(i){if(i.groupId){const[e,t]=this._findClosestRedoElementInGroup(i.groupId);if(i!==e&&t)return this._redo(t)}try{return 1===i.type?this._workspaceRedo(e,i):this._resourceRedo(t,i)}finally{Uc&&this._print("redo")}}}};ed=jc([Hc(0,Wa),Hc(1,ln["a"])],ed);class td{constructor(e){this.returnValue=e}}Object(Rc["b"])(wo,ed);i("675a"),i("0836");const id={ctrlCmd:!1,alt:!1};var nd;(function(e){e[e["NONE"]=0]="NONE",e[e["FIRST"]=1]="FIRST",e[e["SECOND"]=2]="SECOND",e[e["LAST"]=3]="LAST"})(nd||(nd={}));const sd=new ye["b"](()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}});function od(e,t,i=!1){const n=e||"",s=t||"",o=sd.value.collator.compare(n,s);return sd.value.collatorIsNumeric&&0===o&&n!==s?n<s?-1:1:o}function rd(e,t,i){const n=e.toLowerCase(),s=t.toLowerCase(),o=ad(e,t,i);if(o)return o;const r=n.endsWith(i),a=s.endsWith(i);if(r!==a)return r?-1:1;const l=od(n,s);return 0!==l?l:n.localeCompare(s)}function ad(e,t,i){const n=e.toLowerCase(),s=t.toLowerCase(),o=n.startsWith(i),r=s.startsWith(i);if(o!==r)return o?-1:1;if(o&&r){if(n.length<s.length)return-1;if(n.length>s.length)return 1}return 0}var ld=i("c4e3"),hd=i("ee56"),cd=i("9c3e");const dd={},ud=new cd["a"]("quick-input-button-icon-");function gd(e){if(!e)return;let t;const i=e.dark.toString();return dd[i]?t=dd[i]:(t=ud.nextId(),Z["r"]("."+t,"background-image: "+Z["o"](e.light||e.dark)),Z["r"](`.vs-dark .${t}, .hc-black .${t}`,"background-image: "+Z["o"](e.dark)),dd[i]=t),t}i("abf2");const pd=Z["a"];class md{constructor(e,t,i){this.os=t,this.options=i,this.domNode=Z["m"](e,pd(".monaco-keybinding")),this.didEverRender=!1,e.appendChild(this.domNode)}set(e,t){this.didEverRender&&this.keybinding===e&&md.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){if(Z["p"](this.domNode),this.keybinding){let[e,t]=this.keybinding.getParts();e&&this.renderPart(this.domNode,e,this.matches?this.matches.firstPart:null),t&&(Z["m"](this.domNode,pd("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderPart(this.domNode,t,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()||""}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.didEverRender=!0}renderPart(e,t,i){const n=qi.modifierLabels[this.os];t.ctrlKey&&this.renderKey(e,n.ctrlKey,Boolean(null===i||void 0===i?void 0:i.ctrlKey),n.separator),t.shiftKey&&this.renderKey(e,n.shiftKey,Boolean(null===i||void 0===i?void 0:i.shiftKey),n.separator),t.altKey&&this.renderKey(e,n.altKey,Boolean(null===i||void 0===i?void 0:i.altKey),n.separator),t.metaKey&&this.renderKey(e,n.metaKey,Boolean(null===i||void 0===i?void 0:i.metaKey),n.separator);const s=t.keyLabel;s&&this.renderKey(e,s,Boolean(null===i||void 0===i?void 0:i.keyCode),"")}renderKey(e,t,i,n){Z["m"](e,pd("span.monaco-keybinding-key"+(i?".highlight":""),void 0,t)),n&&Z["m"](e,pd("span.monaco-keybinding-key-separator",void 0,n))}renderUnbound(e){Z["m"](e,pd("span.monaco-keybinding-key",void 0,Object(Bi["a"])("unbound","Unbound")))}static areSame(e,t){return e===t||!e&&!t||!!e&&!!t&&Object(ue["d"])(e.firstPart,t.firstPart)&&Object(ue["d"])(e.chordPart,t.chordPart)}}var fd=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},_d=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const bd=Z["a"];class vd{constructor(e){this.hidden=!1,this._onChecked=new W["a"],this.onChecked=this._onChecked.event,Object.assign(this,e)}get checked(){return!!this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire(e))}dispose(){this._onChecked.dispose()}}class Cd{get templateId(){return Cd.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=Z["m"](e,bd(".quick-input-list-entry"));const i=Z["m"](t.entry,bd("label.quick-input-list-label"));t.toDisposeTemplate.push(Z["k"](i,Z["d"].CLICK,e=>{t.checkbox.offsetParent||e.preventDefault()})),t.checkbox=Z["m"](i,bd("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(Z["k"](t.checkbox,Z["d"].CHANGE,e=>{t.element.checked=t.checkbox.checked}));const n=Z["m"](i,bd(".quick-input-list-rows")),s=Z["m"](n,bd(".quick-input-list-row")),o=Z["m"](n,bd(".quick-input-list-row"));t.label=new ld["a"](s,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const r=Z["m"](s,bd(".quick-input-list-entry-keybinding"));t.keybinding=new md(r,Le["a"]);const a=Z["m"](o,bd(".quick-input-list-label-meta"));return t.detail=new hd["a"](a,!0),t.separator=Z["m"](t.entry,bd(".quick-input-list-separator")),t.actionBar=new Bn["a"](t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,i){i.toDisposeElement=Object(de["f"])(i.toDisposeElement),i.element=e,i.checkbox.checked=e.checked,i.toDisposeElement.push(e.onChecked(e=>i.checkbox.checked=e));const{labelHighlights:n,descriptionHighlights:s,detailHighlights:o}=e,r=Object.create(null);r.matches=n||[],r.descriptionTitle=e.saneDescription,r.descriptionMatches=s||[],r.extraClasses=e.item.iconClasses,r.italic=e.item.italic,r.strikethrough=e.item.strikethrough,i.label.setLabel(e.saneLabel,e.saneDescription,r),i.keybinding.set(e.item.keybinding),i.detail.set(e.saneDetail,o),e.separator&&e.separator.label?(i.separator.textContent=e.separator.label,i.separator.style.display=""):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!e.separator),i.actionBar.clear();const a=e.item.buttons;a&&a.length?(i.actionBar.push(a.map((t,i)=>{let n=t.iconClass||(t.iconPath?gd(t.iconPath):void 0);t.alwaysVisible&&(n=n?n+" always-visible":"always-visible");const s=new Vn["a"]("id-"+i,"",n,!0,()=>_d(this,void 0,void 0,(function*(){e.fireButtonTriggered({button:t,item:e.item})})));return s.tooltip=t.tooltip||"",s}),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){i.toDisposeElement=Object(de["f"])(i.toDisposeElement)}disposeTemplate(e){e.toDisposeElement=Object(de["f"])(e.toDisposeElement),e.toDisposeTemplate=Object(de["f"])(e.toDisposeTemplate)}}Cd.ID="listelement";class wd{getHeight(e){return e.saneDetail?44:22}getTemplateId(e){return Cd.ID}}var Sd;(function(e){e[e["First"]=1]="First",e[e["Second"]=2]="Second",e[e["Last"]=3]="Last",e[e["Next"]=4]="Next",e[e["Previous"]=5]="Previous",e[e["NextPage"]=6]="NextPage",e[e["PreviousPage"]=7]="PreviousPage"})(Sd||(Sd={}));class yd{constructor(e,t,i){this.parent=e,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new W["a"],this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new W["a"],this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new W["a"],this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new W["a"],this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new W["a"],this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new W["a"],this.onKeyDown=this._onKeyDown.event,this._onLeave=new W["a"],this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=Z["m"](this.parent,bd(".quick-input-list"));const n=new wd,s=new Ld;this.list=i.createList("QuickInput",this.container,n,[new Cd],{identityProvider:{getId:e=>e.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:s}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(e=>{const t=new wi["a"](e);switch(t.keyCode){case 10:this.toggleCheckbox();break;case 31:(Le["f"]?e.metaKey:e.ctrlKey)&&this.list.setFocus(Object(We["r"])(this.list.length));break;case 16:const t=this.list.getFocus();1===t.length&&0===t[0]&&this._onLeave.fire();break;case 18:const i=this.list.getFocus();1===i.length&&i[0]===this.list.length-1&&this._onLeave.fire();break}this._onKeyDown.fire(t)})),this.disposables.push(this.list.onMouseDown(e=>{2!==e.browserEvent.button&&e.browserEvent.preventDefault()})),this.disposables.push(Z["g"](this.container,Z["d"].CLICK,e=>{(e.x||e.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(e=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(e=>{"number"===typeof e.index&&(e.browserEvent.preventDefault(),this.list.setSelection([e.index]))})),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return W["b"].map(this.list.onDidChangeFocus,e=>e.elements.map(e=>e.item))}get onDidChangeSelection(){return W["b"].map(this.list.onDidChangeSelection,e=>({items:e.elements.map(e=>e.item),event:e.browserEvent}))}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i<n;i++){const n=e[i];if(!n.hidden){if(!n.checked)return!1;t=!0}}return t}getCheckedCount(){let e=0;const t=this.elements;for(let i=0,n=t.length;i<n;i++)t[i].checked&&e++;return e}getVisibleCount(){let e=0;const t=this.elements;for(let i=0,n=t.length;i<n;i++)t[i].hidden||e++;return e}setAllVisibleChecked(e){try{this._fireCheckedEvents=!1,this.elements.forEach(t=>{t.hidden||(t.checked=e)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=Object(de["f"])(this.elementDisposables);const t=e=>this.fireButtonTriggered(e);this.inputElements=e,this.elements=e.reduce((i,n,s)=>{var o,r,a;if("separator"!==n.type){const l=s&&e[s-1],h=n.label&&n.label.replace(/\r?\n/g," "),c=n.meta&&n.meta.replace(/\r?\n/g," "),d=n.description&&n.description.replace(/\r?\n/g," "),u=n.detail&&n.detail.replace(/\r?\n/g," "),g=n.ariaLabel||[h,d,u].map(e=>e&&Object(fa["d"])(e).text).filter(e=>!!e).join(", ");i.push(new vd({index:s,item:n,saneLabel:h,saneMeta:c,saneAriaLabel:g,saneDescription:d,saneDetail:u,labelHighlights:null===(o=n.highlights)||void 0===o?void 0:o.label,descriptionHighlights:null===(r=n.highlights)||void 0===r?void 0:r.description,detailHighlights:null===(a=n.highlights)||void 0===a?void 0:a.detail,checked:!1,separator:l&&"separator"===l.type?l:void 0,fireButtonTriggered:t}))}return i},[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map(e=>e.onChecked(()=>this.fireCheckedEvents()))),this.elementsToIndexes=this.elements.reduce((e,t,i)=>(e.set(t.item,i),e),new Map),this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map(e=>e.item)}setFocusedElements(e){if(this.list.setFocus(e.filter(e=>this.elementsToIndexes.has(e)).map(e=>this.elementsToIndexes.get(e))),e.length>0){const e=this.list.getFocus()[0];"number"===typeof e&&this.list.reveal(e)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter(e=>this.elementsToIndexes.has(e)).map(e=>this.elementsToIndexes.get(e)))}getCheckedElements(){return this.elements.filter(e=>e.checked).map(e=>e.item)}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const i of e)t.add(i);for(const e of this.elements)e.checked=t.has(e.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===Sd.Next&&this.list.getFocus()[0]===this.list.length-1&&(e=Sd.First),e===Sd.Previous&&0===this.list.getFocus()[0]&&(e=Sd.Last),e===Sd.Second&&this.list.length<2&&(e=Sd.First),e){case Sd.First:this.list.focusFirst();break;case Sd.Second:this.list.focusNth(1);break;case Sd.Last:this.list.focusLast();break;case Sd.Next:this.list.focusNext();break;case Sd.Previous:this.list.focusPrevious();break;case Sd.NextPage:this.list.focusNextPage();break;case Sd.PreviousPage:this.list.focusPreviousPage();break}const t=this.list.getFocus()[0];"number"===typeof t&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(e){this.list.getHTMLElement().style.maxHeight=e?`calc(${44*Math.floor(e/44)}px)`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;e=e.trim(),e&&(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)?this.elements.forEach(t=>{const i=this.matchOnLabel?Object(xe["m"])(Object(fa["c"])(e,Object(fa["d"])(t.saneLabel))):void 0,n=this.matchOnDescription?Object(xe["m"])(Object(fa["c"])(e,Object(fa["d"])(t.saneDescription||""))):void 0,s=this.matchOnDetail?Object(xe["m"])(Object(fa["c"])(e,Object(fa["d"])(t.saneDetail||""))):void 0,o=this.matchOnMeta?Object(xe["m"])(Object(fa["c"])(e,Object(fa["d"])(t.saneMeta||""))):void 0;i||n||s||o?(t.labelHighlights=i,t.descriptionHighlights=n,t.detailHighlights=s,t.hidden=!1):(t.labelHighlights=void 0,t.descriptionHighlights=void 0,t.detailHighlights=void 0,t.hidden=!t.item.alwaysShow),t.separator=void 0}):this.elements.forEach(e=>{e.labelHighlights=void 0,e.descriptionHighlights=void 0,e.detailHighlights=void 0,e.hidden=!1;const t=e.index&&this.inputElements[e.index-1];e.separator=t&&"separator"===t.type?t:void 0});const t=this.elements.filter(e=>!e.hidden);if(this.sortByLabel&&e){const i=e.toLowerCase();t.sort((e,t)=>Dd(e,t,i))}return this.elementsToIndexes=t.reduce((e,t,i)=>(e.set(t.item,i),e),new Map),this.list.splice(0,this.list.length,t),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(t.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const i of e)i.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return"none"!==this.container.style.display}dispose(){this.elementDisposables=Object(de["f"])(this.elementDisposables),this.disposables=Object(de["f"])(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}style(e){this.list.style(e)}}function Dd(e,t,i){const n=e.labelHighlights||[],s=t.labelHighlights||[];return n.length&&!s.length?-1:!n.length&&s.length?1:0===n.length&&0===s.length?0:rd(e.saneLabel,t.saneLabel,i)}fd([$l["a"]],yd.prototype,"onDidChangeFocus",null),fd([$l["a"]],yd.prototype,"onDidChangeSelection",null);class Ld{getWidgetAriaLabel(){return Object(Bi["a"])("quickInput","Quick Input")}getAriaLabel(e){return e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(){return"option"}}var xd=i("d3ef");const kd=Z["a"];class Ed extends de["a"]{constructor(e){super(),this.parent=e,this.onKeyDown=e=>Z["g"](this.inputBox.inputElement,Z["d"].KEY_DOWN,t=>{e(new wi["a"](t))}),this.onMouseDown=e=>Z["g"](this.inputBox.inputElement,Z["d"].MOUSE_DOWN,t=>{e(new ma["a"](t))}),this.onDidChange=e=>this.inputBox.onDidChange(e),this.container=Z["m"](this.parent,kd(".quick-input-box")),this.inputBox=this._register(new xd["b"](this.container,void 0))}get value(){return this.inputBox.value}set value(e){this.inputBox.value=e}select(e=null){this.inputBox.select(e)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.inputBox.setPlaceHolder(e)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(e){this.inputBox.setAriaLabel(e)}get password(){return"password"===this.inputBox.inputElement.type}set password(e){this.inputBox.inputElement.type=e?"password":"text"}setAttribute(e,t){this.inputBox.inputElement.setAttribute(e,t)}removeAttribute(e){this.inputBox.inputElement.removeAttribute(e)}showDecoration(e){e===Si["a"].Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:e===Si["a"].Info?1:e===Si["a"].Warning?2:3,content:""})}stylesForType(e){return this.inputBox.stylesForType(e===Si["a"].Info?1:e===Si["a"].Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(e){this.inputBox.style(e)}}i("54f2");const Nd={badgeBackground:_r["a"].fromHex("#4D4D4D"),badgeForeground:_r["a"].fromHex("#FFFFFF")};class Od{constructor(e,t){this.count=0,this.options=t||Object.create(null),Object(ue["f"])(this.options,Nd,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=Object(Z["m"])(e,Object(Z["a"])(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){this.element.textContent=Object(Ge["w"])(this.countFormat,this.count),this.element.title=Object(Ge["w"])(this.titleFormat,this.count),this.applyStyles()}style(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const e=this.badgeBackground?this.badgeBackground.toString():"",t=this.badgeForeground?this.badgeForeground.toString():"",i=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}}}i("1f26");const Id="done",Td="active",Md="infinite",Ad="discrete",Rd={progressBarBackground:_r["a"].fromHex("#0E70C0")};class Fd extends de["a"]{constructor(e,t){super(),this.options=t||Object.create(null),Object(ue["f"])(this.options,Rd,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this._register(this.showDelayedScheduler=new ye["e"](()=>Object(Z["R"])(this.element),0)),this.create(e)}create(e){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(Td,Md,Ad),this.workedVal=0,this.totalWork=void 0}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(Id),this.element.classList.contains(Md)?(this.bit.style.opacity="0",e?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",e?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(Ad,Id),this.element.classList.add(Td,Md),this}getContainer(){return this.element}style(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const e=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=e}}}i("ffac");var Pd=i("a60f"),Bd=i("7ddc");const Wd={buttonBackground:_r["a"].fromHex("#0E639C"),buttonHoverBackground:_r["a"].fromHex("#006BB3"),buttonForeground:_r["a"].white};class Vd extends de["a"]{constructor(e,t){super(),this._onDidClick=this._register(new W["a"]),this.options=t||Object.create(null),Object(ue["f"])(this.options,Wd,!1),this.buttonForeground=this.options.buttonForeground,this.buttonBackground=this.options.buttonBackground,this.buttonHoverBackground=this.options.buttonHoverBackground,this.buttonSecondaryForeground=this.options.buttonSecondaryForeground,this.buttonSecondaryBackground=this.options.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=this.options.buttonSecondaryHoverBackground,this.buttonBorder=this.options.buttonBorder,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),e.appendChild(this._element),this._register(Pd["b"].addTarget(this._element)),[Z["d"].CLICK,Pd["a"].Tap].forEach(e=>{this._register(Object(Z["g"])(this._element,e,e=>{this.enabled?this._onDidClick.fire(e):Z["c"].stop(e)}))}),this._register(Object(Z["g"])(this._element,Z["d"].KEY_DOWN,e=>{const t=new wi["a"](e);let i=!1;this.enabled&&(t.equals(3)||t.equals(10))?(this._onDidClick.fire(e),i=!0):t.equals(9)&&(this._element.blur(),i=!0),i&&Z["c"].stop(t,!0)})),this._register(Object(Z["g"])(this._element,Z["d"].MOUSE_OVER,e=>{this._element.classList.contains("disabled")||this.setHoverBackground()})),this._register(Object(Z["g"])(this._element,Z["d"].MOUSE_OUT,e=>{this.applyStyles()})),this.focusTracker=this._register(Object(Z["T"])(this._element)),this._register(this.focusTracker.onDidFocus(()=>this.setHoverBackground())),this._register(this.focusTracker.onDidBlur(()=>this.applyStyles())),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let e;e=this.options.secondary?this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:this.buttonHoverBackground?this.buttonHoverBackground.toString():null,e&&(this._element.style.backgroundColor=e)}style(e){this.buttonForeground=e.buttonForeground,this.buttonBackground=e.buttonBackground,this.buttonHoverBackground=e.buttonHoverBackground,this.buttonSecondaryForeground=e.buttonSecondaryForeground,this.buttonSecondaryBackground=e.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=e.buttonSecondaryHoverBackground,this.buttonBorder=e.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let e,t;this.options.secondary?(t=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",e=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(t=this.buttonForeground?this.buttonForeground.toString():"",e=this.buttonBackground?this.buttonBackground.toString():"");const i=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=t,this._element.style.backgroundColor=e,this._element.style.borderWidth=i?"1px":"",this._element.style.borderStyle=i?"solid":"",this._element.style.borderColor=i}}get element(){return this._element}set label(e){this._element.classList.add("monaco-text-button"),this.options.supportIcons?Object(Z["M"])(this._element,...Object(Bd["a"])(e)):this._element.textContent=e,"string"===typeof this.options.title?this._element.title=this.options.title:this.options.title&&(this._element.title=e)}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}var jd=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const Hd=Z["a"],zd=Object($n["d"])("quick-input-back",$n["b"].arrowLeft),Ud={iconClass:zd.classNames,tooltip:Object(Bi["a"])("quickInput.back","Back"),handle:-1};class Kd extends de["a"]{constructor(e){super(),this.ui=e,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new W["a"]),this.onDidHideEmitter=this._register(new W["a"]),this.onDisposeEmitter=this._register(new W["a"]),this.visibleDisposables=this._register(new de["b"]),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){this._ignoreFocusOut=e,this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(e=>{-1!==this.buttons.indexOf(e)&&this.onDidTriggerButtonEmitter.fire(e)})),this.ui.show(this),this.visible=!0,this.update())}hide(){this.visible&&this.ui.hide()}didHide(){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire()}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:e||"&nbsp;"===this.ui.title.innerHTML||(this.ui.title.innerText=" ;");const t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this.busy&&!this.busyDelay&&(this.busyDelay=new ye["g"],this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const e=this.buttons.filter(e=>e===Ud);this.ui.leftActionBar.push(e.map((e,t)=>{const i=new Vn["a"]("id-"+t,"",e.iconClass||gd(e.iconPath),!0,()=>jd(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)})));return i.tooltip=e.tooltip||"",i}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const t=this.buttons.filter(e=>e!==Ud);this.ui.rightActionBar.push(t.map((e,t)=>{const i=new Vn["a"]("id-"+t,"",e.iconClass||gd(e.iconPath),!0,()=>jd(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)})));return i.tooltip=e.tooltip||"",i}),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey)}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?Object(Bi["a"])("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e===Si["a"].Error){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?""+t.foreground:"",this.ui.message.style.backgroundColor=t.background?""+t.background:"",this.ui.message.style.border=t.border?"1px solid "+t.border:"",this.ui.message.style.paddingBottom="4px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.paddingBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}class $d extends Kd{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new W["a"]),this.onDidAcceptEmitter=this._register(new W["a"]),this.onDidCustomEmitter=this._register(new W["a"]),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._sortByLabel=!0,this._autoFocusOnList=!0,this._itemActivation=this.ui.isScreenReaderOptimized()?nd.NONE:nd.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new W["a"]),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new W["a"]),this.onDidTriggerItemButtonEmitter=this._register(new W["a"]),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this._value=e||"",this.update()}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?id:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(Sd.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{if(e===this.value)return;this._value=e;const t=this.ui.list.filter(this.filterValue(this.ui.inputBox.value));t&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(e)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(e=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(e=>{switch(e.keyCode){case 18:this.ui.list.focus(Sd.Next),this.canSelectMany&&this.ui.list.domFocus(),Z["c"].stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(Sd.Previous):this.ui.list.focus(Sd.Last),this.canSelectMany&&this.ui.list.domFocus(),Z["c"].stop(e,!0);break;case 12:this.ui.list.focus(Sd.NextPage),this.canSelectMany&&this.ui.list.domFocus(),Z["c"].stop(e,!0);break;case 11:this.ui.list.focus(Sd.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),Z["c"].stop(e,!0);break;case 17:if(!this._canAcceptInBackground)return;if(!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.onDidAcceptEmitter.fire({inBackground:!0}));break;case 14:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(Sd.First),Z["c"].stop(e,!0));break;case 13:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(Sd.Last),Z["c"].stop(e,!0));break}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{!this.canSelectMany&&this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.onDidAcceptEmitter.fire({inBackground:!1})})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&Object(We["g"])(e,this._activeItems,(e,t)=>e===t)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:t})=>{this.canSelectMany?e.length&&this.ui.list.setSelectedElements([]):this.selectedItemsToConfirm!==this._selectedItems&&Object(We["g"])(e,this._selectedItems,(e,t)=>e===t)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.onDidAcceptEmitter.fire({inBackground:t instanceof MouseEvent&&1===t.button}))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&Object(We["g"])(e,this._selectedItems,(e,t)=>e===t)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.fire(e))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}registerQuickNavigation(){return Z["g"](this.ui.container,Z["d"].KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new wi["a"](e),i=t.keyCode,n=this._quickNavigate.keybindings,s=n.some(e=>{const[n,s]=e.getParts();return!s&&(n.shiftKey&&4===i?!(t.ctrlKey||t.altKey||t.metaKey):!(!n.altKey||6!==i)||(!(!n.ctrlKey||5!==i)||!(!n.metaKey||57!==i)))});s&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.onDidAcceptEmitter.fire({inBackground:!1})),this._quickNavigate=void 0)})}update(){if(!this.visible)return;let e=!1,t=!1;this._hideInput&&this._items.length>0&&(this.ui.isScreenReaderOptimized()?t=!0:e=!0),this.ui.container.classList.toggle("hidden-input",e&&!this.description);const i={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!e,progressBar:!e,visibleCount:!0,count:this.canSelectMany,ok:"default"===this.ok?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};if(this.ui.setVisibilities(i),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),t)this.ui.inputBox.ariaLabel="";else{const e=this.ariaLabel||this.placeholder||$d.DEFAULT_ARIA_LABEL;this.ui.inputBox.ariaLabel!==e&&(this.ui.inputBox.ariaLabel=e)}if(this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case nd.NONE:this._itemActivation=nd.FIRST;break;case nd.SECOND:this.ui.list.focus(Sd.Second),this._itemActivation=nd.FIRST;break;case nd.LAST:this.ui.list.focus(Sd.Last),this._itemActivation=nd.FIRST;break;default:this.trySelectFirst();break}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null));const n=this.validationMessage||"";this._lastValidationMessage!==n&&(this._lastValidationMessage=n,Z["M"](this.ui.message,...Object(Bd["a"])(Object(Ge["t"])(n))),this.showMessageDecoration(this.validationMessage?Si["a"].Error:Si["a"].Ignore)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",this.ui.setComboboxAccessibility(!0),i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(Sd.First))}}$d.DEFAULT_ARIA_LABEL=Object(Bi["a"])("quickInputBox.ariaLabel","Type to narrow down results.");class qd extends de["a"]{constructor(e){super(),this.options=e,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new W["a"]),this.onDidCustomEmitter=this._register(new W["a"]),this.onDidTriggerButtonEmitter=this._register(new W["a"]),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new W["a"]),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new W["a"]),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=e=>{this.keyMods.ctrlCmd=e.ctrlKey||e.metaKey,this.keyMods.alt=e.altKey};this._register(Z["g"](window,Z["d"].KEY_DOWN,e,!0)),this._register(Z["g"](window,Z["d"].KEY_UP,e,!0)),this._register(Z["g"](window,Z["d"].MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=Z["m"](this.parentElement,Hd(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const t=Z["s"](e),i=Z["m"](e,Hd(".quick-input-titlebar")),n=this._register(new Bn["a"](i));n.domNode.classList.add("quick-input-left-action-bar");const s=Z["m"](i,Hd(".quick-input-title")),o=this._register(new Bn["a"](i));o.domNode.classList.add("quick-input-right-action-bar");const r=Z["m"](e,Hd(".quick-input-description")),a=Z["m"](e,Hd(".quick-input-header")),l=Z["m"](a,Hd("input.quick-input-check-all"));l.type="checkbox",this._register(Z["k"](l,Z["d"].CHANGE,e=>{const t=l.checked;y.setAllVisibleChecked(t)})),this._register(Z["g"](l,Z["d"].CLICK,e=>{(e.x||e.y)&&u.setFocus()}));const h=Z["m"](a,Hd(".quick-input-description")),c=Z["m"](a,Hd(".quick-input-and-message")),d=Z["m"](c,Hd(".quick-input-filter")),u=this._register(new Ed(d));u.setAttribute("aria-describedby",this.idPrefix+"message");const g=Z["m"](d,Hd(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");const p=new Od(g,{countFormat:Object(Bi["a"])({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")}),m=Z["m"](d,Hd(".quick-input-count"));m.setAttribute("aria-live","polite");const f=new Od(m,{countFormat:Object(Bi["a"])({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")}),_=Z["m"](a,Hd(".quick-input-action")),b=new Vd(_);b.label=Object(Bi["a"])("ok","OK"),this._register(b.onDidClick(e=>{this.onDidAcceptEmitter.fire()}));const v=Z["m"](a,Hd(".quick-input-action")),C=new Vd(v);C.label=Object(Bi["a"])("custom","Custom"),this._register(C.onDidClick(e=>{this.onDidCustomEmitter.fire()}));const w=Z["m"](c,Hd(`#${this.idPrefix}message.quick-input-message`)),S=new Fd(e);S.getContainer().classList.add("quick-input-progress");const y=this._register(new yd(e,this.idPrefix+"list",this.options));this._register(y.onChangedAllVisibleChecked(e=>{l.checked=e})),this._register(y.onChangedVisibleCount(e=>{p.setCount(e)})),this._register(y.onChangedCheckedCount(e=>{f.setCount(e)})),this._register(y.onLeave(()=>{setTimeout(()=>{u.setFocus(),this.controller instanceof $d&&this.controller.canSelectMany&&y.clearFocus()},0)})),this._register(y.onDidChangeFocus(()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")}));const D=Z["T"](e);return this._register(D),this._register(Z["g"](e,Z["d"].FOCUS,e=>{this.previousFocusElement=e.relatedTarget instanceof HTMLElement?e.relatedTarget:void 0},!0)),this._register(D.onDidBlur(()=>{this.getUI().ignoreFocusOut||this.options.ignoreFocusOut()||this.hide(),this.previousFocusElement=void 0})),this._register(Z["g"](e,Z["d"].FOCUS,e=>{u.setFocus()})),this._register(Z["g"](e,Z["d"].KEY_DOWN,t=>{const i=new wi["a"](t);switch(i.keyCode){case 3:Z["c"].stop(t,!0),this.onDidAcceptEmitter.fire();break;case 9:Z["c"].stop(t,!0),this.hide();break;case 2:if(!i.altKey&&!i.ctrlKey&&!i.metaKey){const n=[".action-label.codicon"];e.classList.contains("show-checkboxes")?n.push("input"):n.push("input[type=text]"),this.getUI().list.isDisplayed()&&n.push(".monaco-list");const s=e.querySelectorAll(n.join(", "));i.shiftKey&&i.target===s[0]?(Z["c"].stop(t,!0),s[s.length-1].focus()):i.shiftKey||i.target!==s[s.length-1]||(Z["c"].stop(t,!0),s[0].focus())}break}})),this.ui={container:e,styleSheet:t,leftActionBar:n,titleBar:i,title:s,description1:r,description2:h,rightActionBar:o,checkAll:l,filterContainer:d,inputBox:u,visibleCountContainer:g,visibleCount:p,countContainer:m,count:f,okContainer:_,ok:b,message:w,customButtonContainer:v,customButton:C,progressBar:S,list:y,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:e=>this.show(e),hide:()=>this.hide(),setVisibilities:e=>this.setVisibilities(e),setComboboxAccessibility:e=>this.setComboboxAccessibility(e),setEnabled:e=>this.setEnabled(e),setContextKey:e=>this.options.setContextKey(e)},this.updateStyles(),this.ui}pick(e,t={},i=B["a"].None){return new Promise((n,s)=>{let o=e=>{o=n,t.onKeyMods&&t.onKeyMods(r.keyMods),n(e)};if(i.isCancellationRequested)return void o(void 0);const r=this.createQuickPick();let a;const l=[r,r.onDidAccept(()=>{if(r.canSelectMany)o(r.selectedItems.slice()),r.hide();else{const e=r.activeItems[0];e&&(o(e),r.hide())}}),r.onDidChangeActive(e=>{const i=e[0];i&&t.onDidFocus&&t.onDidFocus(i)}),r.onDidChangeSelection(e=>{if(!r.canSelectMany){const t=e[0];t&&(o(t),r.hide())}}),r.onDidTriggerItemButton(e=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},e),{removeItem:()=>{const t=r.items.indexOf(e.item);if(-1!==t){const e=r.items.slice();e.splice(t,1),r.items=e}}}))),r.onDidChangeValue(e=>{!a||e||1===r.activeItems.length&&r.activeItems[0]===a||(r.activeItems=[a])}),i.onCancellationRequested(()=>{r.hide()}),r.onDidHide(()=>{Object(de["f"])(l),o(void 0)})];r.canSelectMany=!!t.canPickMany,r.placeholder=t.placeHolder,r.ignoreFocusOut=!!t.ignoreFocusLost,r.matchOnDescription=!!t.matchOnDescription,r.matchOnDetail=!!t.matchOnDetail,r.matchOnLabel=void 0===t.matchOnLabel||t.matchOnLabel,r.autoFocusOnList=void 0===t.autoFocusOnList||t.autoFocusOnList,r.quickNavigate=t.quickNavigate,r.contextKey=t.contextKey,r.busy=!0,Promise.all([e,t.activeItem]).then(([e,t])=>{a=t,r.busy=!1,r.items=e,r.canSelectMany&&(r.selectedItems=e.filter(e=>"separator"!==e.type&&e.picked)),a&&(r.activeItems=[a])}),r.show(),Promise.resolve(e).then(void 0,e=>{s(e),r.hide()})})}createQuickPick(){const e=this.getUI();return new $d(e)}show(e){const t=this.getUI();this.onShowEmitter.fire();const i=this.controller;this.controller=e,i&&i.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(Si["a"].Ignore),t.visibleCount.setCount(0),t.count.setCount(0),Z["M"](t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,this.setComboboxAccessibility(!1),t.inputBox.ariaLabel="";const n=this.options.backKeybindingLabel();Ud.tooltip=n?Object(Bi["a"])("quickInput.backWithKeybinding","Back ({0})",n):Object(Bi["a"])("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=!e.description||e.inputBox||e.checkAll?"none":"",t.checkAll.style.display=e.checkAll?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList[e.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(e){if(e!==this.comboboxAccessibility){const t=this.getUI();this.comboboxAccessibility=e,this.comboboxAccessibility?(t.inputBox.setAttribute("role","combobox"),t.inputBox.setAttribute("aria-haspopup","true"),t.inputBox.setAttribute("aria-autocomplete","list"),t.inputBox.setAttribute("aria-activedescendant",t.list.getActiveDescendant()||"")):(t.inputBox.removeAttribute("role"),t.inputBox.removeAttribute("aria-haspopup"),t.inputBox.removeAttribute("aria-autocomplete"),t.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.getAction().enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.getAction().enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(){var e;const t=this.controller;if(t){const i=!(null===(e=this.ui)||void 0===e?void 0:e.container.contains(document.activeElement));this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",i||(this.previousFocusElement&&this.previousFocusElement.offsetParent?(this.previousFocusElement.focus(),this.previousFocusElement=void 0):this.options.returnFocus()),t.didHide()}}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=this.titleBarOffset+"px";const e=this.ui.container.style,t=Math.min(.62*this.dimension.width,qd.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&.4*this.dimension.height)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,contrastBorder:n,widgetShadow:s}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e?e.toString():"",this.ui.container.style.backgroundColor=t?t.toString():"",this.ui.container.style.color=i?i.toString():"",this.ui.container.style.border=n?"1px solid "+n:"",this.ui.container.style.boxShadow=s?"0 0 8px 2px "+s:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button),this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const o=[];this.styles.list.pickerGroupBorder&&o.push(`.quick-input-list .quick-input-list-entry { border-top-color:  ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&o.push(`.quick-input-list .quick-input-list-separator { color:  ${this.styles.list.pickerGroupForeground}; }`);const r=o.join("\n");r!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=r)}}}qd.MAX_WIDTH=600;const Gd=Object(Dt["c"])("quickInputService");var Yd;(function(e){e[e["PRESERVE"]=0]="PRESERVE",e[e["LAST"]=1]="LAST"})(Yd||(Yd={}));const Zd={Quickaccess:"workbench.contributions.quickaccess"};class Xd{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort((e,t)=>t.prefix.length-e.prefix.length),Object(de["h"])(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return Object(We["d"])([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){const t=e&&this.providers.find(t=>e.startsWith(t.prefix))||void 0;return t||this.defaultProvider}}fo["a"].add(Zd.Quickaccess,new Xd);var Qd=i("0bfb"),Jd=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},eu=function(e,t){return function(i,n){t(i,n,e)}};let tu=class extends de["a"]{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=fo["a"].as(Zd.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){var i;const[n,s]=this.getOrInstantiateProvider(e),o=this.visibleQuickAccess,r=null===o||void 0===o?void 0:o.descriptor;if(o&&s&&r===s)return e===s.prefix||(null===t||void 0===t?void 0:t.preserveValue)||(o.picker.value=e),void this.adjustValueSelection(o.picker,s,t);if(s&&!(null===t||void 0===t?void 0:t.preserveValue)){let t=void 0;if(o&&r&&r!==s){const e=o.value.substr(r.prefix.length);e&&(t=`${s.prefix}${e}`)}if(!t){const e=null===n||void 0===n?void 0:n.defaultFilterValue;e===Yd.LAST?t=this.lastAcceptedPickerValues.get(s):"string"===typeof e&&(t=`${s.prefix}${e}`)}"string"===typeof t&&(e=t)}const a=new de["b"],l=a.add(this.quickInputService.createQuickPick());l.value=e,this.adjustValueSelection(l,s,t),l.placeholder=null===s||void 0===s?void 0:s.placeholder,l.quickNavigate=null===t||void 0===t?void 0:t.quickNavigateConfiguration,l.hideInput=!!l.quickNavigate&&!o,("number"===typeof(null===t||void 0===t?void 0:t.itemActivation)||(null===t||void 0===t?void 0:t.quickNavigateConfiguration))&&(l.itemActivation=null!==(i=null===t||void 0===t?void 0:t.itemActivation)&&void 0!==i?i:nd.SECOND),l.contextKey=null===s||void 0===s?void 0:s.contextKey,l.filterValue=e=>e.substring(s?s.prefix.length:0),(null===s||void 0===s?void 0:s.placeholder)&&(l.ariaLabel=null===s||void 0===s?void 0:s.placeholder);const h=this.registerPickerListeners(l,n,s,e,a);n&&a.add(n.provide(l,h)),l.show()}adjustValueSelection(e,t,i){var n;let s;s=(null===i||void 0===i?void 0:i.preserveValue)?[e.value.length,e.value.length]:[null!==(n=null===t||void 0===t?void 0:t.prefix.length)&&void 0!==n?n:0,e.value.length],e.valueSelection=s}registerPickerListeners(e,t,i,n,s){const o=this.visibleQuickAccess={picker:e,descriptor:i,value:n};s.add(Object(de["h"])(()=>{o===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),s.add(e.onDidChangeValue(e=>{const[i]=this.getOrInstantiateProvider(e);i!==t?this.show(e,{preserveValue:!0}):o.value=e})),i&&s.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(i,e.value)}));const r=s.add(new B["b"]);return Object(Qd["a"])(e.onDidHide)(()=>{0===e.selectedItems.length&&r.cancel(),s.dispose()}),r.token}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let i=this.mapProviderToDescriptor.get(t);return i||(i=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,i)),[i,t]}};tu=Jd([eu(0,Gd),eu(1,Dt["a"])],tu);var iu=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},nu=function(e,t){return function(i,n){t(i,n,e)}};let su=class extends Kn["c"]{constructor(e,t,i,n,s){super(i),this.instantiationService=e,this.contextKeyService=t,this.accessibilityService=n,this.layoutService=s,this.contexts=new Map}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(tu))),this._quickAccess}createController(e=this.layoutService,t){var i,n;const s={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:e=>this.setContextKey(e),returnFocus:()=>e.focus(),createList:(e,t,i,n,s)=>this.instantiationService.createInstance(ic,e,t,i,n,s),styles:this.computeStyles()},o=this._register(new qd(Object.assign(Object.assign({},s),t)));return o.layout(e.dimension,null!==(n=null===(i=e.offset)||void 0===i?void 0:i.top)&&void 0!==n?n:0),this._register(e.onDidLayout(t=>{var i,n;return o.layout(t,null!==(n=null===(i=e.offset)||void 0===i?void 0:i.top)&&void 0!==n?n:0)})),this._register(o.onShow(()=>this.resetContextKeys())),this._register(o.onHide(()=>this.resetContextKeys())),o}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new zn["c"](e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),t&&t.get()||(this.resetContextKeys(),t&&t.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t={},i=B["a"].None){return this.controller.pick(e,t,i)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},Object(Ea["c"])(this.theme,{quickInputBackground:Un["Sb"],quickInputForeground:Un["Tb"],quickInputTitleBackground:Un["Vb"],contrastBorder:Un["h"],widgetShadow:Un["kc"]})),inputBox:Object(Ea["c"])(this.theme,{inputForeground:Un["Z"],inputBackground:Un["X"],inputBorder:Un["Y"],inputValidationInfoBackground:Un["db"],inputValidationInfoForeground:Un["fb"],inputValidationInfoBorder:Un["eb"],inputValidationWarningBackground:Un["gb"],inputValidationWarningForeground:Un["ib"],inputValidationWarningBorder:Un["hb"],inputValidationErrorBackground:Un["ab"],inputValidationErrorForeground:Un["cb"],inputValidationErrorBorder:Un["bb"]}),countBadge:Object(Ea["c"])(this.theme,{badgeBackground:Un["c"],badgeForeground:Un["d"],badgeBorder:Un["h"]}),button:Object(Ea["c"])(this.theme,{buttonForeground:Un["f"],buttonBackground:Un["e"],buttonHoverBackground:Un["g"],buttonBorder:Un["h"]}),progressBar:Object(Ea["c"])(this.theme,{progressBarBackground:Un["Rb"]}),list:Object(Ea["c"])(this.theme,{listBackground:Un["Sb"],listInactiveFocusForeground:Un["qb"],listInactiveFocusBackground:Un["Ub"],listFocusOutline:Un["b"],listInactiveFocusOutline:Un["b"],pickerGroupBorder:Un["Pb"],pickerGroupForeground:Un["Qb"]})}}};su=iu([nu(0,Dt["a"]),nu(1,zn["b"]),nu(2,Kn["b"]),nu(3,Us["b"]),nu(4,Ra)],su);var ou=function(e,t,i,n){var s,o=arguments.length,r=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)r=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r},ru=function(e,t){return function(i,n){t(i,n,e)}};let au=class extends su{constructor(e,t,i,n,s,o){super(t,i,n,s,o),this.host=void 0;const r=hu.get(e);this.host={_serviceBrand:void 0,get container(){return r.widget.getDomNode()},get dimension(){return e.getLayoutInfo()},get onDidLayout(){return e.onDidLayoutChange},focus:()=>e.focus()}}createController(){return super.createController(this.host)}};au=ou([ru(1,Dt["a"]),ru(2,zn["b"]),ru(3,Kn["b"]),ru(4,Us["b"]),ru(5,Ra)],au);let lu=class{constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const i=t=this.instantiationService.createInstance(au,e);this.mapEditorToService.set(e,t),Object(Qd["a"])(e.onDidDispose)(()=>{i.dispose(),this.mapEditorToService.delete(e)})}return t}get quickAccess(){return this.activeService.quickAccess}pick(e,t={},i=B["a"].None){return this.activeService.pick(e,t,i)}createQuickPick(){return this.activeService.createQuickPick()}};lu=ou([ru(0,Dt["a"]),ru(1,Y["a"])],lu);class hu{constructor(e){this.editor=e,this.widget=new cu(this.editor)}static get(e){return e.getContribution(hu.ID)}dispose(){this.widget.dispose()}}hu.ID="editor.controller.quickInput";class cu{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return cu.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}var du;cu.ID="editor.contrib.quickInputWidget",Object(jn["k"])(hu.ID,hu),function(e){const t=new ls["a"];class i{constructor(e,t){this._serviceId=e,this._factory=t,this._value=null}get id(){return this._serviceId}get(e){if(!this._value){if(e&&(this._value=e[this._serviceId.toString()]),this._value||(this._value=this._factory(e)),!this._value)throw new Error("Service "+this._serviceId+" is missing!");t.set(this._serviceId,this._value)}return this._value}}e.LazyStaticService=i;let n=[];function s(e,t){let s=new i(e,t);return n.push(s),s}function o(e){let t=new ls["a"];for(const[n,s]of Object(Rc["a"])())t.set(n,s);for(let n in e)e.hasOwnProperty(n)&&t.set(Object(Dt["c"])(n),e[n]);n.forEach(i=>t.set(i.id,i.get(e)));let i=new Ka(t,!0);return t.set(Dt["a"],i),[t,i]}e.init=o,e.instantiationService=s(Dt["a"],()=>new Ka(t,!0));const r=new Sn;e.configurationService=s(Ti["a"],()=>r),e.resourceConfigurationService=s(Lt,()=>new yn(r)),e.resourcePropertiesService=s(xt,()=>new Dn(r)),e.contextService=s(hn["a"],()=>new xn),e.labelService=s(qa["a"],()=>new Nn),e.telemetryService=s(Ia["a"],()=>new Ln),e.dialogService=s(Wa,()=>new _n),e.notificationService=s(ln["a"],()=>new bn),e.markerService=s(Cc,()=>new yc),e.modeService=s(we["a"],e=>new Co),e.standaloneThemeService=s(js,()=>new Ur),e.logService=s(kt["b"],()=>new kt["d"](new kt["a"])),e.undoRedoService=s(wo,t=>new ed(e.dialogService.get(t),e.notificationService.get(t))),e.modelService=s(yt["a"],t=>new Zo(e.configurationService.get(t),e.resourcePropertiesService.get(t),e.standaloneThemeService.get(t),e.logService.get(t),e.undoRedoService.get(t))),e.markerDecorationsService=s(Nc["a"],t=>new Ac(e.modelService.get(t),e.markerService.get(t))),e.contextKeyService=s(zn["b"],t=>new na(e.configurationService.get(t))),e.codeEditorService=s(Y["a"],t=>new fr(null,e.contextKeyService.get(t),e.standaloneThemeService.get(t))),e.editorProgressService=s(ps,()=>new fn),e.storageService=s(Dc["a"],()=>new Dc["b"]),e.editorWorkerService=s(Ce["a"],t=>new At(e.modelService.get(t),e.resourceConfigurationService.get(t),e.logService.get(t)))}(du||(du={}));class uu extends de["a"]{constructor(e,t){super();const[i,n]=du.init(t);this._serviceCollection=i,this._instantiationService=n;const s=this.get(Ti["a"]),o=this.get(ln["a"]),r=this.get(Ia["a"]),a=this.get(Kn["b"]),l=this.get(kt["b"]),h=this.get(zn["b"]);let c=(e,i)=>{let n=null;return t&&(n=t[e.toString()]),n||(n=i()),this._serviceCollection.set(e,n),n};c(Us["b"],()=>new Bc(h,s)),c(Th,()=>new Mh(a));let d=c(ie["b"],()=>new vn(this._instantiationService)),u=c(zs["a"],()=>this._register(new Cn(h,d,r,o,l,e))),g=c(Ra,()=>new On(du.codeEditorService.get(Y["a"]),e));c(Gd,()=>new lu(n,du.codeEditorService.get(Y["a"])));let p=c(hs["b"],()=>this._register(new Ba(g)));c(us["a"],()=>new Vc),c(hs["a"],()=>{const e=new Aa(r,o,p,u,a);return e.configure({blockMouse:!1}),this._register(e)}),c(Hs["a"],()=>new kc(d)),c(Di,()=>new En(du.modelService.get(yt["a"])))}get(e){let t=this._serviceCollection.get(e);if(!t)throw new Error("Missing service "+e);return t}set(e,t){this._serviceCollection.set(e,t)}has(e){return this._serviceCollection.has(e)}}function gu(e,t,i){let n=new uu(e,t),s=null;n.has(Se["a"])||(s=new mn(du.modelService.get()),n.set(Se["a"],s)),n.has(ne["a"])||n.set(ne["a"],new he(n.get(Y["a"]),n.get(ie["b"])));let o=i(n);return s&&s.setEditor(o),o}function pu(e,t,i){return gu(e,i||{},i=>new Xs(e,t,i,i.get(Dt["a"]),i.get(Y["a"]),i.get(ie["b"]),i.get(zn["b"]),i.get(zs["a"]),i.get(hs["b"]),i.get(js),i.get(ln["a"]),i.get(Ti["a"]),i.get(Us["b"]),i.get(yt["a"]),i.get(we["a"])))}function mu(e){return du.codeEditorService.get().onCodeEditorAdd(t=>{e(t)})}function fu(e,t,i){return gu(e,i||{},i=>new Qs(e,t,i,i.get(Dt["a"]),i.get(zn["b"]),i.get(zs["a"]),i.get(hs["b"]),i.get(Ce["a"]),i.get(Y["a"]),i.get(js),i.get(ln["a"]),i.get(Ti["a"]),i.get(hs["a"]),i.get(ps),i.get(us["a"])))}function _u(e,t){return new pe(e,t)}function bu(e,t,i){return Js(du.modelService.get(),du.modeService.get(),e,t,i)}function vu(e,t){du.modelService.get().setMode(e,du.modeService.get().create(t))}function Cu(e,t,i){e&&du.markerService.get().changeOne(t,e.uri,i)}function wu(e){return du.markerService.get().read(e)}function Su(e){return du.markerService.get().onMarkerChanged(e)}function yu(e){return du.modelService.get().getModel(e)}function Du(){return du.modelService.get().getModels()}function Lu(e){return du.modelService.get().onModelAdded(e)}function xu(e){return du.modelService.get().onModelRemoved(e)}function ku(e){return du.modelService.get().onModelModeChanged(t=>{e({model:t.model,oldLanguage:t.oldModeId})})}function Eu(e){return jt(du.modelService.get(),e)}function Nu(e,t){const i=du.standaloneThemeService.get();return i.registerEditorContainer(e),_i.colorizeElement(i,du.modeService.get(),e,t)}function Ou(e,t,i){const n=du.standaloneThemeService.get();return n.registerEditorContainer(document.body),_i.colorize(du.modeService.get(),e,t,i)}function Iu(e,t,i=4){const n=du.standaloneThemeService.get();return n.registerEditorContainer(document.body),_i.colorizeModelLine(e,t,i)}function Tu(e){let t=be["A"].get(e);return t||{getInitialState:()=>ve["c"],tokenize:(t,i,n,s)=>Object(ve["d"])(e,t,n,s)}}function Mu(e,t){let i=du.modeService.get();i.triggerMode(t);let n=Tu(t),s=Object(Ge["Q"])(e),o=[],r=n.getInitialState();for(let a=0,l=s.length;a<l;a++){let e=s[a],t=n.tokenize(e,!0,r,0);o[a]=t.tokens,r=t.endState}return o}function Au(e,t){du.standaloneThemeService.get().defineTheme(e,t)}function Ru(e){du.standaloneThemeService.get().setTheme(e)}function Fu(){Object(Fn["b"])()}function Pu(e,t){return ie["a"].registerCommand({id:e,handler:t})}function Bu(){return{create:pu,onDidCreateEditor:mu,createDiffEditor:fu,createDiffNavigator:_u,createModel:bu,setModelLanguage:vu,setModelMarkers:Cu,getModelMarkers:wu,onDidChangeMarkers:Su,getModels:Du,getModel:yu,onDidCreateModel:Lu,onWillDisposeModel:xu,onDidChangeModelLanguage:ku,createWebWorker:Eu,colorizeElement:Nu,colorize:Ou,colorizeModelLine:Iu,tokenize:Mu,defineTheme:Au,setTheme:Ru,remeasureFonts:Fu,registerCommand:Pu,AccessibilitySupport:n,ContentWidgetPositionPreference:l,CursorChangeReason:h,DefaultEndOfLine:c,EditorAutoIndentStrategy:u,EditorOption:g,EndOfLinePreference:p,EndOfLineSequence:m,MinimapPosition:w,MouseTargetType:S,OverlayWidgetPositionPreference:y,OverviewRulerLane:D,RenderLineNumbersType:L,RenderMinimap:x,ScrollbarVisibility:E,ScrollType:k,TextEditorCursorBlinkingStyle:M,TextEditorCursorStyle:A,TrackedRangeStickiness:R,WrappingIndent:F,ConfigurationChangedEvent:P["b"],BareFontInfo:me["a"],FontInfo:me["b"],TextModelResolvedOptions:_e["e"],FindMatch:_e["b"],EditorType:fe["a"],EditorOptions:P["g"]}}function Wu(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;for(const i of t)if(!e(i))return!1;return!0}function Vu(e,t){return"boolean"===typeof e?e:t}function ju(e,t){return"string"===typeof e?e:t}function Hu(e){const t={};for(const i of e)t[i]=!0;return t}function zu(e,t=!1){t&&(e=e.map((function(e){return e.toLowerCase()})));const i=Hu(e);return t?function(e){return void 0!==i[e.toLowerCase()]&&i.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==i[e]&&i.hasOwnProperty(e)}}function Uu(e,t){let i,n=0;do{i=!1,t=t.replace(/(.|^)@(\w+)/g,(function(n,s,o){if("@"===s)return n;i=!0;let r="";if("string"===typeof e[o])r=e[o];else{if(!(e[o]&&e[o]instanceof RegExp))throw void 0===e[o]?ei(e,"language definition does not contain attribute '"+o+"', used at: "+t):ei(e,"attribute reference '"+o+"' must be a string, used at: "+t);r=e[o].source}return s+(Zt(r)?"":"(?:"+r+")")})),n++}while(i&&n<5);t=t.replace(/@@/g,"@");let s=(e.ignoreCase?"i":"")+(e.unicode?"u":"");return new RegExp(t,s)}function Ku(e,t,i,n){if(n<0)return e;if(n<t.length)return t[n];if(n>=100){n-=100;let e=i.split(".");if(e.unshift(i),n<e.length)return e[n]}return null}function $u(e,t,i,n){let s=-1,o=i,r=i.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);r&&(r[3]&&(s=parseInt(r[3]),r[2]&&(s+=100)),o=r[4]);let a,l="~",h=o;if(o&&0!==o.length?/^\w*$/.test(h)?l="==":(r=o.match(/^(@|!@|~|!~|==|!=)(.*)$/),r&&(l=r[1],h=r[2])):(l="!=",h=""),"~"!==l&&"!~"!==l||!/^(\w|\|)*$/.test(h))if("@"===l||"!@"===l){let i=e[h];if(!i)throw ei(e,"the @ match target '"+h+"' is not defined, in rule: "+t);if(!Wu((function(e){return"string"===typeof e}),i))throw ei(e,"the @ match target '"+h+"' must be an array of strings, in rule: "+t);let n=zu(i,e.ignoreCase);a=function(e){return"@"===l?n(e):!n(e)}}else if("~"===l||"!~"===l)if(h.indexOf("$")<0){let t=Uu(e,"^"+h+"$");a=function(e){return"~"===l?t.test(e):!t.test(e)}}else a=function(t,i,n,s){let o=Uu(e,"^"+ti(e,h,i,n,s)+"$");return o.test(t)};else if(h.indexOf("$")<0){let t=Xt(e,h);a=function(e){return"=="===l?e===t:e!==t}}else{let t=Xt(e,h);a=function(i,n,s,o,r){let a=ti(e,t,n,s,o);return"=="===l?i===a:i!==a}}else{let t=zu(h.split("|"),e.ignoreCase);a=function(e){return"~"===l?t(e):!t(e)}}return-1===s?{name:i,value:n,test:function(e,t,i,n){return a(e,e,t,i,n)}}:{name:i,value:n,test:function(e,t,i,n){let o=Ku(e,t,i,s);return a(o||"",e,t,i,n)}}}function qu(e,t,i){if(i){if("string"===typeof i)return i;if(i.token||""===i.token){if("string"!==typeof i.token)throw ei(e,"a 'token' attribute must be of type string, in rule: "+t);{let n={token:i.token};if(i.token.indexOf("$")>=0&&(n.tokenSubst=!0),"string"===typeof i.bracket)if("@open"===i.bracket)n.bracket=1;else{if("@close"!==i.bracket)throw ei(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t);n.bracket=-1}if(i.next){if("string"!==typeof i.next)throw ei(e,"the next state must be a string value in rule: "+t);{let s=i.next;if(!/^(@pop|@push|@popall)$/.test(s)&&("@"===s[0]&&(s=s.substr(1)),s.indexOf("$")<0&&!ni(e,ti(e,s,"",[],""))))throw ei(e,"the next state '"+i.next+"' is not defined in rule: "+t);n.next=s}}return"number"===typeof i.goBack&&(n.goBack=i.goBack),"string"===typeof i.switchTo&&(n.switchTo=i.switchTo),"string"===typeof i.log&&(n.log=i.log),"string"===typeof i.nextEmbedded&&(n.nextEmbedded=i.nextEmbedded,e.usesEmbedded=!0),n}}if(Array.isArray(i)){let n=[];for(let s=0,o=i.length;s<o;s++)n[s]=qu(e,t,i[s]);return{group:n}}if(i.cases){let n=[];for(let o in i.cases)if(i.cases.hasOwnProperty(o)){const s=qu(e,t,i.cases[o]);"@default"===o||"@"===o||""===o?n.push({test:void 0,value:s,name:o}):"@eos"===o?n.push({test:function(e,t,i,n){return n},value:s,name:o}):n.push($u(e,t,o,s))}const s=e.defaultToken;return{test:function(e,t,i,o){for(const s of n){const n=!s.test||s.test(e,t,i,o);if(n)return s.value}return s}}}throw ei(e,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+t)}return{token:""}}class Gu{constructor(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}setRegex(e,t){let i;if("string"===typeof t)i=t;else{if(!(t instanceof RegExp))throw ei(e,"rules must start with a match string or regular expression: "+this.name);i=t.source}this.matchOnlyAtLineStart=i.length>0&&"^"===i[0],this.name=this.name+": "+i,this.regex=Uu(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")}setAction(e,t){this.action=qu(e,this.name,t)}}function Yu(e,t){if(!t||"object"!==typeof t)throw new Error("Monarch: expecting a language definition object");let i={};i.languageId=e,i.includeLF=Vu(t.includeLF,!1),i.noThrow=!1,i.maxStack=100,i.start="string"===typeof t.start?t.start:null,i.ignoreCase=Vu(t.ignoreCase,!1),i.unicode=Vu(t.unicode,!1),i.tokenPostfix=ju(t.tokenPostfix,"."+i.languageId),i.defaultToken=ju(t.defaultToken,"source"),i.usesEmbedded=!1;let n=t;function s(e,o,r){for(const a of r){let r=a.include;if(r){if("string"!==typeof r)throw ei(i,"an 'include' attribute must be a string at: "+e);if("@"===r[0]&&(r=r.substr(1)),!t.tokenizer[r])throw ei(i,"include target '"+r+"' is not defined at: "+e);s(e+"."+r,o,t.tokenizer[r])}else{const t=new Gu(e);if(Array.isArray(a)&&a.length>=1&&a.length<=3)if(t.setRegex(n,a[0]),a.length>=3)if("string"===typeof a[1])t.setAction(n,{token:a[1],next:a[2]});else{if("object"!==typeof a[1])throw ei(i,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);{const e=a[1];e.next=a[2],t.setAction(n,e)}}else t.setAction(n,a[1]);else{if(!a.regex)throw ei(i,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e);a.name&&"string"===typeof a.name&&(t.name=a.name),a.matchOnlyAtStart&&(t.matchOnlyAtLineStart=Vu(a.matchOnlyAtLineStart,!1)),t.setRegex(n,a.regex),t.setAction(n,a.action)}o.push(t)}}}if(n.languageId=e,n.includeLF=i.includeLF,n.ignoreCase=i.ignoreCase,n.unicode=i.unicode,n.noThrow=i.noThrow,n.usesEmbedded=i.usesEmbedded,n.stateNames=t.tokenizer,n.defaultToken=i.defaultToken,!t.tokenizer||"object"!==typeof t.tokenizer)throw ei(i,"a language definition must define the 'tokenizer' attribute as an object");i.tokenizer=[];for(let r in t.tokenizer)if(t.tokenizer.hasOwnProperty(r)){i.start||(i.start=r);const e=t.tokenizer[r];i.tokenizer[r]=new Array,s("tokenizer."+r,i.tokenizer[r],e)}if(i.usesEmbedded=n.usesEmbedded,t.brackets){if(!Array.isArray(t.brackets))throw ei(i,"the 'brackets' attribute must be defined as an array")}else t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];let o=[];for(let r of t.brackets){let e=r;if(e&&Array.isArray(e)&&3===e.length&&(e={token:e[2],open:e[0],close:e[1]}),e.open===e.close)throw ei(i,"open and close brackets in a 'brackets' attribute must be different: "+e.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.");if("string"!==typeof e.open||"string"!==typeof e.token||"string"!==typeof e.close)throw ei(i,"every element in the 'brackets' array must be a '{open,close,token}' object or array");o.push({token:e.token+i.tokenPostfix,open:Xt(i,e.open),close:Xt(i,e.close)})}return i.brackets=o,i.noThrow=!0,i}function Zu(e){mo["a"].registerLanguage(e)}function Xu(){let e=[];return e=e.concat(mo["a"].getLanguages()),e}function Qu(e){let t=du.modeService.get().getLanguageIdentifier(e);return t?t.id:0}function Ju(e,t){let i=du.modeService.get().onDidCreateMode(n=>{n.getId()===e&&(i.dispose(),t())});return i}function eg(e,t){let i=du.modeService.get().getLanguageIdentifier(e);if(!i)throw new Error("Cannot set configuration for unknown language "+e);return Be["a"].register(i,t,100)}class tg{constructor(e,t){this._languageIdentifier=e,this._actual=t}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i,n){if("function"===typeof this._actual.tokenize)return ig.adaptTokenize(this._languageIdentifier.language,this._actual,e,i,n);throw new Error("Not supported!")}tokenize2(e,t,i){let n=this._actual.tokenizeEncoded(e,i);return new K["c"](n.tokens,n.endState)}}class ig{constructor(e,t,i){this._standaloneThemeService=e,this._languageIdentifier=t,this._actual=i}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t,i){let n=[],s=0;for(let o=0,r=e.length;o<r;o++){const r=e[o];let a=r.startIndex;0===o?a=0:a<s&&(a=s),n[o]=new K["a"](a+i,r.scopes,t),s=a}return n}static adaptTokenize(e,t,i,n,s){let o,r=t.tokenize(i,n),a=ig._toClassicTokens(r.tokens,e,s);return o=r.endState.equals(n)?n:r.endState,new K["b"](a,o)}tokenize(e,t,i,n){return ig.adaptTokenize(this._languageIdentifier.language,this._actual,e,i,n)}_toBinaryTokens(e,t){const i=this._languageIdentifier.id,n=this._standaloneThemeService.getColorTheme().tokenTheme;let s=[],o=0,r=0;for(let l=0,h=e.length;l<h;l++){const a=e[l],h=n.match(i,a.scopes);if(o>0&&s[o-1]===h)continue;let c=a.startIndex;0===l?c=0:c<r&&(c=r),s[o++]=c+t,s[o++]=h,r=c}let a=new Uint32Array(o);for(let l=0;l<o;l++)a[l]=s[l];return a}tokenize2(e,t,i,n){let s,o=this._actual.tokenize(e,i),r=this._toBinaryTokens(o.tokens,n);return s=o.endState.equals(i)?i:o.endState,new K["c"](r,s)}}function ng(e){return"tokenizeEncoded"in e}function sg(e){return e&&"function"===typeof e.then}function og(e){if(e){const t=[null];for(let i=1,n=e.length;i<n;i++)t[i]=_r["a"].fromHex(e[i]);du.standaloneThemeService.get().setColorMapOverride(t)}else du.standaloneThemeService.get().setColorMapOverride(null)}function rg(e,t){let i=du.modeService.get().getLanguageIdentifier(e);if(!i)throw new Error("Cannot set tokens provider for unknown language "+e);const n=e=>ng(e)?new tg(i,e):new ig(du.standaloneThemeService.get(),i,e);return sg(t)?be["A"].registerPromise(e,t.then(e=>n(e))):be["A"].register(e,n(t))}function ag(e,t){const i=t=>pi(du.modeService.get(),du.standaloneThemeService.get(),e,Yu(e,t));return sg(t)?be["A"].registerPromise(e,t.then(e=>i(e))):be["A"].register(e,i(t))}function lg(e,t){return be["v"].register(e,t)}function hg(e,t){return be["w"].register(e,t)}function cg(e,t){return be["y"].register(e,t)}function dg(e,t){return be["o"].register(e,{provideHover:(e,i,n)=>{let s=e.getWordAtPosition(i);return Promise.resolve(t.provideHover(e,i,n)).then(e=>{if(e)return!e.range&&s&&(e.range=new z["a"](i.lineNumber,s.startColumn,i.lineNumber,s.endColumn)),e.range||(e.range=new z["a"](i.lineNumber,i.column,i.lineNumber,i.column)),e})}})}function ug(e,t){return be["l"].register(e,t)}function gg(e,t){return be["h"].register(e,t)}function pg(e,t){return be["t"].register(e,t)}function mg(e,t){return be["f"].register(e,t)}function fg(e,t){return be["p"].register(e,t)}function _g(e,t){return be["B"].register(e,t)}function bg(e,t){return be["b"].register(e,t)}function vg(e,t){return be["a"].register(e,{provideCodeActions:(e,i,n,s)=>{let o=du.markerService.get().read({resource:e.uri}).filter(e=>z["a"].areIntersectingOrTouching(e,i));return t.provideCodeActions(e,i,{markers:o,only:n.only},s)}})}function Cg(e,t){return be["g"].register(e,t)}function wg(e,t){return be["i"].register(e,t)}function Sg(e,t){return be["u"].register(e,t)}function yg(e,t){return be["s"].register(e,t)}function Dg(e,t){return be["d"].register(e,t)}function Lg(e,t){return be["c"].register(e,t)}function xg(e,t){return be["n"].register(e,t)}function kg(e,t){return be["e"].register(e,t)}function Eg(e,t){return be["x"].register(e,t)}function Ng(e,t){return be["k"].register(e,t)}function Og(e,t){return be["j"].register(e,t)}function Ig(){return{register:Zu,getLanguages:Xu,onLanguage:Ju,getEncodedLanguageId:Qu,setLanguageConfiguration:eg,setColorMap:og,setTokensProvider:rg,setMonarchTokensProvider:ag,registerReferenceProvider:lg,registerRenameProvider:hg,registerCompletionItemProvider:Dg,registerSignatureHelpProvider:cg,registerHoverProvider:dg,registerDocumentSymbolProvider:ug,registerDocumentHighlightProvider:gg,registerLinkedEditingRangeProvider:pg,registerDefinitionProvider:mg,registerImplementationProvider:fg,registerTypeDefinitionProvider:_g,registerCodeLensProvider:bg,registerCodeActionProvider:vg,registerDocumentFormattingEditProvider:Cg,registerDocumentRangeFormattingEditProvider:wg,registerOnTypeFormattingEditProvider:Sg,registerLinkProvider:yg,registerColorProvider:Lg,registerFoldingRangeProvider:xg,registerDeclarationProvider:kg,registerSelectionRangeProvider:Eg,registerDocumentSemanticTokensProvider:Ng,registerDocumentRangeSemanticTokensProvider:Og,DocumentHighlightKind:d,CompletionItemKind:o,CompletionItemTag:r,CompletionItemInsertTextRule:s,SymbolKind:I,SymbolTag:T,IndentAction:f,CompletionTriggerKind:a,SignatureHelpTriggerKind:O,InlineHintKind:_,FoldingRangeKind:be["m"]}}class Tg{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return"string"===typeof e?e.toLowerCase():e._lower}}var Mg,Ag=function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function r(e){try{l(n.next(e))}catch(t){o(t)}}function a(e){try{l(n["throw"](e))}catch(t){o(t)}}function l(e){e.done?i(e.value):s(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};function Rg(e){const t=[],i=new Set,n=be["g"].ordered(e);for(const o of n)t.push(o),o.extensionId&&i.add(Tg.toKey(o.extensionId));const s=be["i"].ordered(e);for(const o of s){if(o.extensionId){if(i.has(Tg.toKey(o.extensionId)))continue;i.add(Tg.toKey(o.extensionId))}t.push({displayName:o.displayName,extensionId:o.extensionId,provideDocumentFormattingEdits(e,t,i){return o.provideDocumentRangeFormattingEdits(e,e.getFullModelRange(),t,i)}})}return t}class Fg{static setFormatterSelector(e){const t=Fg._selectors.unshift(e);return{dispose:t}}static select(e,t,i){return Ag(this,void 0,void 0,(function*(){if(0===e.length)return;const n=Kr["a"].first(Fg._selectors);return n?yield n(e,t,i):void 0}))}}function Pg(e,t,i,n,s){return Ag(this,void 0,void 0,(function*(){const o=be["i"].ordered(t);for(const r of o){let o=yield Promise.resolve(r.provideDocumentRangeFormattingEdits(t,i,n,s)).catch(De["f"]);if(Object(We["m"])(o))return yield e.computeMoreMinimalEdits(t.uri,o)}}))}function Bg(e,t,i,n){return Ag(this,void 0,void 0,(function*(){const s=Rg(t);for(const o of s){let s=yield Promise.resolve(o.provideDocumentFormattingEdits(t,i,n)).catch(De["f"]);if(Object(We["m"])(s))return yield e.computeMoreMinimalEdits(t.uri,s)}}))}function Wg(e,t,i,n,s){const o=be["u"].ordered(t);return 0===o.length||o[0].autoFormatTriggerCharacters.indexOf(n)<0?Promise.resolve(void 0):Promise.resolve(o[0].provideOnTypeFormattingEdits(t,i,n,s,B["a"].None)).catch(De["f"]).then(i=>e.computeMoreMinimalEdits(t.uri,i))}Fg._selectors=new X["a"],ie["a"].registerCommand("_executeFormatRangeProvider",(function(e,...t){const[i,n,s]=t;Object(xe["a"])(j["a"].isUri(i)),Object(xe["a"])(z["a"].isIRange(n));const o=e.get(yt["a"]).getModel(i);if(!o)throw Object(De["b"])("resource");return Pg(e.get(Ce["a"]),o,z["a"].lift(n),s,B["a"].None)})),ie["a"].registerCommand("_executeFormatDocumentProvider",(function(e,...t){const[i,n]=t;Object(xe["a"])(j["a"].isUri(i));const s=e.get(yt["a"]).getModel(i);if(!s)throw Object(De["b"])("resource");return Bg(e.get(Ce["a"]),s,n,B["a"].None)})),ie["a"].registerCommand("_executeFormatOnTypeProvider",(function(e,...t){const[i,n,s,o]=t;Object(xe["a"])(j["a"].isUri(i)),Object(xe["a"])(H["a"].isIPosition(n)),Object(xe["a"])("string"===typeof s);const r=e.get(yt["a"]).getModel(i);if(!r)throw Object(De["b"])("resource");return Wg(e.get(Ce["a"]),r,H["a"].lift(n),s,o)})),P["g"].wrappingIndent.defaultValue=0,P["g"].glyphMargin.defaultValue=!1,P["g"].autoIndent.defaultValue=3,P["g"].overviewRulerLanes.defaultValue=2,Fg.setFormatterSelector((e,t,i)=>Promise.resolve(e[0]));const Vg=q();Vg.editor=Bu(),Vg.languages=Ig();const jg=Vg.CancellationTokenSource,Hg=Vg.Emitter,zg=Vg.KeyCode,Ug=Vg.KeyMod,Kg=Vg.Position,$g=Vg.Range,qg=Vg.Selection,Gg=Vg.SelectionDirection,Yg=Vg.MarkerSeverity,Zg=Vg.MarkerTag,Xg=Vg.Uri,Qg=Vg.Token,Jg=Vg.editor,ep=Vg.languages;((null===(Mg=Le["b"].MonacoEnvironment)||void 0===Mg?void 0:Mg.globalAPI)||"function"===typeof define&&i("3c35"))&&(self.monaco=Vg),"undefined"!==typeof self.require&&"function"===typeof self.require.config&&self.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]})},f41d:function(e,t,i){"use strict";i.r(t);var n=i("fa12");Object(n["a"])({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:function(){return i.e("chunk-2d21b84a").then(i.bind(null,"bfb2"))}})},f570:function(e,t,i){"use strict";i.r(t),i.d(t,"cssDefaults",(function(){return a})),i.d(t,"scssDefaults",(function(){return l})),i.d(t,"lessDefaults",(function(){return h}));i("33f9");var n=i("0b3c"),s=function(){function e(e,t,i){this._onDidChange=new n["Emitter"],this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}return Object.defineProperty(e.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"diagnosticsOptions",{get:function(){return this._diagnosticsOptions},enumerable:!1,configurable:!0}),e.prototype.setDiagnosticsOptions=function(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)},e.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},e}(),o={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"}},r={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},a=new s("css",o,r),l=new s("scss",o,r),h=new s("less",o,r);function c(){return i.e("chunk-0b65ffb6").then(i.bind(null,"db4f"))}n["languages"].css={cssDefaults:a,lessDefaults:h,scssDefaults:l},n["languages"].onLanguage("less",(function(){c().then((function(e){return e.setupMode(h)}))})),n["languages"].onLanguage("scss",(function(){c().then((function(e){return e.setupMode(l)}))})),n["languages"].onLanguage("css",(function(){c().then((function(e){return e.setupMode(a)}))}))},f577:function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var n=i("0a0f");const s=Object(n["c"])("clipboardService")},f58f:function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));class n{constructor(e,t,i,n,s,o){this.id=e,this.label=t,this.alias=i,this._precondition=n,this._run=s,this._contextKeyService=o}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}},f5f3:function(e,t,i){"use strict";i.d(t,"b",(function(){return o})),i.d(t,"a",(function(){return r}));var n=i("af40");const s=[];function o(e,t,i){t instanceof n["a"]||(t=new n["a"](t,[],i)),s.push([e,t])}function r(){return s}},fa12:function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));var n=i("fac6"),s={},o={},r=function(){function e(e){var t=this;this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((function(e,i){t._lazyLoadPromiseResolve=e,t._lazyLoadPromiseReject=i}))}return e.getOrCreate=function(t){return o[t]||(o[t]=new e(t)),o[t]},e.prototype.whenLoaded=function(){return this._lazyLoadPromise},e.prototype.load=function(){var e=this;return this._loadingTriggered||(this._loadingTriggered=!0,s[this._languageId].loader().then((function(t){return e._lazyLoadPromiseResolve(t)}),(function(t){return e._lazyLoadPromiseReject(t)}))),this._lazyLoadPromise},e}();function a(e){var t=e.id;s[t]=e,n["languages"].register(e);var i=r.getOrCreate(t);n["languages"].setMonarchTokensProvider(t,i.whenLoaded().then((function(e){return e.language}))),n["languages"].onLanguage(t,(function(){i.load().then((function(e){n["languages"].setLanguageConfiguration(t,e.conf)}))}))}},fac6:function(e,t,i){"use strict";var n=i("33f9");i.o(n,"languages")&&i.d(t,"languages",(function(){return n["languages"]}))},fb71:function(e,t,i){"use strict";i.d(t,"a",(function(){return a})),i.d(t,"b",(function(){return h}));var n=i("30db"),s=i("62bd");const o=n["f"]?1.5:1.35,r=8;class a{constructor(e){this.zoomLevel=e.zoomLevel,this.pixelRatio=e.pixelRatio,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}static createFromValidatedSettings(e,t,i,n){const s=e.get(37),o=e.get(41),r=e.get(40),l=e.get(39),h=e.get(53),c=e.get(50);return a._create(s,o,r,l,h,c,t,i,n)}static _create(e,t,i,n,l,h,c,d,u){0===l?l=Math.round(o*i):l<r&&(l=r);const g=1+(u?0:.1*s["a"].getZoomLevel());return i*=g,l*=g,new a({zoomLevel:c,pixelRatio:d,fontFamily:e,fontWeight:t,fontSize:i,fontFeatureSettings:n,lineHeight:l,letterSpacing:h})}getId(){return this.zoomLevel+"-"+this.pixelRatio+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.fontFeatureSettings+"-"+this.lineHeight+"-"+this.letterSpacing}getMassagedFontFamily(){return/[,"']/.test(this.fontFamily)?this.fontFamily:/[+ ]/.test(this.fontFamily)?`"${this.fontFamily}"`:this.fontFamily}}const l=1;class h extends a{constructor(e,t){super(e),this.version=l,this.isTrusted=t,this.isMonospace=e.isMonospace,this.typicalHalfwidthCharacterWidth=e.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=e.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=e.canUseHalfwidthRightwardsArrow,this.spaceWidth=e.spaceWidth,this.middotWidth=e.middotWidth,this.wsmiddotWidth=e.wsmiddotWidth,this.maxDigitWidth=e.maxDigitWidth}equals(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.fontFeatureSettings===e.fontFeatureSettings&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.maxDigitWidth===e.maxDigitWidth}}},fbba:function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),i.d(t,"g",(function(){return a})),i.d(t,"b",(function(){return l})),i.d(t,"f",(function(){return h})),i.d(t,"d",(function(){return d})),i.d(t,"c",(function(){return u})),i.d(t,"e",(function(){return g}));var n=i("89cd"),s=i("0a0f"),o=i("0910");const r=Object(s["c"])("configurationService");function a(e,t){const i=Object.create(null);for(let n in e)l(i,n,e[n],t);return i}function l(e,t,i,n){const s=t.split("."),o=s.pop();let r=e;for(let l=0;l<s.length;l++){let e=s[l],i=r[e];switch(typeof i){case"undefined":i=r[e]=Object.create(null);break;case"object":break;default:return void n(`Ignoring ${t} as ${s.slice(0,l+1).join(".")} is ${JSON.stringify(i)}`)}r=i}if("object"===typeof r&&null!==r)try{r[o]=i}catch(a){n(`Ignoring ${t} as ${s.join(".")} is ${JSON.stringify(r)}`)}else n(`Ignoring ${t} as ${s.join(".")} is ${JSON.stringify(r)}`)}function h(e,t){const i=t.split(".");c(e,i)}function c(e,t){const i=t.shift();if(0!==t.length){if(-1!==Object.keys(e).indexOf(i)){const n=e[i];"object"!==typeof n||Array.isArray(n)||(c(n,t),0===Object.keys(n).length&&delete e[i])}}else delete e[i]}function d(e,t,i){function n(e,t){let i=e;for(const n of t){if("object"!==typeof i||null===i)return;i=i[n]}return i}const s=t.split("."),o=n(e,s);return"undefined"===typeof o?i:o}function u(){const e=n["a"].as(o["a"].Configuration).getConfigurationProperties();return Object.keys(e)}function g(){const e=Object.create(null),t=n["a"].as(o["a"].Configuration).getConfigurationProperties();for(let i in t){let n=t[i].default;l(e,i,n,e=>console.error("Conflict in default settings: "+e))}return e}},fd49:function(e,t,i){"use strict";i.d(t,"h",(function(){return r})),i.d(t,"b",(function(){return a})),i.d(t,"j",(function(){return l})),i.d(t,"a",(function(){return h})),i.d(t,"k",(function(){return g})),i.d(t,"n",(function(){return b})),i.d(t,"i",(function(){return L})),i.d(t,"e",(function(){return O})),i.d(t,"f",(function(){return F})),i.d(t,"m",(function(){return q})),i.d(t,"c",(function(){return oe})),i.d(t,"d",(function(){return re})),i.d(t,"l",(function(){return ae})),i.d(t,"g",(function(){return he}));var n=i("dff7"),s=i("30db"),o=i("d093");const r=8;class a{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class l{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class h{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class c{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}compute(e,t,i){return i}}class d{constructor(e,t=null){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0,this.deps=t}validate(e){return this.defaultValue}}class u{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}validate(e){return"undefined"===typeof e?this.defaultValue:e}compute(e,t,i){return i}}function g(e,t){return"undefined"===typeof e?t:"false"!==e&&Boolean(e)}class p extends u{constructor(e,t,i,n){"undefined"!==typeof n&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return g(e,this.defaultValue)}}class m extends u{constructor(e,t,i,n,s,o){"undefined"!==typeof o&&(o.type="integer",o.default=i,o.minimum=n,o.maximum=s),super(e,t,i,o),this.minimum=n,this.maximum=s}static clampedInt(e,t,i,n){if("undefined"===typeof e)return t;let s=parseInt(e,10);return isNaN(s)?t:(s=Math.max(i,s),s=Math.min(n,s),0|s)}validate(e){return m.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class f extends u{constructor(e,t,i,n,s){"undefined"!==typeof s&&(s.type="number",s.default=i),super(e,t,i,s),this.validationFn=n}static clamp(e,t,i){return e<t?t:e>i?i:e}static float(e,t){if("number"===typeof e)return e;if("undefined"===typeof e)return t;const i=parseFloat(e);return isNaN(i)?t:i}validate(e){return this.validationFn(f.float(e,this.defaultValue))}}class _ extends u{static string(e,t){return"string"!==typeof e?t:e}constructor(e,t,i,n){"undefined"!==typeof n&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return _.string(e,this.defaultValue)}}function b(e,t,i){return"string"!==typeof e||-1===i.indexOf(e)?t:e}class v extends u{constructor(e,t,i,n,s){"undefined"!==typeof s&&(s.type="string",s.enum=n,s.default=i),super(e,t,i,s),this._allowedValues=n}validate(e){return b(e,this.defaultValue,this._allowedValues)}}class C extends c{constructor(e,t,i,n,s,o,r){"undefined"!==typeof r&&(r.type="string",r.enum=s,r.default=n),super(e,t,i,r),this._allowedValues=s,this._convert=o}validate(e){return"string"!==typeof e||-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}function w(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class S extends c{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[n["a"]("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),n["a"]("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),n["a"]("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:n["a"]("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return 0===i?e.accessibilitySupport:i}}class y extends c{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(16,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:n["a"]("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:n["a"]("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{insertSpace:g(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:g(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function D(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var L;function x(e){switch(e){case"line":return L.Line;case"block":return L.Block;case"underline":return L.Underline;case"line-thin":return L.LineThin;case"block-outline":return L.BlockOutline;case"underline-thin":return L.UnderlineThin}}(function(e){e[e["Line"]=1]="Line",e[e["Block"]=2]="Block",e[e["Underline"]=3]="Underline",e[e["LineThin"]=4]="LineThin",e[e["BlockOutline"]=5]="BlockOutline",e[e["UnderlineThin"]=6]="UnderlineThin"})(L||(L={}));class k extends d{constructor(){super(121,[60,29])}compute(e,t,i){const n=["monaco-editor"];return t.get(29)&&n.push(t.get(29)),e.extraEditorClassName&&n.push(e.extraEditorClassName),"default"===t.get(60)?n.push("mouse-default"):"copy"===t.get(60)&&n.push("mouse-copy"),t.get(95)&&n.push("showUnused"),t.get(119)&&n.push("showDeprecated"),n.join(" ")}}class E extends p{constructor(){super(28,"emptySelectionClipboard",!0,{description:n["a"]("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}class N extends c{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:!0,autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(31,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:n["a"]("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"boolean",default:e.seedSearchStringFromSelection,description:n["a"]("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[n["a"]("editor.find.autoFindInSelection.never","Never turn on Find in selection automatically (default)"),n["a"]("editor.find.autoFindInSelection.always","Always turn on Find in selection automatically"),n["a"]("editor.find.autoFindInSelection.multiline","Turn on Find in selection automatically when multiple lines of content are selected.")],description:n["a"]("find.autoFindInSelection","Controls the condition for turning on find in selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:n["a"]("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:s["f"]},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:n["a"]("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:n["a"]("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{cursorMoveOnType:g(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:g(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection),autoFindInSelection:"boolean"===typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":b(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:g(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:g(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:g(t.loop,this.defaultValue.loop)}}}class O extends c{constructor(){super(39,"fontLigatures",O.OFF,{anyOf:[{type:"boolean",description:n["a"]("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:n["a"]("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:n["a"]("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return"undefined"===typeof e?this.defaultValue:"string"===typeof e?"false"===e?O.OFF:"true"===e?O.ON:e:Boolean(e)?O.ON:O.OFF}}O.OFF='"liga" off, "calt" off',O.ON='"liga" on, "calt" on';class I extends d{constructor(){super(38)}compute(e,t,i){return e.fontInfo}}class T extends u{constructor(){super(40,"fontSize",oe.fontSize,{type:"number",minimum:6,maximum:100,default:oe.fontSize,description:n["a"]("fontSize","Controls the font size in pixels.")})}validate(e){let t=f.float(e,this.defaultValue);return 0===t?oe.fontSize:f.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}class M extends c{constructor(){super(41,"fontWeight",oe.fontWeight,{anyOf:[{type:"number",minimum:M.MINIMUM_VALUE,maximum:M.MAXIMUM_VALUE,errorMessage:n["a"]("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:M.SUGGESTION_VALUES}],default:oe.fontWeight,description:n["a"]("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(m.clampedInt(e,oe.fontWeight,M.MINIMUM_VALUE,M.MAXIMUM_VALUE))}}M.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],M.MINIMUM_VALUE=1,M.MAXIMUM_VALUE=1e3;class A extends c{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[n["a"]("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),n["a"]("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),n["a"]("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]};super(45,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:n["a"]("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:n["a"]("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:n["a"]("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:n["a"]("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:n["a"]("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:n["a"]("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,description:n["a"]("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,description:n["a"]("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,description:n["a"]("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,description:n["a"]("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,description:n["a"]("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,s,o;if(!e||"object"!==typeof e)return this.defaultValue;const r=e;return{multiple:b(r.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=r.multipleDefinitions)&&void 0!==t?t:b(r.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(i=r.multipleTypeDefinitions)&&void 0!==i?i:b(r.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(n=r.multipleDeclarations)&&void 0!==n?n:b(r.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:null!==(s=r.multipleImplementations)&&void 0!==s?s:b(r.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(o=r.multipleReferences)&&void 0!==o?o:b(r.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:_.string(r.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:_.string(r.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:_.string(r.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:_.string(r.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:_.string(r.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class R extends c{constructor(){const e={enabled:!0,delay:300,sticky:!0};super(48,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:n["a"]("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,description:n["a"]("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:n["a"]("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:g(t.enabled,this.defaultValue.enabled),delay:m.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:g(t.sticky,this.defaultValue.sticky)}}}class F extends d{constructor(){super(124,[44,52,33,59,87,54,55,89,111,114,115,116,2])}compute(e,t,i){return F.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=e.scrollBeyondLastLine?t-1:0,n=(e.viewLineCount+i)/(e.pixelRatio*e.height),s=Math.floor(e.viewLineCount/n);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:i,desiredRatio:n,minimapLineCount:s}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,s=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(s*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const o=t.stableMinimapLayoutInput,a=o&&e.outerHeight===o.outerHeight&&e.lineHeight===o.lineHeight&&e.typicalHalfwidthCharacterWidth===o.typicalHalfwidthCharacterWidth&&e.pixelRatio===o.pixelRatio&&e.scrollBeyondLastLine===o.scrollBeyondLastLine&&e.minimap.enabled===o.minimap.enabled&&e.minimap.side===o.minimap.side&&e.minimap.size===o.minimap.size&&e.minimap.showSlider===o.minimap.showSlider&&e.minimap.renderCharacters===o.minimap.renderCharacters&&e.minimap.maxColumn===o.minimap.maxColumn&&e.minimap.scale===o.minimap.scale&&e.verticalScrollbarWidth===o.verticalScrollbarWidth&&e.isViewportWrapping===o.isViewportWrapping,l=e.lineHeight,h=e.typicalHalfwidthCharacterWidth,c=e.scrollBeyondLastLine,d=e.minimap.renderCharacters;let u=s>=2?Math.round(2*e.minimap.scale):e.minimap.scale;const g=e.minimap.maxColumn,p=e.minimap.size,m=e.minimap.side,f=e.verticalScrollbarWidth,_=e.viewLineCount,b=e.remainingWidth,v=e.isViewportWrapping,C=d?2:3;let w=Math.floor(s*n);const S=w/s;let y=!1,D=!1,L=C*u,x=u/s,k=1;if("fill"===p||"fit"===p){const{typicalViewportLineCount:i,extraLinesBeyondLastLine:o,desiredRatio:r,minimapLineCount:h}=F.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:c,height:n,lineHeight:l,pixelRatio:s}),d=_/h;if(d>1)y=!0,D=!0,u=1,L=1,x=u/s;else{let n=!1,h=u+1;if("fit"===p){const i=Math.ceil((_+o)*L);v&&a&&b<=t.stableFitRemainingWidth?(n=!0,h=t.stableFitMaxMinimapScale):(n=i>w,v&&n?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=b):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0))}if("fill"===p||n){y=!0;const e=u;L=Math.min(l*s,Math.max(1,Math.floor(1/r))),u=Math.min(h,Math.max(1,Math.floor(L/C))),u>e&&(k=Math.min(2,u/e)),x=u/s/k,w=Math.ceil(Math.max(i,_+o)*L),v&&n&&(t.stableFitMaxMinimapScale=u)}}}const E=Math.floor(g*x),N=Math.min(E,Math.max(0,Math.floor((b-f-2)*x/(h+x)))+r);let O=Math.floor(s*N);const I=O/s;O=Math.floor(O*k);const T=d?1:2,M="left"===m?0:i-N-f;return{renderMinimap:T,minimapLeft:M,minimapWidth:N,minimapHeightIsEditorHeight:y,minimapIsSampling:D,minimapScale:u,minimapLineHeight:L,minimapCanvasInnerWidth:O,minimapCanvasInnerHeight:w,minimapCanvasOuterWidth:I,minimapCanvasOuterHeight:S}}static computeLayout(e,t){const i=0|t.outerWidth,n=0|t.outerHeight,s=0|t.lineHeight,o=0|t.lineNumbersDigitCount,r=t.typicalHalfwidthCharacterWidth,a=t.maxDigitWidth,l=t.pixelRatio,c=t.viewLineCount,d=e.get(116),u="inherit"===d?e.get(115):d,g="inherit"===u?e.get(111):u,p=e.get(114),f=e.get(2),_=t.isDominatedByLongLines,b=e.get(44),v=0!==e.get(54).renderType,C=e.get(55),w=e.get(89),S=e.get(59),y=e.get(87),D=y.verticalScrollbarSize,L=y.verticalHasArrows,x=y.arrowSize,k=y.horizontalScrollbarSize,E=e.get(52),N=e.get(33);let O;if("string"===typeof E&&/^\d+(\.\d+)?ch$/.test(E)){const e=parseFloat(E.substr(0,E.length-2));O=m.clampedInt(e*r,0,0,1e3)}else O=m.clampedInt(E,0,0,1e3);N&&(O+=16);let I=0;if(v){const e=Math.max(o,C);I=Math.round(e*a)}let T=0;b&&(T=s);let M=0,A=M+T,R=A+I,P=R+O;const B=i-T-I-O;let W=!1,V=!1,j=-1;2!==f&&("inherit"===u&&_?(W=!0,V=!0):"on"===g||"bounded"===g?V=!0:"wordWrapColumn"===g&&(j=p));const H=F._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:s,typicalHalfwidthCharacterWidth:r,pixelRatio:l,scrollBeyondLastLine:w,minimap:S,verticalScrollbarWidth:D,viewLineCount:c,remainingWidth:B,isViewportWrapping:V},t.memory||new h);0!==H.renderMinimap&&0===H.minimapLeft&&(M+=H.minimapWidth,A+=H.minimapWidth,R+=H.minimapWidth,P+=H.minimapWidth);const z=B-H.minimapWidth,U=Math.max(1,Math.floor((z-D-2)/r)),K=L?x:0;return V&&(j=Math.max(1,U),"bounded"===g&&(j=Math.min(j,p))),{width:i,height:n,glyphMarginLeft:M,glyphMarginWidth:T,lineNumbersLeft:A,lineNumbersWidth:I,decorationsLeft:R,decorationsWidth:O,contentLeft:P,contentWidth:z,minimap:H,viewportColumn:U,isWordWrapMinified:W,isViewportWrapping:V,wrappingColumn:j,verticalScrollbarWidth:D,horizontalScrollbarHeight:k,overviewRuler:{top:K,width:D,height:n-2*K,right:0}}}}class P extends c{constructor(){const e={enabled:!0};super(51,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:n["a"]("codeActions","Enables the code action lightbulb in the editor.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:g(t.enabled,this.defaultValue.enabled)}}}class B extends c{constructor(){const e={enabled:!0,fontSize:0,fontFamily:oe.fontFamily};super(120,"inlineHints",e,{"editor.inlineHints.enabled":{type:"boolean",default:e.enabled,description:n["a"]("inlineHints.enable","Enables the inline hints in the editor.")},"editor.inlineHints.fontSize":{type:"number",default:e.fontSize,description:n["a"]("inlineHints.fontSize","Controls font size of inline hints in the editor. When set to `0`, the 90% of `#editor.fontSize#` is used.")},"editor.inlineHints.fontFamily":{type:"string",default:e.fontFamily,description:n["a"]("inlineHints.fontFamily","Controls font family of inline hints in the editor.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:g(t.enabled,this.defaultValue.enabled),fontSize:m.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:_.string(t.fontFamily,this.defaultValue.fontFamily)}}}class W extends m{constructor(){super(53,"lineHeight",oe.lineHeight,0,150,{description:n["a"]("lineHeight","Controls the line height. Use 0 to compute the line height from the font size.")})}compute(e,t,i){return e.fontInfo.lineHeight}}class V extends c{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(59,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:n["a"]("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[n["a"]("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),n["a"]("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),n["a"]("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:n["a"]("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:n["a"]("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:n["a"]("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:n["a"]("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:n["a"]("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:n["a"]("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:g(t.enabled,this.defaultValue.enabled),size:b(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:b(t.side,this.defaultValue.side,["right","left"]),showSlider:b(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:g(t.renderCharacters,this.defaultValue.renderCharacters),scale:m.clampedInt(t.scale,1,1,3),maxColumn:m.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function j(e){return"ctrlCmd"===e?s["f"]?"metaKey":"ctrlKey":"altKey"}class H extends c{constructor(){super(69,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:n["a"]("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:n["a"]("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{top:m.clampedInt(t.top,0,0,1e3),bottom:m.clampedInt(t.bottom,0,0,1e3)}}}class z extends c{constructor(){const e={enabled:!0,cycle:!1};super(70,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:n["a"]("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:n["a"]("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{enabled:g(t.enabled,this.defaultValue.enabled),cycle:g(t.cycle,this.defaultValue.cycle)}}}class U extends d{constructor(){super(122)}compute(e,t,i){return e.pixelRatio}}class K extends c{constructor(){const e={other:!0,comments:!1,strings:!1};super(73,"quickSuggestions",e,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:e.strings,description:n["a"]("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{type:"boolean",default:e.comments,description:n["a"]("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{type:"boolean",default:e.other,description:n["a"]("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}}}],default:e,description:n["a"]("quickSuggestions","Controls whether suggestions should automatically show up while typing.")}),this.defaultValue=e}validate(e){if("boolean"===typeof e)return e;if(e&&"object"===typeof e){const t=e,i={other:g(t.other,this.defaultValue.other),comments:g(t.comments,this.defaultValue.comments),strings:g(t.strings,this.defaultValue.strings)};return!!(i.other&&i.comments&&i.strings)||!!(i.other||i.comments||i.strings)&&i}return this.defaultValue}}class $ extends c{constructor(){super(54,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[n["a"]("lineNumbers.off","Line numbers are not rendered."),n["a"]("lineNumbers.on","Line numbers are rendered as absolute number."),n["a"]("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),n["a"]("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:n["a"]("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return"undefined"!==typeof e&&("function"===typeof e?(t=4,i=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:i}}}function q(e){const t=e.get(82);return"editable"===t?e.get(75):"on"!==t}class G extends c{constructor(){const e=[],t={type:"number",description:n["a"]("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(86,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:n["a"]("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:n["a"]("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){let t=[];for(let i of e)if("number"===typeof i)t.push({column:m.clampedInt(i,0,0,1e4),color:null});else if(i&&"object"===typeof i){const e=i;t.push({column:m.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort((e,t)=>e.column-t.column),t}return this.defaultValue}}function Y(e,t){if("string"!==typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}class Z extends c{constructor(){super(87,"scrollbar",{vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e,i=m.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=m.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:m.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:Y(t.vertical,this.defaultValue.vertical),horizontal:Y(t.horizontal,this.defaultValue.horizontal),useShadows:g(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:g(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:g(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:g(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:g(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:m.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:m.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:g(t.scrollByPage,this.defaultValue.scrollByPage)}}}class X extends c{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(101,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[n["a"]("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),n["a"]("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:n["a"]("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:n["a"]("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:n["a"]("suggest.localityBonus","Controls whether sorting favours words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:n["a"]("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:n["a"]("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:n["a"]("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:n["a"]("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:n["a"]("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:n["a"]("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:n["a"]("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:n["a"]("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||"object"!==typeof e)return this.defaultValue;const t=e;return{insertMode:b(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:g(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:g(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:g(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:g(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:g(t.showIcons,this.defaultValue.showIcons),showStatusBar:g(t.showStatusBar,this.defaultValue.showStatusBar),showInlineDetails:g(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:g(t.showMethods,this.defaultValue.showMethods),showFunctions:g(t.showFunctions,this.defaultValue.showFunctions),showConstructors:g(t.showConstructors,this.defaultValue.showConstructors),showFields:g(t.showFields,this.defaultValue.showFields),showVariables:g(t.showVariables,this.defaultValue.showVariables),showClasses:g(t.showClasses,this.defaultValue.showClasses),showStructs:g(t.showStructs,this.defaultValue.showStructs),showInterfaces:g(t.showInterfaces,this.defaultValue.showInterfaces),showModules:g(t.showModules,this.defaultValue.showModules),showProperties:g(t.showProperties,this.defaultValue.showProperties),showEvents:g(t.showEvents,this.defaultValue.showEvents),showOperators:g(t.showOperators,this.defaultValue.showOperators),showUnits:g(t.showUnits,this.defaultValue.showUnits),showValues:g(t.showValues,this.defaultValue.showValues),showConstants:g(t.showConstants,this.defaultValue.showConstants),showEnums:g(t.showEnums,this.defaultValue.showEnums),showEnumMembers:g(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:g(t.showKeywords,this.defaultValue.showKeywords),showWords:g(t.showWords,this.defaultValue.showWords),showColors:g(t.showColors,this.defaultValue.showColors),showFiles:g(t.showFiles,this.defaultValue.showFiles),showReferences:g(t.showReferences,this.defaultValue.showReferences),showFolders:g(t.showFolders,this.defaultValue.showFolders),showTypeParameters:g(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:g(t.showSnippets,this.defaultValue.showSnippets),showUsers:g(t.showUsers,this.defaultValue.showUsers),showIssues:g(t.showIssues,this.defaultValue.showIssues)}}}class Q extends c{constructor(){super(97,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:n["a"]("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(e){return e&&"object"===typeof e?{selectLeadingAndTrailingWhitespace:g(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}:this.defaultValue}}class J extends d{constructor(){super(123,[75])}compute(e,t,i){const n=t.get(75);return!!n||e.tabFocusMode}}function ee(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}class te extends d{constructor(){super(125,[124])}compute(e,t,i){const n=t.get(124);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}}const ie="Consolas, 'Courier New', monospace",ne="Menlo, Monaco, 'Courier New', monospace",se="'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",oe={fontFamily:s["f"]?ne:s["d"]?se:ie,fontWeight:"normal",fontSize:s["f"]?12:14,lineHeight:0,letterSpacing:0},re={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},ae=[];function le(e){return ae[e.id]=e,e}const he={acceptSuggestionOnCommitCharacter:le(new p(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:n["a"]("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:le(new v(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",n["a"]("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:n["a"]("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:le(new S),accessibilityPageSize:le(new m(3,"accessibilityPageSize",10,1,1073741824,{description:n["a"]("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader. Warning: this has a performance implication for numbers larger than the default.")})),ariaLabel:le(new _(4,"ariaLabel",n["a"]("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:le(new v(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",n["a"]("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),n["a"]("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:n["a"]("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingOvertype:le(new v(6,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",n["a"]("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:n["a"]("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:le(new v(7,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",n["a"]("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),n["a"]("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:n["a"]("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:le(new C(8,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],w,{enumDescriptions:[n["a"]("editor.autoIndent.none","The editor will not insert indentation automatically."),n["a"]("editor.autoIndent.keep","The editor will keep the current line's indentation."),n["a"]("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),n["a"]("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),n["a"]("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:n["a"]("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:le(new p(9,"automaticLayout",!1)),autoSurround:le(new v(10,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[n["a"]("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),n["a"]("editor.autoSurround.quotes","Surround with quotes but not brackets."),n["a"]("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:n["a"]("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),stickyTabStops:le(new p(99,"stickyTabStops",!1,{description:n["a"]("stickyTabStops","Emulate selection behaviour of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:le(new p(11,"codeLens",!0,{description:n["a"]("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:le(new _(12,"codeLensFontFamily","",{description:n["a"]("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:le(new m(13,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,description:n["a"]("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to `0`, the 90% of `#editor.fontSize#` is used.")})),colorDecorators:le(new p(14,"colorDecorators",!0,{description:n["a"]("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:le(new p(15,"columnSelection",!1,{description:n["a"]("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:le(new y),contextmenu:le(new p(17,"contextmenu",!0)),copyWithSyntaxHighlighting:le(new p(18,"copyWithSyntaxHighlighting",!0,{description:n["a"]("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:le(new C(19,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],D,{description:n["a"]("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:le(new p(20,"cursorSmoothCaretAnimation",!1,{description:n["a"]("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:le(new C(21,"cursorStyle",L.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],x,{description:n["a"]("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:le(new m(22,"cursorSurroundingLines",0,0,1073741824,{description:n["a"]("cursorSurroundingLines","Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:le(new v(23,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[n["a"]("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),n["a"]("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:n["a"]("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:le(new m(24,"cursorWidth",0,0,1073741824,{markdownDescription:n["a"]("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:le(new p(25,"disableLayerHinting",!1)),disableMonospaceOptimizations:le(new p(26,"disableMonospaceOptimizations",!1)),dragAndDrop:le(new p(27,"dragAndDrop",!0,{description:n["a"]("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:le(new E),extraEditorClassName:le(new _(29,"extraEditorClassName","")),fastScrollSensitivity:le(new f(30,"fastScrollSensitivity",5,e=>e<=0?5:e,{markdownDescription:n["a"]("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:le(new N),fixedOverflowWidgets:le(new p(32,"fixedOverflowWidgets",!1)),folding:le(new p(33,"folding",!0,{description:n["a"]("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:le(new v(34,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[n["a"]("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),n["a"]("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:n["a"]("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:le(new p(35,"foldingHighlight",!0,{description:n["a"]("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),unfoldOnClickAfterEndOfLine:le(new p(36,"unfoldOnClickAfterEndOfLine",!1,{description:n["a"]("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:le(new _(37,"fontFamily",oe.fontFamily,{description:n["a"]("fontFamily","Controls the font family.")})),fontInfo:le(new I),fontLigatures2:le(new O),fontSize:le(new T),fontWeight:le(new M),formatOnPaste:le(new p(42,"formatOnPaste",!1,{description:n["a"]("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:le(new p(43,"formatOnType",!1,{description:n["a"]("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:le(new p(44,"glyphMargin",!0,{description:n["a"]("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:le(new A),hideCursorInOverviewRuler:le(new p(46,"hideCursorInOverviewRuler",!1,{description:n["a"]("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),highlightActiveIndentGuide:le(new p(47,"highlightActiveIndentGuide",!0,{description:n["a"]("highlightActiveIndentGuide","Controls whether the editor should highlight the active indent guide.")})),hover:le(new R),inDiffEditor:le(new p(49,"inDiffEditor",!1)),letterSpacing:le(new f(50,"letterSpacing",oe.letterSpacing,e=>f.clamp(e,-5,20),{description:n["a"]("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:le(new P),lineDecorationsWidth:le(new u(52,"lineDecorationsWidth",10)),lineHeight:le(new W),lineNumbers:le(new $),lineNumbersMinChars:le(new m(55,"lineNumbersMinChars",5,1,300)),linkedEditing:le(new p(56,"linkedEditing",!1,{description:n["a"]("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.")})),links:le(new p(57,"links",!0,{description:n["a"]("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:le(new v(58,"matchBrackets","always",["always","near","never"],{description:n["a"]("matchBrackets","Highlight matching brackets.")})),minimap:le(new V),mouseStyle:le(new v(60,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:le(new f(61,"mouseWheelScrollSensitivity",1,e=>0===e?1:e,{markdownDescription:n["a"]("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:le(new p(62,"mouseWheelZoom",!1,{markdownDescription:n["a"]("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:le(new p(63,"multiCursorMergeOverlapping",!0,{description:n["a"]("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:le(new C(64,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],j,{markdownEnumDescriptions:[n["a"]("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),n["a"]("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:n["a"]({key:"multiCursorModifier",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 multiple cursors with the mouse. The Go To Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:le(new v(65,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[n["a"]("multiCursorPaste.spread","Each cursor pastes a single line of the text."),n["a"]("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:n["a"]("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:le(new p(66,"occurrencesHighlight",!0,{description:n["a"]("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:le(new p(67,"overviewRulerBorder",!0,{description:n["a"]("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:le(new m(68,"overviewRulerLanes",3,0,3)),padding:le(new H),parameterHints:le(new z),peekWidgetDefaultFocus:le(new v(71,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[n["a"]("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),n["a"]("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:n["a"]("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:le(new p(72,"definitionLinkOpensInPeek",!1,{description:n["a"]("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:le(new K),quickSuggestionsDelay:le(new m(74,"quickSuggestionsDelay",10,0,1073741824,{description:n["a"]("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:le(new p(75,"readOnly",!1)),renameOnType:le(new p(76,"renameOnType",!1,{description:n["a"]("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:n["a"]("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:le(new p(77,"renderControlCharacters",!1,{description:n["a"]("renderControlCharacters","Controls whether the editor should render control characters.")})),renderIndentGuides:le(new p(78,"renderIndentGuides",!0,{description:n["a"]("renderIndentGuides","Controls whether the editor should render indent guides.")})),renderFinalNewline:le(new p(79,"renderFinalNewline",!0,{description:n["a"]("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:le(new v(80,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",n["a"]("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:n["a"]("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:le(new p(81,"renderLineHighlightOnlyWhenFocus",!1,{description:n["a"]("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused")})),renderValidationDecorations:le(new v(82,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:le(new v(83,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",n["a"]("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),n["a"]("renderWhitespace.selection","Render whitespace characters only on selected text."),n["a"]("renderWhitespace.trailing","Render only trailing whitespace characters"),""],description:n["a"]("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:le(new m(84,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:le(new p(85,"roundedSelection",!0,{description:n["a"]("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:le(new G),scrollbar:le(new Z),scrollBeyondLastColumn:le(new m(88,"scrollBeyondLastColumn",5,0,1073741824,{description:n["a"]("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:le(new p(89,"scrollBeyondLastLine",!0,{description:n["a"]("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:le(new p(90,"scrollPredominantAxis",!0,{description:n["a"]("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:le(new p(91,"selectionClipboard",!0,{description:n["a"]("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:s["d"]})),selectionHighlight:le(new p(92,"selectionHighlight",!0,{description:n["a"]("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:le(new p(93,"selectOnLineNumbers",!0)),showFoldingControls:le(new v(94,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[n["a"]("showFoldingControls.always","Always show the folding controls."),n["a"]("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:n["a"]("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:le(new p(95,"showUnused",!0,{description:n["a"]("showUnused","Controls fading out of unused code.")})),showDeprecated:le(new p(119,"showDeprecated",!0,{description:n["a"]("showDeprecated","Controls strikethrough deprecated variables.")})),inlineHints:le(new B),snippetSuggestions:le(new v(96,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[n["a"]("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),n["a"]("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),n["a"]("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),n["a"]("snippetSuggestions.none","Do not show snippet suggestions.")],description:n["a"]("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:le(new Q),smoothScrolling:le(new p(98,"smoothScrolling",!1,{description:n["a"]("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:le(new m(100,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:le(new X),suggestFontSize:le(new m(102,"suggestFontSize",0,0,1e3,{markdownDescription:n["a"]("suggestFontSize","Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")})),suggestLineHeight:le(new m(103,"suggestLineHeight",0,0,1e3,{markdownDescription:n["a"]("suggestLineHeight","Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used. The minimum value is 8.")})),suggestOnTriggerCharacters:le(new p(104,"suggestOnTriggerCharacters",!0,{description:n["a"]("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:le(new v(105,"suggestSelection","recentlyUsed",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[n["a"]("suggestSelection.first","Always select the first suggestion."),n["a"]("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),n["a"]("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:n["a"]("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:le(new v(106,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[n["a"]("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),n["a"]("tabCompletion.off","Disable tab completions."),n["a"]("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:n["a"]("tabCompletion","Enables tab completions.")})),tabIndex:le(new m(107,"tabIndex",0,-1,1073741824)),unusualLineTerminators:le(new v(108,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[n["a"]("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),n["a"]("unusualLineTerminators.off","Unusual line terminators are ignored."),n["a"]("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:n["a"]("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useTabStops:le(new p(109,"useTabStops",!0,{description:n["a"]("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordSeparators:le(new _(110,"wordSeparators",o["b"],{description:n["a"]("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:le(new v(111,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[n["a"]("wordWrap.off","Lines will never wrap."),n["a"]("wordWrap.on","Lines will wrap at the viewport width."),n["a"]({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),n["a"]({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:n["a"]({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:le(new _(112,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。｡､￠，．：；？！％・･ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ｧｨｩｪｫｬｭｮｯｰ”〉》」』】〕）］｝｣")),wordWrapBreakBeforeCharacters:le(new _(113,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔（［｛｢£¥＄￡￥+＋")),wordWrapColumn:le(new m(114,"wordWrapColumn",80,1,1073741824,{markdownDescription:n["a"]({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:le(new v(115,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:le(new v(116,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:le(new C(117,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],ee,{enumDescriptions:[n["a"]("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),n["a"]("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),n["a"]("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),n["a"]("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:n["a"]("wrappingIndent","Controls the indentation of wrapped lines.")})),wrappingStrategy:le(new v(118,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[n["a"]("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),n["a"]("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],description:n["a"]("wrappingStrategy","Controls the algorithm that computes wrapping points.")})),editorClassName:le(new k),pixelRatio:le(new U),tabFocusMode:le(new J),layoutInfo:le(new F),wrappingInfo:le(new te)}},fdcc:function(e,t,i){"use strict";i.d(t,"e",(function(){return o})),i.d(t,"f",(function(){return r})),i.d(t,"g",(function(){return a})),i.d(t,"d",(function(){return h})),i.d(t,"a",(function(){return c})),i.d(t,"b",(function(){return d})),i.d(t,"c",(function(){return u}));class n{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const s=new n;function o(e){h(e)||s.onUnexpectedError(e)}function r(e){h(e)||s.onUnexpectedExternalError(e)}function a(e){if(e instanceof Error){let{name:t,message:i}=e;const n=e.stacktrace||e.stack;return{$isError:!0,name:t,message:i,stack:n}}return e}const l="Canceled";function h(e){return e instanceof Error&&e.name===l&&e.message===l}function c(){const e=new Error(l);return e.name=e.message,e}function d(e){return e?new Error("Illegal argument: "+e):new Error("Illegal argument")}function u(e){return e?new Error("Illegal state: "+e):new Error("Illegal state")}},fe45:function(e,t,i){"use strict";i.d(t,"b",(function(){return l})),i.d(t,"a",(function(){return h})),i.d(t,"f",(function(){return c})),i.d(t,"e",(function(){return u})),i.d(t,"d",(function(){return p})),i.d(t,"c",(function(){return m}));var n=i("fdcc");class s{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const o=new s,r=new s,a=new s;var l;function h(e,t){const i=(65535&t)<<16>>>0;return(e|i)>>>0}function c(e,t){if(0===e)return null;const i=(65535&e)>>>0,n=(4294901760&e)>>>16;return new g(0!==n?[d(i,t),d(n,t)]:[d(i,t)])}function d(e,t){const i=!!(2048&e),n=!!(256&e),s=2===t?n:i,o=!!(1024&e),r=!!(512&e),a=2===t?i:n,l=255&e;return new u(s,o,r,a,l)}(function(){function e(e,t,i=t,n=i){o.define(e,t),r.define(e,i),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){function t(e){return o.keyCodeToStr(e)}function i(e){return o.strToKeyCode(e)}function n(e){return r.keyCodeToStr(e)}function s(e){return a.keyCodeToStr(e)}function l(e){return r.strToKeyCode(e)||a.strToKeyCode(e)}e.toString=t,e.fromString=i,e.toUserSettingsUS=n,e.toUserSettingsGeneral=s,e.fromUserSettings=l}(l||(l={}));class u{constructor(e,t,i,n,s){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=s}equals(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}toChord(){return new g([this])}isDuplicateModifierCase(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}class g{constructor(e){if(0===e.length)throw Object(n["b"])("parts");this.parts=e}}class p{constructor(e,t,i,n,s,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyLabel=s,this.keyAriaLabel=o}}class m{}},ffac:function(e,t,i){}}]);