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,EAAO+oB,mBAAoBC,EAAiBC,EAA4BjpB,EAAOupB,cAC7I,CACA,WAAAh1B,CAAYi1B,EAAmBC,EAAuBC,EAAkBC,EAA6BC,GACjGl1B,KAAK80B,kBAAoBA,EACzB90B,KAAK+0B,sBAAwBA,EAC7B/0B,KAAKg1B,iBAAmBA,EACxBh1B,KAAKi1B,4BAA8BA,EACnCj1B,KAAKk1B,gBAAkBA,CAC3B,CACA,OAAAC,CAAQ7pB,GACJ,IAAItL,KAAK+0B,wBAA0BzpB,EAAO+oB,oBAAsBr0B,KAAK80B,oBAAsBxpB,EAAO6oB,iBAI9Fn0B,KAAKg1B,iBAAkB,CACvB,MAAML,EAA2BrpB,EAAOspB,kBAAkB50B,KAAKg1B,iBAAiBzb,WAAYvZ,KAAKg1B,iBAAiBpb,QAClHtO,EAAO8pB,aAAaT,EAA2B30B,KAAKi1B,4BACxD,CACJ,CACA,uCAAAI,CAAwC/pB,GACpC,GAAItL,KAAK+0B,wBAA0BzpB,EAAO+oB,oBAAsBr0B,KAAK80B,oBAAsBxpB,EAAO6oB,eAE9F,OAEJ,MAAMmB,EAAwBhqB,EAAOupB,cACrC,IAAK70B,KAAKk1B,kBAAoBI,EAC1B,OAEJ,MAAMC,EAASjqB,EAAOkqB,oBAAoBF,EAAsB/b,YAAcjO,EAAOkqB,oBAAoBx1B,KAAKk1B,gBAAgB3b,YAC9HjO,EAAO8pB,aAAa9pB,EAAO6oB,eAAiBoB,EAAQ,EACxD,E","sources":["file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/browser/editorBrowser.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/browser/editorDom.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/browser/observableUtilities.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/browser/services/abstractCodeEditorService.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/browser/services/bulkEditService.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/browser/services/codeEditorService.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/browser/services/editorWorkerService.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/browser/services/hoverService/hoverWidget.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/browser/services/hoverService/updatableHoverWidget.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/browser/services/hoverService/hoverService.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/browser/services/markerDecorations.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/browser/services/openerService.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/browser/services/webWorker.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/editor/browser/stableEditorScroll.js"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as editorCommon from '../common/editorCommon.js';\n/**\n *@internal\n */\nexport function isCodeEditor(thing) {\n if (thing && typeof thing.getEditorType === 'function') {\n return thing.getEditorType() === editorCommon.EditorType.ICodeEditor;\n }\n else {\n return false;\n }\n}\n/**\n *@internal\n */\nexport function isDiffEditor(thing) {\n if (thing && typeof thing.getEditorType === 'function') {\n return thing.getEditorType() === editorCommon.EditorType.IDiffEditor;\n }\n else {\n return false;\n }\n}\n/**\n *@internal\n */\nexport function isCompositeEditor(thing) {\n return !!thing\n && typeof thing === 'object'\n && typeof thing.onDidChangeActiveEditor === 'function';\n}\n/**\n *@internal\n */\nexport function getCodeEditor(thing) {\n if (isCodeEditor(thing)) {\n return thing;\n }\n if (isDiffEditor(thing)) {\n return thing.getModifiedEditor();\n }\n if (isCompositeEditor(thing) && isCodeEditor(thing.activeCodeEditor)) {\n return thing.activeCodeEditor;\n }\n return null;\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as dom from '../../base/browser/dom.js';\nimport { GlobalPointerMoveMonitor } from '../../base/browser/globalPointerMoveMonitor.js';\nimport { StandardMouseEvent } from '../../base/browser/mouseEvent.js';\nimport { RunOnceScheduler } from '../../base/common/async.js';\nimport { Disposable, DisposableStore } from '../../base/common/lifecycle.js';\nimport { asCssVariable } from '../../platform/theme/common/colorRegistry.js';\n/**\n * Coordinates relative to the whole document (e.g. mouse event's pageX and pageY)\n */\nexport class PageCoordinates {\n constructor(x, y) {\n this.x = x;\n this.y = y;\n this._pageCoordinatesBrand = undefined;\n }\n toClientCoordinates(targetWindow) {\n return new ClientCoordinates(this.x - targetWindow.scrollX, this.y - targetWindow.scrollY);\n }\n}\n/**\n * Coordinates within the application's client area (i.e. origin is document's scroll position).\n *\n * For example, clicking in the top-left corner of the client area will\n * always result in a mouse event with a client.x value of 0, regardless\n * of whether the page is scrolled horizontally.\n */\nexport class ClientCoordinates {\n constructor(clientX, clientY) {\n this.clientX = clientX;\n this.clientY = clientY;\n this._clientCoordinatesBrand = undefined;\n }\n toPageCoordinates(targetWindow) {\n return new PageCoordinates(this.clientX + targetWindow.scrollX, this.clientY + targetWindow.scrollY);\n }\n}\n/**\n * The position of the editor in the page.\n */\nexport class EditorPagePosition {\n constructor(x, y, width, height) {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this._editorPagePositionBrand = undefined;\n }\n}\n/**\n * Coordinates relative to the the (top;left) of the editor that can be used safely with other internal editor metrics.\n * **NOTE**: This position is obtained by taking page coordinates and transforming them relative to the\n * editor's (top;left) position in a way in which scale transformations are taken into account.\n * **NOTE**: These coordinates could be negative if the mouse position is outside the editor.\n */\nexport class CoordinatesRelativeToEditor {\n constructor(x, y) {\n this.x = x;\n this.y = y;\n this._positionRelativeToEditorBrand = undefined;\n }\n}\nexport function createEditorPagePosition(editorViewDomNode) {\n const editorPos = dom.getDomNodePagePosition(editorViewDomNode);\n return new EditorPagePosition(editorPos.left, editorPos.top, editorPos.width, editorPos.height);\n}\nexport function createCoordinatesRelativeToEditor(editorViewDomNode, editorPagePosition, pos) {\n // The editor's page position is read from the DOM using getBoundingClientRect().\n //\n // getBoundingClientRect() returns the actual dimensions, while offsetWidth and offsetHeight\n // reflect the unscaled size. We can use this difference to detect a transform:scale()\n // and we will apply the transformation in inverse to get mouse coordinates that make sense inside the editor.\n //\n // This could be expanded to cover rotation as well maybe by walking the DOM up from `editorViewDomNode`\n // and computing the effective transformation matrix using getComputedStyle(element).transform.\n //\n const scaleX = editorPagePosition.width / editorViewDomNode.offsetWidth;\n const scaleY = editorPagePosition.height / editorViewDomNode.offsetHeight;\n // Adjust mouse offsets if editor appears to be scaled via transforms\n const relativeX = (pos.x - editorPagePosition.x) / scaleX;\n const relativeY = (pos.y - editorPagePosition.y) / scaleY;\n return new CoordinatesRelativeToEditor(relativeX, relativeY);\n}\nexport class EditorMouseEvent extends StandardMouseEvent {\n constructor(e, isFromPointerCapture, editorViewDomNode) {\n super(dom.getWindow(editorViewDomNode), e);\n this._editorMouseEventBrand = undefined;\n this.isFromPointerCapture = isFromPointerCapture;\n this.pos = new PageCoordinates(this.posx, this.posy);\n this.editorPos = createEditorPagePosition(editorViewDomNode);\n this.relativePos = createCoordinatesRelativeToEditor(editorViewDomNode, this.editorPos, this.pos);\n }\n}\nexport class EditorMouseEventFactory {\n constructor(editorViewDomNode) {\n this._editorViewDomNode = editorViewDomNode;\n }\n _create(e) {\n return new EditorMouseEvent(e, false, this._editorViewDomNode);\n }\n onContextMenu(target, callback) {\n return dom.addDisposableListener(target, 'contextmenu', (e) => {\n callback(this._create(e));\n });\n }\n onMouseUp(target, callback) {\n return dom.addDisposableListener(target, 'mouseup', (e) => {\n callback(this._create(e));\n });\n }\n onMouseDown(target, callback) {\n return dom.addDisposableListener(target, dom.EventType.MOUSE_DOWN, (e) => {\n callback(this._create(e));\n });\n }\n onPointerDown(target, callback) {\n return dom.addDisposableListener(target, dom.EventType.POINTER_DOWN, (e) => {\n callback(this._create(e), e.pointerId);\n });\n }\n onMouseLeave(target, callback) {\n return dom.addDisposableListener(target, dom.EventType.MOUSE_LEAVE, (e) => {\n callback(this._create(e));\n });\n }\n onMouseMove(target, callback) {\n return dom.addDisposableListener(target, 'mousemove', (e) => callback(this._create(e)));\n }\n}\nexport class EditorPointerEventFactory {\n constructor(editorViewDomNode) {\n this._editorViewDomNode = editorViewDomNode;\n }\n _create(e) {\n return new EditorMouseEvent(e, false, this._editorViewDomNode);\n }\n onPointerUp(target, callback) {\n return dom.addDisposableListener(target, 'pointerup', (e) => {\n callback(this._create(e));\n });\n }\n onPointerDown(target, callback) {\n return dom.addDisposableListener(target, dom.EventType.POINTER_DOWN, (e) => {\n callback(this._create(e), e.pointerId);\n });\n }\n onPointerLeave(target, callback) {\n return dom.addDisposableListener(target, dom.EventType.POINTER_LEAVE, (e) => {\n callback(this._create(e));\n });\n }\n onPointerMove(target, callback) {\n return dom.addDisposableListener(target, 'pointermove', (e) => callback(this._create(e)));\n }\n}\nexport class GlobalEditorPointerMoveMonitor extends Disposable {\n constructor(editorViewDomNode) {\n super();\n this._editorViewDomNode = editorViewDomNode;\n this._globalPointerMoveMonitor = this._register(new GlobalPointerMoveMonitor());\n this._keydownListener = null;\n }\n startMonitoring(initialElement, pointerId, initialButtons, pointerMoveCallback, onStopCallback) {\n // Add a <> keydown event listener that will cancel the monitoring\n // if something other than a modifier key is pressed\n this._keydownListener = dom.addStandardDisposableListener(initialElement.ownerDocument, 'keydown', (e) => {\n const chord = e.toKeyCodeChord();\n if (chord.isModifierKey()) {\n // Allow modifier keys\n return;\n }\n this._globalPointerMoveMonitor.stopMonitoring(true, e.browserEvent);\n }, true);\n this._globalPointerMoveMonitor.startMonitoring(initialElement, pointerId, initialButtons, (e) => {\n pointerMoveCallback(new EditorMouseEvent(e, true, this._editorViewDomNode));\n }, (e) => {\n this._keydownListener.dispose();\n onStopCallback(e);\n });\n }\n stopMonitoring() {\n this._globalPointerMoveMonitor.stopMonitoring(true);\n }\n}\n/**\n * A helper to create dynamic css rules, bound to a class name.\n * Rules are reused.\n * Reference counting and delayed garbage collection ensure that no rules leak.\n*/\nexport class DynamicCssRules {\n constructor(_editor) {\n this._editor = _editor;\n this._instanceId = ++DynamicCssRules._idPool;\n this._counter = 0;\n this._rules = new Map();\n // We delay garbage collection so that hanging rules can be reused.\n this._garbageCollectionScheduler = new RunOnceScheduler(() => this.garbageCollect(), 1000);\n }\n createClassNameRef(options) {\n const rule = this.getOrCreateRule(options);\n rule.increaseRefCount();\n return {\n className: rule.className,\n dispose: () => {\n rule.decreaseRefCount();\n this._garbageCollectionScheduler.schedule();\n }\n };\n }\n getOrCreateRule(properties) {\n const key = this.computeUniqueKey(properties);\n let existingRule = this._rules.get(key);\n if (!existingRule) {\n const counter = this._counter++;\n existingRule = new RefCountedCssRule(key, `dyn-rule-${this._instanceId}-${counter}`, dom.isInShadowDOM(this._editor.getContainerDomNode())\n ? this._editor.getContainerDomNode()\n : undefined, properties);\n this._rules.set(key, existingRule);\n }\n return existingRule;\n }\n computeUniqueKey(properties) {\n return JSON.stringify(properties);\n }\n garbageCollect() {\n for (const rule of this._rules.values()) {\n if (!rule.hasReferences()) {\n this._rules.delete(rule.key);\n rule.dispose();\n }\n }\n }\n}\nDynamicCssRules._idPool = 0;\nclass RefCountedCssRule {\n constructor(key, className, _containerElement, properties) {\n this.key = key;\n this.className = className;\n this.properties = properties;\n this._referenceCount = 0;\n this._styleElementDisposables = new DisposableStore();\n this._styleElement = dom.createStyleSheet(_containerElement, undefined, this._styleElementDisposables);\n this._styleElement.textContent = this.getCssText(this.className, this.properties);\n }\n getCssText(className, properties) {\n let str = `.${className} {`;\n for (const prop in properties) {\n const value = properties[prop];\n let cssValue;\n if (typeof value === 'object') {\n cssValue = asCssVariable(value.id);\n }\n else {\n cssValue = value;\n }\n const cssPropName = camelToDashes(prop);\n str += `\\n\\t${cssPropName}: ${cssValue};`;\n }\n str += `\\n}`;\n return str;\n }\n dispose() {\n this._styleElementDisposables.dispose();\n this._styleElement = undefined;\n }\n increaseRefCount() {\n this._referenceCount++;\n }\n decreaseRefCount() {\n this._referenceCount--;\n }\n hasReferences() {\n return this._referenceCount > 0;\n }\n}\nfunction camelToDashes(str) {\n return str.replace(/(^[A-Z])/, ([first]) => first.toLowerCase())\n .replace(/([A-Z])/g, ([letter]) => `-${letter.toLowerCase()}`);\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as nls from '../../nls.js';\nimport { URI } from '../../base/common/uri.js';\nimport { ICodeEditorService } from './services/codeEditorService.js';\nimport { Position } from '../common/core/position.js';\nimport { IModelService } from '../common/services/model.js';\nimport { ITextModelService } from '../common/services/resolverService.js';\nimport { MenuId, MenuRegistry, Action2 } from '../../platform/actions/common/actions.js';\nimport { CommandsRegistry } from '../../platform/commands/common/commands.js';\nimport { ContextKeyExpr, IContextKeyService } from '../../platform/contextkey/common/contextkey.js';\nimport { IInstantiationService } from '../../platform/instantiation/common/instantiation.js';\nimport { KeybindingsRegistry } from '../../platform/keybinding/common/keybindingsRegistry.js';\nimport { Registry } from '../../platform/registry/common/platform.js';\nimport { ITelemetryService } from '../../platform/telemetry/common/telemetry.js';\nimport { assertType } from '../../base/common/types.js';\nimport { ILogService } from '../../platform/log/common/log.js';\nimport { getActiveElement } from '../../base/browser/dom.js';\nexport class Command {\n constructor(opts) {\n this.id = opts.id;\n this.precondition = opts.precondition;\n this._kbOpts = opts.kbOpts;\n this._menuOpts = opts.menuOpts;\n this.metadata = opts.metadata;\n }\n register() {\n if (Array.isArray(this._menuOpts)) {\n this._menuOpts.forEach(this._registerMenuItem, this);\n }\n else if (this._menuOpts) {\n this._registerMenuItem(this._menuOpts);\n }\n if (this._kbOpts) {\n const kbOptsArr = Array.isArray(this._kbOpts) ? this._kbOpts : [this._kbOpts];\n for (const kbOpts of kbOptsArr) {\n let kbWhen = kbOpts.kbExpr;\n if (this.precondition) {\n if (kbWhen) {\n kbWhen = ContextKeyExpr.and(kbWhen, this.precondition);\n }\n else {\n kbWhen = this.precondition;\n }\n }\n const desc = {\n id: this.id,\n weight: kbOpts.weight,\n args: kbOpts.args,\n when: kbWhen,\n primary: kbOpts.primary,\n secondary: kbOpts.secondary,\n win: kbOpts.win,\n linux: kbOpts.linux,\n mac: kbOpts.mac,\n };\n KeybindingsRegistry.registerKeybindingRule(desc);\n }\n }\n CommandsRegistry.registerCommand({\n id: this.id,\n handler: (accessor, args) => this.runCommand(accessor, args),\n metadata: this.metadata\n });\n }\n _registerMenuItem(item) {\n MenuRegistry.appendMenuItem(item.menuId, {\n group: item.group,\n command: {\n id: this.id,\n title: item.title,\n icon: item.icon,\n precondition: this.precondition\n },\n when: item.when,\n order: item.order\n });\n }\n}\nexport class MultiCommand extends Command {\n constructor() {\n super(...arguments);\n this._implementations = [];\n }\n /**\n * A higher priority gets to be looked at first\n */\n addImplementation(priority, name, implementation, when) {\n this._implementations.push({ priority, name, implementation, when });\n this._implementations.sort((a, b) => b.priority - a.priority);\n return {\n dispose: () => {\n for (let i = 0; i < this._implementations.length; i++) {\n if (this._implementations[i].implementation === implementation) {\n this._implementations.splice(i, 1);\n return;\n }\n }\n }\n };\n }\n runCommand(accessor, args) {\n const logService = accessor.get(ILogService);\n const contextKeyService = accessor.get(IContextKeyService);\n logService.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);\n for (const impl of this._implementations) {\n if (impl.when) {\n const context = contextKeyService.getContext(getActiveElement());\n const value = impl.when.evaluate(context);\n if (!value) {\n continue;\n }\n }\n const result = impl.implementation(accessor, args);\n if (result) {\n logService.trace(`Command '${this.id}' was handled by '${impl.name}'.`);\n if (typeof result === 'boolean') {\n return;\n }\n return result;\n }\n }\n logService.trace(`The Command '${this.id}' was not handled by any implementation.`);\n }\n}\n//#endregion\n/**\n * A command that delegates to another command's implementation.\n *\n * This lets different commands be registered but share the same implementation\n */\nexport class ProxyCommand extends Command {\n constructor(command, opts) {\n super(opts);\n this.command = command;\n }\n runCommand(accessor, args) {\n return this.command.runCommand(accessor, args);\n }\n}\nexport class EditorCommand extends Command {\n /**\n * Create a command class that is bound to a certain editor contribution.\n */\n static bindToContribution(controllerGetter) {\n return class EditorControllerCommandImpl extends EditorCommand {\n constructor(opts) {\n super(opts);\n this._callback = opts.handler;\n }\n runEditorCommand(accessor, editor, args) {\n const controller = controllerGetter(editor);\n if (controller) {\n this._callback(controller, args);\n }\n }\n };\n }\n static runEditorCommand(accessor, args, precondition, runner) {\n const codeEditorService = accessor.get(ICodeEditorService);\n // Find the editor with text focus or active\n const editor = codeEditorService.getFocusedCodeEditor() || codeEditorService.getActiveCodeEditor();\n if (!editor) {\n // well, at least we tried...\n return;\n }\n return editor.invokeWithinContext((editorAccessor) => {\n const kbService = editorAccessor.get(IContextKeyService);\n if (!kbService.contextMatchesRules(precondition !== null && precondition !== void 0 ? precondition : undefined)) {\n // precondition does not hold\n return;\n }\n return runner(editorAccessor, editor, args);\n });\n }\n runCommand(accessor, args) {\n return EditorCommand.runEditorCommand(accessor, args, this.precondition, (accessor, editor, args) => this.runEditorCommand(accessor, editor, args));\n }\n}\nexport class EditorAction extends EditorCommand {\n static convertOptions(opts) {\n let menuOpts;\n if (Array.isArray(opts.menuOpts)) {\n menuOpts = opts.menuOpts;\n }\n else if (opts.menuOpts) {\n menuOpts = [opts.menuOpts];\n }\n else {\n menuOpts = [];\n }\n function withDefaults(item) {\n if (!item.menuId) {\n item.menuId = MenuId.EditorContext;\n }\n if (!item.title) {\n item.title = opts.label;\n }\n item.when = ContextKeyExpr.and(opts.precondition, item.when);\n return item;\n }\n if (Array.isArray(opts.contextMenuOpts)) {\n menuOpts.push(...opts.contextMenuOpts.map(withDefaults));\n }\n else if (opts.contextMenuOpts) {\n menuOpts.push(withDefaults(opts.contextMenuOpts));\n }\n opts.menuOpts = menuOpts;\n return opts;\n }\n constructor(opts) {\n super(EditorAction.convertOptions(opts));\n this.label = opts.label;\n this.alias = opts.alias;\n }\n runEditorCommand(accessor, editor, args) {\n this.reportTelemetry(accessor, editor);\n return this.run(accessor, editor, args || {});\n }\n reportTelemetry(accessor, editor) {\n accessor.get(ITelemetryService).publicLog2('editorActionInvoked', { name: this.label, id: this.id });\n }\n}\nexport class MultiEditorAction extends EditorAction {\n constructor() {\n super(...arguments);\n this._implementations = [];\n }\n /**\n * A higher priority gets to be looked at first\n */\n addImplementation(priority, implementation) {\n this._implementations.push([priority, implementation]);\n this._implementations.sort((a, b) => b[0] - a[0]);\n return {\n dispose: () => {\n for (let i = 0; i < this._implementations.length; i++) {\n if (this._implementations[i][1] === implementation) {\n this._implementations.splice(i, 1);\n return;\n }\n }\n }\n };\n }\n run(accessor, editor, args) {\n for (const impl of this._implementations) {\n const result = impl[1](accessor, editor, args);\n if (result) {\n if (typeof result === 'boolean') {\n return;\n }\n return result;\n }\n }\n }\n}\n//#endregion EditorAction\n//#region EditorAction2\nexport class EditorAction2 extends Action2 {\n run(accessor, ...args) {\n // Find the editor with text focus or active\n const codeEditorService = accessor.get(ICodeEditorService);\n const editor = codeEditorService.getFocusedCodeEditor() || codeEditorService.getActiveCodeEditor();\n if (!editor) {\n // well, at least we tried...\n return;\n }\n // precondition does hold\n return editor.invokeWithinContext((editorAccessor) => {\n var _a, _b;\n const kbService = editorAccessor.get(IContextKeyService);\n const logService = editorAccessor.get(ILogService);\n const enabled = kbService.contextMatchesRules((_a = this.desc.precondition) !== null && _a !== void 0 ? _a : undefined);\n if (!enabled) {\n logService.debug(`[EditorAction2] NOT running command because its precondition is FALSE`, this.desc.id, (_b = this.desc.precondition) === null || _b === void 0 ? void 0 : _b.serialize());\n return;\n }\n return this.runEditorCommand(editorAccessor, editor, ...args);\n });\n }\n}\n//#endregion\n// --- Registration of commands and actions\nexport function registerModelAndPositionCommand(id, handler) {\n CommandsRegistry.registerCommand(id, function (accessor, ...args) {\n const instaService = accessor.get(IInstantiationService);\n const [resource, position] = args;\n assertType(URI.isUri(resource));\n assertType(Position.isIPosition(position));\n const model = accessor.get(IModelService).getModel(resource);\n if (model) {\n const editorPosition = Position.lift(position);\n return instaService.invokeFunction(handler, model, editorPosition, ...args.slice(2));\n }\n return accessor.get(ITextModelService).createModelReference(resource).then(reference => {\n return new Promise((resolve, reject) => {\n try {\n const result = instaService.invokeFunction(handler, reference.object.textEditorModel, Position.lift(position), args.slice(2));\n resolve(result);\n }\n catch (err) {\n reject(err);\n }\n }).finally(() => {\n reference.dispose();\n });\n });\n });\n}\nexport function registerEditorCommand(editorCommand) {\n EditorContributionRegistry.INSTANCE.registerEditorCommand(editorCommand);\n return editorCommand;\n}\nexport function registerEditorAction(ctor) {\n const action = new ctor();\n EditorContributionRegistry.INSTANCE.registerEditorAction(action);\n return action;\n}\nexport function registerMultiEditorAction(action) {\n EditorContributionRegistry.INSTANCE.registerEditorAction(action);\n return action;\n}\nexport function registerInstantiatedEditorAction(editorAction) {\n EditorContributionRegistry.INSTANCE.registerEditorAction(editorAction);\n}\n/**\n * Registers an editor contribution. Editor contributions have a lifecycle which is bound\n * to a specific code editor instance.\n */\nexport function registerEditorContribution(id, ctor, instantiation) {\n EditorContributionRegistry.INSTANCE.registerEditorContribution(id, ctor, instantiation);\n}\nexport var EditorExtensionsRegistry;\n(function (EditorExtensionsRegistry) {\n function getEditorCommand(commandId) {\n return EditorContributionRegistry.INSTANCE.getEditorCommand(commandId);\n }\n EditorExtensionsRegistry.getEditorCommand = getEditorCommand;\n function getEditorActions() {\n return EditorContributionRegistry.INSTANCE.getEditorActions();\n }\n EditorExtensionsRegistry.getEditorActions = getEditorActions;\n function getEditorContributions() {\n return EditorContributionRegistry.INSTANCE.getEditorContributions();\n }\n EditorExtensionsRegistry.getEditorContributions = getEditorContributions;\n function getSomeEditorContributions(ids) {\n return EditorContributionRegistry.INSTANCE.getEditorContributions().filter(c => ids.indexOf(c.id) >= 0);\n }\n EditorExtensionsRegistry.getSomeEditorContributions = getSomeEditorContributions;\n function getDiffEditorContributions() {\n return EditorContributionRegistry.INSTANCE.getDiffEditorContributions();\n }\n EditorExtensionsRegistry.getDiffEditorContributions = getDiffEditorContributions;\n})(EditorExtensionsRegistry || (EditorExtensionsRegistry = {}));\n// Editor extension points\nconst Extensions = {\n EditorCommonContributions: 'editor.contributions'\n};\nclass EditorContributionRegistry {\n constructor() {\n this.editorContributions = [];\n this.diffEditorContributions = [];\n this.editorActions = [];\n this.editorCommands = Object.create(null);\n }\n registerEditorContribution(id, ctor, instantiation) {\n this.editorContributions.push({ id, ctor: ctor, instantiation });\n }\n getEditorContributions() {\n return this.editorContributions.slice(0);\n }\n getDiffEditorContributions() {\n return this.diffEditorContributions.slice(0);\n }\n registerEditorAction(action) {\n action.register();\n this.editorActions.push(action);\n }\n getEditorActions() {\n return this.editorActions;\n }\n registerEditorCommand(editorCommand) {\n editorCommand.register();\n this.editorCommands[editorCommand.id] = editorCommand;\n }\n getEditorCommand(commandId) {\n return (this.editorCommands[commandId] || null);\n }\n}\nEditorContributionRegistry.INSTANCE = new EditorContributionRegistry();\nRegistry.add(Extensions.EditorCommonContributions, EditorContributionRegistry.INSTANCE);\nfunction registerCommand(command) {\n command.register();\n return command;\n}\nexport const UndoCommand = registerCommand(new MultiCommand({\n id: 'undo',\n precondition: undefined,\n kbOpts: {\n weight: 0 /* KeybindingWeight.EditorCore */,\n primary: 2048 /* KeyMod.CtrlCmd */ | 56 /* KeyCode.KeyZ */\n },\n menuOpts: [{\n menuId: MenuId.MenubarEditMenu,\n group: '1_do',\n title: nls.localize({ key: 'miUndo', comment: ['&& denotes a mnemonic'] }, \"&&Undo\"),\n order: 1\n }, {\n menuId: MenuId.CommandPalette,\n group: '',\n title: nls.localize('undo', \"Undo\"),\n order: 1\n }]\n}));\nregisterCommand(new ProxyCommand(UndoCommand, { id: 'default:undo', precondition: undefined }));\nexport const RedoCommand = registerCommand(new MultiCommand({\n id: 'redo',\n precondition: undefined,\n kbOpts: {\n weight: 0 /* KeybindingWeight.EditorCore */,\n primary: 2048 /* KeyMod.CtrlCmd */ | 55 /* KeyCode.KeyY */,\n secondary: [2048 /* KeyMod.CtrlCmd */ | 1024 /* KeyMod.Shift */ | 56 /* KeyCode.KeyZ */],\n mac: { primary: 2048 /* KeyMod.CtrlCmd */ | 1024 /* KeyMod.Shift */ | 56 /* KeyCode.KeyZ */ }\n },\n menuOpts: [{\n menuId: MenuId.MenubarEditMenu,\n group: '1_do',\n title: nls.localize({ key: 'miRedo', comment: ['&& denotes a mnemonic'] }, \"&&Redo\"),\n order: 2\n }, {\n menuId: MenuId.CommandPalette,\n group: '',\n title: nls.localize('redo', \"Redo\"),\n order: 1\n }]\n}));\nregisterCommand(new ProxyCommand(RedoCommand, { id: 'default:redo', precondition: undefined }));\nexport const SelectAllCommand = registerCommand(new MultiCommand({\n id: 'editor.action.selectAll',\n precondition: undefined,\n kbOpts: {\n weight: 0 /* KeybindingWeight.EditorCore */,\n kbExpr: null,\n primary: 2048 /* KeyMod.CtrlCmd */ | 31 /* KeyCode.KeyA */\n },\n menuOpts: [{\n menuId: MenuId.MenubarSelectionMenu,\n group: '1_basic',\n title: nls.localize({ key: 'miSelectAll', comment: ['&& denotes a mnemonic'] }, \"&&Select All\"),\n order: 1\n }, {\n menuId: MenuId.CommandPalette,\n group: '',\n title: nls.localize('selectAll', \"Select All\"),\n order: 1\n }]\n}));\n","import { observableFromEvent } from '../../base/common/observable.js';\n/**\n * Returns a facade for the code editor that provides observables for various states/events.\n*/\nexport function obsCodeEditor(editor) {\n return ObservableCodeEditor.get(editor);\n}\nclass ObservableCodeEditor {\n /**\n * Make sure that editor is not disposed yet!\n */\n static get(editor) {\n let result = ObservableCodeEditor._map.get(editor);\n if (!result) {\n result = new ObservableCodeEditor(editor);\n ObservableCodeEditor._map.set(editor, result);\n const d = editor.onDidDispose(() => {\n ObservableCodeEditor._map.delete(editor);\n d.dispose();\n });\n }\n return result;\n }\n constructor(editor) {\n this.editor = editor;\n this.model = observableFromEvent(this.editor.onDidChangeModel, () => this.editor.getModel());\n }\n}\nObservableCodeEditor._map = new Map();\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { Emitter } from '../../../base/common/event.js';\nimport { Disposable, toDisposable } from '../../../base/common/lifecycle.js';\nimport { LinkedList } from '../../../base/common/linkedList.js';\nimport { IThemeService } from '../../../platform/theme/common/themeService.js';\nlet AbstractCodeEditorService = class AbstractCodeEditorService extends Disposable {\n constructor(_themeService) {\n super();\n this._themeService = _themeService;\n this._onWillCreateCodeEditor = this._register(new Emitter());\n this._onCodeEditorAdd = this._register(new Emitter());\n this.onCodeEditorAdd = this._onCodeEditorAdd.event;\n this._onCodeEditorRemove = this._register(new Emitter());\n this.onCodeEditorRemove = this._onCodeEditorRemove.event;\n this._onWillCreateDiffEditor = this._register(new Emitter());\n this._onDiffEditorAdd = this._register(new Emitter());\n this.onDiffEditorAdd = this._onDiffEditorAdd.event;\n this._onDiffEditorRemove = this._register(new Emitter());\n this.onDiffEditorRemove = this._onDiffEditorRemove.event;\n this._decorationOptionProviders = new Map();\n this._codeEditorOpenHandlers = new LinkedList();\n this._modelProperties = new Map();\n this._codeEditors = Object.create(null);\n this._diffEditors = Object.create(null);\n this._globalStyleSheet = null;\n }\n willCreateCodeEditor() {\n this._onWillCreateCodeEditor.fire();\n }\n addCodeEditor(editor) {\n this._codeEditors[editor.getId()] = editor;\n this._onCodeEditorAdd.fire(editor);\n }\n removeCodeEditor(editor) {\n if (delete this._codeEditors[editor.getId()]) {\n this._onCodeEditorRemove.fire(editor);\n }\n }\n listCodeEditors() {\n return Object.keys(this._codeEditors).map(id => this._codeEditors[id]);\n }\n willCreateDiffEditor() {\n this._onWillCreateDiffEditor.fire();\n }\n addDiffEditor(editor) {\n this._diffEditors[editor.getId()] = editor;\n this._onDiffEditorAdd.fire(editor);\n }\n listDiffEditors() {\n return Object.keys(this._diffEditors).map(id => this._diffEditors[id]);\n }\n getFocusedCodeEditor() {\n let editorWithWidgetFocus = null;\n const editors = this.listCodeEditors();\n for (const editor of editors) {\n if (editor.hasTextFocus()) {\n // bingo!\n return editor;\n }\n if (editor.hasWidgetFocus()) {\n editorWithWidgetFocus = editor;\n }\n }\n return editorWithWidgetFocus;\n }\n removeDecorationType(key) {\n const provider = this._decorationOptionProviders.get(key);\n if (provider) {\n provider.refCount--;\n if (provider.refCount <= 0) {\n this._decorationOptionProviders.delete(key);\n provider.dispose();\n this.listCodeEditors().forEach((ed) => ed.removeDecorationsByType(key));\n }\n }\n }\n setModelProperty(resource, key, value) {\n const key1 = resource.toString();\n let dest;\n if (this._modelProperties.has(key1)) {\n dest = this._modelProperties.get(key1);\n }\n else {\n dest = new Map();\n this._modelProperties.set(key1, dest);\n }\n dest.set(key, value);\n }\n getModelProperty(resource, key) {\n const key1 = resource.toString();\n if (this._modelProperties.has(key1)) {\n const innerMap = this._modelProperties.get(key1);\n return innerMap.get(key);\n }\n return undefined;\n }\n async openCodeEditor(input, source, sideBySide) {\n for (const handler of this._codeEditorOpenHandlers) {\n const candidate = await handler(input, source, sideBySide);\n if (candidate !== null) {\n return candidate;\n }\n }\n return null;\n }\n registerCodeEditorOpenHandler(handler) {\n const rm = this._codeEditorOpenHandlers.unshift(handler);\n return toDisposable(rm);\n }\n};\nAbstractCodeEditorService = __decorate([\n __param(0, IThemeService)\n], AbstractCodeEditorService);\nexport { AbstractCodeEditorService };\nexport class GlobalStyleSheet {\n constructor(styleSheet) {\n this._styleSheet = styleSheet;\n }\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { createDecorator } from '../../../platform/instantiation/common/instantiation.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { isObject } from '../../../base/common/types.js';\nexport const IBulkEditService = createDecorator('IWorkspaceEditService');\nexport class ResourceEdit {\n constructor(metadata) {\n this.metadata = metadata;\n }\n static convert(edit) {\n return edit.edits.map(edit => {\n if (ResourceTextEdit.is(edit)) {\n return ResourceTextEdit.lift(edit);\n }\n if (ResourceFileEdit.is(edit)) {\n return ResourceFileEdit.lift(edit);\n }\n throw new Error('Unsupported edit');\n });\n }\n}\nexport class ResourceTextEdit extends ResourceEdit {\n static is(candidate) {\n if (candidate instanceof ResourceTextEdit) {\n return true;\n }\n return isObject(candidate)\n && URI.isUri(candidate.resource)\n && isObject(candidate.textEdit);\n }\n static lift(edit) {\n if (edit instanceof ResourceTextEdit) {\n return edit;\n }\n else {\n return new ResourceTextEdit(edit.resource, edit.textEdit, edit.versionId, edit.metadata);\n }\n }\n constructor(resource, textEdit, versionId = undefined, metadata) {\n super(metadata);\n this.resource = resource;\n this.textEdit = textEdit;\n this.versionId = versionId;\n }\n}\nexport class ResourceFileEdit extends ResourceEdit {\n static is(candidate) {\n if (candidate instanceof ResourceFileEdit) {\n return true;\n }\n else {\n return isObject(candidate)\n && (Boolean(candidate.newResource) || Boolean(candidate.oldResource));\n }\n }\n static lift(edit) {\n if (edit instanceof ResourceFileEdit) {\n return edit;\n }\n else {\n return new ResourceFileEdit(edit.oldResource, edit.newResource, edit.options, edit.metadata);\n }\n }\n constructor(oldResource, newResource, options = {}, metadata) {\n super(metadata);\n this.oldResource = oldResource;\n this.newResource = newResource;\n this.options = options;\n }\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { createDecorator } from '../../../platform/instantiation/common/instantiation.js';\nexport const ICodeEditorService = createDecorator('codeEditorService');\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { IntervalTimer, timeout } from '../../../base/common/async.js';\nimport { Disposable, dispose, toDisposable, DisposableStore } from '../../../base/common/lifecycle.js';\nimport { SimpleWorkerClient, logOnceWebWorkerWarning } from '../../../base/common/worker/simpleWorker.js';\nimport { DefaultWorkerFactory } from '../../../base/browser/defaultWorkerFactory.js';\nimport { Range } from '../../common/core/range.js';\nimport { ILanguageConfigurationService } from '../../common/languages/languageConfigurationRegistry.js';\nimport { EditorSimpleWorker } from '../../common/services/editorSimpleWorker.js';\nimport { IModelService } from '../../common/services/model.js';\nimport { ITextResourceConfigurationService } from '../../common/services/textResourceConfiguration.js';\nimport { isNonEmptyArray } from '../../../base/common/arrays.js';\nimport { ILogService } from '../../../platform/log/common/log.js';\nimport { StopWatch } from '../../../base/common/stopwatch.js';\nimport { canceled } from '../../../base/common/errors.js';\nimport { ILanguageFeaturesService } from '../../common/services/languageFeatures.js';\nimport { MovedText } from '../../common/diff/linesDiffComputer.js';\nimport { DetailedLineRangeMapping, RangeMapping, LineRangeMapping } from '../../common/diff/rangeMapping.js';\nimport { LineRange } from '../../common/core/lineRange.js';\nimport { mainWindow } from '../../../base/browser/window.js';\nimport { WindowIntervalTimer } from '../../../base/browser/dom.js';\n/**\n * Stop syncing a model to the worker if it was not needed for 1 min.\n */\nconst STOP_SYNC_MODEL_DELTA_TIME_MS = 60 * 1000;\n/**\n * Stop the worker if it was not needed for 5 min.\n */\nconst STOP_WORKER_DELTA_TIME_MS = 5 * 60 * 1000;\nfunction canSyncModel(modelService, resource) {\n const model = modelService.getModel(resource);\n if (!model) {\n return false;\n }\n if (model.isTooLargeForSyncing()) {\n return false;\n }\n return true;\n}\nlet EditorWorkerService = class EditorWorkerService extends Disposable {\n constructor(modelService, configurationService, logService, languageConfigurationService, languageFeaturesService) {\n super();\n this._modelService = modelService;\n this._workerManager = this._register(new WorkerManager(this._modelService, languageConfigurationService));\n this._logService = logService;\n // register default link-provider and default completions-provider\n this._register(languageFeaturesService.linkProvider.register({ language: '*', hasAccessToAllModels: true }, {\n provideLinks: (model, token) => {\n if (!canSyncModel(this._modelService, model.uri)) {\n return Promise.resolve({ links: [] }); // File too large\n }\n return this._workerManager.withWorker().then(client => client.computeLinks(model.uri)).then(links => {\n return links && { links };\n });\n }\n }));\n this._register(languageFeaturesService.completionProvider.register('*', new WordBasedCompletionItemProvider(this._workerManager, configurationService, this._modelService, languageConfigurationService)));\n }\n dispose() {\n super.dispose();\n }\n canComputeUnicodeHighlights(uri) {\n return canSyncModel(this._modelService, uri);\n }\n computedUnicodeHighlights(uri, options, range) {\n return this._workerManager.withWorker().then(client => client.computedUnicodeHighlights(uri, options, range));\n }\n async computeDiff(original, modified, options, algorithm) {\n const result = await this._workerManager.withWorker().then(client => client.computeDiff(original, modified, options, algorithm));\n if (!result) {\n return null;\n }\n // Convert from space efficient JSON data to rich objects.\n const diff = {\n identical: result.identical,\n quitEarly: result.quitEarly,\n changes: toLineRangeMappings(result.changes),\n moves: result.moves.map(m => new MovedText(new LineRangeMapping(new LineRange(m[0], m[1]), new LineRange(m[2], m[3])), toLineRangeMappings(m[4])))\n };\n return diff;\n function toLineRangeMappings(changes) {\n return changes.map((c) => {\n var _a;\n return new DetailedLineRangeMapping(new LineRange(c[0], c[1]), new LineRange(c[2], c[3]), (_a = c[4]) === null || _a === void 0 ? void 0 : _a.map((c) => new RangeMapping(new Range(c[0], c[1], c[2], c[3]), new Range(c[4], c[5], c[6], c[7]))));\n });\n }\n }\n computeMoreMinimalEdits(resource, edits, pretty = false) {\n if (isNonEmptyArray(edits)) {\n if (!canSyncModel(this._modelService, resource)) {\n return Promise.resolve(edits); // File too large\n }\n const sw = StopWatch.create();\n const result = this._workerManager.withWorker().then(client => client.computeMoreMinimalEdits(resource, edits, pretty));\n result.finally(() => this._logService.trace('FORMAT#computeMoreMinimalEdits', resource.toString(true), sw.elapsed()));\n return Promise.race([result, timeout(1000).then(() => edits)]);\n }\n else {\n return Promise.resolve(undefined);\n }\n }\n canNavigateValueSet(resource) {\n return (canSyncModel(this._modelService, resource));\n }\n navigateValueSet(resource, range, up) {\n return this._workerManager.withWorker().then(client => client.navigateValueSet(resource, range, up));\n }\n canComputeWordRanges(resource) {\n return canSyncModel(this._modelService, resource);\n }\n computeWordRanges(resource, range) {\n return this._workerManager.withWorker().then(client => client.computeWordRanges(resource, range));\n }\n findSectionHeaders(uri, options) {\n return this._workerManager.withWorker().then(client => client.findSectionHeaders(uri, options));\n }\n};\nEditorWorkerService = __decorate([\n __param(0, IModelService),\n __param(1, ITextResourceConfigurationService),\n __param(2, ILogService),\n __param(3, ILanguageConfigurationService),\n __param(4, ILanguageFeaturesService)\n], EditorWorkerService);\nexport { EditorWorkerService };\nclass WordBasedCompletionItemProvider {\n constructor(workerManager, configurationService, modelService, languageConfigurationService) {\n this.languageConfigurationService = languageConfigurationService;\n this._debugDisplayName = 'wordbasedCompletions';\n this._workerManager = workerManager;\n this._configurationService = configurationService;\n this._modelService = modelService;\n }\n async provideCompletionItems(model, position) {\n const config = this._configurationService.getValue(model.uri, position, 'editor');\n if (config.wordBasedSuggestions === 'off') {\n return undefined;\n }\n const models = [];\n if (config.wordBasedSuggestions === 'currentDocument') {\n // only current file and only if not too large\n if (canSyncModel(this._modelService, model.uri)) {\n models.push(model.uri);\n }\n }\n else {\n // either all files or files of same language\n for (const candidate of this._modelService.getModels()) {\n if (!canSyncModel(this._modelService, candidate.uri)) {\n continue;\n }\n if (candidate === model) {\n models.unshift(candidate.uri);\n }\n else if (config.wordBasedSuggestions === 'allDocuments' || candidate.getLanguageId() === model.getLanguageId()) {\n models.push(candidate.uri);\n }\n }\n }\n if (models.length === 0) {\n return undefined; // File too large, no other files\n }\n const wordDefRegExp = this.languageConfigurationService.getLanguageConfiguration(model.getLanguageId()).getWordDefinition();\n const word = model.getWordAtPosition(position);\n const replace = !word ? Range.fromPositions(position) : new Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn);\n const insert = replace.setEndPosition(position.lineNumber, position.column);\n const client = await this._workerManager.withWorker();\n const data = await client.textualSuggest(models, word === null || word === void 0 ? void 0 : word.word, wordDefRegExp);\n if (!data) {\n return undefined;\n }\n return {\n duration: data.duration,\n suggestions: data.words.map((word) => {\n return {\n kind: 18 /* languages.CompletionItemKind.Text */,\n label: word,\n insertText: word,\n range: { insert, replace }\n };\n }),\n };\n }\n}\nclass WorkerManager extends Disposable {\n constructor(modelService, languageConfigurationService) {\n super();\n this.languageConfigurationService = languageConfigurationService;\n this._modelService = modelService;\n this._editorWorkerClient = null;\n this._lastWorkerUsedTime = (new Date()).getTime();\n const stopWorkerInterval = this._register(new WindowIntervalTimer());\n stopWorkerInterval.cancelAndSet(() => this._checkStopIdleWorker(), Math.round(STOP_WORKER_DELTA_TIME_MS / 2), mainWindow);\n this._register(this._modelService.onModelRemoved(_ => this._checkStopEmptyWorker()));\n }\n dispose() {\n if (this._editorWorkerClient) {\n this._editorWorkerClient.dispose();\n this._editorWorkerClient = null;\n }\n super.dispose();\n }\n /**\n * Check if the model service has no more models and stop the worker if that is the case.\n */\n _checkStopEmptyWorker() {\n if (!this._editorWorkerClient) {\n return;\n }\n const models = this._modelService.getModels();\n if (models.length === 0) {\n // There are no more models => nothing possible for me to do\n this._editorWorkerClient.dispose();\n this._editorWorkerClient = null;\n }\n }\n /**\n * Check if the worker has been idle for a while and then stop it.\n */\n _checkStopIdleWorker() {\n if (!this._editorWorkerClient) {\n return;\n }\n const timeSinceLastWorkerUsedTime = (new Date()).getTime() - this._lastWorkerUsedTime;\n if (timeSinceLastWorkerUsedTime > STOP_WORKER_DELTA_TIME_MS) {\n this._editorWorkerClient.dispose();\n this._editorWorkerClient = null;\n }\n }\n withWorker() {\n this._lastWorkerUsedTime = (new Date()).getTime();\n if (!this._editorWorkerClient) {\n this._editorWorkerClient = new EditorWorkerClient(this._modelService, false, 'editorWorkerService', this.languageConfigurationService);\n }\n return Promise.resolve(this._editorWorkerClient);\n }\n}\nclass EditorModelManager extends Disposable {\n constructor(proxy, modelService, keepIdleModels) {\n super();\n this._syncedModels = Object.create(null);\n this._syncedModelsLastUsedTime = Object.create(null);\n this._proxy = proxy;\n this._modelService = modelService;\n if (!keepIdleModels) {\n const timer = new IntervalTimer();\n timer.cancelAndSet(() => this._checkStopModelSync(), Math.round(STOP_SYNC_MODEL_DELTA_TIME_MS / 2));\n this._register(timer);\n }\n }\n dispose() {\n for (const modelUrl in this._syncedModels) {\n dispose(this._syncedModels[modelUrl]);\n }\n this._syncedModels = Object.create(null);\n this._syncedModelsLastUsedTime = Object.create(null);\n super.dispose();\n }\n ensureSyncedResources(resources, forceLargeModels) {\n for (const resource of resources) {\n const resourceStr = resource.toString();\n if (!this._syncedModels[resourceStr]) {\n this._beginModelSync(resource, forceLargeModels);\n }\n if (this._syncedModels[resourceStr]) {\n this._syncedModelsLastUsedTime[resourceStr] = (new Date()).getTime();\n }\n }\n }\n _checkStopModelSync() {\n const currentTime = (new Date()).getTime();\n const toRemove = [];\n for (const modelUrl in this._syncedModelsLastUsedTime) {\n const elapsedTime = currentTime - this._syncedModelsLastUsedTime[modelUrl];\n if (elapsedTime > STOP_SYNC_MODEL_DELTA_TIME_MS) {\n toRemove.push(modelUrl);\n }\n }\n for (const e of toRemove) {\n this._stopModelSync(e);\n }\n }\n _beginModelSync(resource, forceLargeModels) {\n const model = this._modelService.getModel(resource);\n if (!model) {\n return;\n }\n if (!forceLargeModels && model.isTooLargeForSyncing()) {\n return;\n }\n const modelUrl = resource.toString();\n this._proxy.acceptNewModel({\n url: model.uri.toString(),\n lines: model.getLinesContent(),\n EOL: model.getEOL(),\n versionId: model.getVersionId()\n });\n const toDispose = new DisposableStore();\n toDispose.add(model.onDidChangeContent((e) => {\n this._proxy.acceptModelChanged(modelUrl.toString(), e);\n }));\n toDispose.add(model.onWillDispose(() => {\n this._stopModelSync(modelUrl);\n }));\n toDispose.add(toDisposable(() => {\n this._proxy.acceptRemovedModel(modelUrl);\n }));\n this._syncedModels[modelUrl] = toDispose;\n }\n _stopModelSync(modelUrl) {\n const toDispose = this._syncedModels[modelUrl];\n delete this._syncedModels[modelUrl];\n delete this._syncedModelsLastUsedTime[modelUrl];\n dispose(toDispose);\n }\n}\nclass SynchronousWorkerClient {\n constructor(instance) {\n this._instance = instance;\n this._proxyObj = Promise.resolve(this._instance);\n }\n dispose() {\n this._instance.dispose();\n }\n getProxyObject() {\n return this._proxyObj;\n }\n}\nexport class EditorWorkerHost {\n constructor(workerClient) {\n this._workerClient = workerClient;\n }\n // foreign host request\n fhr(method, args) {\n return this._workerClient.fhr(method, args);\n }\n}\nexport class EditorWorkerClient extends Disposable {\n constructor(modelService, keepIdleModels, label, languageConfigurationService) {\n super();\n this.languageConfigurationService = languageConfigurationService;\n this._disposed = false;\n this._modelService = modelService;\n this._keepIdleModels = keepIdleModels;\n this._workerFactory = new DefaultWorkerFactory(label);\n this._worker = null;\n this._modelManager = null;\n }\n // foreign host request\n fhr(method, args) {\n throw new Error(`Not implemented!`);\n }\n _getOrCreateWorker() {\n if (!this._worker) {\n try {\n this._worker = this._register(new SimpleWorkerClient(this._workerFactory, 'vs/editor/common/services/editorSimpleWorker', new EditorWorkerHost(this)));\n }\n catch (err) {\n logOnceWebWorkerWarning(err);\n this._worker = new SynchronousWorkerClient(new EditorSimpleWorker(new EditorWorkerHost(this), null));\n }\n }\n return this._worker;\n }\n _getProxy() {\n return this._getOrCreateWorker().getProxyObject().then(undefined, (err) => {\n logOnceWebWorkerWarning(err);\n this._worker = new SynchronousWorkerClient(new EditorSimpleWorker(new EditorWorkerHost(this), null));\n return this._getOrCreateWorker().getProxyObject();\n });\n }\n _getOrCreateModelManager(proxy) {\n if (!this._modelManager) {\n this._modelManager = this._register(new EditorModelManager(proxy, this._modelService, this._keepIdleModels));\n }\n return this._modelManager;\n }\n async _withSyncedResources(resources, forceLargeModels = false) {\n if (this._disposed) {\n return Promise.reject(canceled());\n }\n return this._getProxy().then((proxy) => {\n this._getOrCreateModelManager(proxy).ensureSyncedResources(resources, forceLargeModels);\n return proxy;\n });\n }\n computedUnicodeHighlights(uri, options, range) {\n return this._withSyncedResources([uri]).then(proxy => {\n return proxy.computeUnicodeHighlights(uri.toString(), options, range);\n });\n }\n computeDiff(original, modified, options, algorithm) {\n return this._withSyncedResources([original, modified], /* forceLargeModels */ true).then(proxy => {\n return proxy.computeDiff(original.toString(), modified.toString(), options, algorithm);\n });\n }\n computeMoreMinimalEdits(resource, edits, pretty) {\n return this._withSyncedResources([resource]).then(proxy => {\n return proxy.computeMoreMinimalEdits(resource.toString(), edits, pretty);\n });\n }\n computeLinks(resource) {\n return this._withSyncedResources([resource]).then(proxy => {\n return proxy.computeLinks(resource.toString());\n });\n }\n computeDefaultDocumentColors(resource) {\n return this._withSyncedResources([resource]).then(proxy => {\n return proxy.computeDefaultDocumentColors(resource.toString());\n });\n }\n async textualSuggest(resources, leadingWord, wordDefRegExp) {\n const proxy = await this._withSyncedResources(resources);\n const wordDef = wordDefRegExp.source;\n const wordDefFlags = wordDefRegExp.flags;\n return proxy.textualSuggest(resources.map(r => r.toString()), leadingWord, wordDef, wordDefFlags);\n }\n computeWordRanges(resource, range) {\n return this._withSyncedResources([resource]).then(proxy => {\n const model = this._modelService.getModel(resource);\n if (!model) {\n return Promise.resolve(null);\n }\n const wordDefRegExp = this.languageConfigurationService.getLanguageConfiguration(model.getLanguageId()).getWordDefinition();\n const wordDef = wordDefRegExp.source;\n const wordDefFlags = wordDefRegExp.flags;\n return proxy.computeWordRanges(resource.toString(), range, wordDef, wordDefFlags);\n });\n }\n navigateValueSet(resource, range, up) {\n return this._withSyncedResources([resource]).then(proxy => {\n const model = this._modelService.getModel(resource);\n if (!model) {\n return null;\n }\n const wordDefRegExp = this.languageConfigurationService.getLanguageConfiguration(model.getLanguageId()).getWordDefinition();\n const wordDef = wordDefRegExp.source;\n const wordDefFlags = wordDefRegExp.flags;\n return proxy.navigateValueSet(resource.toString(), range, up, wordDef, wordDefFlags);\n });\n }\n findSectionHeaders(uri, options) {\n return this._withSyncedResources([uri]).then(proxy => {\n return proxy.findSectionHeaders(uri.toString(), options);\n });\n }\n dispose() {\n super.dispose();\n this._disposed = true;\n }\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport './hover.css';\nimport { DisposableStore } from '../../../../base/common/lifecycle.js';\nimport { Emitter } from '../../../../base/common/event.js';\nimport * as dom from '../../../../base/browser/dom.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { IConfigurationService } from '../../../../platform/configuration/common/configuration.js';\nimport { EDITOR_FONT_DEFAULTS } from '../../../common/config/editorOptions.js';\nimport { HoverAction, HoverWidget as BaseHoverWidget, getHoverAccessibleViewHint } from '../../../../base/browser/ui/hover/hoverWidget.js';\nimport { Widget } from '../../../../base/browser/ui/widget.js';\nimport { IOpenerService } from '../../../../platform/opener/common/opener.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { MarkdownRenderer, openLinkFromMarkdown } from '../../widget/markdownRenderer/browser/markdownRenderer.js';\nimport { isMarkdownString } from '../../../../base/common/htmlContent.js';\nimport { localize } from '../../../../nls.js';\nimport { isMacintosh } from '../../../../base/common/platform.js';\nimport { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.js';\nimport { status } from '../../../../base/browser/ui/aria/aria.js';\nconst $ = dom.$;\nlet HoverWidget = class HoverWidget extends Widget {\n get _targetWindow() {\n return dom.getWindow(this._target.targetElements[0]);\n }\n get _targetDocumentElement() {\n return dom.getWindow(this._target.targetElements[0]).document.documentElement;\n }\n get isDisposed() { return this._isDisposed; }\n get isMouseIn() { return this._lockMouseTracker.isMouseIn; }\n get domNode() { return this._hover.containerDomNode; }\n get onDispose() { return this._onDispose.event; }\n get onRequestLayout() { return this._onRequestLayout.event; }\n get anchor() { return this._hoverPosition === 2 /* HoverPosition.BELOW */ ? 0 /* AnchorPosition.BELOW */ : 1 /* AnchorPosition.ABOVE */; }\n get x() { return this._x; }\n get y() { return this._y; }\n /**\n * Whether the hover is \"locked\" by holding the alt/option key. When locked, the hover will not\n * hide and can be hovered regardless of whether the `hideOnHover` hover option is set.\n */\n get isLocked() { return this._isLocked; }\n set isLocked(value) {\n if (this._isLocked === value) {\n return;\n }\n this._isLocked = value;\n this._hoverContainer.classList.toggle('locked', this._isLocked);\n }\n constructor(options, _keybindingService, _configurationService, _openerService, _instantiationService, _accessibilityService) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n super();\n this._keybindingService = _keybindingService;\n this._configurationService = _configurationService;\n this._openerService = _openerService;\n this._instantiationService = _instantiationService;\n this._accessibilityService = _accessibilityService;\n this._messageListeners = new DisposableStore();\n this._isDisposed = false;\n this._forcePosition = false;\n this._x = 0;\n this._y = 0;\n this._isLocked = false;\n this._enableFocusTraps = false;\n this._addedFocusTrap = false;\n this._onDispose = this._register(new Emitter());\n this._onRequestLayout = this._register(new Emitter());\n this._linkHandler = options.linkHandler || (url => {\n return openLinkFromMarkdown(this._openerService, url, isMarkdownString(options.content) ? options.content.isTrusted : undefined);\n });\n this._target = 'targetElements' in options.target ? options.target : new ElementHoverTarget(options.target);\n this._hoverPointer = ((_a = options.appearance) === null || _a === void 0 ? void 0 : _a.showPointer) ? $('div.workbench-hover-pointer') : undefined;\n this._hover = this._register(new BaseHoverWidget());\n this._hover.containerDomNode.classList.add('workbench-hover', 'fadeIn');\n if ((_b = options.appearance) === null || _b === void 0 ? void 0 : _b.compact) {\n this._hover.containerDomNode.classList.add('workbench-hover', 'compact');\n }\n if ((_c = options.appearance) === null || _c === void 0 ? void 0 : _c.skipFadeInAnimation) {\n this._hover.containerDomNode.classList.add('skip-fade-in');\n }\n if (options.additionalClasses) {\n this._hover.containerDomNode.classList.add(...options.additionalClasses);\n }\n if ((_d = options.position) === null || _d === void 0 ? void 0 : _d.forcePosition) {\n this._forcePosition = true;\n }\n if (options.trapFocus) {\n this._enableFocusTraps = true;\n }\n this._hoverPosition = (_f = (_e = options.position) === null || _e === void 0 ? void 0 : _e.hoverPosition) !== null && _f !== void 0 ? _f : 3 /* HoverPosition.ABOVE */;\n // Don't allow mousedown out of the widget, otherwise preventDefault will call and text will\n // not be selected.\n this.onmousedown(this._hover.containerDomNode, e => e.stopPropagation());\n // Hide hover on escape\n this.onkeydown(this._hover.containerDomNode, e => {\n if (e.equals(9 /* KeyCode.Escape */)) {\n this.dispose();\n }\n });\n // Hide when the window loses focus\n this._register(dom.addDisposableListener(this._targetWindow, 'blur', () => this.dispose()));\n const rowElement = $('div.hover-row.markdown-hover');\n const contentsElement = $('div.hover-contents');\n if (typeof options.content === 'string') {\n contentsElement.textContent = options.content;\n contentsElement.style.whiteSpace = 'pre-wrap';\n }\n else if (dom.isHTMLElement(options.content)) {\n contentsElement.appendChild(options.content);\n contentsElement.classList.add('html-hover-contents');\n }\n else {\n const markdown = options.content;\n const mdRenderer = this._instantiationService.createInstance(MarkdownRenderer, { codeBlockFontFamily: this._configurationService.getValue('editor').fontFamily || EDITOR_FONT_DEFAULTS.fontFamily });\n const { element } = mdRenderer.render(markdown, {\n actionHandler: {\n callback: (content) => this._linkHandler(content),\n disposables: this._messageListeners\n },\n asyncRenderCallback: () => {\n contentsElement.classList.add('code-hover-contents');\n this.layout();\n // This changes the dimensions of the hover so trigger a layout\n this._onRequestLayout.fire();\n }\n });\n contentsElement.appendChild(element);\n }\n rowElement.appendChild(contentsElement);\n this._hover.contentsDomNode.appendChild(rowElement);\n if (options.actions && options.actions.length > 0) {\n const statusBarElement = $('div.hover-row.status-bar');\n const actionsElement = $('div.actions');\n options.actions.forEach(action => {\n const keybinding = this._keybindingService.lookupKeybinding(action.commandId);\n const keybindingLabel = keybinding ? keybinding.getLabel() : null;\n HoverAction.render(actionsElement, {\n label: action.label,\n commandId: action.commandId,\n run: e => {\n action.run(e);\n this.dispose();\n },\n iconClass: action.iconClass\n }, keybindingLabel);\n });\n statusBarElement.appendChild(actionsElement);\n this._hover.containerDomNode.appendChild(statusBarElement);\n }\n this._hoverContainer = $('div.workbench-hover-container');\n if (this._hoverPointer) {\n this._hoverContainer.appendChild(this._hoverPointer);\n }\n this._hoverContainer.appendChild(this._hover.containerDomNode);\n // Determine whether to hide on hover\n let hideOnHover;\n if (options.actions && options.actions.length > 0) {\n // If there are actions, require hover so they can be accessed\n hideOnHover = false;\n }\n else {\n if (((_g = options.persistence) === null || _g === void 0 ? void 0 : _g.hideOnHover) === undefined) {\n // When unset, will default to true when it's a string or when it's markdown that\n // appears to have a link using a naive check for '](' and ''\n hideOnHover = typeof options.content === 'string' ||\n isMarkdownString(options.content) && !options.content.value.includes('](') && !options.content.value.includes('');\n }\n else {\n // It's set explicitly\n hideOnHover = options.persistence.hideOnHover;\n }\n }\n // Show the hover hint if needed\n if (hideOnHover && ((_h = options.appearance) === null || _h === void 0 ? void 0 : _h.showHoverHint)) {\n const statusBarElement = $('div.hover-row.status-bar');\n const infoElement = $('div.info');\n infoElement.textContent = localize('hoverhint', 'Hold {0} key to mouse over', isMacintosh ? 'Option' : 'Alt');\n statusBarElement.appendChild(infoElement);\n this._hover.containerDomNode.appendChild(statusBarElement);\n }\n const mouseTrackerTargets = [...this._target.targetElements];\n if (!hideOnHover) {\n mouseTrackerTargets.push(this._hoverContainer);\n }\n const mouseTracker = this._register(new CompositeMouseTracker(mouseTrackerTargets));\n this._register(mouseTracker.onMouseOut(() => {\n if (!this._isLocked) {\n this.dispose();\n }\n }));\n // Setup another mouse tracker when hideOnHover is set in order to track the hover as well\n // when it is locked. This ensures the hover will hide on mouseout after alt has been\n // released to unlock the element.\n if (hideOnHover) {\n const mouseTracker2Targets = [...this._target.targetElements, this._hoverContainer];\n this._lockMouseTracker = this._register(new CompositeMouseTracker(mouseTracker2Targets));\n this._register(this._lockMouseTracker.onMouseOut(() => {\n if (!this._isLocked) {\n this.dispose();\n }\n }));\n }\n else {\n this._lockMouseTracker = mouseTracker;\n }\n }\n addFocusTrap() {\n if (!this._enableFocusTraps || this._addedFocusTrap) {\n return;\n }\n this._addedFocusTrap = true;\n // Add a hover tab loop if the hover has at least one element with a valid tabIndex\n const firstContainerFocusElement = this._hover.containerDomNode;\n const lastContainerFocusElement = this.findLastFocusableChild(this._hover.containerDomNode);\n if (lastContainerFocusElement) {\n const beforeContainerFocusElement = dom.prepend(this._hoverContainer, $('div'));\n const afterContainerFocusElement = dom.append(this._hoverContainer, $('div'));\n beforeContainerFocusElement.tabIndex = 0;\n afterContainerFocusElement.tabIndex = 0;\n this._register(dom.addDisposableListener(afterContainerFocusElement, 'focus', (e) => {\n firstContainerFocusElement.focus();\n e.preventDefault();\n }));\n this._register(dom.addDisposableListener(beforeContainerFocusElement, 'focus', (e) => {\n lastContainerFocusElement.focus();\n e.preventDefault();\n }));\n }\n }\n findLastFocusableChild(root) {\n if (root.hasChildNodes()) {\n for (let i = 0; i < root.childNodes.length; i++) {\n const node = root.childNodes.item(root.childNodes.length - i - 1);\n if (node.nodeType === node.ELEMENT_NODE) {\n const parsedNode = node;\n if (typeof parsedNode.tabIndex === 'number' && parsedNode.tabIndex >= 0) {\n return parsedNode;\n }\n }\n const recursivelyFoundElement = this.findLastFocusableChild(node);\n if (recursivelyFoundElement) {\n return recursivelyFoundElement;\n }\n }\n }\n return undefined;\n }\n render(container) {\n var _a;\n container.appendChild(this._hoverContainer);\n const hoverFocused = this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement);\n const accessibleViewHint = hoverFocused && getHoverAccessibleViewHint(this._configurationService.getValue('accessibility.verbosity.hover') === true && this._accessibilityService.isScreenReaderOptimized(), (_a = this._keybindingService.lookupKeybinding('editor.action.accessibleView')) === null || _a === void 0 ? void 0 : _a.getAriaLabel());\n if (accessibleViewHint) {\n status(accessibleViewHint);\n }\n this.layout();\n this.addFocusTrap();\n }\n layout() {\n this._hover.containerDomNode.classList.remove('right-aligned');\n this._hover.contentsDomNode.style.maxHeight = '';\n const getZoomAccountedBoundingClientRect = (e) => {\n const zoom = dom.getDomNodeZoomLevel(e);\n const boundingRect = e.getBoundingClientRect();\n return {\n top: boundingRect.top * zoom,\n bottom: boundingRect.bottom * zoom,\n right: boundingRect.right * zoom,\n left: boundingRect.left * zoom,\n };\n };\n const targetBounds = this._target.targetElements.map(e => getZoomAccountedBoundingClientRect(e));\n const { top, right, bottom, left } = targetBounds[0];\n const width = right - left;\n const height = bottom - top;\n const targetRect = {\n top, right, bottom, left, width, height,\n center: {\n x: left + (width / 2),\n y: top + (height / 2)\n }\n };\n // These calls adjust the position depending on spacing.\n this.adjustHorizontalHoverPosition(targetRect);\n this.adjustVerticalHoverPosition(targetRect);\n // This call limits the maximum height of the hover.\n this.adjustHoverMaxHeight(targetRect);\n // Offset the hover position if there is a pointer so it aligns with the target element\n this._hoverContainer.style.padding = '';\n this._hoverContainer.style.margin = '';\n if (this._hoverPointer) {\n switch (this._hoverPosition) {\n case 1 /* HoverPosition.RIGHT */:\n targetRect.left += 3 /* Constants.PointerSize */;\n targetRect.right += 3 /* Constants.PointerSize */;\n this._hoverContainer.style.paddingLeft = `${3 /* Constants.PointerSize */}px`;\n this._hoverContainer.style.marginLeft = `${-3 /* Constants.PointerSize */}px`;\n break;\n case 0 /* HoverPosition.LEFT */:\n targetRect.left -= 3 /* Constants.PointerSize */;\n targetRect.right -= 3 /* Constants.PointerSize */;\n this._hoverContainer.style.paddingRight = `${3 /* Constants.PointerSize */}px`;\n this._hoverContainer.style.marginRight = `${-3 /* Constants.PointerSize */}px`;\n break;\n case 2 /* HoverPosition.BELOW */:\n targetRect.top += 3 /* Constants.PointerSize */;\n targetRect.bottom += 3 /* Constants.PointerSize */;\n this._hoverContainer.style.paddingTop = `${3 /* Constants.PointerSize */}px`;\n this._hoverContainer.style.marginTop = `${-3 /* Constants.PointerSize */}px`;\n break;\n case 3 /* HoverPosition.ABOVE */:\n targetRect.top -= 3 /* Constants.PointerSize */;\n targetRect.bottom -= 3 /* Constants.PointerSize */;\n this._hoverContainer.style.paddingBottom = `${3 /* Constants.PointerSize */}px`;\n this._hoverContainer.style.marginBottom = `${-3 /* Constants.PointerSize */}px`;\n break;\n }\n targetRect.center.x = targetRect.left + (width / 2);\n targetRect.center.y = targetRect.top + (height / 2);\n }\n this.computeXCordinate(targetRect);\n this.computeYCordinate(targetRect);\n if (this._hoverPointer) {\n // reset\n this._hoverPointer.classList.remove('top');\n this._hoverPointer.classList.remove('left');\n this._hoverPointer.classList.remove('right');\n this._hoverPointer.classList.remove('bottom');\n this.setHoverPointerPosition(targetRect);\n }\n this._hover.onContentsChanged();\n }\n computeXCordinate(target) {\n const hoverWidth = this._hover.containerDomNode.clientWidth + 2 /* Constants.HoverBorderWidth */;\n if (this._target.x !== undefined) {\n this._x = this._target.x;\n }\n else if (this._hoverPosition === 1 /* HoverPosition.RIGHT */) {\n this._x = target.right;\n }\n else if (this._hoverPosition === 0 /* HoverPosition.LEFT */) {\n this._x = target.left - hoverWidth;\n }\n else {\n if (this._hoverPointer) {\n this._x = target.center.x - (this._hover.containerDomNode.clientWidth / 2);\n }\n else {\n this._x = target.left;\n }\n // Hover is going beyond window towards right end\n if (this._x + hoverWidth >= this._targetDocumentElement.clientWidth) {\n this._hover.containerDomNode.classList.add('right-aligned');\n this._x = Math.max(this._targetDocumentElement.clientWidth - hoverWidth - 2 /* Constants.HoverWindowEdgeMargin */, this._targetDocumentElement.clientLeft);\n }\n }\n // Hover is going beyond window towards left end\n if (this._x < this._targetDocumentElement.clientLeft) {\n this._x = target.left + 2 /* Constants.HoverWindowEdgeMargin */;\n }\n }\n computeYCordinate(target) {\n if (this._target.y !== undefined) {\n this._y = this._target.y;\n }\n else if (this._hoverPosition === 3 /* HoverPosition.ABOVE */) {\n this._y = target.top;\n }\n else if (this._hoverPosition === 2 /* HoverPosition.BELOW */) {\n this._y = target.bottom - 2;\n }\n else {\n if (this._hoverPointer) {\n this._y = target.center.y + (this._hover.containerDomNode.clientHeight / 2);\n }\n else {\n this._y = target.bottom;\n }\n }\n // Hover on bottom is going beyond window\n if (this._y > this._targetWindow.innerHeight) {\n this._y = target.bottom;\n }\n }\n adjustHorizontalHoverPosition(target) {\n // Do not adjust horizontal hover position if x cordiante is provided\n if (this._target.x !== undefined) {\n return;\n }\n const hoverPointerOffset = (this._hoverPointer ? 3 /* Constants.PointerSize */ : 0);\n // When force position is enabled, restrict max width\n if (this._forcePosition) {\n const padding = hoverPointerOffset + 2 /* Constants.HoverBorderWidth */;\n if (this._hoverPosition === 1 /* HoverPosition.RIGHT */) {\n this._hover.containerDomNode.style.maxWidth = `${this._targetDocumentElement.clientWidth - target.right - padding}px`;\n }\n else if (this._hoverPosition === 0 /* HoverPosition.LEFT */) {\n this._hover.containerDomNode.style.maxWidth = `${target.left - padding}px`;\n }\n return;\n }\n // Position hover on right to target\n if (this._hoverPosition === 1 /* HoverPosition.RIGHT */) {\n const roomOnRight = this._targetDocumentElement.clientWidth - target.right;\n // Hover on the right is going beyond window.\n if (roomOnRight < this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n const roomOnLeft = target.left;\n // There's enough room on the left, flip the hover position\n if (roomOnLeft >= this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n this._hoverPosition = 0 /* HoverPosition.LEFT */;\n }\n // Hover on the left would go beyond window too\n else {\n this._hoverPosition = 2 /* HoverPosition.BELOW */;\n }\n }\n }\n // Position hover on left to target\n else if (this._hoverPosition === 0 /* HoverPosition.LEFT */) {\n const roomOnLeft = target.left;\n // Hover on the left is going beyond window.\n if (roomOnLeft < this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n const roomOnRight = this._targetDocumentElement.clientWidth - target.right;\n // There's enough room on the right, flip the hover position\n if (roomOnRight >= this._hover.containerDomNode.clientWidth + hoverPointerOffset) {\n this._hoverPosition = 1 /* HoverPosition.RIGHT */;\n }\n // Hover on the right would go beyond window too\n else {\n this._hoverPosition = 2 /* HoverPosition.BELOW */;\n }\n }\n // Hover on the left is going beyond window.\n if (target.left - this._hover.containerDomNode.clientWidth - hoverPointerOffset <= this._targetDocumentElement.clientLeft) {\n this._hoverPosition = 1 /* HoverPosition.RIGHT */;\n }\n }\n }\n adjustVerticalHoverPosition(target) {\n // Do not adjust vertical hover position if the y coordinate is provided\n // or the position is forced\n if (this._target.y !== undefined || this._forcePosition) {\n return;\n }\n const hoverPointerOffset = (this._hoverPointer ? 3 /* Constants.PointerSize */ : 0);\n // Position hover on top of the target\n if (this._hoverPosition === 3 /* HoverPosition.ABOVE */) {\n // Hover on top is going beyond window\n if (target.top - this._hover.containerDomNode.clientHeight - hoverPointerOffset < 0) {\n this._hoverPosition = 2 /* HoverPosition.BELOW */;\n }\n }\n // Position hover below the target\n else if (this._hoverPosition === 2 /* HoverPosition.BELOW */) {\n // Hover on bottom is going beyond window\n if (target.bottom + this._hover.containerDomNode.clientHeight + hoverPointerOffset > this._targetWindow.innerHeight) {\n this._hoverPosition = 3 /* HoverPosition.ABOVE */;\n }\n }\n }\n adjustHoverMaxHeight(target) {\n let maxHeight = this._targetWindow.innerHeight / 2;\n // When force position is enabled, restrict max height\n if (this._forcePosition) {\n const padding = (this._hoverPointer ? 3 /* Constants.PointerSize */ : 0) + 2 /* Constants.HoverBorderWidth */;\n if (this._hoverPosition === 3 /* HoverPosition.ABOVE */) {\n maxHeight = Math.min(maxHeight, target.top - padding);\n }\n else if (this._hoverPosition === 2 /* HoverPosition.BELOW */) {\n maxHeight = Math.min(maxHeight, this._targetWindow.innerHeight - target.bottom - padding);\n }\n }\n this._hover.containerDomNode.style.maxHeight = `${maxHeight}px`;\n if (this._hover.contentsDomNode.clientHeight < this._hover.contentsDomNode.scrollHeight) {\n // Add padding for a vertical scrollbar\n const extraRightPadding = `${this._hover.scrollbar.options.verticalScrollbarSize}px`;\n if (this._hover.contentsDomNode.style.paddingRight !== extraRightPadding) {\n this._hover.contentsDomNode.style.paddingRight = extraRightPadding;\n }\n }\n }\n setHoverPointerPosition(target) {\n if (!this._hoverPointer) {\n return;\n }\n switch (this._hoverPosition) {\n case 0 /* HoverPosition.LEFT */:\n case 1 /* HoverPosition.RIGHT */: {\n this._hoverPointer.classList.add(this._hoverPosition === 0 /* HoverPosition.LEFT */ ? 'right' : 'left');\n const hoverHeight = this._hover.containerDomNode.clientHeight;\n // If hover is taller than target, then show the pointer at the center of target\n if (hoverHeight > target.height) {\n this._hoverPointer.style.top = `${target.center.y - (this._y - hoverHeight) - 3 /* Constants.PointerSize */}px`;\n }\n // Otherwise show the pointer at the center of hover\n else {\n this._hoverPointer.style.top = `${Math.round((hoverHeight / 2)) - 3 /* Constants.PointerSize */}px`;\n }\n break;\n }\n case 3 /* HoverPosition.ABOVE */:\n case 2 /* HoverPosition.BELOW */: {\n this._hoverPointer.classList.add(this._hoverPosition === 3 /* HoverPosition.ABOVE */ ? 'bottom' : 'top');\n const hoverWidth = this._hover.containerDomNode.clientWidth;\n // Position pointer at the center of the hover\n let pointerLeftPosition = Math.round((hoverWidth / 2)) - 3 /* Constants.PointerSize */;\n // If pointer goes beyond target then position it at the center of the target\n const pointerX = this._x + pointerLeftPosition;\n if (pointerX < target.left || pointerX > target.right) {\n pointerLeftPosition = target.center.x - this._x - 3 /* Constants.PointerSize */;\n }\n this._hoverPointer.style.left = `${pointerLeftPosition}px`;\n break;\n }\n }\n }\n focus() {\n this._hover.containerDomNode.focus();\n }\n dispose() {\n if (!this._isDisposed) {\n this._onDispose.fire();\n this._hoverContainer.remove();\n this._messageListeners.dispose();\n this._target.dispose();\n super.dispose();\n }\n this._isDisposed = true;\n }\n};\nHoverWidget = __decorate([\n __param(1, IKeybindingService),\n __param(2, IConfigurationService),\n __param(3, IOpenerService),\n __param(4, IInstantiationService),\n __param(5, IAccessibilityService)\n], HoverWidget);\nexport { HoverWidget };\nclass CompositeMouseTracker extends Widget {\n get onMouseOut() { return this._onMouseOut.event; }\n get isMouseIn() { return this._isMouseIn; }\n constructor(_elements) {\n super();\n this._elements = _elements;\n this._isMouseIn = true;\n this._onMouseOut = this._register(new Emitter());\n this._elements.forEach(n => this.onmouseover(n, () => this._onTargetMouseOver(n)));\n this._elements.forEach(n => this.onmouseleave(n, () => this._onTargetMouseLeave(n)));\n }\n _onTargetMouseOver(target) {\n this._isMouseIn = true;\n this._clearEvaluateMouseStateTimeout(target);\n }\n _onTargetMouseLeave(target) {\n this._isMouseIn = false;\n this._evaluateMouseState(target);\n }\n _evaluateMouseState(target) {\n this._clearEvaluateMouseStateTimeout(target);\n // Evaluate whether the mouse is still outside asynchronously such that other mouse targets\n // have the opportunity to first their mouse in event.\n this._mouseTimeout = dom.getWindow(target).setTimeout(() => this._fireIfMouseOutside(), 0);\n }\n _clearEvaluateMouseStateTimeout(target) {\n if (this._mouseTimeout) {\n dom.getWindow(target).clearTimeout(this._mouseTimeout);\n this._mouseTimeout = undefined;\n }\n }\n _fireIfMouseOutside() {\n if (!this._isMouseIn) {\n this._onMouseOut.fire();\n }\n }\n}\nclass ElementHoverTarget {\n constructor(_element) {\n this._element = _element;\n this.targetElements = [this._element];\n }\n dispose() {\n }\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { isHTMLElement } from '../../../../base/browser/dom.js';\nimport { CancellationTokenSource } from '../../../../base/common/cancellation.js';\nimport { isMarkdownString } from '../../../../base/common/htmlContent.js';\nimport { isFunction, isString } from '../../../../base/common/types.js';\nimport { localize } from '../../../../nls.js';\nexport class UpdatableHoverWidget {\n constructor(hoverDelegate, target, fadeInAnimation) {\n this.hoverDelegate = hoverDelegate;\n this.target = target;\n this.fadeInAnimation = fadeInAnimation;\n }\n async update(content, focus, options) {\n var _a;\n if (this._cancellationTokenSource) {\n // there's an computation ongoing, cancel it\n this._cancellationTokenSource.dispose(true);\n this._cancellationTokenSource = undefined;\n }\n if (this.isDisposed) {\n return;\n }\n let resolvedContent;\n if (content === undefined || isString(content) || isHTMLElement(content)) {\n resolvedContent = content;\n }\n else if (!isFunction(content.markdown)) {\n resolvedContent = (_a = content.markdown) !== null && _a !== void 0 ? _a : content.markdownNotSupportedFallback;\n }\n else {\n // compute the content, potentially long-running\n // show 'Loading' if no hover is up yet\n if (!this._hoverWidget) {\n this.show(localize('iconLabel.loading', \"Loading...\"), focus, options);\n }\n // compute the content\n this._cancellationTokenSource = new CancellationTokenSource();\n const token = this._cancellationTokenSource.token;\n resolvedContent = await content.markdown(token);\n if (resolvedContent === undefined) {\n resolvedContent = content.markdownNotSupportedFallback;\n }\n if (this.isDisposed || token.isCancellationRequested) {\n // either the widget has been closed in the meantime\n // or there has been a new call to `update`\n return;\n }\n }\n this.show(resolvedContent, focus, options);\n }\n show(content, focus, options) {\n const oldHoverWidget = this._hoverWidget;\n if (this.hasContent(content)) {\n const hoverOptions = {\n content,\n target: this.target,\n appearance: {\n showPointer: this.hoverDelegate.placement === 'element',\n skipFadeInAnimation: !this.fadeInAnimation || !!oldHoverWidget, // do not fade in if the hover is already showing\n },\n position: {\n hoverPosition: 2 /* HoverPosition.BELOW */,\n },\n ...options\n };\n this._hoverWidget = this.hoverDelegate.showHover(hoverOptions, focus);\n }\n oldHoverWidget === null || oldHoverWidget === void 0 ? void 0 : oldHoverWidget.dispose();\n }\n hasContent(content) {\n if (!content) {\n return false;\n }\n if (isMarkdownString(content)) {\n return !!content.value;\n }\n return true;\n }\n get isDisposed() {\n var _a;\n return (_a = this._hoverWidget) === null || _a === void 0 ? void 0 : _a.isDisposed;\n }\n dispose() {\n var _a, _b;\n (_a = this._hoverWidget) === null || _a === void 0 ? void 0 : _a.dispose();\n (_b = this._cancellationTokenSource) === null || _b === void 0 ? void 0 : _b.dispose(true);\n this._cancellationTokenSource = undefined;\n }\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { registerSingleton } from '../../../../platform/instantiation/common/extensions.js';\nimport { registerThemingParticipant } from '../../../../platform/theme/common/themeService.js';\nimport { editorHoverBorder } from '../../../../platform/theme/common/colorRegistry.js';\nimport { IHoverService } from '../../../../platform/hover/browser/hover.js';\nimport { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js';\nimport { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';\nimport { HoverWidget } from './hoverWidget.js';\nimport { Disposable, DisposableStore, toDisposable } from '../../../../base/common/lifecycle.js';\nimport { addDisposableListener, EventType, getActiveElement, isAncestorOfActiveElement, isAncestor, getWindow, isHTMLElement } from '../../../../base/browser/dom.js';\nimport { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';\nimport { StandardKeyboardEvent } from '../../../../base/browser/keyboardEvent.js';\nimport { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.js';\nimport { ILayoutService } from '../../../../platform/layout/browser/layoutService.js';\nimport { mainWindow } from '../../../../base/browser/window.js';\nimport { ContextViewHandler } from '../../../../platform/contextview/browser/contextViewService.js';\nimport { UpdatableHoverWidget } from './updatableHoverWidget.js';\nimport { TimeoutTimer } from '../../../../base/common/async.js';\nlet HoverService = class HoverService extends Disposable {\n constructor(_instantiationService, contextMenuService, _keybindingService, _layoutService, _accessibilityService) {\n super();\n this._instantiationService = _instantiationService;\n this._keybindingService = _keybindingService;\n this._layoutService = _layoutService;\n this._accessibilityService = _accessibilityService;\n this._existingHovers = new Map();\n contextMenuService.onDidShowContextMenu(() => this.hideHover());\n this._contextViewHandler = this._register(new ContextViewHandler(this._layoutService));\n }\n showHover(options, focus, skipLastFocusedUpdate) {\n var _a, _b, _c, _d;\n if (getHoverOptionsIdentity(this._currentHoverOptions) === getHoverOptionsIdentity(options)) {\n return undefined;\n }\n if (this._currentHover && ((_b = (_a = this._currentHoverOptions) === null || _a === void 0 ? void 0 : _a.persistence) === null || _b === void 0 ? void 0 : _b.sticky)) {\n return undefined;\n }\n this._currentHoverOptions = options;\n this._lastHoverOptions = options;\n const trapFocus = options.trapFocus || this._accessibilityService.isScreenReaderOptimized();\n const activeElement = getActiveElement();\n // HACK, remove this check when #189076 is fixed\n if (!skipLastFocusedUpdate) {\n if (trapFocus && activeElement) {\n if (!activeElement.classList.contains('monaco-hover')) {\n this._lastFocusedElementBeforeOpen = activeElement;\n }\n }\n else {\n this._lastFocusedElementBeforeOpen = undefined;\n }\n }\n const hoverDisposables = new DisposableStore();\n const hover = this._instantiationService.createInstance(HoverWidget, options);\n if ((_c = options.persistence) === null || _c === void 0 ? void 0 : _c.sticky) {\n hover.isLocked = true;\n }\n hover.onDispose(() => {\n var _a, _b;\n const hoverWasFocused = ((_a = this._currentHover) === null || _a === void 0 ? void 0 : _a.domNode) && isAncestorOfActiveElement(this._currentHover.domNode);\n if (hoverWasFocused) {\n // Required to handle cases such as closing the hover with the escape key\n (_b = this._lastFocusedElementBeforeOpen) === null || _b === void 0 ? void 0 : _b.focus();\n }\n // Only clear the current options if it's the current hover, the current options help\n // reduce flickering when the same hover is shown multiple times\n if (this._currentHoverOptions === options) {\n this._currentHoverOptions = undefined;\n }\n hoverDisposables.dispose();\n }, undefined, hoverDisposables);\n // Set the container explicitly to enable aux window support\n if (!options.container) {\n const targetElement = isHTMLElement(options.target) ? options.target : options.target.targetElements[0];\n options.container = this._layoutService.getContainer(getWindow(targetElement));\n }\n this._contextViewHandler.showContextView(new HoverContextViewDelegate(hover, focus), options.container);\n hover.onRequestLayout(() => this._contextViewHandler.layout(), undefined, hoverDisposables);\n if ((_d = options.persistence) === null || _d === void 0 ? void 0 : _d.sticky) {\n hoverDisposables.add(addDisposableListener(getWindow(options.container).document, EventType.MOUSE_DOWN, e => {\n if (!isAncestor(e.target, hover.domNode)) {\n this.doHideHover();\n }\n }));\n }\n else {\n if ('targetElements' in options.target) {\n for (const element of options.target.targetElements) {\n hoverDisposables.add(addDisposableListener(element, EventType.CLICK, () => this.hideHover()));\n }\n }\n else {\n hoverDisposables.add(addDisposableListener(options.target, EventType.CLICK, () => this.hideHover()));\n }\n const focusedElement = getActiveElement();\n if (focusedElement) {\n const focusedElementDocument = getWindow(focusedElement).document;\n hoverDisposables.add(addDisposableListener(focusedElement, EventType.KEY_DOWN, e => { var _a; return this._keyDown(e, hover, !!((_a = options.persistence) === null || _a === void 0 ? void 0 : _a.hideOnKeyDown)); }));\n hoverDisposables.add(addDisposableListener(focusedElementDocument, EventType.KEY_DOWN, e => { var _a; return this._keyDown(e, hover, !!((_a = options.persistence) === null || _a === void 0 ? void 0 : _a.hideOnKeyDown)); }));\n hoverDisposables.add(addDisposableListener(focusedElement, EventType.KEY_UP, e => this._keyUp(e, hover)));\n hoverDisposables.add(addDisposableListener(focusedElementDocument, EventType.KEY_UP, e => this._keyUp(e, hover)));\n }\n }\n if ('IntersectionObserver' in mainWindow) {\n const observer = new IntersectionObserver(e => this._intersectionChange(e, hover), { threshold: 0 });\n const firstTargetElement = 'targetElements' in options.target ? options.target.targetElements[0] : options.target;\n observer.observe(firstTargetElement);\n hoverDisposables.add(toDisposable(() => observer.disconnect()));\n }\n this._currentHover = hover;\n return hover;\n }\n hideHover() {\n var _a;\n if (((_a = this._currentHover) === null || _a === void 0 ? void 0 : _a.isLocked) || !this._currentHoverOptions) {\n return;\n }\n this.doHideHover();\n }\n doHideHover() {\n this._currentHover = undefined;\n this._currentHoverOptions = undefined;\n this._contextViewHandler.hideContextView();\n }\n _intersectionChange(entries, hover) {\n const entry = entries[entries.length - 1];\n if (!entry.isIntersecting) {\n hover.dispose();\n }\n }\n showAndFocusLastHover() {\n if (!this._lastHoverOptions) {\n return;\n }\n this.showHover(this._lastHoverOptions, true, true);\n }\n _keyDown(e, hover, hideOnKeyDown) {\n var _a, _b;\n if (e.key === 'Alt') {\n hover.isLocked = true;\n return;\n }\n const event = new StandardKeyboardEvent(e);\n const keybinding = this._keybindingService.resolveKeyboardEvent(event);\n if (keybinding.getSingleModifierDispatchChords().some(value => !!value) || this._keybindingService.softDispatch(event, event.target).kind !== 0 /* ResultKind.NoMatchingKb */) {\n return;\n }\n if (hideOnKeyDown && (!((_a = this._currentHoverOptions) === null || _a === void 0 ? void 0 : _a.trapFocus) || e.key !== 'Tab')) {\n this.hideHover();\n (_b = this._lastFocusedElementBeforeOpen) === null || _b === void 0 ? void 0 : _b.focus();\n }\n }\n _keyUp(e, hover) {\n var _a;\n if (e.key === 'Alt') {\n hover.isLocked = false;\n // Hide if alt is released while the mouse is not over hover/target\n if (!hover.isMouseIn) {\n this.hideHover();\n (_a = this._lastFocusedElementBeforeOpen) === null || _a === void 0 ? void 0 : _a.focus();\n }\n }\n }\n // TODO: Investigate performance of this function. There seems to be a lot of content created\n // and thrown away on start up\n setupUpdatableHover(hoverDelegate, htmlElement, content, options) {\n htmlElement.setAttribute('custom-hover', 'true');\n if (htmlElement.title !== '') {\n console.warn('HTML element already has a title attribute, which will conflict with the custom hover. Please remove the title attribute.');\n console.trace('Stack trace:', htmlElement.title);\n htmlElement.title = '';\n }\n let hoverPreparation;\n let hoverWidget;\n const hideHover = (disposeWidget, disposePreparation) => {\n var _a;\n const hadHover = hoverWidget !== undefined;\n if (disposeWidget) {\n hoverWidget === null || hoverWidget === void 0 ? void 0 : hoverWidget.dispose();\n hoverWidget = undefined;\n }\n if (disposePreparation) {\n hoverPreparation === null || hoverPreparation === void 0 ? void 0 : hoverPreparation.dispose();\n hoverPreparation = undefined;\n }\n if (hadHover) {\n (_a = hoverDelegate.onDidHideHover) === null || _a === void 0 ? void 0 : _a.call(hoverDelegate);\n hoverWidget = undefined;\n }\n };\n const triggerShowHover = (delay, focus, target, trapFocus) => {\n return new TimeoutTimer(async () => {\n if (!hoverWidget || hoverWidget.isDisposed) {\n hoverWidget = new UpdatableHoverWidget(hoverDelegate, target || htmlElement, delay > 0);\n await hoverWidget.update(typeof content === 'function' ? content() : content, focus, { ...options, trapFocus });\n }\n }, delay);\n };\n let isMouseDown = false;\n const mouseDownEmitter = addDisposableListener(htmlElement, EventType.MOUSE_DOWN, () => {\n isMouseDown = true;\n hideHover(true, true);\n }, true);\n const mouseUpEmitter = addDisposableListener(htmlElement, EventType.MOUSE_UP, () => {\n isMouseDown = false;\n }, true);\n const mouseLeaveEmitter = addDisposableListener(htmlElement, EventType.MOUSE_LEAVE, (e) => {\n isMouseDown = false;\n hideHover(false, e.fromElement === htmlElement);\n }, true);\n const onMouseOver = (e) => {\n if (hoverPreparation) {\n return;\n }\n const toDispose = new DisposableStore();\n const target = {\n targetElements: [htmlElement],\n dispose: () => { }\n };\n if (hoverDelegate.placement === undefined || hoverDelegate.placement === 'mouse') {\n // track the mouse position\n const onMouseMove = (e) => {\n target.x = e.x + 10;\n if ((isHTMLElement(e.target)) && getHoverTargetElement(e.target, htmlElement) !== htmlElement) {\n hideHover(true, true);\n }\n };\n toDispose.add(addDisposableListener(htmlElement, EventType.MOUSE_MOVE, onMouseMove, true));\n }\n hoverPreparation = toDispose;\n if ((isHTMLElement(e.target)) && getHoverTargetElement(e.target, htmlElement) !== htmlElement) {\n return; // Do not show hover when the mouse is over another hover target\n }\n toDispose.add(triggerShowHover(hoverDelegate.delay, false, target));\n };\n const mouseOverDomEmitter = addDisposableListener(htmlElement, EventType.MOUSE_OVER, onMouseOver, true);\n const onFocus = () => {\n if (isMouseDown || hoverPreparation) {\n return;\n }\n const target = {\n targetElements: [htmlElement],\n dispose: () => { }\n };\n const toDispose = new DisposableStore();\n const onBlur = () => hideHover(true, true);\n toDispose.add(addDisposableListener(htmlElement, EventType.BLUR, onBlur, true));\n toDispose.add(triggerShowHover(hoverDelegate.delay, false, target));\n hoverPreparation = toDispose;\n };\n // Do not show hover when focusing an input or textarea\n let focusDomEmitter;\n const tagName = htmlElement.tagName.toLowerCase();\n if (tagName !== 'input' && tagName !== 'textarea') {\n focusDomEmitter = addDisposableListener(htmlElement, EventType.FOCUS, onFocus, true);\n }\n const hover = {\n show: focus => {\n hideHover(false, true); // terminate a ongoing mouse over preparation\n triggerShowHover(0, focus, undefined, focus); // show hover immediately\n },\n hide: () => {\n hideHover(true, true);\n },\n update: async (newContent, hoverOptions) => {\n content = newContent;\n await (hoverWidget === null || hoverWidget === void 0 ? void 0 : hoverWidget.update(content, undefined, hoverOptions));\n },\n dispose: () => {\n this._existingHovers.delete(htmlElement);\n mouseOverDomEmitter.dispose();\n mouseLeaveEmitter.dispose();\n mouseDownEmitter.dispose();\n mouseUpEmitter.dispose();\n focusDomEmitter === null || focusDomEmitter === void 0 ? void 0 : focusDomEmitter.dispose();\n hideHover(true, true);\n }\n };\n this._existingHovers.set(htmlElement, hover);\n return hover;\n }\n triggerUpdatableHover(target) {\n const hover = this._existingHovers.get(target);\n if (hover) {\n hover.show(true);\n }\n }\n dispose() {\n this._existingHovers.forEach(hover => hover.dispose());\n super.dispose();\n }\n};\nHoverService = __decorate([\n __param(0, IInstantiationService),\n __param(1, IContextMenuService),\n __param(2, IKeybindingService),\n __param(3, ILayoutService),\n __param(4, IAccessibilityService)\n], HoverService);\nexport { HoverService };\nfunction getHoverOptionsIdentity(options) {\n var _a;\n if (options === undefined) {\n return undefined;\n }\n return (_a = options === null || options === void 0 ? void 0 : options.id) !== null && _a !== void 0 ? _a : options;\n}\nclass HoverContextViewDelegate {\n get anchorPosition() {\n return this._hover.anchor;\n }\n constructor(_hover, _focus = false) {\n this._hover = _hover;\n this._focus = _focus;\n // Render over all other context views\n this.layer = 1;\n }\n render(container) {\n this._hover.render(container);\n if (this._focus) {\n this._hover.focus();\n }\n return this._hover;\n }\n getAnchor() {\n return {\n x: this._hover.x,\n y: this._hover.y\n };\n }\n layout() {\n this._hover.layout();\n }\n}\nfunction getHoverTargetElement(element, stopElement) {\n stopElement = stopElement !== null && stopElement !== void 0 ? stopElement : getWindow(element).document.body;\n while (!element.hasAttribute('custom-hover') && element !== stopElement) {\n element = element.parentElement;\n }\n return element;\n}\nregisterSingleton(IHoverService, HoverService, 1 /* InstantiationType.Delayed */);\nregisterThemingParticipant((theme, collector) => {\n const hoverBorder = theme.getColor(editorHoverBorder);\n if (hoverBorder) {\n collector.addRule(`.monaco-workbench .workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${hoverBorder.transparent(0.5)}; }`);\n collector.addRule(`.monaco-workbench .workbench-hover hr { border-top: 1px solid ${hoverBorder.transparent(0.5)}; }`);\n }\n});\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport { IMarkerDecorationsService } from '../../common/services/markerDecorations.js';\nimport { registerEditorContribution } from '../editorExtensions.js';\nlet MarkerDecorationsContribution = class MarkerDecorationsContribution {\n constructor(_editor, _markerDecorationsService) {\n // Doesn't do anything, just requires `IMarkerDecorationsService` to make sure it gets instantiated\n }\n dispose() {\n }\n};\nMarkerDecorationsContribution.ID = 'editor.contrib.markerDecorations';\nMarkerDecorationsContribution = __decorate([\n __param(1, IMarkerDecorationsService)\n], MarkerDecorationsContribution);\nexport { MarkerDecorationsContribution };\nregisterEditorContribution(MarkerDecorationsContribution.ID, MarkerDecorationsContribution, 0 /* EditorContributionInstantiation.Eager */); // eager because it instantiates IMarkerDecorationsService which is responsible for rendering squiggles\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nimport * as dom from '../../../base/browser/dom.js';\nimport { mainWindow } from '../../../base/browser/window.js';\nimport { CancellationToken } from '../../../base/common/cancellation.js';\nimport { LinkedList } from '../../../base/common/linkedList.js';\nimport { ResourceMap } from '../../../base/common/map.js';\nimport { parse } from '../../../base/common/marshalling.js';\nimport { matchesScheme, matchesSomeScheme, Schemas } from '../../../base/common/network.js';\nimport { normalizePath } from '../../../base/common/resources.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { ICodeEditorService } from './codeEditorService.js';\nimport { ICommandService } from '../../../platform/commands/common/commands.js';\nimport { EditorOpenSource } from '../../../platform/editor/common/editor.js';\nimport { extractSelection } from '../../../platform/opener/common/opener.js';\nlet CommandOpener = class CommandOpener {\n constructor(_commandService) {\n this._commandService = _commandService;\n }\n async open(target, options) {\n if (!matchesScheme(target, Schemas.command)) {\n return false;\n }\n if (!(options === null || options === void 0 ? void 0 : options.allowCommands)) {\n // silently ignore commands when command-links are disabled, also\n // suppress other openers by returning TRUE\n return true;\n }\n if (typeof target === 'string') {\n target = URI.parse(target);\n }\n if (Array.isArray(options.allowCommands)) {\n // Only allow specific commands\n if (!options.allowCommands.includes(target.path)) {\n // Suppress other openers by returning TRUE\n return true;\n }\n }\n // execute as command\n let args = [];\n try {\n args = parse(decodeURIComponent(target.query));\n }\n catch (_a) {\n // ignore and retry\n try {\n args = parse(target.query);\n }\n catch (_b) {\n // ignore error\n }\n }\n if (!Array.isArray(args)) {\n args = [args];\n }\n await this._commandService.executeCommand(target.path, ...args);\n return true;\n }\n};\nCommandOpener = __decorate([\n __param(0, ICommandService)\n], CommandOpener);\nlet EditorOpener = class EditorOpener {\n constructor(_editorService) {\n this._editorService = _editorService;\n }\n async open(target, options) {\n if (typeof target === 'string') {\n target = URI.parse(target);\n }\n const { selection, uri } = extractSelection(target);\n target = uri;\n if (target.scheme === Schemas.file) {\n target = normalizePath(target); // workaround for non-normalized paths (https://github.com/microsoft/vscode/issues/12954)\n }\n await this._editorService.openCodeEditor({\n resource: target,\n options: {\n selection,\n source: (options === null || options === void 0 ? void 0 : options.fromUserGesture) ? EditorOpenSource.USER : EditorOpenSource.API,\n ...options === null || options === void 0 ? void 0 : options.editorOptions\n }\n }, this._editorService.getFocusedCodeEditor(), options === null || options === void 0 ? void 0 : options.openToSide);\n return true;\n }\n};\nEditorOpener = __decorate([\n __param(0, ICodeEditorService)\n], EditorOpener);\nlet OpenerService = class OpenerService {\n constructor(editorService, commandService) {\n this._openers = new LinkedList();\n this._validators = new LinkedList();\n this._resolvers = new LinkedList();\n this._resolvedUriTargets = new ResourceMap(uri => uri.with({ path: null, fragment: null, query: null }).toString());\n this._externalOpeners = new LinkedList();\n // Default external opener is going through window.open()\n this._defaultExternalOpener = {\n openExternal: async (href) => {\n // ensure to open HTTP/HTTPS links into new windows\n // to not trigger a navigation. Any other link is\n // safe to be set as HREF to prevent a blank window\n // from opening.\n if (matchesSomeScheme(href, Schemas.http, Schemas.https)) {\n dom.windowOpenNoOpener(href);\n }\n else {\n mainWindow.location.href = href;\n }\n return true;\n }\n };\n // Default opener: any external, maito, http(s), command, and catch-all-editors\n this._openers.push({\n open: async (target, options) => {\n if ((options === null || options === void 0 ? void 0 : options.openExternal) || matchesSomeScheme(target, Schemas.mailto, Schemas.http, Schemas.https, Schemas.vsls)) {\n // open externally\n await this._doOpenExternal(target, options);\n return true;\n }\n return false;\n }\n });\n this._openers.push(new CommandOpener(commandService));\n this._openers.push(new EditorOpener(editorService));\n }\n registerOpener(opener) {\n const remove = this._openers.unshift(opener);\n return { dispose: remove };\n }\n async open(target, options) {\n var _a;\n // check with contributed validators\n const targetURI = typeof target === 'string' ? URI.parse(target) : target;\n // validate against the original URI that this URI resolves to, if one exists\n const validationTarget = (_a = this._resolvedUriTargets.get(targetURI)) !== null && _a !== void 0 ? _a : target;\n for (const validator of this._validators) {\n if (!(await validator.shouldOpen(validationTarget, options))) {\n return false;\n }\n }\n // check with contributed openers\n for (const opener of this._openers) {\n const handled = await opener.open(target, options);\n if (handled) {\n return true;\n }\n }\n return false;\n }\n async resolveExternalUri(resource, options) {\n for (const resolver of this._resolvers) {\n try {\n const result = await resolver.resolveExternalUri(resource, options);\n if (result) {\n if (!this._resolvedUriTargets.has(result.resolved)) {\n this._resolvedUriTargets.set(result.resolved, resource);\n }\n return result;\n }\n }\n catch (_a) {\n // noop\n }\n }\n throw new Error('Could not resolve external URI: ' + resource.toString());\n }\n async _doOpenExternal(resource, options) {\n //todo@jrieken IExternalUriResolver should support `uri: URI | string`\n const uri = typeof resource === 'string' ? URI.parse(resource) : resource;\n let externalUri;\n try {\n externalUri = (await this.resolveExternalUri(uri, options)).resolved;\n }\n catch (_a) {\n externalUri = uri;\n }\n let href;\n if (typeof resource === 'string' && uri.toString() === externalUri.toString()) {\n // open the url-string AS IS\n href = resource;\n }\n else {\n // open URI using the toString(noEncode)+encodeURI-trick\n href = encodeURI(externalUri.toString(true));\n }\n if (options === null || options === void 0 ? void 0 : options.allowContributedOpeners) {\n const preferredOpenerId = typeof (options === null || options === void 0 ? void 0 : options.allowContributedOpeners) === 'string' ? options === null || options === void 0 ? void 0 : options.allowContributedOpeners : undefined;\n for (const opener of this._externalOpeners) {\n const didOpen = await opener.openExternal(href, {\n sourceUri: uri,\n preferredOpenerId,\n }, CancellationToken.None);\n if (didOpen) {\n return true;\n }\n }\n }\n return this._defaultExternalOpener.openExternal(href, { sourceUri: uri }, CancellationToken.None);\n }\n dispose() {\n this._validators.clear();\n }\n};\nOpenerService = __decorate([\n __param(0, ICodeEditorService),\n __param(1, ICommandService)\n], OpenerService);\nexport { OpenerService };\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport { getAllMethodNames } from '../../../base/common/objects.js';\nimport { EditorWorkerClient } from './editorWorkerService.js';\n/**\n * Create a new web worker that has model syncing capabilities built in.\n * Specify an AMD module to load that will `create` an object that will be proxied.\n */\nexport function createWebWorker(modelService, languageConfigurationService, opts) {\n return new MonacoWebWorkerImpl(modelService, languageConfigurationService, opts);\n}\nclass MonacoWebWorkerImpl extends EditorWorkerClient {\n constructor(modelService, languageConfigurationService, opts) {\n super(modelService, opts.keepIdleModels || false, opts.label, languageConfigurationService);\n this._foreignModuleId = opts.moduleId;\n this._foreignModuleCreateData = opts.createData || null;\n this._foreignModuleHost = opts.host || null;\n this._foreignProxy = null;\n }\n // foreign host request\n fhr(method, args) {\n if (!this._foreignModuleHost || typeof this._foreignModuleHost[method] !== 'function') {\n return Promise.reject(new Error('Missing method ' + method + ' or missing main thread foreign host.'));\n }\n try {\n return Promise.resolve(this._foreignModuleHost[method].apply(this._foreignModuleHost, args));\n }\n catch (e) {\n return Promise.reject(e);\n }\n }\n _getForeignProxy() {\n if (!this._foreignProxy) {\n this._foreignProxy = this._getProxy().then((proxy) => {\n const foreignHostMethods = this._foreignModuleHost ? getAllMethodNames(this._foreignModuleHost) : [];\n return proxy.loadForeignModule(this._foreignModuleId, this._foreignModuleCreateData, foreignHostMethods).then((foreignMethods) => {\n this._foreignModuleCreateData = null;\n const proxyMethodRequest = (method, args) => {\n return proxy.fmr(method, args);\n };\n const createProxyMethod = (method, proxyMethodRequest) => {\n return function () {\n const args = Array.prototype.slice.call(arguments, 0);\n return proxyMethodRequest(method, args);\n };\n };\n const foreignProxy = {};\n for (const foreignMethod of foreignMethods) {\n foreignProxy[foreignMethod] = createProxyMethod(foreignMethod, proxyMethodRequest);\n }\n return foreignProxy;\n });\n });\n }\n return this._foreignProxy;\n }\n getProxy() {\n return this._getForeignProxy();\n }\n withSyncedResources(resources) {\n return this._withSyncedResources(resources).then(_ => this.getProxy());\n }\n}\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nexport class StableEditorScrollState {\n static capture(editor) {\n if (editor.getScrollTop() === 0 || editor.hasPendingScrollAnimation()) {\n // Never mess with the scroll top if the editor is at the top of the file or if there is a pending scroll animation\n return new StableEditorScrollState(editor.getScrollTop(), editor.getContentHeight(), null, 0, null);\n }\n let visiblePosition = null;\n let visiblePositionScrollDelta = 0;\n const visibleRanges = editor.getVisibleRanges();\n if (visibleRanges.length > 0) {\n visiblePosition = visibleRanges[0].getStartPosition();\n const visiblePositionScrollTop = editor.getTopForPosition(visiblePosition.lineNumber, visiblePosition.column);\n visiblePositionScrollDelta = editor.getScrollTop() - visiblePositionScrollTop;\n }\n return new StableEditorScrollState(editor.getScrollTop(), editor.getContentHeight(), visiblePosition, visiblePositionScrollDelta, editor.getPosition());\n }\n constructor(_initialScrollTop, _initialContentHeight, _visiblePosition, _visiblePositionScrollDelta, _cursorPosition) {\n this._initialScrollTop = _initialScrollTop;\n this._initialContentHeight = _initialContentHeight;\n this._visiblePosition = _visiblePosition;\n this._visiblePositionScrollDelta = _visiblePositionScrollDelta;\n this._cursorPosition = _cursorPosition;\n }\n restore(editor) {\n if (this._initialContentHeight === editor.getContentHeight() && this._initialScrollTop === editor.getScrollTop()) {\n // The editor's content height and scroll top haven't changed, so we don't need to do anything\n return;\n }\n if (this._visiblePosition) {\n const visiblePositionScrollTop = editor.getTopForPosition(this._visiblePosition.lineNumber, this._visiblePosition.column);\n editor.setScrollTop(visiblePositionScrollTop + this._visiblePositionScrollDelta);\n }\n }\n restoreRelativeVerticalPositionOfCursor(editor) {\n if (this._initialContentHeight === editor.getContentHeight() && this._initialScrollTop === editor.getScrollTop()) {\n // The editor's content height and scroll top haven't changed, so we don't need to do anything\n return;\n }\n const currentCursorPosition = editor.getPosition();\n if (!this._cursorPosition || !currentCursorPosition) {\n return;\n }\n const offset = editor.getTopForLineNumber(currentCursorPosition.lineNumber) - editor.getTopForLineNumber(this._cursorPosition.lineNumber);\n editor.setScrollTop(editor.getScrollTop() + offset, 1 /* ScrollType.Immediate */);\n }\n}\n"],"names":["isCodeEditor","thing","getEditorType","isDiffEditor","getCodeEditor","getModifiedEditor","onDidChangeActiveEditor","isCompositeEditor","activeCodeEditor","PageCoordinates","constructor","x","y","this","_pageCoordinatesBrand","undefined","toClientCoordinates","targetWindow","ClientCoordinates","scrollX","scrollY","clientX","clientY","_clientCoordinatesBrand","toPageCoordinates","EditorPagePosition","width","height","_editorPagePositionBrand","CoordinatesRelativeToEditor","_positionRelativeToEditorBrand","createEditorPagePosition","editorViewDomNode","editorPos","left","top","createCoordinatesRelativeToEditor","editorPagePosition","pos","scaleX","offsetWidth","scaleY","offsetHeight","relativeX","relativeY","EditorMouseEvent","e","isFromPointerCapture","super","_editorMouseEventBrand","posx","posy","relativePos","EditorMouseEventFactory","_editorViewDomNode","_create","onContextMenu","target","callback","onMouseUp","onMouseDown","onPointerDown","pointerId","onMouseLeave","onMouseMove","EditorPointerEventFactory","onPointerUp","onPointerLeave","onPointerMove","GlobalEditorPointerMoveMonitor","_globalPointerMoveMonitor","_register","_keydownListener","startMonitoring","initialElement","initialButtons","pointerMoveCallback","onStopCallback","ownerDocument","toKeyCodeChord","isModifierKey","stopMonitoring","browserEvent","dispose","DynamicCssRules","_editor","_instanceId","_idPool","_counter","_rules","Map","_garbageCollectionScheduler","garbageCollect","createClassNameRef","options","rule","getOrCreateRule","increaseRefCount","className","decreaseRefCount","schedule","properties","key","computeUniqueKey","existingRule","get","counter","RefCountedCssRule","getContainerDomNode","set","JSON","stringify","values","hasReferences","delete","_containerElement","_referenceCount","_styleElementDisposables","_styleElement","textContent","getCssText","str","prop","value","cssValue","id","camelToDashes","replace","first","toLowerCase","letter","EditorExtensionsRegistry","Command","opts","precondition","_kbOpts","kbOpts","_menuOpts","menuOpts","metadata","register","Array","isArray","forEach","_registerMenuItem","kbOptsArr","kbWhen","kbExpr","desc","weight","args","when","primary","secondary","win","linux","mac","handler","accessor","runCommand","item","menuId","group","command","title","icon","order","MultiCommand","arguments","_implementations","addImplementation","priority","name","implementation","push","sort","a","b","i","length","splice","logService","contextKeyService","trace","impl","context","getContext","evaluate","result","ProxyCommand","EditorCommand","bindToContribution","controllerGetter","_callback","runEditorCommand","editor","controller","runner","codeEditorService","getFocusedCodeEditor","getActiveCodeEditor","invokeWithinContext","editorAccessor","contextMatchesRules","EditorAction","convertOptions","withDefaults","label","contextMenuOpts","map","alias","reportTelemetry","run","publicLog2","MultiEditorAction","EditorAction2","_a","_b","kbService","debug","serialize","registerModelAndPositionCommand","instaService","resource","position","model","getModel","editorPosition","invokeFunction","slice","createModelReference","then","reference","Promise","resolve","reject","object","textEditorModel","err","finally","registerEditorCommand","editorCommand","EditorContributionRegistry","INSTANCE","registerEditorAction","ctor","action","registerMultiEditorAction","registerInstantiatedEditorAction","editorAction","registerEditorContribution","instantiation","getEditorCommand","commandId","getEditorActions","getEditorContributions","getSomeEditorContributions","ids","filter","c","indexOf","getDiffEditorContributions","editorContributions","diffEditorContributions","editorActions","editorCommands","Object","create","registerCommand","UndoCommand","comment","RedoCommand","SelectAllCommand","obsCodeEditor","ObservableCodeEditor","_map","d","onDidDispose","onDidChangeModel","__decorate","decorators","r","getOwnPropertyDescriptor","Reflect","decorate","defineProperty","__param","paramIndex","decorator","AbstractCodeEditorService","_themeService","_onWillCreateCodeEditor","_onCodeEditorAdd","onCodeEditorAdd","event","_onCodeEditorRemove","onCodeEditorRemove","_onWillCreateDiffEditor","_onDiffEditorAdd","onDiffEditorAdd","_onDiffEditorRemove","onDiffEditorRemove","_decorationOptionProviders","_codeEditorOpenHandlers","_modelProperties","_codeEditors","_diffEditors","_globalStyleSheet","willCreateCodeEditor","fire","addCodeEditor","getId","removeCodeEditor","listCodeEditors","keys","willCreateDiffEditor","addDiffEditor","listDiffEditors","editorWithWidgetFocus","editors","hasTextFocus","hasWidgetFocus","removeDecorationType","provider","refCount","ed","removeDecorationsByType","setModelProperty","key1","toString","dest","has","getModelProperty","openCodeEditor","input","source","sideBySide","candidate","registerCodeEditorOpenHandler","rm","unshift","IBulkEditService","ResourceEdit","convert","edit","edits","ResourceTextEdit","is","lift","ResourceFileEdit","Error","textEdit","versionId","Boolean","newResource","oldResource","ICodeEditorService","STOP_WORKER_DELTA_TIME_MS","canSyncModel","modelService","isTooLargeForSyncing","EditorWorkerService","configurationService","languageConfigurationService","languageFeaturesService","_modelService","_workerManager","WorkerManager","_logService","linkProvider","language","hasAccessToAllModels","provideLinks","token","uri","withWorker","client","computeLinks","links","completionProvider","WordBasedCompletionItemProvider","canComputeUnicodeHighlights","computedUnicodeHighlights","range","computeDiff","original","modified","algorithm","identical","quitEarly","changes","toLineRangeMappings","moves","m","computeMoreMinimalEdits","pretty","sw","elapsed","race","canNavigateValueSet","navigateValueSet","up","canComputeWordRanges","computeWordRanges","findSectionHeaders","workerManager","_debugDisplayName","_configurationService","provideCompletionItems","config","getValue","wordBasedSuggestions","models","getModels","getLanguageId","wordDefRegExp","getLanguageConfiguration","getWordDefinition","word","getWordAtPosition","lineNumber","startColumn","endColumn","insert","setEndPosition","column","data","textualSuggest","duration","suggestions","words","kind","insertText","_editorWorkerClient","_lastWorkerUsedTime","Date","getTime","cancelAndSet","_checkStopIdleWorker","Math","round","onModelRemoved","_","_checkStopEmptyWorker","EditorWorkerClient","EditorModelManager","proxy","keepIdleModels","_syncedModels","_syncedModelsLastUsedTime","_proxy","timer","_checkStopModelSync","STOP_SYNC_MODEL_DELTA_TIME_MS","modelUrl","ensureSyncedResources","resources","forceLargeModels","resourceStr","_beginModelSync","currentTime","toRemove","_stopModelSync","acceptNewModel","url","lines","getLinesContent","EOL","getEOL","getVersionId","toDispose","add","onDidChangeContent","acceptModelChanged","onWillDispose","acceptRemovedModel","SynchronousWorkerClient","instance","_instance","_proxyObj","getProxyObject","EditorWorkerHost","workerClient","_workerClient","fhr","method","_disposed","_keepIdleModels","_workerFactory","_worker","_modelManager","_getOrCreateWorker","_getProxy","_getOrCreateModelManager","_withSyncedResources","computeUnicodeHighlights","computeDefaultDocumentColors","leadingWord","wordDef","wordDefFlags","flags","$","dom","HoverWidget","_targetWindow","_target","targetElements","_targetDocumentElement","document","documentElement","isDisposed","_isDisposed","isMouseIn","_lockMouseTracker","domNode","_hover","containerDomNode","onDispose","_onDispose","onRequestLayout","_onRequestLayout","anchor","_hoverPosition","_x","_y","isLocked","_isLocked","_hoverContainer","classList","toggle","_keybindingService","_openerService","_instantiationService","_accessibilityService","_c","_d","_e","_f","_g","_h","_messageListeners","_forcePosition","_enableFocusTraps","_addedFocusTrap","_linkHandler","linkHandler","content","isTrusted","ElementHoverTarget","_hoverPointer","appearance","showPointer","compact","skipFadeInAnimation","additionalClasses","forcePosition","trapFocus","hoverPosition","onmousedown","stopPropagation","onkeydown","equals","rowElement","contentsElement","style","whiteSpace","appendChild","markdown","mdRenderer","createInstance","codeBlockFontFamily","fontFamily","element","render","actionHandler","disposables","asyncRenderCallback","layout","contentsDomNode","actions","statusBarElement","actionsElement","keybinding","lookupKeybinding","keybindingLabel","getLabel","iconClass","hideOnHover","persistence","includes","showHoverHint","infoElement","mouseTrackerTargets","mouseTracker","CompositeMouseTracker","onMouseOut","mouseTracker2Targets","addFocusTrap","firstContainerFocusElement","lastContainerFocusElement","findLastFocusableChild","beforeContainerFocusElement","afterContainerFocusElement","tabIndex","focus","preventDefault","root","hasChildNodes","childNodes","node","nodeType","ELEMENT_NODE","parsedNode","recursivelyFoundElement","container","accessibleViewHint","contains","activeElement","isScreenReaderOptimized","getAriaLabel","remove","maxHeight","targetBounds","zoom","boundingRect","getBoundingClientRect","bottom","right","getZoomAccountedBoundingClientRect","targetRect","center","adjustHorizontalHoverPosition","adjustVerticalHoverPosition","adjustHoverMaxHeight","padding","margin","paddingLeft","marginLeft","paddingRight","marginRight","paddingTop","marginTop","paddingBottom","marginBottom","computeXCordinate","computeYCordinate","setHoverPointerPosition","onContentsChanged","hoverWidth","clientWidth","max","clientLeft","clientHeight","innerHeight","hoverPointerOffset","maxWidth","min","scrollHeight","extraRightPadding","scrollbar","verticalScrollbarSize","hoverHeight","pointerLeftPosition","pointerX","_onMouseOut","_isMouseIn","_elements","n","onmouseover","_onTargetMouseOver","onmouseleave","_onTargetMouseLeave","_clearEvaluateMouseStateTimeout","_evaluateMouseState","_mouseTimeout","setTimeout","_fireIfMouseOutside","clearTimeout","_element","UpdatableHoverWidget","hoverDelegate","fadeInAnimation","update","_cancellationTokenSource","resolvedContent","_hoverWidget","show","markdownNotSupportedFallback","isCancellationRequested","oldHoverWidget","hasContent","hoverOptions","placement","showHover","HoverService","contextMenuService","_layoutService","_existingHovers","onDidShowContextMenu","hideHover","_contextViewHandler","skipLastFocusedUpdate","getHoverOptionsIdentity","_currentHoverOptions","_currentHover","sticky","_lastHoverOptions","_lastFocusedElementBeforeOpen","hoverDisposables","hover","targetElement","getContainer","showContextView","HoverContextViewDelegate","doHideHover","focusedElement","focusedElementDocument","_keyDown","hideOnKeyDown","_keyUp","observer","IntersectionObserver","_intersectionChange","threshold","firstTargetElement","observe","disconnect","hideContextView","entries","isIntersecting","showAndFocusLastHover","resolveKeyboardEvent","getSingleModifierDispatchChords","some","softDispatch","setupUpdatableHover","htmlElement","hoverPreparation","hoverWidget","setAttribute","console","warn","disposeWidget","disposePreparation","hadHover","onDidHideHover","call","triggerShowHover","delay","async","isMouseDown","mouseDownEmitter","mouseUpEmitter","mouseLeaveEmitter","fromElement","mouseOverDomEmitter","getHoverTargetElement","onFocus","focusDomEmitter","tagName","hide","newContent","triggerUpdatableHover","anchorPosition","_focus","layer","getAnchor","stopElement","body","hasAttribute","parentElement","theme","collector","hoverBorder","getColor","addRule","transparent","MarkerDecorationsContribution","_markerDecorationsService","ID","CommandOpener","_commandService","open","allowCommands","path","decodeURIComponent","query","executeCommand","EditorOpener","_editorService","selection","scheme","fromUserGesture","editorOptions","openToSide","OpenerService","editorService","commandService","_openers","_validators","_resolvers","_resolvedUriTargets","with","fragment","_externalOpeners","_defaultExternalOpener","openExternal","href","_doOpenExternal","registerOpener","opener","targetURI","validationTarget","validator","shouldOpen","resolveExternalUri","resolver","resolved","externalUri","encodeURI","allowContributedOpeners","preferredOpenerId","sourceUri","clear","createWebWorker","MonacoWebWorkerImpl","_foreignModuleId","moduleId","_foreignModuleCreateData","createData","_foreignModuleHost","host","_foreignProxy","apply","_getForeignProxy","foreignHostMethods","loadForeignModule","foreignMethods","proxyMethodRequest","fmr","createProxyMethod","prototype","foreignProxy","foreignMethod","getProxy","withSyncedResources","StableEditorScrollState","capture","getScrollTop","hasPendingScrollAnimation","getContentHeight","visiblePosition","visiblePositionScrollDelta","visibleRanges","getVisibleRanges","getStartPosition","visiblePositionScrollTop","getTopForPosition","getPosition","_initialScrollTop","_initialContentHeight","_visiblePosition","_visiblePositionScrollDelta","_cursorPosition","restore","setScrollTop","restoreRelativeVerticalPositionOfCursor","currentCursorPosition","offset","getTopForLineNumber"],"sourceRoot":""}