~ K    A     L    I ~
UNAME : Linux web64.extendcp.co.uk 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
SERVER IP : 10.0.187.64 -________- CLIENT IP : 216.73.216.230
PATH :/usr/share/maxscale/gui/js/
UP FILE :
MINI SHELL D ZAB '
Current File : //usr/share/maxscale/gui/js/npm.monaco-editor~6c43a7dc.9e122ee6.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["npm.monaco-editor~6c43a7dc"],{"1c8c":function(e,t,i){},5902:function(e,t,i){"use strict";i.r(t);var n=i("b2cc"),o=i("fd9b"),s=i("308f"),r=i("a666"),a=i("3742"),l=i("24b7"),c=i("c101");const d="editor.action.inlineSuggest.commit";var u=i("7061"),h=i("2e5a"),g=i("5fe7"),p=i("2504"),m=i("fdcc"),f=i("0494"),v=i("d3f4"),b=i("6a89");class C{constructor(e,t,i=0){this.lineNumber=e,this.parts=t,this.additionalReservedLineCount=i}renderForScreenReader(e){if(0===this.parts.length)return"";const t=this.parts[this.parts.length-1],i=e.substr(0,t.column-1),n=w(i,this.parts.map(e=>({range:{startLineNumber:1,endLineNumber:1,startColumn:e.column,endColumn:e.column},text:e.lines.join("\n")})));return n.substring(this.parts[0].column-1)}}class L{constructor(e){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;t<e.length;t++)"\n"===e.charAt(t)&&this.lineStartOffsetByLineIdx.push(t+1)}getOffset(e){return this.lineStartOffsetByLineIdx[e.lineNumber-1]+e.column-1}}function w(e,t){const i=new L(e),n=t.map(e=>{const t=b["a"].lift(e.range);return{startOffset:i.getOffset(t.getStartPosition()),endOffset:i.getOffset(t.getEndPosition()),text:e.text}});n.sort((e,t)=>t.startOffset-e.startOffset);for(const o of n)e=e.substring(0,o.startOffset)+o.text+e.substring(o.endOffset);return e}class x{constructor(e,t,i){this.column=e,this.lines=t,this.preview=i}}class S extends r["a"]{constructor(e){super(),this.editor=e,this._expanded=void 0,this.onDidChangeEmitter=new s["b"],this.onDidChange=this.onDidChangeEmitter.event,this._register(e.onDidChangeConfiguration(e=>{e.hasChanged(106)&&void 0===this._expanded&&this.onDidChangeEmitter.fire()}))}setExpanded(e){this._expanded=!0,this.onDidChangeEmitter.fire()}}var I=i("9e74"),_=i("1b0e");function N(e,t){return e===t||!(!e||!t)&&(e.range.equalsRange(t.range)&&e.text===t.text&&e.command===t.command)}function y(e,t,i,n,o=0){if(e.range.startLineNumber!==e.range.endLineNumber)return;const s=t.getLineContent(e.range.startLineNumber),r=a["x"](s).length,l=e.range.startColumn-1<=r;if(l){const t=a["x"](e.text).length,i=s.substring(e.range.startColumn-1,r),n=b["a"].fromPositions(e.range.getStartPosition().delta(0,i.length),e.range.getEndPosition()),o=e.text.startsWith(i)?e.text.substring(i.length):e.text.substring(t);e={range:n,text:o,command:e.command}}const c=t.getValueInRange(e.range),d=D(c,e.text);if(!d)return;const u=e.range.startLineNumber,h=new Array;if("prefix"===i){const e=d.filter(e=>0===e.originalLength);if(e.length>1||1===e.length&&e[0].originalStart!==c.length)return}const g=e.text.length-o;for(const p of d){const t=e.range.startColumn+p.originalStart+p.originalLength;if("subwordSmart"===i&&n&&n.lineNumber===e.range.startLineNumber&&t<n.column)return;if(p.originalLength>0)return;if(0===p.modifiedLength)continue;const o=p.modifiedStart+p.modifiedLength,s=Math.max(p.modifiedStart,Math.min(o,g)),r=e.text.substring(p.modifiedStart,s),l=e.text.substring(s,Math.max(p.modifiedStart,o));if(r.length>0){const e=a["R"](r);h.push(new x(t,e,!1))}if(l.length>0){const e=a["R"](l);h.push(new x(t,e,!0))}}return new C(u,h,0)}let O=void 0;function D(e,t){if((null===O||void 0===O?void 0:O.originalValue)===e&&(null===O||void 0===O?void 0:O.newValue)===t)return null===O||void 0===O?void 0:O.changes;{const i=M(e,t);return O={originalValue:e,newValue:t,changes:i},i}}function M(e,t){if(e.length>5e3||t.length>5e3)return;function i(e){let t=0;for(let i=0,n=e.length;i<n;i++){const n=e.charCodeAt(i);n>t&&(t=n)}return t}const n=Math.max(i(e),i(t));function o(e){if(e<0)throw new Error("unexpected");return n+e+1}function s(e){let t=0,i=0;const n=new Int32Array(e.length);for(let s=0,r=e.length;s<r;s++){const r=100*i+t;"("===e[s]?(n[s]=o(2*r),t++):")"===e[s]?(n[s]=o(2*r+1),1===t&&i++,t=Math.max(t-1,0)):n[s]=e.charCodeAt(s)}return n}const r=s(e),a=s(t);return new _["a"]({getElements:()=>r},{getElements:()=>a}).ComputeDiff(!1).changes}var k=i("0184"),E=i("accc"),R=i("7340"),A=i("e971"),T=function(e,t,i,n){var o,s=arguments.length,r=s<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--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},P=function(e,t){return function(i,n){t(i,n,e)}},j=function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let U=class extends r["a"]{constructor(e,t,i,n,o,a){super(),this.editor=e,this.cache=t,this.commandService=i,this.languageConfigurationService=n,this.languageFeaturesService=o,this.debounceService=a,this.onDidChangeEmitter=new s["b"],this.onDidChange=this.onDidChangeEmitter.event,this.completionSession=this._register(new r["d"]),this.active=!1,this.disposed=!1,this.debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:200}),this._register(i.onDidExecuteCommand(t=>{const i=new Set([f["CoreEditingCommands"].Tab.id,f["CoreEditingCommands"].DeleteLeft.id,f["CoreEditingCommands"].DeleteRight.id,d,"acceptSelectedSuggestion"]);i.has(t.commandId)&&e.hasTextFocus()&&this.handleUserInput()})),this._register(this.editor.onDidType(e=>{this.handleUserInput()})),this._register(this.editor.onDidChangeCursorPosition(e=>{this.session&&!this.session.isValid&&this.hide()})),this._register(Object(r["j"])(()=>{this.disposed=!0})),this._register(this.editor.onDidBlurEditorWidget(()=>{this.hide()}))}handleUserInput(){this.session&&!this.session.isValid&&this.hide(),setTimeout(()=>{this.disposed||this.startSessionIfTriggered()},0)}get session(){return this.completionSession.value}get ghostText(){var e;return null===(e=this.session)||void 0===e?void 0:e.ghostText}get minReservedLineCount(){return this.session?this.session.minReservedLineCount:0}setExpanded(e){var t;null===(t=this.session)||void 0===t||t.setExpanded(e)}setActive(e){var t;this.active=e,e&&(null===(t=this.session)||void 0===t||t.scheduleAutomaticUpdate())}startSessionIfTriggered(){const e=this.editor.getOption(55);e.enabled&&(this.session&&this.session.isValid||this.trigger(h["g"].Automatic))}trigger(e){this.completionSession.value?e===h["g"].Explicit&&this.completionSession.value.ensureUpdateWithExplicitContext():(this.completionSession.value=new W(this.editor,this.editor.getPosition(),()=>this.active,this.commandService,this.cache,e,this.languageConfigurationService,this.languageFeaturesService.inlineCompletionsProvider,this.debounceValue),this.completionSession.value.takeOwnership(this.completionSession.value.onDidChange(()=>{this.onDidChangeEmitter.fire()})))}hide(){this.completionSession.clear(),this.onDidChangeEmitter.fire()}commitCurrentSuggestion(){var e;null===(e=this.session)||void 0===e||e.commitCurrentCompletion()}showNext(){var e;null===(e=this.session)||void 0===e||e.showNextInlineCompletion()}showPrevious(){var e;null===(e=this.session)||void 0===e||e.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var e;return j(this,void 0,void 0,(function*(){const t=yield null===(e=this.session)||void 0===e?void 0:e.hasMultipleInlineCompletions();return void 0!==t&&t}))}};U=T([P(2,I["b"]),P(3,k["a"]),P(4,R["a"]),P(5,A["a"])],U);class W extends S{constructor(e,t,i,n,o,s,a,l,c){super(e),this.triggerPosition=t,this.shouldUpdate=i,this.commandService=n,this.cache=o,this.initialTriggerKind=s,this.languageConfigurationService=a,this.registry=l,this.debounce=c,this.minReservedLineCount=0,this.updateOperation=this._register(new r["d"]),this.updateSoon=this._register(new g["h"](()=>{let e=this.initialTriggerKind;return this.initialTriggerKind=h["g"].Automatic,this.update(e)},50)),this.currentlySelectedCompletionId=void 0;let d=void 0;this._register(this.onDidChange(()=>{const e=this.currentCompletion;if(e&&e.sourceInlineCompletion!==d){d=e.sourceInlineCompletion;const t=e.sourceProvider;t.handleItemDidShow&&t.handleItemDidShow(e.sourceInlineCompletions,d)}})),this._register(Object(r["j"])(()=>{this.cache.clear()})),this._register(this.editor.onDidChangeCursorPosition(e=>{this.cache.value&&this.onDidChangeEmitter.fire()})),this._register(this.editor.onDidChangeModelContent(e=>{this.scheduleAutomaticUpdate()})),this._register(this.registry.onDidChange(()=>{this.updateSoon.schedule(this.debounce.get(this.editor.getModel()))})),this.scheduleAutomaticUpdate()}fixAndGetIndexOfCurrentSelection(){if(!this.currentlySelectedCompletionId||!this.cache.value)return 0;if(0===this.cache.value.completions.length)return 0;const e=this.cache.value.completions.findIndex(e=>e.semanticId===this.currentlySelectedCompletionId);return-1===e?(this.currentlySelectedCompletionId=void 0,0):e}get currentCachedCompletion(){if(this.cache.value)return this.cache.value.completions[this.fixAndGetIndexOfCurrentSelection()]}showNextInlineCompletion(){var e;return j(this,void 0,void 0,(function*(){yield this.ensureUpdateWithExplicitContext();const t=(null===(e=this.cache.value)||void 0===e?void 0:e.completions)||[];if(t.length>0){const e=(this.fixAndGetIndexOfCurrentSelection()+1)%t.length;this.currentlySelectedCompletionId=t[e].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()}))}showPreviousInlineCompletion(){var e;return j(this,void 0,void 0,(function*(){yield this.ensureUpdateWithExplicitContext();const t=(null===(e=this.cache.value)||void 0===e?void 0:e.completions)||[];if(t.length>0){const e=(this.fixAndGetIndexOfCurrentSelection()+t.length-1)%t.length;this.currentlySelectedCompletionId=t[e].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()}))}ensureUpdateWithExplicitContext(){var e;return j(this,void 0,void 0,(function*(){this.updateOperation.value?this.updateOperation.value.triggerKind===h["g"].Explicit?yield this.updateOperation.value.promise:yield this.update(h["g"].Explicit):(null===(e=this.cache.value)||void 0===e?void 0:e.triggerKind)!==h["g"].Explicit&&(yield this.update(h["g"].Explicit))}))}hasMultipleInlineCompletions(){var e;return j(this,void 0,void 0,(function*(){return yield this.ensureUpdateWithExplicitContext(),((null===(e=this.cache.value)||void 0===e?void 0:e.completions.length)||0)>1}))}get ghostText(){const e=this.currentCompletion,t=this.editor.getOptions().get(55).mode;return e?y(e,this.editor.getModel(),t,this.editor.getPosition()):void 0}get currentCompletion(){const e=this.currentCachedCompletion;if(e)return e.toLiveInlineCompletion()}get isValid(){return this.editor.getPosition().lineNumber===this.triggerPosition.lineNumber}scheduleAutomaticUpdate(){this.updateOperation.clear(),this.updateSoon.schedule(this.debounce.get(this.editor.getModel()))}update(e){return j(this,void 0,void 0,(function*(){if(!this.shouldUpdate())return;const t=this.editor.getPosition(),i=new Date,n=Object(g["l"])(n=>j(this,void 0,void 0,(function*(){let o;try{o=yield z(this.registry,t,this.editor.getModel(),{triggerKind:e,selectedSuggestionInfo:void 0},n,this.languageConfigurationService);const s=new Date;this.debounce.update(this.editor.getModel(),s.getTime()-i.getTime())}catch(s){return void Object(m["g"])(s)}n.isCancellationRequested||(this.cache.setValue(this.editor,o,e),this.onDidChangeEmitter.fire())}))),o=new V(n,e);this.updateOperation.value=o,yield n,this.updateOperation.value===o&&this.updateOperation.clear()}))}takeOwnership(e){this._register(e)}commitCurrentCompletion(){if(!this.ghostText)return;const e=this.currentCompletion;e&&this.commit(e)}commit(e){const t=this.cache.clearAndLeak();this.editor.executeEdits("inlineSuggestion.accept",[v["a"].replaceMove(e.range,e.text)]),e.command?this.commandService.executeCommand(e.command.id,...e.command.arguments||[]).finally(()=>{null===t||void 0===t||t.dispose()}).then(void 0,m["h"]):null===t||void 0===t||t.dispose(),this.onDidChangeEmitter.fire()}}class V{constructor(e,t){this.promise=e,this.triggerKind=t}dispose(){this.promise.cancel()}}class K extends r["a"]{constructor(e,t,i,n){super(),this.triggerKind=n;const o=e.deltaDecorations([],t.items.map(e=>({range:e.range,options:{description:"inline-completion-tracking-range"}})));this._register(Object(r["j"])(()=>{e.deltaDecorations(o,[])})),this.completions=t.items.map((e,t)=>new F(e,o[t])),this._register(e.onDidChangeModelContent(()=>{let t=!1;const n=e.getModel();for(const e of this.completions){const i=n.getDecorationRange(e.decorationId);i?e.synchronizedRange.equalsRange(i)||(t=!0,e.synchronizedRange=i):Object(m["g"])(new Error("Decoration has no range"))}t&&i()})),this._register(t)}}class F{constructor(e,t){this.inlineCompletion=e,this.decorationId=t,this.semanticId=JSON.stringify({text:this.inlineCompletion.text,startLine:this.inlineCompletion.range.startLineNumber,startColumn:this.inlineCompletion.range.startColumn,command:this.inlineCompletion.command}),this.synchronizedRange=e.range}toLiveInlineCompletion(){return{text:this.inlineCompletion.text,range:this.synchronizedRange,command:this.inlineCompletion.command,sourceProvider:this.inlineCompletion.sourceProvider,sourceInlineCompletions:this.inlineCompletion.sourceInlineCompletions,sourceInlineCompletion:this.inlineCompletion.sourceInlineCompletion}}}function B(e,t){const i=t.getWordAtPosition(e),n=t.getLineMaxColumn(e.lineNumber);return i?new b["a"](e.lineNumber,i.startColumn,e.lineNumber,n):b["a"].fromPositions(e,e.with(void 0,n))}function z(e,t,i,n,o=p["a"].None,s){return j(this,void 0,void 0,(function*(){const r=B(t,i),a=e.all(i),l=yield Promise.all(a.map(e=>j(this,void 0,void 0,(function*(){const s=yield Promise.resolve(e.provideInlineCompletions(i,t,n,o)).catch(m["h"]);return{completions:s,provider:e,dispose:()=>{s&&e.freeInlineCompletions(s)}}})))),c=new Map;for(const e of l){const t=e.completions;if(t)for(const n of t.items){const o=n.range?b["a"].lift(n.range):r;if(o.startLineNumber!==o.endLineNumber)continue;const a=s&&n.completeBracketPairs?H(n.text,o.getStartPosition(),i,s):n.text,l={text:a,range:o,command:n.command,sourceProvider:e.provider,sourceInlineCompletions:t,sourceInlineCompletion:n};c.set(JSON.stringify({text:a,range:n.range}),l)}}return{items:[...c.values()],dispose:()=>{for(const e of l)e.dispose()}}}))}function H(e,t,i,n){const o=i.getLineContent(t.lineNumber).substring(0,t.column-1),s=o+e,r=i.tokenizeLineWithEdit(t,s.length-(t.column-1),e),a=null===r||void 0===r?void 0:r.sliceAndInflate(t.column-1,s.length,0);if(!a)return e;console.log(a);const l=Object(E["a"])(a,n);return l}function $(e,t){if(!t)return t;const i=e.getValueInRange(t.range),n=Object(a["f"])(i,t.text),o=e.getOffsetAt(t.range.getStartPosition())+n,s=e.getPositionAt(o),r=i.substr(n),l=Object(a["g"])(r,t.text),c=e.getPositionAt(Math.max(o,e.getOffsetAt(t.range.getEndPosition())-l));return{range:b["a"].fromPositions(s,c),text:t.text.substr(n,t.text.length-n-l)}}var q=i("e8e3"),Z=i("7ef3"),G=i("6d42"),J=i("90db");class X extends r["a"]{constructor(e,t){super(),this.editor=e,this.suggestControllerPreselector=t,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this.onDidChangeEmitter=new s["b"],this.onDidChange=this.onDidChangeEmitter.event,this.setInactiveDelayed=this._register(new g["h"](()=>{this.isSuggestWidgetVisible||this._isActive&&(this._isActive=!1,this.onDidChangeEmitter.fire())},100)),this._register(e.onKeyDown(e=>{e.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(e.onKeyUp(e=>{e.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const i=J["SuggestController"].get(this.editor);if(i){this._register(i.registerSelector({priority:100,select:(e,t,n)=>{const o=this.editor.getModel(),s=$(o,this.suggestControllerPreselector());if(!s)return-1;const r=u["a"].lift(t),a=n.map((e,t)=>{const n=ee(i,r,e,this.isShiftKeyPressed),a=$(o,null===n||void 0===n?void 0:n.normalizedInlineCompletion);if(!a)return;const l=Y(s.range,a.range)&&s.text.startsWith(a.text);return{index:t,valid:l,prefixLength:a.text.length,suggestItem:e}}).filter(e=>e&&e.valid),l=Object(q["l"])(a,Object(q["f"])(e=>e.prefixLength,q["s"]));return l?l.index:-1}}));let e=!1;const t=()=>{e||(e=!0,this._register(i.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(i.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.setInactiveDelayed.schedule(),this.update(this._isActive)})),this._register(i.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(s["c"].once(i.model.onDidTrigger)(e=>{t()}))}this.update(this._isActive)}get state(){if(this._isActive)return{selectedItem:this._currentSuggestItemInfo}}update(e){const t=this.getSuggestItemInfo();let i=!1;Q(this._currentSuggestItemInfo,t)||(this._currentSuggestItemInfo=t,i=!0),this._isActive!==e&&(this._isActive=e,i=!0),i&&this.onDidChangeEmitter.fire()}getSuggestItemInfo(){const e=J["SuggestController"].get(this.editor);if(!e)return;if(!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem();return t?ee(e,this.editor.getPosition(),t.item,this.isShiftKeyPressed):void 0}stopForceRenderingAbove(){const e=J["SuggestController"].get(this.editor);e&&e.stopForceRenderingAbove()}forceRenderingAbove(){const e=J["SuggestController"].get(this.editor);e&&e.forceRenderingAbove()}}function Y(e,t){return t.startLineNumber===e.startLineNumber&&t.startColumn===e.startColumn&&(t.endLineNumber<e.endLineNumber||t.endLineNumber===e.endLineNumber&&t.endColumn<=e.endColumn)}function Q(e,t){return e===t||!(!e||!t)&&(e.completionItemKind===t.completionItemKind&&e.isSnippetText===t.isSnippetText&&N(e.normalizedInlineCompletion,t.normalizedInlineCompletion))}function ee(e,t,i,n){if(Array.isArray(i.completion.additionalTextEdits)&&i.completion.additionalTextEdits.length>0)return{completionItemKind:i.completion.kind,isSnippetText:!1,normalizedInlineCompletion:{range:b["a"].fromPositions(t,t),text:""}};let{insertText:o}=i.completion,s=!1;if(4&i.completion.insertTextRules){const i=(new Z["c"]).parse(o),n=e.editor.getModel();if(i.children.length>100)return;G["a"].adjustWhitespace(n,t,i,!0,!0),o=i.toString(),s=!0}const r=e.getOverwriteInfo(i,n);return{isSnippetText:s,completionItemKind:i.completion.kind,normalizedInlineCompletion:{text:o,range:b["a"].fromPositions(t.delta(0,-r.overwriteBefore),t.delta(0,Math.max(r.overwriteAfter,0)))}}}var te=function(e,t,i,n){var o,s=arguments.length,r=s<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--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ie=function(e,t){return function(i,n){t(i,n,e)}},ne=function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let oe=class extends S{constructor(e,t,i){super(e),this.cache=t,this.languageFeaturesService=i,this.suggestionInlineCompletionSource=this._register(new X(this.editor,()=>{var e,t;return null===(t=null===(e=this.cache.value)||void 0===e?void 0:e.completions[0])||void 0===t?void 0:t.toLiveInlineCompletion()})),this.updateOperation=this._register(new r["d"]),this.updateCacheSoon=this._register(new g["h"](()=>this.updateCache(),50)),this.minReservedLineCount=0,this._register(this.suggestionInlineCompletionSource.onDidChange(()=>{this.updateCacheSoon.schedule();const e=this.suggestionInlineCompletionSource.state;e||(this.minReservedLineCount=0);const t=this.ghostText;t&&(this.minReservedLineCount=Math.max(this.minReservedLineCount,se(t.parts.map(e=>e.lines.length-1)))),this.minReservedLineCount>=1?this.suggestionInlineCompletionSource.forceRenderingAbove():this.suggestionInlineCompletionSource.stopForceRenderingAbove(),this.onDidChangeEmitter.fire()})),this._register(this.cache.onDidChange(()=>{this.onDidChangeEmitter.fire()})),this._register(this.editor.onDidChangeCursorPosition(e=>{this.minReservedLineCount=0,this.updateCacheSoon.schedule(),this.onDidChangeEmitter.fire()})),this._register(Object(r["j"])(()=>this.suggestionInlineCompletionSource.stopForceRenderingAbove()))}get isActive(){return void 0!==this.suggestionInlineCompletionSource.state}isSuggestionPreviewEnabled(){const e=this.editor.getOption(106);return e.preview}updateCache(){return ne(this,void 0,void 0,(function*(){const e=this.suggestionInlineCompletionSource.state;if(!e||!e.selectedItem)return;const t={text:e.selectedItem.normalizedInlineCompletion.text,range:e.selectedItem.normalizedInlineCompletion.range,isSnippetText:e.selectedItem.isSnippetText,completionKind:e.selectedItem.completionItemKind},i=this.editor.getPosition(),n=Object(g["l"])(e=>ne(this,void 0,void 0,(function*(){let n;try{n=yield z(this.languageFeaturesService.inlineCompletionsProvider,i,this.editor.getModel(),{triggerKind:h["g"].Automatic,selectedSuggestionInfo:t},e)}catch(o){return void Object(m["g"])(o)}e.isCancellationRequested||(this.cache.setValue(this.editor,n,h["g"].Automatic),this.onDidChangeEmitter.fire())}))),o=new V(n,h["g"].Automatic);this.updateOperation.value=o,yield n,this.updateOperation.value===o&&this.updateOperation.clear()}))}get ghostText(){var e,t,i;const n=this.isSuggestionPreviewEnabled(),o=$(this.editor.getModel(),null===(t=null===(e=this.cache.value)||void 0===e?void 0:e.completions[0])||void 0===t?void 0:t.toLiveInlineCompletion()),s=this.suggestionInlineCompletionSource.state,r=$(this.editor.getModel(),null===(i=null===s||void 0===s?void 0:s.selectedItem)||void 0===i?void 0:i.normalizedInlineCompletion),a=o&&r&&o.text.startsWith(r.text)&&o.range.equalsRange(r.range);if(!n&&!a)return;const l=a?o:r||o,c=a?l.text.length-r.text.length:0,d=this.toGhostText(l,c);return d}toGhostText(e,t){const i=this.editor.getOptions().get(106).previewMode;return e?y(e,this.editor.getModel(),i,this.editor.getPosition(),t)||new C(e.range.endLineNumber,[],this.minReservedLineCount):void 0}};function se(e){return e.reduce((e,t)=>e+t,0)}function re(e,t){return{object:e,dispose:()=>null===t||void 0===t?void 0:t.dispose()}}oe=te([ie(2,R["a"])],oe);var ae=i("0a0f"),le=function(e,t,i,n){var o,s=arguments.length,r=s<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--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},ce=function(e,t){return function(i,n){t(i,n,e)}},de=function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class ue extends r["a"]{constructor(){super(...arguments),this.onDidChangeEmitter=new s["b"],this.onDidChange=this.onDidChangeEmitter.event,this.hasCachedGhostText=!1,this.currentModelRef=this._register(new r["d"])}get targetModel(){var e;return null===(e=this.currentModelRef.value)||void 0===e?void 0:e.object}setTargetModel(e){var t;(null===(t=this.currentModelRef.value)||void 0===t?void 0:t.object)!==e&&(this.currentModelRef.clear(),this.currentModelRef.value=e?re(e,e.onDidChange(()=>{this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire()})):void 0,this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire())}get ghostText(){var e,t;return this.hasCachedGhostText||(this.cachedGhostText=null===(t=null===(e=this.currentModelRef.value)||void 0===e?void 0:e.object)||void 0===t?void 0:t.ghostText,this.hasCachedGhostText=!0),this.cachedGhostText}setExpanded(e){var t;null===(t=this.targetModel)||void 0===t||t.setExpanded(e)}get minReservedLineCount(){return this.targetModel?this.targetModel.minReservedLineCount:0}}let he=class extends ue{constructor(e,t){super(),this.editor=e,this.instantiationService=t,this.sharedCache=this._register(new ge),this.suggestWidgetAdapterModel=this._register(this.instantiationService.createInstance(oe,this.editor,this.sharedCache)),this.inlineCompletionsModel=this._register(this.instantiationService.createInstance(U,this.editor,this.sharedCache)),this._register(this.suggestWidgetAdapterModel.onDidChange(()=>{this.updateModel()})),this.updateModel()}get activeInlineCompletionsModel(){if(this.targetModel===this.inlineCompletionsModel)return this.inlineCompletionsModel}updateModel(){this.setTargetModel(this.suggestWidgetAdapterModel.isActive?this.suggestWidgetAdapterModel:this.inlineCompletionsModel),this.inlineCompletionsModel.setActive(this.targetModel===this.inlineCompletionsModel)}shouldShowHoverAt(e){var t;const i=null===(t=this.activeInlineCompletionsModel)||void 0===t?void 0:t.ghostText;return!!i&&i.parts.some(t=>e.containsPosition(new u["a"](i.lineNumber,t.column)))}triggerInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.trigger(h["g"].Explicit)}commitInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.commitCurrentSuggestion()}hideInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.hide()}showNextInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.showNext()}showPreviousInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.showPrevious()}hasMultipleInlineCompletions(){var e;return de(this,void 0,void 0,(function*(){const t=yield null===(e=this.activeInlineCompletionsModel)||void 0===e?void 0:e.hasMultipleInlineCompletions();return void 0!==t&&t}))}};he=le([ce(1,ae["a"])],he);class ge extends r["a"]{constructor(){super(...arguments),this.onDidChangeEmitter=new s["b"],this.onDidChange=this.onDidChangeEmitter.event,this.cache=this._register(new r["d"])}get value(){return this.cache.value}setValue(e,t,i){this.cache.value=new K(e,t,()=>this.onDidChangeEmitter.fire(),i)}clearAndLeak(){return this.cache.clearAndLeak()}clear(){this.cache.clear()}}var pe,me=i("11f7"),fe=(i("1c8c"),i("0cc2")),ve=i("fd49"),be=i("ce17"),Ce=i("7ab3"),Le=i("0867"),we=i("dc81"),xe=i("7416"),Se=i("6da2"),Ie=i("b7d0"),_e=function(e,t,i,n){var o,s=arguments.length,r=s<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--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Ne=function(e,t){return function(i,n){t(i,n,e)}};const ye=null===(pe=window.trustedTypes)||void 0===pe?void 0:pe.createPolicy("editorGhostText",{createHTML:e=>e});let Oe=class extends r["a"]{constructor(e,t,i,n){super(),this.editor=e,this.model=t,this.instantiationService=i,this.languageService=n,this.disposed=!1,this.partsWidget=this._register(this.instantiationService.createInstance(De,this.editor)),this.additionalLinesWidget=this._register(new Me(this.editor,this.languageService.languageIdCodec)),this.viewMoreContentWidget=void 0,this._register(this.editor.onDidChangeConfiguration(e=>{(e.hasChanged(29)||e.hasChanged(105)||e.hasChanged(88)||e.hasChanged(83)||e.hasChanged(45)||e.hasChanged(44)||e.hasChanged(59))&&this.update()})),this._register(Object(r["j"])(()=>{var e;this.disposed=!0,this.update(),null===(e=this.viewMoreContentWidget)||void 0===e||e.dispose(),this.viewMoreContentWidget=void 0})),this._register(t.onDidChange(()=>{this.update()})),this.update()}shouldShowHoverAtViewZone(e){return this.additionalLinesWidget.viewZoneId===e}update(){var e;const t=this.model.ghostText;if(!this.editor.hasModel()||!t||this.disposed)return this.partsWidget.clear(),void this.additionalLinesWidget.clear();const i=new Array,n=new Array;function o(e,t){if(n.length>0){const i=n[n.length-1];t&&i.decorations.push(new xe["a"](i.content.length+1,i.content.length+1+e[0].length,t,0)),i.content+=e[0],e=e.slice(1)}for(const i of e)n.push({content:i,decorations:t?[new xe["a"](1,i.length+1,t,0)]:[]})}const s=this.editor.getModel().getLineContent(t.lineNumber);this.editor.getModel().getLineTokens(t.lineNumber);let r=void 0,a=0;for(const l of t.parts){let e=l.lines;void 0===r?(i.push({column:l.column,text:e[0],preview:l.preview}),e=e.slice(1)):o([s.substring(a,l.column-1)],void 0),e.length>0&&(o(e,"ghost-text"),void 0===r&&l.column<=s.length&&(r=l.column)),a=l.column-1}void 0!==r&&o([s.substring(a)],void 0),this.partsWidget.setParts(t.lineNumber,i,void 0!==r?{column:r,length:s.length+1-r}:void 0),this.additionalLinesWidget.updateLines(t.lineNumber,n,t.additionalReservedLineCount),t.parts.some(e=>e.lines.length<0)?this.viewMoreContentWidget=this.renderViewMoreLines(new u["a"](t.lineNumber,this.editor.getModel().getLineMaxColumn(t.lineNumber)),"",0):(null===(e=this.viewMoreContentWidget)||void 0===e||e.dispose(),this.viewMoreContentWidget=void 0)}renderViewMoreLines(e,t,i){const n=this.editor.getOption(44),o=document.createElement("div");o.className="suggest-preview-additional-widget",Object(fe["a"])(o,n);const s=document.createElement("span");s.className="content-spacer",s.append(t),o.append(s);const a=document.createElement("span");a.className="content-newline suggest-preview-text",a.append("⏎  "),o.append(a);const l=new r["b"],c=document.createElement("div");return c.className="button suggest-preview-text",c.append(`+${i} lines…`),l.add(me["o"](c,"mousedown",e=>{var t;null===(t=this.model)||void 0===t||t.setExpanded(!0),e.preventDefault(),this.editor.focus()})),o.append(c),new Ee(this.editor,e,o,l)}};Oe=_e([Ne(2,ae["a"]),Ne(3,Le["a"])],Oe);class De{constructor(e){this.editor=e,this.decorationIds=[],this.disposableStore=new r["b"]}dispose(){this.clear(),this.disposableStore.dispose()}clear(){this.editor.deltaDecorations(this.decorationIds,[]),this.disposableStore.clear()}setParts(e,t,i){this.disposableStore.clear();const n=this.editor.getModel();if(!n)return;const o=new Array;i&&o.push({range:b["a"].fromPositions(new u["a"](e,i.column),new u["a"](e,i.column+i.length)),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}}),this.decorationIds=this.editor.deltaDecorations(this.decorationIds,t.map(t=>({range:b["a"].fromPositions(new u["a"](e,t.column)),options:{description:"ghost-text",after:{content:t.text,inlineClassName:t.preview?"ghost-text-decoration-preview":"ghost-text-decoration"},showIfCollapsed:!0}})).concat(o))}}class Me{constructor(e,t){this.editor=e,this.languageIdCodec=t,this._viewZoneId=void 0}get viewZoneId(){return this._viewZoneId}dispose(){this.clear()}clear(){this.editor.changeViewZones(e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(e,t,i){const n=this.editor.getModel();if(!n)return;const{tabSize:o}=n.getOptions();this.editor.changeViewZones(n=>{this._viewZoneId&&(n.removeZone(this._viewZoneId),this._viewZoneId=void 0);const s=Math.max(t.length,i);if(s>0){const i=document.createElement("div");ke(i,o,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=n.addZone({afterLineNumber:e,heightInLines:s,domNode:i,afterColumnAffinity:1})}})}}function ke(e,t,i,n,o){const s=n.get(29),r=n.get(105),l="none",c=n.get(83),d=n.get(45),u=n.get(44),h=n.get(59),g=Object(Ce["a"])(1e4);g.appendASCIIString('<div class="suggest-preview-text">');for(let f=0,v=i.length;f<v;f++){const e=i[f],n=e.content;g.appendASCIIString('<div class="view-line'),g.appendASCIIString('" style="top:'),g.appendASCIIString(String(f*h)),g.appendASCIIString('px;width:1000000px;">');const p=a["A"](n),m=a["m"](n),v=be["a"].createEmpty(n,o);Object(Se["d"])(new Se["c"](u.isMonospace&&!s,u.canUseHalfwidthRightwardsArrow,n,!1,p,m,0,v,e.decorations,t,0,u.spaceWidth,u.middotWidth,u.wsmiddotWidth,r,l,c,d!==ve["e"].OFF,null),g),g.appendASCIIString("</div>")}g.appendASCIIString("</div>"),Object(fe["a"])(e,u);const p=g.build(),m=ye?ye.createHTML(p):p;e.innerHTML=m}class Ee extends r["a"]{constructor(e,t,i,n){super(),this.editor=e,this.position=t,this.domNode=i,this.allowEditorOverflow=!1,this.suppressMouseDown=!1,this._register(n),this._register(Object(r["j"])(()=>{this.editor.removeContentWidget(this)})),this.editor.addContentWidget(this)}getId(){return"editor.widget.viewMoreLinesWidget"}getDomNode(){return this.domNode}getPosition(){return{position:this.position,preference:[0]}}}Object(Ie["f"])((e,t)=>{const i=e.getColor(we["K"]);i&&(t.addRule(`.monaco-editor .ghost-text-decoration { color: ${i.toString()} !important; }`),t.addRule(`.monaco-editor .ghost-text-decoration-preview { color: ${i.toString()} !important; }`),t.addRule(`.monaco-editor .suggest-preview-text .ghost-text { color: ${i.toString()} !important; }`));const n=e.getColor(we["I"]);n&&(t.addRule(`.monaco-editor .ghost-text-decoration { background-color: ${n.toString()}; }`),t.addRule(`.monaco-editor .ghost-text-decoration-preview { background-color: ${n.toString()}; }`),t.addRule(`.monaco-editor .suggest-preview-text .ghost-text { background-color: ${n.toString()}; }`));const o=e.getColor(we["J"]);o&&(t.addRule(`.monaco-editor .suggest-preview-text .ghost-text { border: 1px solid ${o}; }`),t.addRule(`.monaco-editor .ghost-text-decoration { border: 1px solid ${o}; }`),t.addRule(`.monaco-editor .ghost-text-decoration-preview { border: 1px solid ${o}; }`))});var Re=i("dff7"),Ae=i("4fc3"),Te=i("9eb8"),Pe=function(e,t,i,n){var o,s=arguments.length,r=s<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--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},je=function(e,t){return function(i,n){t(i,n,e)}},Ue=function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let We=class e extends r["a"]{constructor(e,t){super(),this.editor=e,this.instantiationService=t,this.triggeredExplicitly=!1,this.activeController=this._register(new r["d"]),this.activeModelDidChangeEmitter=this._register(new s["b"]),this._register(this.editor.onDidChangeModel(()=>{this.updateModelController()})),this._register(this.editor.onDidChangeConfiguration(e=>{e.hasChanged(106)&&this.updateModelController(),e.hasChanged(55)&&this.updateModelController()})),this.updateModelController()}static get(t){return t.getContribution(e.ID)}get activeModel(){var e;return null===(e=this.activeController.value)||void 0===e?void 0:e.model}updateModelController(){const e=this.editor.getOption(106),t=this.editor.getOption(55);this.activeController.value=void 0,this.activeController.value=this.editor.hasModel()&&(e.preview||t.enabled||this.triggeredExplicitly)?this.instantiationService.createInstance(Ke,this.editor):void 0,this.activeModelDidChangeEmitter.fire()}shouldShowHoverAt(e){var t;return(null===(t=this.activeModel)||void 0===t?void 0:t.shouldShowHoverAt(e))||!1}shouldShowHoverAtViewZone(e){var t,i;return(null===(i=null===(t=this.activeController.value)||void 0===t?void 0:t.widget)||void 0===i?void 0:i.shouldShowHoverAtViewZone(e))||!1}trigger(){var e;this.triggeredExplicitly=!0,this.activeController.value||this.updateModelController(),null===(e=this.activeModel)||void 0===e||e.triggerInlineCompletion()}commit(){var e;null===(e=this.activeModel)||void 0===e||e.commitInlineCompletion()}hide(){var e;null===(e=this.activeModel)||void 0===e||e.hideInlineCompletion()}showNextInlineCompletion(){var e;null===(e=this.activeModel)||void 0===e||e.showNextInlineCompletion()}showPreviousInlineCompletion(){var e;null===(e=this.activeModel)||void 0===e||e.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var e;return Ue(this,void 0,void 0,(function*(){const t=yield null===(e=this.activeModel)||void 0===e?void 0:e.hasMultipleInlineCompletions();return void 0!==t&&t}))}};We.inlineSuggestionVisible=new Ae["c"]("inlineSuggestionVisible",!1,Re["a"]("inlineSuggestionVisible","Whether an inline suggestion is visible")),We.inlineSuggestionHasIndentation=new Ae["c"]("inlineSuggestionHasIndentation",!1,Re["a"]("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace")),We.inlineSuggestionHasIndentationLessThanTabSize=new Ae["c"]("inlineSuggestionHasIndentationLessThanTabSize",!0,Re["a"]("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab")),We.ID="editor.contrib.ghostTextController",We=Pe([je(1,ae["a"])],We);class Ve{constructor(e){this.contextKeyService=e,this.inlineCompletionVisible=We.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=We.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=We.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService)}}let Ke=class extends r["a"]{constructor(e,t,i){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=i,this.contextKeys=new Ve(this.contextKeyService),this.model=this._register(this.instantiationService.createInstance(he,this.editor)),this.widget=this._register(this.instantiationService.createInstance(Oe,this.editor,this.model)),this._register(Object(r["j"])(()=>{this.contextKeys.inlineCompletionVisible.set(!1),this.contextKeys.inlineCompletionSuggestsIndentation.set(!1),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(!0)})),this._register(this.model.onDidChange(()=>{this.updateContextKeys()})),this.updateContextKeys()}updateContextKeys(){var e;this.contextKeys.inlineCompletionVisible.set(void 0!==(null===(e=this.model.activeInlineCompletionsModel)||void 0===e?void 0:e.ghostText));let t=!1,i=!0;const n=this.model.inlineCompletionsModel.ghostText;if(this.model.activeInlineCompletionsModel&&n&&n.parts.length>0){const{column:e,lines:o}=n.parts[0],s=o[0],r=this.editor.getModel().getLineIndentColumn(n.lineNumber),c=e<=r;if(c){let e=Object(a["u"])(s);-1===e&&(e=s.length-1),t=e>0;const n=this.editor.getModel().getOptions().tabSize,o=l["a"].visibleColumnFromColumn(s,e+1,n);i=o<n}}this.contextKeys.inlineCompletionSuggestsIndentation.set(t),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(i)}};Ke=Pe([je(1,ae["a"]),je(2,Ae["b"])],Ke);const Fe=n["c"].bindToContribution(We.get),Be=new Fe({id:d,precondition:We.inlineSuggestionVisible,handler(e){e.commit(),e.editor.focus()}});Object(n["k"])(Be),Te["a"].registerKeybindingRule({primary:2,weight:200,id:Be.id,when:Ae["a"].and(Be.precondition,c["a"].tabMovesFocus.toNegated(),We.inlineSuggestionHasIndentationLessThanTabSize)}),Object(n["k"])(new Fe({id:"editor.action.inlineSuggest.hide",precondition:We.inlineSuggestionVisible,kbOpts:{weight:100,primary:9},handler(e){e.hide()}}));class ze extends n["b"]{constructor(){super({id:ze.ID,label:Re["a"]("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:Ae["a"].and(c["a"].writable,We.inlineSuggestionVisible),kbOpts:{weight:100,primary:601}})}run(e,t){return Ue(this,void 0,void 0,(function*(){const e=We.get(t);e&&(e.showNextInlineCompletion(),t.focus())}))}}ze.ID="editor.action.inlineSuggest.showNext";class He extends n["b"]{constructor(){super({id:He.ID,label:Re["a"]("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:Ae["a"].and(c["a"].writable,We.inlineSuggestionVisible),kbOpts:{weight:100,primary:599}})}run(e,t){return Ue(this,void 0,void 0,(function*(){const e=We.get(t);e&&(e.showPreviousInlineCompletion(),t.focus())}))}}He.ID="editor.action.inlineSuggest.showPrevious";class $e extends n["b"]{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:Re["a"]("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:c["a"].writable})}run(e,t){return Ue(this,void 0,void 0,(function*(){const e=We.get(t);e&&e.trigger()}))}}var qe=i("78bc"),Ze=i("85c1"),Ge=i("4779"),Je=i("7e32"),Xe=i("5bd7"),Ye=function(e,t,i,n){var o,s=arguments.length,r=s<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--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},Qe=function(e,t){return function(i,n){t(i,n,e)}};class et{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}hasMultipleSuggestions(){return this.controller.hasMultipleInlineCompletions()}}let tt=class{constructor(e,t,i,n,o,s,r){this._editor=e,this._commandService=t,this._menuService=i,this._contextKeyService=n,this._languageService=o,this._openerService=s,this.accessibilityService=r,this.hoverOrdinal=3}suggestHoverAnchor(e){const t=We.get(this._editor);if(!t)return null;const i=e.target;if(8===i.type){const e=i.detail;if(t.shouldShowHoverAtViewZone(e.viewZoneId))return new o["a"](1e3,this,b["a"].fromPositions(e.positionBefore||e.position,e.positionBefore||e.position))}if(7===i.type&&t.shouldShowHoverAt(i.range))return new o["a"](1e3,this,i.range);if(6===i.type){const e=i.detail.mightBeForeignElement;if(e&&t.shouldShowHoverAt(i.range))return new o["a"](1e3,this,i.range)}return null}computeSync(e,t){const i=We.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new et(this,e.range,i)]:[]}renderHoverParts(e,t){const i=new r["b"],n=t[0];this.accessibilityService.isScreenReaderOptimized()&&this.renderScreenReaderText(e,n,i);const o=i.add(this._menuService.createMenu(Je["b"].InlineCompletionsActions,this._contextKeyService)),s=e.statusBar.addAction({label:Re["a"]("showNextInlineSuggestion","Next"),commandId:ze.ID,run:()=>this._commandService.executeCommand(ze.ID)}),a=e.statusBar.addAction({label:Re["a"]("showPreviousInlineSuggestion","Previous"),commandId:He.ID,run:()=>this._commandService.executeCommand(He.ID)});e.statusBar.addAction({label:Re["a"]("acceptInlineSuggestion","Accept"),commandId:Be.id,run:()=>this._commandService.executeCommand(Be.id)});const l=[s,a];for(const r of l)r.setEnabled(!1);n.hasMultipleSuggestions().then(e=>{for(const t of l)t.setEnabled(e)});for(const[r,c]of o.getActions())for(const t of c)t instanceof Je["c"]&&e.statusBar.addAction({label:t.label,commandId:t.item.id,run:()=>this._commandService.executeCommand(t.item.id)});return i}renderScreenReaderText(e,t,i){var n,o;const s=me["a"],r=s("div.hover-row.markdown-hover"),a=me["q"](r,s("div.hover-contents")),l=i.add(new Ze["a"]({editor:this._editor},this._languageService,this._openerService)),c=t=>{i.add(l.onDidRenderAsync(()=>{a.className="hover-contents code-hover-contents",e.onContentsChanged()}));const n=Re["a"]("inlineSuggestionFollows","Suggestion:"),o=i.add(l.render((new qe["a"]).appendText(n).appendCodeblock("text",t)));a.replaceChildren(o.element)},d=null===(o=null===(n=t.controller.activeModel)||void 0===n?void 0:n.inlineCompletionsModel)||void 0===o?void 0:o.ghostText;if(d){const e=this._editor.getModel().getLineContent(d.lineNumber);c(d.renderForScreenReader(e))}e.fragment.appendChild(r)}};tt=Ye([Qe(1,I["b"]),Qe(2,Je["a"]),Qe(3,Ae["b"]),Qe(4,Le["a"]),Qe(5,Xe["a"]),Qe(6,Ge["b"])],tt),Object(n["l"])(We.ID,We),Object(n["j"])($e),Object(n["j"])(ze),Object(n["j"])(He),o["b"].register(tt)},"6c46":function(e,t,i){"use strict";i.r(t),i.d(t,"DuplicateSelectionAction",(function(){return D})),i.d(t,"AbstractSortLinesAction",(function(){return R})),i.d(t,"SortLinesAscendingAction",(function(){return A})),i.d(t,"SortLinesDescendingAction",(function(){return T})),i.d(t,"DeleteDuplicateLinesAction",(function(){return P})),i.d(t,"TrimTrailingWhitespaceAction",(function(){return j})),i.d(t,"DeleteLinesAction",(function(){return U})),i.d(t,"IndentLinesAction",(function(){return W})),i.d(t,"InsertLineBeforeAction",(function(){return K})),i.d(t,"InsertLineAfterAction",(function(){return F})),i.d(t,"AbstractDeleteAllToBoundaryAction",(function(){return B})),i.d(t,"DeleteAllLeftAction",(function(){return z})),i.d(t,"DeleteAllRightAction",(function(){return H})),i.d(t,"JoinLinesAction",(function(){return $})),i.d(t,"TransposeAction",(function(){return q})),i.d(t,"AbstractCaseAction",(function(){return Z})),i.d(t,"UpperCaseAction",(function(){return G})),i.d(t,"LowerCaseAction",(function(){return J})),i.d(t,"TitleCaseAction",(function(){return Y})),i.d(t,"SnakeCaseAction",(function(){return Q}));var n=i("fe45"),o=i("0494"),s=i("b2cc"),r=i("2c29"),a=i("7faa"),l=i("1c72"),c=i("d3f4"),d=i("7061"),u=i("6a89"),h=i("8025"),g=i("c101");class p{constructor(e,t,i){this._selection=e,this._isCopyingDown=t,this._noop=i||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(e,t){let i=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,i.startLineNumber<i.endLineNumber&&1===i.endColumn&&(this._endLineNumberDelta=1,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));let n=[];for(let s=i.startLineNumber;s<=i.endLineNumber;s++)n.push(e.getLineContent(s));const o=n.join("\n");""===o&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?t.addEditOperation(new u["a"](i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber+1,1),i.endLineNumber===e.getLineCount()?"":"\n"):this._isCopyingDown?t.addEditOperation(new u["a"](i.startLineNumber,1,i.startLineNumber,1),o+"\n"):t.addEditOperation(new u["a"](i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),"\n"+o),this._selectionId=t.trackSelection(i),this._selectionDirection=this._selection.getDirection()}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);if(0!==this._startLineNumberDelta||0!==this._endLineNumberDelta){let e=i.startLineNumber,t=i.startColumn,n=i.endLineNumber,o=i.endColumn;0!==this._startLineNumberDelta&&(e+=this._startLineNumberDelta,t=1),0!==this._endLineNumberDelta&&(n+=this._endLineNumberDelta,o=1),i=h["a"].createWithDirection(e,t,n,o,this._selectionDirection)}return i}}var m=i("3742"),f=i("ccde"),v=i("3d70"),b=i("0184"),C=i("bd8e");class L{constructor(e,t,i){this._selection=e,this._isMovingDown=t,this._autoIndent=i,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){let i=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===i)return void(this._selectionId=t.trackSelection(this._selection));if(!this._isMovingDown&&1===this._selection.startLineNumber)return void(this._selectionId=t.trackSelection(this._selection));this._moveEndPositionDown=!1;let n=this._selection;n.startLineNumber<n.endLineNumber&&1===n.endColumn&&(this._moveEndPositionDown=!0,n=n.setEndPosition(n.endLineNumber-1,e.getLineMaxColumn(n.endLineNumber-1)));const{tabSize:o,indentSize:s,insertSpaces:r}=e.getOptions();let a=this.buildIndentConverter(o,s,r),l={getLineTokens:t=>e.getLineTokens(t),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(t,i)=>e.getLanguageIdAtPosition(t,i),getLineContent:null};if(n.startLineNumber===n.endLineNumber&&1===e.getLineMaxColumn(n.startLineNumber)){let i=n.startLineNumber,o=this._isMovingDown?i+1:i-1;1===e.getLineMaxColumn(o)?t.addEditOperation(new u["a"](1,1,1,1),null):(t.addEditOperation(new u["a"](i,1,i,1),e.getLineContent(o)),t.addEditOperation(new u["a"](o,1,o,e.getLineMaxColumn(o)),null)),n=new h["a"](o,1,o,1)}else{let i,s;if(this._isMovingDown){i=n.endLineNumber+1,s=e.getLineContent(i),t.addEditOperation(new u["a"](i-1,e.getLineMaxColumn(i-1),i,e.getLineMaxColumn(i)),null);let c=s;if(this.shouldAutoIndent(e,n)){let d=this.matchEnterRule(e,a,o,i,n.startLineNumber-1);if(null!==d){let t=m["x"](e.getLineContent(i)),n=d+C["b"](t,o),a=C["a"](n,o,r);c=a+this.trimLeft(s)}else{l.getLineContent=t=>t===n.startLineNumber?e.getLineContent(i):e.getLineContent(t);let t=b["b"].getGoodIndentForLine(this._autoIndent,l,e.getLanguageIdAtPosition(i,1),n.startLineNumber,a);if(null!==t){let n=m["x"](e.getLineContent(i)),a=C["b"](t,o),l=C["b"](n,o);if(a!==l){let e=C["a"](a,o,r);c=e+this.trimLeft(s)}}}t.addEditOperation(new u["a"](n.startLineNumber,1,n.startLineNumber,1),c+"\n");let h=this.matchEnterRuleMovingDown(e,a,o,n.startLineNumber,i,c);if(null!==h)0!==h&&this.getIndentEditsOfMovingBlock(e,t,n,o,r,h);else{l.getLineContent=t=>t===n.startLineNumber?c:t>=n.startLineNumber+1&&t<=n.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t);let s=b["b"].getGoodIndentForLine(this._autoIndent,l,e.getLanguageIdAtPosition(i,1),n.startLineNumber+1,a);if(null!==s){const i=m["x"](e.getLineContent(n.startLineNumber)),a=C["b"](s,o),l=C["b"](i,o);if(a!==l){const i=a-l;this.getIndentEditsOfMovingBlock(e,t,n,o,r,i)}}}}else t.addEditOperation(new u["a"](n.startLineNumber,1,n.startLineNumber,1),c+"\n")}else if(i=n.startLineNumber-1,s=e.getLineContent(i),t.addEditOperation(new u["a"](i,1,i+1,1),null),t.addEditOperation(new u["a"](n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),"\n"+s),this.shouldAutoIndent(e,n)){l.getLineContent=t=>t===i?e.getLineContent(n.startLineNumber):e.getLineContent(t);let s=this.matchEnterRule(e,a,o,n.startLineNumber,n.startLineNumber-2);if(null!==s)0!==s&&this.getIndentEditsOfMovingBlock(e,t,n,o,r,s);else{let s=b["b"].getGoodIndentForLine(this._autoIndent,l,e.getLanguageIdAtPosition(n.startLineNumber,1),i,a);if(null!==s){let i=m["x"](e.getLineContent(n.startLineNumber)),a=C["b"](s,o),l=C["b"](i,o);if(a!==l){let i=a-l;this.getIndentEditsOfMovingBlock(e,t,n,o,r,i)}}}}}this._selectionId=t.trackSelection(n)}buildIndentConverter(e,t,i){return{shiftIndent:n=>f["a"].shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>f["a"].unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,o){if(o){let s=o.indentation;o.indentAction===v["b"].None||o.indentAction===v["b"].Indent?s=o.indentation+o.appendText:o.indentAction===v["b"].IndentOutdent?s=o.indentation:o.indentAction===v["b"].Outdent&&(s=t.unshiftIndent(o.indentation)+o.appendText);let r=e.getLineContent(n);if(this.trimLeft(r).indexOf(this.trimLeft(s))>=0){let o=m["x"](e.getLineContent(n)),r=m["x"](s),a=b["b"].getIndentMetadata(e,n);null!==a&&2&a&&(r=t.unshiftIndent(r));let l=C["b"](r,i),c=C["b"](o,i);return l-c}}return null}matchEnterRuleMovingDown(e,t,i,n,o,s){if(m["I"](s)>=0){let s=e.getLineMaxColumn(o),r=b["b"].getEnterAction(this._autoIndent,e,new u["a"](o,s,o,s));return this.parseEnterResult(e,t,i,n,r)}{let o=n-1;while(o>=1){let t=e.getLineContent(o),i=m["I"](t);if(i>=0)break;o--}if(o<1||n>e.getLineCount())return null;let s=e.getLineMaxColumn(o),r=b["b"].getEnterAction(this._autoIndent,e,new u["a"](o,s,o,s));return this.parseEnterResult(e,t,i,n,r)}}matchEnterRule(e,t,i,n,o,s){let r=o;while(r>=1){let t;t=r===o&&void 0!==s?s:e.getLineContent(r);let i=m["I"](t);if(i>=0)break;r--}if(r<1||n>e.getLineCount())return null;let a=e.getLineMaxColumn(r),l=b["b"].getEnterAction(this._autoIndent,e,new u["a"](r,a,r,a));return this.parseEnterResult(e,t,i,n,l)}trimLeft(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4)return!1;if(!e.isCheapToTokenize(t.startLineNumber))return!1;let i=e.getLanguageIdAtPosition(t.startLineNumber,1),n=e.getLanguageIdAtPosition(t.endLineNumber,1);return i===n&&null!==b["b"].getIndentRulesSupport(i)}getIndentEditsOfMovingBlock(e,t,i,n,o,s){for(let r=i.startLineNumber;r<=i.endLineNumber;r++){let a=e.getLineContent(r),l=m["x"](a),c=C["b"](l,n),d=c+s,h=C["a"](d,n,o);h!==l&&(t.addEditOperation(new u["a"](r,1,r,l.length+1),h),r===i.endLineNumber&&i.endColumn<=l.length+1&&""===h&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber<i.endLineNumber&&(i=i.setEndPosition(i.endLineNumber,2)),i}}class w{constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}static getCollator(){return w._COLLATOR||(w._COLLATOR=new Intl.Collator),w._COLLATOR}getEditOperations(e,t){let i=S(e,this.selection,this.descending);i&&t.addEditOperation(i.range,i.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,i){if(null===e)return!1;let n=x(e,t,i);if(!n)return!1;for(let o=0,s=n.before.length;o<s;o++)if(n.before[o]!==n.after[o])return!0;return!1}}function x(e,t,i){let n=t.startLineNumber,o=t.endLineNumber;if(1===t.endColumn&&o--,n>=o)return null;let s=[];for(let a=n;a<=o;a++)s.push(e.getLineContent(a));let r=s.slice(0);return r.sort(w.getCollator().compare),!0===i&&(r=r.reverse()),{startLineNumber:n,endLineNumber:o,before:s,after:r}}function S(e,t,i){let n=x(e,t,i);return n?c["a"].replace(new u["a"](n.startLineNumber,1,n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),n.after.join("\n")):null}w._COLLATOR=null;var I=i("dff7"),_=i("7e32");class N extends s["b"]{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map((e,t)=>({selection:e,index:t,ignore:!1}));i.sort((e,t)=>u["a"].compareRangesUsingStarts(e.selection,t.selection));let n=i[0];for(let s=1;s<i.length;s++){const e=i[s];n.selection.endLineNumber===e.selection.startLineNumber&&(n.index<e.index?e.ignore=!0:(n.ignore=!0,n=e))}const o=[];for(const s of i)o.push(new p(s.selection,this.down,s.ignore));t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}class y extends N{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:I["a"]("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:g["a"].writable,kbOpts:{kbExpr:g["a"].editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:_["b"].MenubarSelectionMenu,group:"2_line",title:I["a"]({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}}class O extends N{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:I["a"]("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:g["a"].writable,kbOpts:{kbExpr:g["a"].editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:_["b"].MenubarSelectionMenu,group:"2_line",title:I["a"]({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}}class D extends s["b"]{constructor(){super({id:"editor.action.duplicateSelection",label:I["a"]("duplicateSelection","Duplicate Selection"),alias:"Duplicate Selection",precondition:g["a"].writable,menuOpts:{menuId:_["b"].MenubarSelectionMenu,group:"2_line",title:I["a"]({key:"miDuplicateSelection",comment:["&& denotes a mnemonic"]},"&&Duplicate Selection"),order:5}})}run(e,t,i){if(!t.hasModel())return;const n=[],o=t.getSelections(),s=t.getModel();for(const a of o)if(a.isEmpty())n.push(new p(a,!0));else{const e=new h["a"](a.endLineNumber,a.endColumn,a.endLineNumber,a.endColumn);n.push(new r["c"](e,s.getValueInRange(a)))}t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class M extends s["b"]{constructor(e,t){super(t),this.down=e}run(e,t){let i=[],n=t.getSelections()||[];const o=t.getOption(9);for(const s of n)i.push(new L(s,this.down,o));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class k extends M{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:I["a"]("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:g["a"].writable,kbOpts:{kbExpr:g["a"].editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:_["b"].MenubarSelectionMenu,group:"2_line",title:I["a"]({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}}class E extends M{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:I["a"]("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:g["a"].writable,kbOpts:{kbExpr:g["a"].editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:_["b"].MenubarSelectionMenu,group:"2_line",title:I["a"]({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}}class R extends s["b"]{constructor(e,t){super(t),this.descending=e}run(e,t){const i=t.getSelections()||[];for(const o of i)if(!w.canRun(t.getModel(),o,this.descending))return;let n=[];for(let o=0,s=i.length;o<s;o++)n[o]=new w(i[o],this.descending);t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class A extends R{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:I["a"]("lines.sortAscending","Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:g["a"].writable})}}class T extends R{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:I["a"]("lines.sortDescending","Sort Lines Descending"),alias:"Sort Lines Descending",precondition:g["a"].writable})}}class P extends s["b"]{constructor(){super({id:"editor.action.removeDuplicateLines",label:I["a"]("lines.deleteDuplicates","Delete Duplicate Lines"),alias:"Delete Duplicate Lines",precondition:g["a"].writable})}run(e,t){if(!t.hasModel())return;let i=t.getModel();if(1===i.getLineCount()&&1===i.getLineMaxColumn(1))return;let n=[],o=[],s=0;for(let r of t.getSelections()){let e=new Set,t=[];for(let n=r.startLineNumber;n<=r.endLineNumber;n++){let o=i.getLineContent(n);e.has(o)||(t.push(o),e.add(o))}let a=new h["a"](r.startLineNumber,1,r.endLineNumber,i.getLineMaxColumn(r.endLineNumber)),l=r.startLineNumber-s,d=new h["a"](l,1,l+t.length-1,t[t.length-1].length);n.push(c["a"].replace(a,t.join("\n"))),o.push(d),s+=r.endLineNumber-r.startLineNumber+1-t.length}t.pushUndoStop(),t.executeEdits(this.id,n,o),t.pushUndoStop()}}class j extends s["b"]{constructor(){super({id:j.ID,label:I["a"]("lines.trimTrailingWhitespace","Trim Trailing Whitespace"),alias:"Trim Trailing Whitespace",precondition:g["a"].writable,kbOpts:{kbExpr:g["a"].editorTextFocus,primary:Object(n["c"])(2089,2102),weight:100}})}run(e,t,i){let n=[];"auto-save"===i.reason&&(n=(t.getSelections()||[]).map(e=>new d["a"](e.positionLineNumber,e.positionColumn)));let o=t.getSelection();if(null===o)return;let s=new a["a"](o,n);t.pushUndoStop(),t.executeCommands(this.id,[s]),t.pushUndoStop()}}j.ID="editor.action.trimTrailingWhitespace";class U extends s["b"]{constructor(){super({id:"editor.action.deleteLines",label:I["a"]("lines.delete","Delete Line"),alias:"Delete Line",precondition:g["a"].writable,kbOpts:{kbExpr:g["a"].textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;let i=this._getLinesToRemove(t),n=t.getModel();if(1===n.getLineCount()&&1===n.getLineMaxColumn(1))return;let o=0,s=[],r=[];for(let a=0,l=i.length;a<l;a++){const e=i[a];let t=e.startLineNumber,l=e.endLineNumber,d=1,u=n.getLineMaxColumn(l);l<n.getLineCount()?(l+=1,u=1):t>1&&(t-=1,d=n.getLineMaxColumn(t)),s.push(c["a"].replace(new h["a"](t,d,l,u),"")),r.push(new h["a"](t-o,e.positionColumn,t-o,e.positionColumn)),o+=e.endLineNumber-e.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,s,r),t.pushUndoStop()}_getLinesToRemove(e){let t=e.getSelections().map(e=>{let t=e.endLineNumber;return e.startLineNumber<e.endLineNumber&&1===e.endColumn&&(t-=1),{startLineNumber:e.startLineNumber,selectionStartColumn:e.selectionStartColumn,endLineNumber:t,positionColumn:e.positionColumn}});t.sort((e,t)=>e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber);let i=[],n=t[0];for(let o=1;o<t.length;o++)n.endLineNumber+1>=t[o].startLineNumber?n.endLineNumber=t[o].endLineNumber:(i.push(n),n=t[o]);return i.push(n),i}}class W extends s["b"]{constructor(){super({id:"editor.action.indentLines",label:I["a"]("lines.indent","Indent Line"),alias:"Indent Line",precondition:g["a"].writable,kbOpts:{kbExpr:g["a"].editorTextFocus,primary:2137,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,l["a"].indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class V extends s["b"]{constructor(){super({id:"editor.action.outdentLines",label:I["a"]("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:g["a"].writable,kbOpts:{kbExpr:g["a"].editorTextFocus,primary:2135,weight:100}})}run(e,t){o["CoreEditingCommands"].Outdent.runEditorCommand(e,t,null)}}class K extends s["b"]{constructor(){super({id:"editor.action.insertLineBefore",label:I["a"]("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:g["a"].writable,kbOpts:{kbExpr:g["a"].editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,l["a"].lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class F extends s["b"]{constructor(){super({id:"editor.action.insertLineAfter",label:I["a"]("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:g["a"].writable,kbOpts:{kbExpr:g["a"].editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,l["a"].lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class B extends s["b"]{run(e,t){if(!t.hasModel())return;const i=t.getSelection();let n=this._getRangesToDelete(t),o=[];for(let a=0,l=n.length-1;a<l;a++){let e=n[a],t=n[a+1];null===u["a"].intersectRanges(e,t)?o.push(e):n[a+1]=u["a"].plusRange(e,t)}o.push(n[n.length-1]);let s=this._getEndCursorState(i,o),r=o.map(e=>c["a"].replace(e,""));t.pushUndoStop(),t.executeEdits(this.id,r,s),t.pushUndoStop()}}class z extends B{constructor(){super({id:"deleteAllLeft",label:I["a"]("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:g["a"].writable,kbOpts:{kbExpr:g["a"].textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null,n=[],o=0;return t.forEach(t=>{let s;if(1===t.endColumn&&o>0){let e=t.startLineNumber-o;s=new h["a"](e,t.startColumn,e,t.startColumn)}else s=new h["a"](t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);o+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?i=s:n.push(s)}),i&&n.unshift(i),n}_getRangesToDelete(e){let t=e.getSelections();if(null===t)return[];let i=t,n=e.getModel();return null===n?[]:(i.sort(u["a"].compareRangesUsingStarts),i=i.map(e=>{if(e.isEmpty()){if(1===e.startColumn){let t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineContent(t).length+1;return new u["a"](t,i,e.startLineNumber,1)}return new u["a"](e.startLineNumber,1,e.startLineNumber,e.startColumn)}return new u["a"](e.startLineNumber,1,e.endLineNumber,e.endColumn)}),i)}}class H extends B{constructor(){super({id:"deleteAllRight",label:I["a"]("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:g["a"].writable,kbOpts:{kbExpr:g["a"].textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null,n=[];for(let o=0,s=t.length,r=0;o<s;o++){let s=t[o],a=new h["a"](s.startLineNumber-r,s.startColumn,s.startLineNumber-r,s.startColumn);s.intersectRanges(e)?i=a:n.push(a)}return i&&n.unshift(i),n}_getRangesToDelete(e){let t=e.getModel();if(null===t)return[];let i=e.getSelections();if(null===i)return[];let n=i.map(e=>{if(e.isEmpty()){const i=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===i?new u["a"](e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new u["a"](e.startLineNumber,e.startColumn,e.startLineNumber,i)}return e});return n.sort(u["a"].compareRangesUsingStarts),n}}class $ extends s["b"]{constructor(){super({id:"editor.action.joinLines",label:I["a"]("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:g["a"].writable,kbOpts:{kbExpr:g["a"].editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){let i=t.getSelections();if(null===i)return;let n=t.getSelection();if(null===n)return;i.sort(u["a"].compareRangesUsingStarts);let o=[],s=i.reduce((e,t)=>e.isEmpty()?e.endLineNumber===t.startLineNumber?(n.equalsSelection(e)&&(n=t),t):t.startLineNumber>e.endLineNumber+1?(o.push(e),t):new h["a"](e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(o.push(e),t):new h["a"](e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn));o.push(s);let r=t.getModel();if(null===r)return;let a=[],l=[],d=n,g=0;for(let p=0,m=o.length;p<m;p++){let e,t,i=o[p],s=i.startLineNumber,m=1,f=0,v=r.getLineContent(i.endLineNumber).length-i.endColumn;if(i.isEmpty()||i.startLineNumber===i.endLineNumber){let n=i.getStartPosition();n.lineNumber<r.getLineCount()?(e=s+1,t=r.getLineMaxColumn(e)):(e=n.lineNumber,t=r.getLineMaxColumn(n.lineNumber))}else e=i.endLineNumber,t=r.getLineMaxColumn(e);let b=r.getLineContent(s);for(let n=s+1;n<=e;n++){let e=r.getLineContent(n),t=r.getLineFirstNonWhitespaceColumn(n);if(t>=1){let i=!0;""===b&&(i=!1),!i||" "!==b.charAt(b.length-1)&&"\t"!==b.charAt(b.length-1)||(i=!1,b=b.replace(/[\s\uFEFF\xA0]+$/g," "));let n=e.substr(t-1);b+=(i?" ":"")+n,f=i?n.length+1:n.length}else f=0}let C=new u["a"](s,m,e,t);if(!C.isEmpty()){let e;i.isEmpty()?(a.push(c["a"].replace(C,b)),e=new h["a"](C.startLineNumber-g,b.length-f+1,s-g,b.length-f+1)):i.startLineNumber===i.endLineNumber?(a.push(c["a"].replace(C,b)),e=new h["a"](i.startLineNumber-g,i.startColumn,i.endLineNumber-g,i.endColumn)):(a.push(c["a"].replace(C,b)),e=new h["a"](i.startLineNumber-g,i.startColumn,i.startLineNumber-g,b.length-v)),null!==u["a"].intersectRanges(C,n)?d=e:l.push(e)}g+=C.endLineNumber-C.startLineNumber}l.unshift(d),t.pushUndoStop(),t.executeEdits(this.id,a,l),t.pushUndoStop()}}class q extends s["b"]{constructor(){super({id:"editor.action.transpose",label:I["a"]("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:g["a"].writable})}run(e,t){let i=t.getSelections();if(null===i)return;let n=t.getModel();if(null===n)return;let o=[];for(let s=0,a=i.length;s<a;s++){let e=i[s];if(!e.isEmpty())continue;let t=e.getStartPosition(),a=n.getLineMaxColumn(t.lineNumber);if(t.column>=a){if(t.lineNumber===n.getLineCount())continue;let e=new u["a"](t.lineNumber,Math.max(1,t.column-1),t.lineNumber+1,1),i=n.getValueInRange(e).split("").reverse().join("");o.push(new r["a"](new h["a"](t.lineNumber,Math.max(1,t.column-1),t.lineNumber+1,1),i))}else{let e=new u["a"](t.lineNumber,Math.max(1,t.column-1),t.lineNumber,t.column+1),i=n.getValueInRange(e).split("").reverse().join("");o.push(new r["b"](e,i,new h["a"](t.lineNumber,t.column+1,t.lineNumber,t.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}class Z extends s["b"]{run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const o=t.getOption(117),s=[];for(const r of i)if(r.isEmpty()){const e=r.getStartPosition(),i=t.getConfiguredWordAtPosition(e);if(!i)continue;const a=new u["a"](e.lineNumber,i.startColumn,e.lineNumber,i.endColumn),l=n.getValueInRange(a);s.push(c["a"].replace(a,this._modifyText(l,o)))}else{const e=n.getValueInRange(r);s.push(c["a"].replace(r,this._modifyText(e,o)))}t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop()}}class G extends Z{constructor(){super({id:"editor.action.transformToUppercase",label:I["a"]("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:g["a"].writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}class J extends Z{constructor(){super({id:"editor.action.transformToLowercase",label:I["a"]("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:g["a"].writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}class X{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(e){}}return this._actual}isSupported(){return null!==this.get()}}class Y extends Z{constructor(){super({id:"editor.action.transformToTitlecase",label:I["a"]("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:g["a"].writable})}_modifyText(e,t){const i=Y.titleBoundary.get();return i?e.toLocaleLowerCase().replace(i,e=>e.toLocaleUpperCase()):e}}Y.titleBoundary=new X("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class Q extends Z{constructor(){super({id:"editor.action.transformToSnakecase",label:I["a"]("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:g["a"].writable})}_modifyText(e,t){const i=Q.caseBoundary.get(),n=Q.singleLetters.get();return i&&n?e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase():e}}Q.caseBoundary=new X("(\\p{Ll})(\\p{Lu})","gmu"),Q.singleLetters=new X("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu"),Object(s["j"])(y),Object(s["j"])(O),Object(s["j"])(D),Object(s["j"])(k),Object(s["j"])(E),Object(s["j"])(A),Object(s["j"])(T),Object(s["j"])(P),Object(s["j"])(j),Object(s["j"])(U),Object(s["j"])(W),Object(s["j"])(V),Object(s["j"])(K),Object(s["j"])(F),Object(s["j"])(z),Object(s["j"])(H),Object(s["j"])($),Object(s["j"])(q),Object(s["j"])(G),Object(s["j"])(J),Q.caseBoundary.isSupported()&&Q.singleLetters.isSupported()&&Object(s["j"])(Q),Y.titleBoundary.isSupported()&&Object(s["j"])(Y)},"8d10":function(e,t,i){"use strict";i.r(t),i.d(t,"CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE",(function(){return D})),i.d(t,"LinkedEditingContribution",(function(){return k})),i.d(t,"LinkedEditingAction",(function(){return E})),i.d(t,"editorLinkedEditingBackground",(function(){return T}));var n=i("e8e3"),o=i("5fe7"),s=i("2504"),r=i("ceb8"),a=i("fdcc"),l=i("308f"),c=i("a666"),d=i("3742"),u=i("6d8e"),h=i("b2cc"),g=i("5717"),p=i("7061"),m=i("6a89"),f=i("c101"),v=i("b57f"),b=i("0184"),C=i("dff7"),L=i("4fc3"),w=i("303e"),x=i("b7d0"),S=i("7340"),I=i("e971"),_=i("e58e"),N=function(e,t,i,n){var o,s=arguments.length,r=s<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--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},y=function(e,t){return function(i,n){t(i,n,e)}},O=function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};const D=new L["c"]("LinkedEditingInputVisible",!1),M="linked-editing-decoration";let k=class e extends c["a"]{constructor(e,t,i,n,o){super(),this.languageConfigurationService=n,this._localToDispose=this._register(new c["b"]),this._editor=e,this._providers=i.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=D.bindTo(t),this._debounceInformation=o.for(this._providers,"Linked Editing",{min:200}),this._currentDecorations=[],this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new c["b"]),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(e=>{(e.hasChanged(62)||e.hasChanged(82))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}static get(t){return t.getContribution(e.ID)}reinitialize(e){const t=this._editor.getModel(),i=null!==t&&(this._editor.getOption(62)||this._editor.getOption(82))&&this._providers.has(t);if(i===this._enabled&&!e)return;if(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||null===t)return;this._localToDispose.add(l["c"].runAndSubscribe(t.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()}));const n=new o["c"](this._debounceInformation.get(t)),s=()=>{var e;this._rangeUpdateTriggerPromise=n.trigger(()=>this.updateRanges(),null!==(e=this._debounceDuration)&&void 0!==e?e:this._debounceInformation.get(t))},r=new o["c"](0),a=e=>{this._rangeSyncTriggerPromise=r.trigger(()=>this._syncRanges(e))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{s()})),this._localToDispose.add(this._editor.onDidChangeModelContent(e=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const i=t.getDecorationRange(this._currentDecorations[0]);if(i&&e.changes.every(e=>i.intersectRanges(e.range)))return void a(this._currentDecorations)}s()})),this._localToDispose.add({dispose:()=>{n.dispose(),r.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._currentDecorations||0===e.length)return;const t=this._editor.getModel(),i=t.getDecorationRange(e[0]);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const n=t.getValueInRange(i);if(this._currentWordPattern){const e=n.match(this._currentWordPattern),t=e?e[0].length:0;if(t!==n.length)return this.clearRanges()}let o=[];for(let s=1,r=e.length;s<r;s++){const i=t.getDecorationRange(e[s]);if(i)if(i.startLineNumber!==i.endLineNumber)o.push({range:i,text:n});else{let e=t.getValueInRange(i),s=n,r=i.startColumn,a=i.endColumn;const l=d["f"](e,s);r+=l,e=e.substr(l),s=s.substr(l);const c=d["g"](e,s);a-=c,e=e.substr(0,e.length-c),s=s.substr(0,s.length-c),r===a&&0===s.length||o.push({range:new m["a"](i.startLineNumber,r,i.endLineNumber,a),text:s})}}if(0!==o.length)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;const e=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",o),this._editor._getViewModel().setPrevEditOperationType(e)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,[]),this._currentRequest&&(this._currentRequest.cancel(),this._currentRequest=null,this._currentRequestPosition=null)}updateRanges(t=!1){return O(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return void this.clearRanges();const i=this._editor.getPosition();if(!this._enabled&&!t||this._editor.getSelections().length>1)return void this.clearRanges();const n=this._editor.getModel(),s=n.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===s){if(i.equals(this._currentRequestPosition))return;if(this._currentDecorations&&this._currentDecorations.length>0){const e=n.getDecorationRange(this._currentDecorations[0]);if(e&&e.containsPosition(i))return}}this._currentRequestPosition=i,this._currentRequestModelVersion=s;const r=Object(o["l"])(t=>O(this,void 0,void 0,(function*(){try{const o=new _["a"](!1),a=yield A(this._providers,n,i,t);if(this._debounceInformation.update(n,o.elapsed()),r!==this._currentRequest)return;if(this._currentRequest=null,s!==n.getVersionId())return;let l=[];(null===a||void 0===a?void 0:a.ranges)&&(l=a.ranges),this._currentWordPattern=(null===a||void 0===a?void 0:a.wordPattern)||this._languageWordPattern;let c=!1;for(let e=0,t=l.length;e<t;e++)if(m["a"].containsPosition(l[e],i)){if(c=!0,0!==e){const t=l[e];l.splice(e,1),l.unshift(t)}break}if(!c)return void this.clearRanges();const d=l.map(t=>({range:t,options:e.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,d)}catch(o){Object(a["f"])(o)||Object(a["g"])(o),this._currentRequest!==r&&this._currentRequest||this.clearRanges()}})));return this._currentRequest=r,r}))}};k.ID="editor.contrib.linkedEditing",k.DECORATION=v["b"].register({description:"linked-editing",stickiness:0,className:M}),k=N([y(1,L["b"]),y(2,S["a"]),y(3,b["a"]),y(4,I["a"])],k);class E extends h["b"]{constructor(){super({id:"editor.action.linkedEditing",label:C["a"]("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:L["a"].and(f["a"].writable,f["a"].hasRenameProvider),kbOpts:{kbExpr:f["a"].editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const i=e.get(g["a"]),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return u["a"].isUri(n)&&p["a"].isIPosition(o)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(e=>{e&&(e.setPosition(o),e.invokeWithinContext(t=>(this.reportTelemetry(t,e),this.run(t,e))))},a["g"]):super.runCommand(e,t)}run(e,t){const i=k.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}const R=h["c"].bindToContribution(k.get);function A(e,t,i,s){const r=e.ordered(t);return Object(o["n"])(r.map(e=>()=>O(this,void 0,void 0,(function*(){try{return yield e.provideLinkedEditingRanges(t,i,s)}catch(n){return void Object(a["h"])(n)}}))),e=>!!e&&n["r"](null===e||void 0===e?void 0:e.ranges))}Object(h["k"])(new R({id:"cancelLinkedEditingInput",precondition:D,handler:e=>e.clearRanges(),kbOpts:{kbExpr:f["a"].editorTextFocus,weight:199,primary:9,secondary:[1033]}}));const T=Object(w["Jc"])("editor.linkedEditingBackground",{dark:r["a"].fromHex("#f00").transparent(.3),light:r["a"].fromHex("#f00").transparent(.3),hc:r["a"].fromHex("#f00").transparent(.3)},C["a"]("editorLinkedEditingBackground","Background color when the editor auto renames on type."));Object(x["f"])((e,t)=>{const i=e.getColor(T);i&&t.addRule(`.monaco-editor .${M} { background: ${i}; border-left-color: ${i}; }`)}),Object(h["n"])("_executeLinkedEditingProvider",(e,t,i)=>{const{linkedEditingRangeProvider:n}=e.get(S["a"]);return A(n,t,i,s["a"].None)}),Object(h["l"])(k.ID,k),Object(h["j"])(E)},b6f2:function(e,t,i){},c0d1:function(e,t,i){"use strict";i.r(t),i.d(t,"LinkDetector",(function(){return T}));var n=i("5fe7"),o=i("2504"),s=i("fdcc"),r=i("78bc"),a=i("a666"),l=i("b589"),c=i("30db"),d=i("82c9"),u=i("e58e"),h=i("6d8e"),g=(i("b6f2"),i("b2cc")),p=i("b57f"),m=i("e971"),f=i("7340"),v=i("3799"),b=i("e8e3"),C=i("ef8e"),L=i("6a89"),w=i("944a"),x=i("9e74"),S=function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};class I{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}resolve(e){return S(this,void 0,void 0,(function*(){return this._link.url?this._link.url:"function"===typeof this._provider.resolveLink?Promise.resolve(this._provider.resolveLink(this._link,e)).then(t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))}))}}class _{constructor(e){this._disposables=new a["b"];let t=[];for(const[i,n]of e){const e=i.links.map(e=>new I(e,n));t=_._union(t,e),Object(a["h"])(i)&&this._disposables.add(i)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){let i,n,o,s,r=[];for(i=0,o=0,n=e.length,s=t.length;i<n&&o<s;){const n=e[i],s=t[o];if(L["a"].areIntersectingOrTouching(n.range,s.range)){i++;continue}const a=L["a"].compareRangesUsingStarts(n.range,s.range);a<0?(r.push(n),i++):(r.push(s),o++)}for(;i<n;i++)r.push(e[i]);for(;o<s;o++)r.push(t[o]);return r}}function N(e,t,i){const n=[],o=e.ordered(t).reverse().map((e,o)=>Promise.resolve(e.provideLinks(t,i)).then(t=>{t&&(n[o]=[t,e])},s["h"]));return Promise.all(o).then(()=>{const e=new _(Object(b["e"])(n));return i.isCancellationRequested?(e.dispose(),new _([])):e})}x["a"].registerCommand("_executeLinkProvider",(e,...t)=>S(void 0,void 0,void 0,(function*(){let[i,n]=t;Object(C["c"])(i instanceof h["a"]),"number"!==typeof n&&(n=0);const{linkProvider:s}=e.get(f["a"]),r=e.get(w["a"]).getModel(i);if(!r)return[];const a=yield N(s,r,o["a"].None);if(!a)return[];for(let e=0;e<Math.min(n,a.links.length);e++)yield a.links[e].resolve(o["a"].None);const l=a.links.slice(0);return a.dispose(),l})));var y=i("dff7"),O=i("b0cd"),D=i("5bd7"),M=i("303e"),k=i("b7d0"),E=function(e,t,i,n){var o,s=arguments.length,r=s<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--)(o=e[a])&&(r=(s<3?o(r):s>3?o(t,i,r):o(t,i))||r);return s>3&&r&&Object.defineProperty(t,i,r),r},R=function(e,t){return function(i,n){t(i,n,e)}},A=function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function r(e){try{l(n.next(e))}catch(t){s(t)}}function a(e){try{l(n["throw"](e))}catch(t){s(t)}}function l(e){e.done?i(e.value):o(e.value).then(r,a)}l((n=n.apply(e,t||[])).next())}))};let T=class e extends a["a"]{constructor(e,t,i,o,s){super(),this.editor=e,this.openerService=t,this.notificationService=i,this.languageFeaturesService=o,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=s.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new n["h"](()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const r=this._register(new v["a"](e));this._register(r.onMouseMoveOrRelevantKeyDown(([e,t])=>{this._onEditorMouseMove(e,t)})),this._register(r.onExecute(e=>{this.onEditorMouseUp(e)})),this._register(r.onCancel(e=>{this.cleanUpActiveLinkDecoration()})),this._register(e.onDidChangeConfiguration(e=>{e.hasChanged(63)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(e.onDidChangeModelContent(e=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(e.onDidChangeModel(e=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(e.onDidChangeModelLanguage(e=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(e=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}static get(t){return t.getContribution(e.ID)}computeLinksNow(){return A(this,void 0,void 0,(function*(){if(!this.editor.hasModel()||!this.editor.getOption(63))return;const e=this.editor.getModel();if(this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=Object(n["l"])(t=>N(this.providers,e,t));try{const t=new u["a"](!1);if(this.activeLinksList=yield this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(t){Object(s["g"])(t)}finally{this.computePromise=null}}}))}updateDecorations(e){const t="altKey"===this.editor.getOption(70),i=[],n=Object.keys(this.currentOccurrences);for(const r of n){const e=this.currentOccurrences[r];i.push(e.decorationId)}const o=[];if(e)for(const r of e)o.push(j.decoration(r,t));const s=this.editor.deltaDecorations(i,o);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let r=0,a=s.length;r<a;r++){const t=new j(e[r],s[r]);this.currentOccurrences[t.decorationId]=t}}_onEditorMouseMove(e,t){const i="altKey"===this.editor.getOption(70);if(this.isEnabled(e,t)){this.cleanUpActiveLinkDecoration();const t=this.getLinkOccurrence(e.target.position);t&&this.editor.changeDecorations(e=>{t.activate(e,i),this.activeLinkDecorationId=t.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e="altKey"===this.editor.getOption(70);if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations(i=>{t.deactivate(i,e)}),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,i=!1){if(!this.openerService)return;const{link:n}=e;n.resolve(o["a"].None).then(e=>{if("string"===typeof e&&this.editor.hasModel()){const t=this.editor.getModel().uri;if(t.scheme===l["c"].file&&e.startsWith(l["c"].file+":")){const i=h["a"].parse(e);if(i.scheme===l["c"].file){const n=d["j"](i);let o=null;n.startsWith("/./")?o="."+n.substr(1):n.startsWith("//./")&&(o="."+n.substr(2)),o&&(e=d["h"](t,o))}}}return this.openerService.open(e,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0})},e=>{const t=e instanceof Error?e.message:e;"invalid"===t?this.notificationService.warn(y["a"]("invalid.url","Failed to open this link because it is not well-formed: {0}",n.url.toString())):"missing"===t?this.notificationService.warn(y["a"]("missing.url","Failed to open this link because its target is missing.")):Object(s["g"])(e)})}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const i of t){const e=this.currentOccurrences[i.id];if(e)return e}return null}isEnabled(e,t){return Boolean(6===e.target.type&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){var e;this.computeLinks.cancel(),this.activeLinksList&&(null===(e=this.activeLinksList)||void 0===e||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};T.ID="editor.linkDetector",T=E([R(1,D["a"]),R(2,O["a"]),R(3,f["a"]),R(4,m["a"])],T);const P={general:p["b"].register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:p["b"].register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class j{constructor(e,t){this.link=e,this.decorationId=t}static decoration(e,t){return{range:e.range,options:j._getOptions(e,t,!1)}}static _getOptions(e,t,i){const n=Object.assign({},i?P.active:P.general);return n.hoverMessage=U(e,t),n}activate(e,t){e.changeDecorationOptions(this.decorationId,j._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,j._getOptions(this.link,t,!1))}}function U(e,t){const i=e.url&&/^command:/i.test(e.url.toString()),n=e.tooltip?e.tooltip:i?y["a"]("links.navigate.executeCmd","Execute command"):y["a"]("links.navigate.follow","Follow link"),o=t?c["i"]?y["a"]("links.navigate.kb.meta.mac","cmd + click"):y["a"]("links.navigate.kb.meta","ctrl + click"):c["i"]?y["a"]("links.navigate.kb.alt.mac","option + click"):y["a"]("links.navigate.kb.alt","alt + click");if(e.url){let t="";if(/^command:/i.test(e.url.toString())){const i=e.url.toString().match(/^command:([^?#]+)/);if(i){const e=i[1],n=y["a"]("tooltip.explanation","Execute command {0}",e);t=` "${n}"`}}const i=new r["a"]("",!0).appendMarkdown(`[${n}](${e.url.toString(!0).replace(/ /g,"%20")}${t}) (${o})`);return i}return(new r["a"]).appendText(`${n} (${o})`)}class W extends g["b"]{constructor(){super({id:"editor.action.openLink",label:y["a"]("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){const i=T.get(t);if(!i)return;if(!t.hasModel())return;const n=t.getSelections();for(const o of n){const e=i.getLinkOccurrence(o.getEndPosition());e&&i.openLinkOccurrence(e,!1)}}}Object(g["l"])(T.ID,T),Object(g["j"])(W),Object(k["f"])((e,t)=>{const i=e.getColor(M["x"]);i&&t.addRule(`.monaco-editor .detected-link-active { color: ${i} !important; }`)})},c49c:function(e,t,i){"use strict";i.r(t),i.d(t,"ExpandLineSelectionAction",(function(){return a}));var n=i("b2cc"),o=i("b157"),s=i("c101"),r=i("dff7");class a extends n["b"]{constructor(){super({id:"expandLineSelection",label:r["a"]("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:s["a"].textInputFocus,primary:2090}})}run(e,t,i){if(i=i||{},!t.hasModel())return;const n=t._getViewModel();n.model.pushStackElement(),n.setCursorStates(i.source,3,o["b"].expandLineSelection(n,n.getCursorStates())),n.revealPrimaryCursor(i.source,!0)}}Object(n["j"])(a)}}]);
Coded by KALI :v Greetz to DR HARD ../ kali.zbi@hotmail.com