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AAAmX,CAAQC,GACJ,OAAOA,GAASA,IAAUjwB,KAAKiwB,KACnC,CACA,OAAAC,CAAQD,GACJ,GAAIjwB,KAAKgwB,QAAQC,GACb,OAAOjwB,KAAK8I,IAGpB,EAEJgnB,EAAuBjX,SAAW,IAAIiX,C,iBC9B/B,IAAIK,E,iBACX,SAAWA,GAKPA,EAAiBA,EAAsB,IAAI,GAAK,MAKhDA,EAAiBA,EAAuB,KAAI,GAAK,MACpD,CAXD,CAWGA,IAAqBA,EAAmB,CAAC,G","sources":["file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/platform/clipboard/browser/clipboardService.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/platform/commands/common/commands.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/platform/configuration/common/configuration.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationModels.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/platform/configuration/common/configurations.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/platform/contextkey/browser/contextKeyService.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/platform/contextkey/common/scanner.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkey.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/platform/contextkey/common/contextkeys.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuHandler.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextMenuService.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextView.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/platform/contextview/browser/contextViewService.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/platform/dialogs/common/dialogs.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/platform/dnd/browser/dnd.js","file:////home/runner/work/platform/platform/common/temp/node_modules/.pnpm/monaco-editor@0.50.0/node_modules/monaco-editor/esm/vs/platform/editor/common/editor.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 *--------------------------------------------------------------------------------------------*/\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};\nvar BrowserClipboardService_1;\nimport { isSafari, isWebkitWebView } from '../../../base/browser/browser.js';\nimport { $, addDisposableListener, getActiveDocument, getActiveWindow, isHTMLElement, onDidRegisterWindow } from '../../../base/browser/dom.js';\nimport { mainWindow } from '../../../base/browser/window.js';\nimport { DeferredPromise } from '../../../base/common/async.js';\nimport { Event } from '../../../base/common/event.js';\nimport { hash } from '../../../base/common/hash.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { ILayoutService } from '../../layout/browser/layoutService.js';\nimport { ILogService } from '../../log/common/log.js';\nlet BrowserClipboardService = BrowserClipboardService_1 = class BrowserClipboardService extends Disposable {\n constructor(layoutService, logService) {\n super();\n this.layoutService = layoutService;\n this.logService = logService;\n this.mapTextToType = new Map(); // unsupported in web (only in-memory)\n this.findText = ''; // unsupported in web (only in-memory)\n this.resources = []; // unsupported in web (only in-memory)\n this.resourcesStateHash = undefined;\n if (isSafari || isWebkitWebView) {\n this.installWebKitWriteTextWorkaround();\n }\n // Keep track of copy operations to reset our set of\n // copied resources: since we keep resources in memory\n // and not in the clipboard, we have to invalidate\n // that state when the user copies other data.\n this._register(Event.runAndSubscribe(onDidRegisterWindow, ({ window, disposables }) => {\n disposables.add(addDisposableListener(window.document, 'copy', () => this.clearResources()));\n }, { window: mainWindow, disposables: this._store }));\n }\n // In Safari, it has the following note:\n //\n // \"The request to write to the clipboard must be triggered during a user gesture.\n // A call to clipboard.write or clipboard.writeText outside the scope of a user\n // gesture(such as \"click\" or \"touch\" event handlers) will result in the immediate\n // rejection of the promise returned by the API call.\"\n // From: https://webkit.org/blog/10855/async-clipboard-api/\n //\n // Since extensions run in a web worker, and handle gestures in an asynchronous way,\n // they are not classified by Safari as \"in response to a user gesture\" and will reject.\n //\n // This function sets up some handlers to work around that behavior.\n installWebKitWriteTextWorkaround() {\n const handler = () => {\n const currentWritePromise = new DeferredPromise();\n // Cancel the previous promise since we just created a new one in response to this new event\n if (this.webKitPendingClipboardWritePromise && !this.webKitPendingClipboardWritePromise.isSettled) {\n this.webKitPendingClipboardWritePromise.cancel();\n }\n this.webKitPendingClipboardWritePromise = currentWritePromise;\n // The ctor of ClipboardItem allows you to pass in a promise that will resolve to a string.\n // This allows us to pass in a Promise that will either be cancelled by another event or\n // resolved with the contents of the first call to this.writeText.\n // see https://developer.mozilla.org/en-US/docs/Web/API/ClipboardItem/ClipboardItem#parameters\n getActiveWindow().navigator.clipboard.write([new ClipboardItem({\n 'text/plain': currentWritePromise.p,\n })]).catch(async (err) => {\n if (!(err instanceof Error) || err.name !== 'NotAllowedError' || !currentWritePromise.isRejected) {\n this.logService.error(err);\n }\n });\n };\n this._register(Event.runAndSubscribe(this.layoutService.onDidAddContainer, ({ container, disposables }) => {\n disposables.add(addDisposableListener(container, 'click', handler));\n disposables.add(addDisposableListener(container, 'keydown', handler));\n }, { container: this.layoutService.mainContainer, disposables: this._store }));\n }\n async writeText(text, type) {\n // Clear resources given we are writing text\n this.writeResources([]);\n // With type: only in-memory is supported\n if (type) {\n this.mapTextToType.set(type, text);\n return;\n }\n if (this.webKitPendingClipboardWritePromise) {\n // For Safari, we complete this Promise which allows the call to `navigator.clipboard.write()`\n // above to resolve and successfully copy to the clipboard. If we let this continue, Safari\n // would throw an error because this call stack doesn't appear to originate from a user gesture.\n return this.webKitPendingClipboardWritePromise.complete(text);\n }\n // Guard access to navigator.clipboard with try/catch\n // as we have seen DOMExceptions in certain browsers\n // due to security policies.\n try {\n return await getActiveWindow().navigator.clipboard.writeText(text);\n }\n catch (error) {\n console.error(error);\n }\n // Fallback to textarea and execCommand solution\n this.fallbackWriteText(text);\n }\n fallbackWriteText(text) {\n const activeDocument = getActiveDocument();\n const activeElement = activeDocument.activeElement;\n const textArea = activeDocument.body.appendChild($('textarea', { 'aria-hidden': true }));\n textArea.style.height = '1px';\n textArea.style.width = '1px';\n textArea.style.position = 'absolute';\n textArea.value = text;\n textArea.focus();\n textArea.select();\n activeDocument.execCommand('copy');\n if (isHTMLElement(activeElement)) {\n activeElement.focus();\n }\n activeDocument.body.removeChild(textArea);\n }\n async readText(type) {\n // With type: only in-memory is supported\n if (type) {\n return this.mapTextToType.get(type) || '';\n }\n // Guard access to navigator.clipboard with try/catch\n // as we have seen DOMExceptions in certain browsers\n // due to security policies.\n try {\n return await getActiveWindow().navigator.clipboard.readText();\n }\n catch (error) {\n console.error(error);\n }\n return '';\n }\n async readFindText() {\n return this.findText;\n }\n async writeFindText(text) {\n this.findText = text;\n }\n async writeResources(resources) {\n if (resources.length === 0) {\n this.clearResources();\n }\n else {\n this.resources = resources;\n this.resourcesStateHash = await this.computeResourcesStateHash();\n }\n }\n async readResources() {\n const resourcesStateHash = await this.computeResourcesStateHash();\n if (this.resourcesStateHash !== resourcesStateHash) {\n this.clearResources(); // state mismatch, resources no longer valid\n }\n return this.resources;\n }\n async computeResourcesStateHash() {\n if (this.resources.length === 0) {\n return undefined; // no resources, no hash needed\n }\n // Resources clipboard is managed in-memory only and thus\n // fails to invalidate when clipboard data is changing.\n // As such, we compute the hash of the current clipboard\n // and use that to later validate the resources clipboard.\n const clipboardText = await this.readText();\n return hash(clipboardText.substring(0, BrowserClipboardService_1.MAX_RESOURCE_STATE_SOURCE_LENGTH));\n }\n clearResources() {\n this.resources = [];\n this.resourcesStateHash = undefined;\n }\n};\nBrowserClipboardService.MAX_RESOURCE_STATE_SOURCE_LENGTH = 1000;\nBrowserClipboardService = BrowserClipboardService_1 = __decorate([\n __param(0, ILayoutService),\n __param(1, ILogService)\n], BrowserClipboardService);\nexport { BrowserClipboardService };\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 '../../instantiation/common/instantiation.js';\nexport const IClipboardService = createDecorator('clipboardService');\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 { Emitter } from '../../../base/common/event.js';\nimport { Iterable } from '../../../base/common/iterator.js';\nimport { toDisposable } from '../../../base/common/lifecycle.js';\nimport { LinkedList } from '../../../base/common/linkedList.js';\nimport { validateConstraints } from '../../../base/common/types.js';\nimport { createDecorator } from '../../instantiation/common/instantiation.js';\nexport const ICommandService = createDecorator('commandService');\nexport const CommandsRegistry = new class {\n constructor() {\n this._commands = new Map();\n this._onDidRegisterCommand = new Emitter();\n this.onDidRegisterCommand = this._onDidRegisterCommand.event;\n }\n registerCommand(idOrCommand, handler) {\n if (!idOrCommand) {\n throw new Error(`invalid command`);\n }\n if (typeof idOrCommand === 'string') {\n if (!handler) {\n throw new Error(`invalid command`);\n }\n return this.registerCommand({ id: idOrCommand, handler });\n }\n // add argument validation if rich command metadata is provided\n if (idOrCommand.metadata && Array.isArray(idOrCommand.metadata.args)) {\n const constraints = [];\n for (const arg of idOrCommand.metadata.args) {\n constraints.push(arg.constraint);\n }\n const actualHandler = idOrCommand.handler;\n idOrCommand.handler = function (accessor, ...args) {\n validateConstraints(args, constraints);\n return actualHandler(accessor, ...args);\n };\n }\n // find a place to store the command\n const { id } = idOrCommand;\n let commands = this._commands.get(id);\n if (!commands) {\n commands = new LinkedList();\n this._commands.set(id, commands);\n }\n const removeFn = commands.unshift(idOrCommand);\n const ret = toDisposable(() => {\n removeFn();\n const command = this._commands.get(id);\n if (command === null || command === void 0 ? void 0 : command.isEmpty()) {\n this._commands.delete(id);\n }\n });\n // tell the world about this command\n this._onDidRegisterCommand.fire(id);\n return ret;\n }\n registerCommandAlias(oldId, newId) {\n return CommandsRegistry.registerCommand(oldId, (accessor, ...args) => accessor.get(ICommandService).executeCommand(newId, ...args));\n }\n getCommand(id) {\n const list = this._commands.get(id);\n if (!list || list.isEmpty()) {\n return undefined;\n }\n return Iterable.first(list);\n }\n getCommands() {\n const result = new Map();\n for (const key of this._commands.keys()) {\n const command = this.getCommand(key);\n if (command) {\n result.set(key, command);\n }\n }\n return result;\n }\n};\nCommandsRegistry.registerCommand('noop', () => { });\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 '../../instantiation/common/instantiation.js';\nexport const IConfigurationService = createDecorator('configurationService');\nexport function toValuesTree(properties, conflictReporter) {\n const root = Object.create(null);\n for (const key in properties) {\n addToValueTree(root, key, properties[key], conflictReporter);\n }\n return root;\n}\nexport function addToValueTree(settingsTreeRoot, key, value, conflictReporter) {\n const segments = key.split('.');\n const last = segments.pop();\n let curr = settingsTreeRoot;\n for (let i = 0; i < segments.length; i++) {\n const s = segments[i];\n let obj = curr[s];\n switch (typeof obj) {\n case 'undefined':\n obj = curr[s] = Object.create(null);\n break;\n case 'object':\n if (obj === null) {\n conflictReporter(`Ignoring ${key} as ${segments.slice(0, i + 1).join('.')} is null`);\n return;\n }\n break;\n default:\n conflictReporter(`Ignoring ${key} as ${segments.slice(0, i + 1).join('.')} is ${JSON.stringify(obj)}`);\n return;\n }\n curr = obj;\n }\n if (typeof curr === 'object' && curr !== null) {\n try {\n curr[last] = value; // workaround https://github.com/microsoft/vscode/issues/13606\n }\n catch (e) {\n conflictReporter(`Ignoring ${key} as ${segments.join('.')} is ${JSON.stringify(curr)}`);\n }\n }\n else {\n conflictReporter(`Ignoring ${key} as ${segments.join('.')} is ${JSON.stringify(curr)}`);\n }\n}\nexport function removeFromValueTree(valueTree, key) {\n const segments = key.split('.');\n doRemoveFromValueTree(valueTree, segments);\n}\nfunction doRemoveFromValueTree(valueTree, segments) {\n const first = segments.shift();\n if (segments.length === 0) {\n // Reached last segment\n delete valueTree[first];\n return;\n }\n if (Object.keys(valueTree).indexOf(first) !== -1) {\n const value = valueTree[first];\n if (typeof value === 'object' && !Array.isArray(value)) {\n doRemoveFromValueTree(value, segments);\n if (Object.keys(value).length === 0) {\n delete valueTree[first];\n }\n }\n }\n}\n/**\n * A helper function to get the configuration value with a specific settings path (e.g. config.some.setting)\n */\nexport function getConfigurationValue(config, settingPath, defaultValue) {\n function accessSetting(config, path) {\n let current = config;\n for (const component of path) {\n if (typeof current !== 'object' || current === null) {\n return undefined;\n }\n current = current[component];\n }\n return current;\n }\n const path = settingPath.split('.');\n const result = accessSetting(config, path);\n return typeof result === 'undefined' ? defaultValue : result;\n}\nexport function getLanguageTagSettingPlainKey(settingKey) {\n return settingKey.replace(/[\\[\\]]/g, '');\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 arrays from '../../../base/common/arrays.js';\nimport { ResourceMap } from '../../../base/common/map.js';\nimport * as objects from '../../../base/common/objects.js';\nimport * as types from '../../../base/common/types.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { addToValueTree, getConfigurationValue, removeFromValueTree, toValuesTree } from './configuration.js';\nimport { Extensions, overrideIdentifiersFromKey, OVERRIDE_PROPERTY_REGEX } from './configurationRegistry.js';\nimport { Registry } from '../../registry/common/platform.js';\nfunction freeze(data) {\n return Object.isFrozen(data) ? data : objects.deepFreeze(data);\n}\nexport class ConfigurationModel {\n static createEmptyModel(logService) {\n return new ConfigurationModel({}, [], [], undefined, logService);\n }\n constructor(_contents, _keys, _overrides, raw, logService) {\n this._contents = _contents;\n this._keys = _keys;\n this._overrides = _overrides;\n this.raw = raw;\n this.logService = logService;\n this.overrideConfigurations = new Map();\n }\n get rawConfiguration() {\n var _a;\n if (!this._rawConfiguration) {\n if ((_a = this.raw) === null || _a === void 0 ? void 0 : _a.length) {\n const rawConfigurationModels = this.raw.map(raw => {\n if (raw instanceof ConfigurationModel) {\n return raw;\n }\n const parser = new ConfigurationModelParser('', this.logService);\n parser.parseRaw(raw);\n return parser.configurationModel;\n });\n this._rawConfiguration = rawConfigurationModels.reduce((previous, current) => current === previous ? current : previous.merge(current), rawConfigurationModels[0]);\n }\n else {\n // raw is same as current\n this._rawConfiguration = this;\n }\n }\n return this._rawConfiguration;\n }\n get contents() {\n return this._contents;\n }\n get overrides() {\n return this._overrides;\n }\n get keys() {\n return this._keys;\n }\n isEmpty() {\n return this._keys.length === 0 && Object.keys(this._contents).length === 0 && this._overrides.length === 0;\n }\n getValue(section) {\n return section ? getConfigurationValue(this.contents, section) : this.contents;\n }\n inspect(section, overrideIdentifier) {\n const that = this;\n return {\n get value() {\n return freeze(that.rawConfiguration.getValue(section));\n },\n get override() {\n return overrideIdentifier ? freeze(that.rawConfiguration.getOverrideValue(section, overrideIdentifier)) : undefined;\n },\n get merged() {\n return freeze(overrideIdentifier ? that.rawConfiguration.override(overrideIdentifier).getValue(section) : that.rawConfiguration.getValue(section));\n },\n get overrides() {\n const overrides = [];\n for (const { contents, identifiers, keys } of that.rawConfiguration.overrides) {\n const value = new ConfigurationModel(contents, keys, [], undefined, that.logService).getValue(section);\n if (value !== undefined) {\n overrides.push({ identifiers, value });\n }\n }\n return overrides.length ? freeze(overrides) : undefined;\n }\n };\n }\n getOverrideValue(section, overrideIdentifier) {\n const overrideContents = this.getContentsForOverrideIdentifer(overrideIdentifier);\n return overrideContents\n ? section ? getConfigurationValue(overrideContents, section) : overrideContents\n : undefined;\n }\n override(identifier) {\n let overrideConfigurationModel = this.overrideConfigurations.get(identifier);\n if (!overrideConfigurationModel) {\n overrideConfigurationModel = this.createOverrideConfigurationModel(identifier);\n this.overrideConfigurations.set(identifier, overrideConfigurationModel);\n }\n return overrideConfigurationModel;\n }\n merge(...others) {\n var _a, _b;\n const contents = objects.deepClone(this.contents);\n const overrides = objects.deepClone(this.overrides);\n const keys = [...this.keys];\n const raws = ((_a = this.raw) === null || _a === void 0 ? void 0 : _a.length) ? [...this.raw] : [this];\n for (const other of others) {\n raws.push(...(((_b = other.raw) === null || _b === void 0 ? void 0 : _b.length) ? other.raw : [other]));\n if (other.isEmpty()) {\n continue;\n }\n this.mergeContents(contents, other.contents);\n for (const otherOverride of other.overrides) {\n const [override] = overrides.filter(o => arrays.equals(o.identifiers, otherOverride.identifiers));\n if (override) {\n this.mergeContents(override.contents, otherOverride.contents);\n override.keys.push(...otherOverride.keys);\n override.keys = arrays.distinct(override.keys);\n }\n else {\n overrides.push(objects.deepClone(otherOverride));\n }\n }\n for (const key of other.keys) {\n if (keys.indexOf(key) === -1) {\n keys.push(key);\n }\n }\n }\n return new ConfigurationModel(contents, keys, overrides, raws.every(raw => raw instanceof ConfigurationModel) ? undefined : raws, this.logService);\n }\n createOverrideConfigurationModel(identifier) {\n const overrideContents = this.getContentsForOverrideIdentifer(identifier);\n if (!overrideContents || typeof overrideContents !== 'object' || !Object.keys(overrideContents).length) {\n // If there are no valid overrides, return self\n return this;\n }\n const contents = {};\n for (const key of arrays.distinct([...Object.keys(this.contents), ...Object.keys(overrideContents)])) {\n let contentsForKey = this.contents[key];\n const overrideContentsForKey = overrideContents[key];\n // If there are override contents for the key, clone and merge otherwise use base contents\n if (overrideContentsForKey) {\n // Clone and merge only if base contents and override contents are of type object otherwise just override\n if (typeof contentsForKey === 'object' && typeof overrideContentsForKey === 'object') {\n contentsForKey = objects.deepClone(contentsForKey);\n this.mergeContents(contentsForKey, overrideContentsForKey);\n }\n else {\n contentsForKey = overrideContentsForKey;\n }\n }\n contents[key] = contentsForKey;\n }\n return new ConfigurationModel(contents, this.keys, this.overrides, undefined, this.logService);\n }\n mergeContents(source, target) {\n for (const key of Object.keys(target)) {\n if (key in source) {\n if (types.isObject(source[key]) && types.isObject(target[key])) {\n this.mergeContents(source[key], target[key]);\n continue;\n }\n }\n source[key] = objects.deepClone(target[key]);\n }\n }\n getContentsForOverrideIdentifer(identifier) {\n let contentsForIdentifierOnly = null;\n let contents = null;\n const mergeContents = (contentsToMerge) => {\n if (contentsToMerge) {\n if (contents) {\n this.mergeContents(contents, contentsToMerge);\n }\n else {\n contents = objects.deepClone(contentsToMerge);\n }\n }\n };\n for (const override of this.overrides) {\n if (override.identifiers.length === 1 && override.identifiers[0] === identifier) {\n contentsForIdentifierOnly = override.contents;\n }\n else if (override.identifiers.includes(identifier)) {\n mergeContents(override.contents);\n }\n }\n // Merge contents of the identifier only at the end to take precedence.\n mergeContents(contentsForIdentifierOnly);\n return contents;\n }\n toJSON() {\n return {\n contents: this.contents,\n overrides: this.overrides,\n keys: this.keys\n };\n }\n // Update methods\n addValue(key, value) {\n this.updateValue(key, value, true);\n }\n setValue(key, value) {\n this.updateValue(key, value, false);\n }\n removeValue(key) {\n const index = this.keys.indexOf(key);\n if (index === -1) {\n return;\n }\n this.keys.splice(index, 1);\n removeFromValueTree(this.contents, key);\n if (OVERRIDE_PROPERTY_REGEX.test(key)) {\n this.overrides.splice(this.overrides.findIndex(o => arrays.equals(o.identifiers, overrideIdentifiersFromKey(key))), 1);\n }\n }\n updateValue(key, value, add) {\n addToValueTree(this.contents, key, value, e => this.logService.error(e));\n add = add || this.keys.indexOf(key) === -1;\n if (add) {\n this.keys.push(key);\n }\n if (OVERRIDE_PROPERTY_REGEX.test(key)) {\n this.overrides.push({\n identifiers: overrideIdentifiersFromKey(key),\n keys: Object.keys(this.contents[key]),\n contents: toValuesTree(this.contents[key], message => this.logService.error(message)),\n });\n }\n }\n}\nexport class ConfigurationModelParser {\n constructor(_name, logService) {\n this._name = _name;\n this.logService = logService;\n this._raw = null;\n this._configurationModel = null;\n this._restrictedConfigurations = [];\n }\n get configurationModel() {\n return this._configurationModel || ConfigurationModel.createEmptyModel(this.logService);\n }\n parseRaw(raw, options) {\n this._raw = raw;\n const { contents, keys, overrides, restricted, hasExcludedProperties } = this.doParseRaw(raw, options);\n this._configurationModel = new ConfigurationModel(contents, keys, overrides, hasExcludedProperties ? [raw] : undefined /* raw has not changed */, this.logService);\n this._restrictedConfigurations = restricted || [];\n }\n doParseRaw(raw, options) {\n const configurationProperties = Registry.as(Extensions.Configuration).getConfigurationProperties();\n const filtered = this.filter(raw, configurationProperties, true, options);\n raw = filtered.raw;\n const contents = toValuesTree(raw, message => this.logService.error(`Conflict in settings file ${this._name}: ${message}`));\n const keys = Object.keys(raw);\n const overrides = this.toOverrides(raw, message => this.logService.error(`Conflict in settings file ${this._name}: ${message}`));\n return { contents, keys, overrides, restricted: filtered.restricted, hasExcludedProperties: filtered.hasExcludedProperties };\n }\n filter(properties, configurationProperties, filterOverriddenProperties, options) {\n var _a, _b, _c;\n let hasExcludedProperties = false;\n if (!(options === null || options === void 0 ? void 0 : options.scopes) && !(options === null || options === void 0 ? void 0 : options.skipRestricted) && !((_a = options === null || options === void 0 ? void 0 : options.exclude) === null || _a === void 0 ? void 0 : _a.length)) {\n return { raw: properties, restricted: [], hasExcludedProperties };\n }\n const raw = {};\n const restricted = [];\n for (const key in properties) {\n if (OVERRIDE_PROPERTY_REGEX.test(key) && filterOverriddenProperties) {\n const result = this.filter(properties[key], configurationProperties, false, options);\n raw[key] = result.raw;\n hasExcludedProperties = hasExcludedProperties || result.hasExcludedProperties;\n restricted.push(...result.restricted);\n }\n else {\n const propertySchema = configurationProperties[key];\n const scope = propertySchema ? typeof propertySchema.scope !== 'undefined' ? propertySchema.scope : 3 /* ConfigurationScope.WINDOW */ : undefined;\n if (propertySchema === null || propertySchema === void 0 ? void 0 : propertySchema.restricted) {\n restricted.push(key);\n }\n if (!((_b = options.exclude) === null || _b === void 0 ? void 0 : _b.includes(key)) /* Check exclude */\n && (((_c = options.include) === null || _c === void 0 ? void 0 : _c.includes(key) /* Check include */)\n || ((scope === undefined || options.scopes === undefined || options.scopes.includes(scope)) /* Check scopes */\n && !(options.skipRestricted && (propertySchema === null || propertySchema === void 0 ? void 0 : propertySchema.restricted))))) /* Check restricted */ {\n raw[key] = properties[key];\n }\n else {\n hasExcludedProperties = true;\n }\n }\n }\n return { raw, restricted, hasExcludedProperties };\n }\n toOverrides(raw, conflictReporter) {\n const overrides = [];\n for (const key of Object.keys(raw)) {\n if (OVERRIDE_PROPERTY_REGEX.test(key)) {\n const overrideRaw = {};\n for (const keyInOverrideRaw in raw[key]) {\n overrideRaw[keyInOverrideRaw] = raw[key][keyInOverrideRaw];\n }\n overrides.push({\n identifiers: overrideIdentifiersFromKey(key),\n keys: Object.keys(overrideRaw),\n contents: toValuesTree(overrideRaw, conflictReporter)\n });\n }\n }\n return overrides;\n }\n}\nclass ConfigurationInspectValue {\n constructor(key, overrides, _value, overrideIdentifiers, defaultConfiguration, policyConfiguration, applicationConfiguration, userConfiguration, localUserConfiguration, remoteUserConfiguration, workspaceConfiguration, folderConfigurationModel, memoryConfigurationModel) {\n this.key = key;\n this.overrides = overrides;\n this._value = _value;\n this.overrideIdentifiers = overrideIdentifiers;\n this.defaultConfiguration = defaultConfiguration;\n this.policyConfiguration = policyConfiguration;\n this.applicationConfiguration = applicationConfiguration;\n this.userConfiguration = userConfiguration;\n this.localUserConfiguration = localUserConfiguration;\n this.remoteUserConfiguration = remoteUserConfiguration;\n this.workspaceConfiguration = workspaceConfiguration;\n this.folderConfigurationModel = folderConfigurationModel;\n this.memoryConfigurationModel = memoryConfigurationModel;\n }\n toInspectValue(inspectValue) {\n return (inspectValue === null || inspectValue === void 0 ? void 0 : inspectValue.value) !== undefined || (inspectValue === null || inspectValue === void 0 ? void 0 : inspectValue.override) !== undefined || (inspectValue === null || inspectValue === void 0 ? void 0 : inspectValue.overrides) !== undefined ? inspectValue : undefined;\n }\n get userInspectValue() {\n if (!this._userInspectValue) {\n this._userInspectValue = this.userConfiguration.inspect(this.key, this.overrides.overrideIdentifier);\n }\n return this._userInspectValue;\n }\n get user() {\n return this.toInspectValue(this.userInspectValue);\n }\n}\nexport class Configuration {\n constructor(_defaultConfiguration, _policyConfiguration, _applicationConfiguration, _localUserConfiguration, _remoteUserConfiguration, _workspaceConfiguration, _folderConfigurations, _memoryConfiguration, _memoryConfigurationByResource, logService) {\n this._defaultConfiguration = _defaultConfiguration;\n this._policyConfiguration = _policyConfiguration;\n this._applicationConfiguration = _applicationConfiguration;\n this._localUserConfiguration = _localUserConfiguration;\n this._remoteUserConfiguration = _remoteUserConfiguration;\n this._workspaceConfiguration = _workspaceConfiguration;\n this._folderConfigurations = _folderConfigurations;\n this._memoryConfiguration = _memoryConfiguration;\n this._memoryConfigurationByResource = _memoryConfigurationByResource;\n this.logService = logService;\n this._workspaceConsolidatedConfiguration = null;\n this._foldersConsolidatedConfigurations = new ResourceMap();\n this._userConfiguration = null;\n }\n getValue(section, overrides, workspace) {\n const consolidateConfigurationModel = this.getConsolidatedConfigurationModel(section, overrides, workspace);\n return consolidateConfigurationModel.getValue(section);\n }\n updateValue(key, value, overrides = {}) {\n let memoryConfiguration;\n if (overrides.resource) {\n memoryConfiguration = this._memoryConfigurationByResource.get(overrides.resource);\n if (!memoryConfiguration) {\n memoryConfiguration = ConfigurationModel.createEmptyModel(this.logService);\n this._memoryConfigurationByResource.set(overrides.resource, memoryConfiguration);\n }\n }\n else {\n memoryConfiguration = this._memoryConfiguration;\n }\n if (value === undefined) {\n memoryConfiguration.removeValue(key);\n }\n else {\n memoryConfiguration.setValue(key, value);\n }\n if (!overrides.resource) {\n this._workspaceConsolidatedConfiguration = null;\n }\n }\n inspect(key, overrides, workspace) {\n const consolidateConfigurationModel = this.getConsolidatedConfigurationModel(key, overrides, workspace);\n const folderConfigurationModel = this.getFolderConfigurationModelForResource(overrides.resource, workspace);\n const memoryConfigurationModel = overrides.resource ? this._memoryConfigurationByResource.get(overrides.resource) || this._memoryConfiguration : this._memoryConfiguration;\n const overrideIdentifiers = new Set();\n for (const override of consolidateConfigurationModel.overrides) {\n for (const overrideIdentifier of override.identifiers) {\n if (consolidateConfigurationModel.getOverrideValue(key, overrideIdentifier) !== undefined) {\n overrideIdentifiers.add(overrideIdentifier);\n }\n }\n }\n return new ConfigurationInspectValue(key, overrides, consolidateConfigurationModel.getValue(key), overrideIdentifiers.size ? [...overrideIdentifiers] : undefined, this._defaultConfiguration, this._policyConfiguration.isEmpty() ? undefined : this._policyConfiguration, this.applicationConfiguration.isEmpty() ? undefined : this.applicationConfiguration, this.userConfiguration, this.localUserConfiguration, this.remoteUserConfiguration, workspace ? this._workspaceConfiguration : undefined, folderConfigurationModel ? folderConfigurationModel : undefined, memoryConfigurationModel);\n }\n get applicationConfiguration() {\n return this._applicationConfiguration;\n }\n get userConfiguration() {\n if (!this._userConfiguration) {\n this._userConfiguration = this._remoteUserConfiguration.isEmpty() ? this._localUserConfiguration : this._localUserConfiguration.merge(this._remoteUserConfiguration);\n }\n return this._userConfiguration;\n }\n get localUserConfiguration() {\n return this._localUserConfiguration;\n }\n get remoteUserConfiguration() {\n return this._remoteUserConfiguration;\n }\n getConsolidatedConfigurationModel(section, overrides, workspace) {\n let configurationModel = this.getConsolidatedConfigurationModelForResource(overrides, workspace);\n if (overrides.overrideIdentifier) {\n configurationModel = configurationModel.override(overrides.overrideIdentifier);\n }\n if (!this._policyConfiguration.isEmpty() && this._policyConfiguration.getValue(section) !== undefined) {\n configurationModel = configurationModel.merge(this._policyConfiguration);\n }\n return configurationModel;\n }\n getConsolidatedConfigurationModelForResource({ resource }, workspace) {\n let consolidateConfiguration = this.getWorkspaceConsolidatedConfiguration();\n if (workspace && resource) {\n const root = workspace.getFolder(resource);\n if (root) {\n consolidateConfiguration = this.getFolderConsolidatedConfiguration(root.uri) || consolidateConfiguration;\n }\n const memoryConfigurationForResource = this._memoryConfigurationByResource.get(resource);\n if (memoryConfigurationForResource) {\n consolidateConfiguration = consolidateConfiguration.merge(memoryConfigurationForResource);\n }\n }\n return consolidateConfiguration;\n }\n getWorkspaceConsolidatedConfiguration() {\n if (!this._workspaceConsolidatedConfiguration) {\n this._workspaceConsolidatedConfiguration = this._defaultConfiguration.merge(this.applicationConfiguration, this.userConfiguration, this._workspaceConfiguration, this._memoryConfiguration);\n }\n return this._workspaceConsolidatedConfiguration;\n }\n getFolderConsolidatedConfiguration(folder) {\n let folderConsolidatedConfiguration = this._foldersConsolidatedConfigurations.get(folder);\n if (!folderConsolidatedConfiguration) {\n const workspaceConsolidateConfiguration = this.getWorkspaceConsolidatedConfiguration();\n const folderConfiguration = this._folderConfigurations.get(folder);\n if (folderConfiguration) {\n folderConsolidatedConfiguration = workspaceConsolidateConfiguration.merge(folderConfiguration);\n this._foldersConsolidatedConfigurations.set(folder, folderConsolidatedConfiguration);\n }\n else {\n folderConsolidatedConfiguration = workspaceConsolidateConfiguration;\n }\n }\n return folderConsolidatedConfiguration;\n }\n getFolderConfigurationModelForResource(resource, workspace) {\n if (workspace && resource) {\n const root = workspace.getFolder(resource);\n if (root) {\n return this._folderConfigurations.get(root.uri);\n }\n }\n return undefined;\n }\n toData() {\n return {\n defaults: {\n contents: this._defaultConfiguration.contents,\n overrides: this._defaultConfiguration.overrides,\n keys: this._defaultConfiguration.keys\n },\n policy: {\n contents: this._policyConfiguration.contents,\n overrides: this._policyConfiguration.overrides,\n keys: this._policyConfiguration.keys\n },\n application: {\n contents: this.applicationConfiguration.contents,\n overrides: this.applicationConfiguration.overrides,\n keys: this.applicationConfiguration.keys\n },\n user: {\n contents: this.userConfiguration.contents,\n overrides: this.userConfiguration.overrides,\n keys: this.userConfiguration.keys\n },\n workspace: {\n contents: this._workspaceConfiguration.contents,\n overrides: this._workspaceConfiguration.overrides,\n keys: this._workspaceConfiguration.keys\n },\n folders: [...this._folderConfigurations.keys()].reduce((result, folder) => {\n const { contents, overrides, keys } = this._folderConfigurations.get(folder);\n result.push([folder, { contents, overrides, keys }]);\n return result;\n }, [])\n };\n }\n static parse(data, logService) {\n const defaultConfiguration = this.parseConfigurationModel(data.defaults, logService);\n const policyConfiguration = this.parseConfigurationModel(data.policy, logService);\n const applicationConfiguration = this.parseConfigurationModel(data.application, logService);\n const userConfiguration = this.parseConfigurationModel(data.user, logService);\n const workspaceConfiguration = this.parseConfigurationModel(data.workspace, logService);\n const folders = data.folders.reduce((result, value) => {\n result.set(URI.revive(value[0]), this.parseConfigurationModel(value[1], logService));\n return result;\n }, new ResourceMap());\n return new Configuration(defaultConfiguration, policyConfiguration, applicationConfiguration, userConfiguration, ConfigurationModel.createEmptyModel(logService), workspaceConfiguration, folders, ConfigurationModel.createEmptyModel(logService), new ResourceMap(), logService);\n }\n static parseConfigurationModel(model, logService) {\n return new ConfigurationModel(model.contents, model.keys, model.overrides, undefined, logService);\n }\n}\nexport class ConfigurationChangeEvent {\n constructor(change, previous, currentConfiguraiton, currentWorkspace, logService) {\n this.change = change;\n this.previous = previous;\n this.currentConfiguraiton = currentConfiguraiton;\n this.currentWorkspace = currentWorkspace;\n this.logService = logService;\n this._marker = '\\n';\n this._markerCode1 = this._marker.charCodeAt(0);\n this._markerCode2 = '.'.charCodeAt(0);\n this.affectedKeys = new Set();\n this._previousConfiguration = undefined;\n for (const key of change.keys) {\n this.affectedKeys.add(key);\n }\n for (const [, keys] of change.overrides) {\n for (const key of keys) {\n this.affectedKeys.add(key);\n }\n }\n // Example: '\\nfoo.bar\\nabc.def\\n'\n this._affectsConfigStr = this._marker;\n for (const key of this.affectedKeys) {\n this._affectsConfigStr += key + this._marker;\n }\n }\n get previousConfiguration() {\n if (!this._previousConfiguration && this.previous) {\n this._previousConfiguration = Configuration.parse(this.previous.data, this.logService);\n }\n return this._previousConfiguration;\n }\n affectsConfiguration(section, overrides) {\n var _a;\n // we have one large string with all keys that have changed. we pad (marker) the section\n // and check that either find it padded or before a segment character\n const needle = this._marker + section;\n const idx = this._affectsConfigStr.indexOf(needle);\n if (idx < 0) {\n // NOT: (marker + section)\n return false;\n }\n const pos = idx + needle.length;\n if (pos >= this._affectsConfigStr.length) {\n return false;\n }\n const code = this._affectsConfigStr.charCodeAt(pos);\n if (code !== this._markerCode1 && code !== this._markerCode2) {\n // NOT: section + (marker | segment)\n return false;\n }\n if (overrides) {\n const value1 = this.previousConfiguration ? this.previousConfiguration.getValue(section, overrides, (_a = this.previous) === null || _a === void 0 ? void 0 : _a.workspace) : undefined;\n const value2 = this.currentConfiguraiton.getValue(section, overrides, this.currentWorkspace);\n return !objects.equals(value1, value2);\n }\n return 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 *--------------------------------------------------------------------------------------------*/\nimport { distinct } from '../../../base/common/arrays.js';\nimport { Emitter } from '../../../base/common/event.js';\nimport * as types from '../../../base/common/types.js';\nimport * as nls from '../../../nls.js';\nimport { getLanguageTagSettingPlainKey } from './configuration.js';\nimport { Extensions as JSONExtensions } from '../../jsonschemas/common/jsonContributionRegistry.js';\nimport { Registry } from '../../registry/common/platform.js';\nexport const Extensions = {\n Configuration: 'base.contributions.configuration'\n};\nexport const allSettings = { properties: {}, patternProperties: {} };\nexport const applicationSettings = { properties: {}, patternProperties: {} };\nexport const machineSettings = { properties: {}, patternProperties: {} };\nexport const machineOverridableSettings = { properties: {}, patternProperties: {} };\nexport const windowSettings = { properties: {}, patternProperties: {} };\nexport const resourceSettings = { properties: {}, patternProperties: {} };\nexport const resourceLanguageSettingsSchemaId = 'vscode://schemas/settings/resourceLanguage';\nconst contributionRegistry = Registry.as(JSONExtensions.JSONContribution);\nclass ConfigurationRegistry {\n constructor() {\n this.overrideIdentifiers = new Set();\n this._onDidSchemaChange = new Emitter();\n this._onDidUpdateConfiguration = new Emitter();\n this.configurationDefaultsOverrides = new Map();\n this.defaultLanguageConfigurationOverridesNode = {\n id: 'defaultOverrides',\n title: nls.localize('defaultLanguageConfigurationOverrides.title', \"Default Language Configuration Overrides\"),\n properties: {}\n };\n this.configurationContributors = [this.defaultLanguageConfigurationOverridesNode];\n this.resourceLanguageSettingsSchema = {\n properties: {},\n patternProperties: {},\n additionalProperties: true,\n allowTrailingCommas: true,\n allowComments: true\n };\n this.configurationProperties = {};\n this.policyConfigurations = new Map();\n this.excludedConfigurationProperties = {};\n contributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);\n this.registerOverridePropertyPatternKey();\n }\n registerConfiguration(configuration, validate = true) {\n this.registerConfigurations([configuration], validate);\n }\n registerConfigurations(configurations, validate = true) {\n const properties = new Set();\n this.doRegisterConfigurations(configurations, validate, properties);\n contributionRegistry.registerSchema(resourceLanguageSettingsSchemaId, this.resourceLanguageSettingsSchema);\n this._onDidSchemaChange.fire();\n this._onDidUpdateConfiguration.fire({ properties });\n }\n registerDefaultConfigurations(configurationDefaults) {\n const properties = new Set();\n this.doRegisterDefaultConfigurations(configurationDefaults, properties);\n this._onDidSchemaChange.fire();\n this._onDidUpdateConfiguration.fire({ properties, defaultsOverrides: true });\n }\n doRegisterDefaultConfigurations(configurationDefaults, bucket) {\n var _a;\n const overrideIdentifiers = [];\n for (const { overrides, source } of configurationDefaults) {\n for (const key in overrides) {\n bucket.add(key);\n if (OVERRIDE_PROPERTY_REGEX.test(key)) {\n const configurationDefaultOverride = this.configurationDefaultsOverrides.get(key);\n const valuesSources = (_a = configurationDefaultOverride === null || configurationDefaultOverride === void 0 ? void 0 : configurationDefaultOverride.valuesSources) !== null && _a !== void 0 ? _a : new Map();\n if (source) {\n for (const configuration of Object.keys(overrides[key])) {\n valuesSources.set(configuration, source);\n }\n }\n const defaultValue = { ...((configurationDefaultOverride === null || configurationDefaultOverride === void 0 ? void 0 : configurationDefaultOverride.value) || {}), ...overrides[key] };\n this.configurationDefaultsOverrides.set(key, { source, value: defaultValue, valuesSources });\n const plainKey = getLanguageTagSettingPlainKey(key);\n const property = {\n type: 'object',\n default: defaultValue,\n description: nls.localize('defaultLanguageConfiguration.description', \"Configure settings to be overridden for the {0} language.\", plainKey),\n $ref: resourceLanguageSettingsSchemaId,\n defaultDefaultValue: defaultValue,\n source: types.isString(source) ? undefined : source,\n defaultValueSource: source\n };\n overrideIdentifiers.push(...overrideIdentifiersFromKey(key));\n this.configurationProperties[key] = property;\n this.defaultLanguageConfigurationOverridesNode.properties[key] = property;\n }\n else {\n this.configurationDefaultsOverrides.set(key, { value: overrides[key], source });\n const property = this.configurationProperties[key];\n if (property) {\n this.updatePropertyDefaultValue(key, property);\n this.updateSchema(key, property);\n }\n }\n }\n }\n this.doRegisterOverrideIdentifiers(overrideIdentifiers);\n }\n registerOverrideIdentifiers(overrideIdentifiers) {\n this.doRegisterOverrideIdentifiers(overrideIdentifiers);\n this._onDidSchemaChange.fire();\n }\n doRegisterOverrideIdentifiers(overrideIdentifiers) {\n for (const overrideIdentifier of overrideIdentifiers) {\n this.overrideIdentifiers.add(overrideIdentifier);\n }\n this.updateOverridePropertyPatternKey();\n }\n doRegisterConfigurations(configurations, validate, bucket) {\n configurations.forEach(configuration => {\n this.validateAndRegisterProperties(configuration, validate, configuration.extensionInfo, configuration.restrictedProperties, undefined, bucket);\n this.configurationContributors.push(configuration);\n this.registerJSONConfiguration(configuration);\n });\n }\n validateAndRegisterProperties(configuration, validate = true, extensionInfo, restrictedProperties, scope = 3 /* ConfigurationScope.WINDOW */, bucket) {\n var _a;\n scope = types.isUndefinedOrNull(configuration.scope) ? scope : configuration.scope;\n const properties = configuration.properties;\n if (properties) {\n for (const key in properties) {\n const property = properties[key];\n if (validate && validateProperty(key, property)) {\n delete properties[key];\n continue;\n }\n property.source = extensionInfo;\n // update default value\n property.defaultDefaultValue = properties[key].default;\n this.updatePropertyDefaultValue(key, property);\n // update scope\n if (OVERRIDE_PROPERTY_REGEX.test(key)) {\n property.scope = undefined; // No scope for overridable properties `[${identifier}]`\n }\n else {\n property.scope = types.isUndefinedOrNull(property.scope) ? scope : property.scope;\n property.restricted = types.isUndefinedOrNull(property.restricted) ? !!(restrictedProperties === null || restrictedProperties === void 0 ? void 0 : restrictedProperties.includes(key)) : property.restricted;\n }\n // Add to properties maps\n // Property is included by default if 'included' is unspecified\n if (properties[key].hasOwnProperty('included') && !properties[key].included) {\n this.excludedConfigurationProperties[key] = properties[key];\n delete properties[key];\n continue;\n }\n else {\n this.configurationProperties[key] = properties[key];\n if ((_a = properties[key].policy) === null || _a === void 0 ? void 0 : _a.name) {\n this.policyConfigurations.set(properties[key].policy.name, key);\n }\n }\n if (!properties[key].deprecationMessage && properties[key].markdownDeprecationMessage) {\n // If not set, default deprecationMessage to the markdown source\n properties[key].deprecationMessage = properties[key].markdownDeprecationMessage;\n }\n bucket.add(key);\n }\n }\n const subNodes = configuration.allOf;\n if (subNodes) {\n for (const node of subNodes) {\n this.validateAndRegisterProperties(node, validate, extensionInfo, restrictedProperties, scope, bucket);\n }\n }\n }\n getConfigurationProperties() {\n return this.configurationProperties;\n }\n getPolicyConfigurations() {\n return this.policyConfigurations;\n }\n registerJSONConfiguration(configuration) {\n const register = (configuration) => {\n const properties = configuration.properties;\n if (properties) {\n for (const key in properties) {\n this.updateSchema(key, properties[key]);\n }\n }\n const subNodes = configuration.allOf;\n subNodes === null || subNodes === void 0 ? void 0 : subNodes.forEach(register);\n };\n register(configuration);\n }\n updateSchema(key, property) {\n allSettings.properties[key] = property;\n switch (property.scope) {\n case 1 /* ConfigurationScope.APPLICATION */:\n applicationSettings.properties[key] = property;\n break;\n case 2 /* ConfigurationScope.MACHINE */:\n machineSettings.properties[key] = property;\n break;\n case 6 /* ConfigurationScope.MACHINE_OVERRIDABLE */:\n machineOverridableSettings.properties[key] = property;\n break;\n case 3 /* ConfigurationScope.WINDOW */:\n windowSettings.properties[key] = property;\n break;\n case 4 /* ConfigurationScope.RESOURCE */:\n resourceSettings.properties[key] = property;\n break;\n case 5 /* ConfigurationScope.LANGUAGE_OVERRIDABLE */:\n resourceSettings.properties[key] = property;\n this.resourceLanguageSettingsSchema.properties[key] = property;\n break;\n }\n }\n updateOverridePropertyPatternKey() {\n for (const overrideIdentifier of this.overrideIdentifiers.values()) {\n const overrideIdentifierProperty = `[${overrideIdentifier}]`;\n const resourceLanguagePropertiesSchema = {\n type: 'object',\n description: nls.localize('overrideSettings.defaultDescription', \"Configure editor settings to be overridden for a language.\"),\n errorMessage: nls.localize('overrideSettings.errorMessage', \"This setting does not support per-language configuration.\"),\n $ref: resourceLanguageSettingsSchemaId,\n };\n this.updatePropertyDefaultValue(overrideIdentifierProperty, resourceLanguagePropertiesSchema);\n allSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n applicationSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n machineSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n machineOverridableSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n windowSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n resourceSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;\n }\n }\n registerOverridePropertyPatternKey() {\n const resourceLanguagePropertiesSchema = {\n type: 'object',\n description: nls.localize('overrideSettings.defaultDescription', \"Configure editor settings to be overridden for a language.\"),\n errorMessage: nls.localize('overrideSettings.errorMessage', \"This setting does not support per-language configuration.\"),\n $ref: resourceLanguageSettingsSchemaId,\n };\n allSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n applicationSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n machineSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n machineOverridableSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n windowSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n resourceSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;\n this._onDidSchemaChange.fire();\n }\n updatePropertyDefaultValue(key, property) {\n const configurationdefaultOverride = this.configurationDefaultsOverrides.get(key);\n let defaultValue = configurationdefaultOverride === null || configurationdefaultOverride === void 0 ? void 0 : configurationdefaultOverride.value;\n let defaultSource = configurationdefaultOverride === null || configurationdefaultOverride === void 0 ? void 0 : configurationdefaultOverride.source;\n if (types.isUndefined(defaultValue)) {\n defaultValue = property.defaultDefaultValue;\n defaultSource = undefined;\n }\n if (types.isUndefined(defaultValue)) {\n defaultValue = getDefaultValue(property.type);\n }\n property.default = defaultValue;\n property.defaultValueSource = defaultSource;\n }\n}\nconst OVERRIDE_IDENTIFIER_PATTERN = `\\\\[([^\\\\]]+)\\\\]`;\nconst OVERRIDE_IDENTIFIER_REGEX = new RegExp(OVERRIDE_IDENTIFIER_PATTERN, 'g');\nexport const OVERRIDE_PROPERTY_PATTERN = `^(${OVERRIDE_IDENTIFIER_PATTERN})+$`;\nexport const OVERRIDE_PROPERTY_REGEX = new RegExp(OVERRIDE_PROPERTY_PATTERN);\nexport function overrideIdentifiersFromKey(key) {\n const identifiers = [];\n if (OVERRIDE_PROPERTY_REGEX.test(key)) {\n let matches = OVERRIDE_IDENTIFIER_REGEX.exec(key);\n while (matches === null || matches === void 0 ? void 0 : matches.length) {\n const identifier = matches[1].trim();\n if (identifier) {\n identifiers.push(identifier);\n }\n matches = OVERRIDE_IDENTIFIER_REGEX.exec(key);\n }\n }\n return distinct(identifiers);\n}\nexport function getDefaultValue(type) {\n const t = Array.isArray(type) ? type[0] : type;\n switch (t) {\n case 'boolean':\n return false;\n case 'integer':\n case 'number':\n return 0;\n case 'string':\n return '';\n case 'array':\n return [];\n case 'object':\n return {};\n default:\n return null;\n }\n}\nconst configurationRegistry = new ConfigurationRegistry();\nRegistry.add(Extensions.Configuration, configurationRegistry);\nexport function validateProperty(property, schema) {\n var _a, _b, _c, _d;\n if (!property.trim()) {\n return nls.localize('config.property.empty', \"Cannot register an empty property\");\n }\n if (OVERRIDE_PROPERTY_REGEX.test(property)) {\n return nls.localize('config.property.languageDefault', \"Cannot register '{0}'. This matches property pattern '\\\\\\\\[.*\\\\\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.\", property);\n }\n if (configurationRegistry.getConfigurationProperties()[property] !== undefined) {\n return nls.localize('config.property.duplicate', \"Cannot register '{0}'. This property is already registered.\", property);\n }\n if (((_a = schema.policy) === null || _a === void 0 ? void 0 : _a.name) && configurationRegistry.getPolicyConfigurations().get((_b = schema.policy) === null || _b === void 0 ? void 0 : _b.name) !== undefined) {\n return nls.localize('config.policy.duplicate', \"Cannot register '{0}'. The associated policy {1} is already registered with {2}.\", property, (_c = schema.policy) === null || _c === void 0 ? void 0 : _c.name, configurationRegistry.getPolicyConfigurations().get((_d = schema.policy) === null || _d === void 0 ? void 0 : _d.name));\n }\n return null;\n}\n","import { Disposable } from '../../../base/common/lifecycle.js';\nimport { ConfigurationModel } from './configurationModels.js';\nimport { Extensions } from './configurationRegistry.js';\nimport { Registry } from '../../registry/common/platform.js';\nexport class DefaultConfiguration extends Disposable {\n get configurationModel() {\n return this._configurationModel;\n }\n constructor(logService) {\n super();\n this.logService = logService;\n this._configurationModel = ConfigurationModel.createEmptyModel(this.logService);\n }\n reload() {\n this.resetConfigurationModel();\n return this.configurationModel;\n }\n getConfigurationDefaultOverrides() {\n return {};\n }\n resetConfigurationModel() {\n this._configurationModel = ConfigurationModel.createEmptyModel(this.logService);\n const properties = Registry.as(Extensions.Configuration).getConfigurationProperties();\n this.updateConfigurationModel(Object.keys(properties), properties);\n }\n updateConfigurationModel(properties, configurationProperties) {\n const configurationDefaultsOverrides = this.getConfigurationDefaultOverrides();\n for (const key of properties) {\n const defaultOverrideValue = configurationDefaultsOverrides[key];\n const propertySchema = configurationProperties[key];\n if (defaultOverrideValue !== undefined) {\n this._configurationModel.addValue(key, defaultOverrideValue);\n }\n else if (propertySchema) {\n this._configurationModel.addValue(key, propertySchema.default);\n }\n else {\n this._configurationModel.removeValue(key);\n }\n }\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 { PauseableEmitter } from '../../../base/common/event.js';\nimport { Iterable } from '../../../base/common/iterator.js';\nimport { Disposable, MutableDisposable } from '../../../base/common/lifecycle.js';\nimport { cloneAndChange } from '../../../base/common/objects.js';\nimport { TernarySearchTree } from '../../../base/common/ternarySearchTree.js';\nimport { URI } from '../../../base/common/uri.js';\nimport { localize } from '../../../nls.js';\nimport { CommandsRegistry } from '../../commands/common/commands.js';\nimport { IConfigurationService } from '../../configuration/common/configuration.js';\nimport { IContextKeyService, RawContextKey } from '../common/contextkey.js';\nconst KEYBINDING_CONTEXT_ATTR = 'data-keybinding-context';\nexport class Context {\n constructor(id, parent) {\n this._id = id;\n this._parent = parent;\n this._value = Object.create(null);\n this._value['_contextId'] = id;\n }\n get value() {\n return { ...this._value };\n }\n setValue(key, value) {\n // console.log('SET ' + key + ' = ' + value + ' ON ' + this._id);\n if (this._value[key] !== value) {\n this._value[key] = value;\n return true;\n }\n return false;\n }\n removeValue(key) {\n // console.log('REMOVE ' + key + ' FROM ' + this._id);\n if (key in this._value) {\n delete this._value[key];\n return true;\n }\n return false;\n }\n getValue(key) {\n const ret = this._value[key];\n if (typeof ret === 'undefined' && this._parent) {\n return this._parent.getValue(key);\n }\n return ret;\n }\n}\nclass NullContext extends Context {\n constructor() {\n super(-1, null);\n }\n setValue(key, value) {\n return false;\n }\n removeValue(key) {\n return false;\n }\n getValue(key) {\n return undefined;\n }\n}\nNullContext.INSTANCE = new NullContext();\nclass ConfigAwareContextValuesContainer extends Context {\n constructor(id, _configurationService, emitter) {\n super(id, null);\n this._configurationService = _configurationService;\n this._values = TernarySearchTree.forConfigKeys();\n this._listener = this._configurationService.onDidChangeConfiguration(event => {\n if (event.source === 7 /* ConfigurationTarget.DEFAULT */) {\n // new setting, reset everything\n const allKeys = Array.from(this._values, ([k]) => k);\n this._values.clear();\n emitter.fire(new ArrayContextKeyChangeEvent(allKeys));\n }\n else {\n const changedKeys = [];\n for (const configKey of event.affectedKeys) {\n const contextKey = `config.${configKey}`;\n const cachedItems = this._values.findSuperstr(contextKey);\n if (cachedItems !== undefined) {\n changedKeys.push(...Iterable.map(cachedItems, ([key]) => key));\n this._values.deleteSuperstr(contextKey);\n }\n if (this._values.has(contextKey)) {\n changedKeys.push(contextKey);\n this._values.delete(contextKey);\n }\n }\n emitter.fire(new ArrayContextKeyChangeEvent(changedKeys));\n }\n });\n }\n dispose() {\n this._listener.dispose();\n }\n getValue(key) {\n if (key.indexOf(ConfigAwareContextValuesContainer._keyPrefix) !== 0) {\n return super.getValue(key);\n }\n if (this._values.has(key)) {\n return this._values.get(key);\n }\n const configKey = key.substr(ConfigAwareContextValuesContainer._keyPrefix.length);\n const configValue = this._configurationService.getValue(configKey);\n let value = undefined;\n switch (typeof configValue) {\n case 'number':\n case 'boolean':\n case 'string':\n value = configValue;\n break;\n default:\n if (Array.isArray(configValue)) {\n value = JSON.stringify(configValue);\n }\n else {\n value = configValue;\n }\n }\n this._values.set(key, value);\n return value;\n }\n setValue(key, value) {\n return super.setValue(key, value);\n }\n removeValue(key) {\n return super.removeValue(key);\n }\n}\nConfigAwareContextValuesContainer._keyPrefix = 'config.';\nclass ContextKey {\n constructor(service, key, defaultValue) {\n this._service = service;\n this._key = key;\n this._defaultValue = defaultValue;\n this.reset();\n }\n set(value) {\n this._service.setContext(this._key, value);\n }\n reset() {\n if (typeof this._defaultValue === 'undefined') {\n this._service.removeContext(this._key);\n }\n else {\n this._service.setContext(this._key, this._defaultValue);\n }\n }\n get() {\n return this._service.getContextKeyValue(this._key);\n }\n}\nclass SimpleContextKeyChangeEvent {\n constructor(key) {\n this.key = key;\n }\n affectsSome(keys) {\n return keys.has(this.key);\n }\n allKeysContainedIn(keys) {\n return this.affectsSome(keys);\n }\n}\nclass ArrayContextKeyChangeEvent {\n constructor(keys) {\n this.keys = keys;\n }\n affectsSome(keys) {\n for (const key of this.keys) {\n if (keys.has(key)) {\n return true;\n }\n }\n return false;\n }\n allKeysContainedIn(keys) {\n return this.keys.every(key => keys.has(key));\n }\n}\nclass CompositeContextKeyChangeEvent {\n constructor(events) {\n this.events = events;\n }\n affectsSome(keys) {\n for (const e of this.events) {\n if (e.affectsSome(keys)) {\n return true;\n }\n }\n return false;\n }\n allKeysContainedIn(keys) {\n return this.events.every(evt => evt.allKeysContainedIn(keys));\n }\n}\nfunction allEventKeysInContext(event, context) {\n return event.allKeysContainedIn(new Set(Object.keys(context)));\n}\nexport class AbstractContextKeyService extends Disposable {\n constructor(myContextId) {\n super();\n this._onDidChangeContext = this._register(new PauseableEmitter({ merge: input => new CompositeContextKeyChangeEvent(input) }));\n this.onDidChangeContext = this._onDidChangeContext.event;\n this._isDisposed = false;\n this._myContextId = myContextId;\n }\n createKey(key, defaultValue) {\n if (this._isDisposed) {\n throw new Error(`AbstractContextKeyService has been disposed`);\n }\n return new ContextKey(this, key, defaultValue);\n }\n bufferChangeEvents(callback) {\n this._onDidChangeContext.pause();\n try {\n callback();\n }\n finally {\n this._onDidChangeContext.resume();\n }\n }\n createScoped(domNode) {\n if (this._isDisposed) {\n throw new Error(`AbstractContextKeyService has been disposed`);\n }\n return new ScopedContextKeyService(this, domNode);\n }\n contextMatchesRules(rules) {\n if (this._isDisposed) {\n throw new Error(`AbstractContextKeyService has been disposed`);\n }\n const context = this.getContextValuesContainer(this._myContextId);\n const result = (rules ? rules.evaluate(context) : true);\n // console.group(rules.serialize() + ' -> ' + result);\n // rules.keys().forEach(key => { console.log(key, ctx[key]); });\n // console.groupEnd();\n return result;\n }\n getContextKeyValue(key) {\n if (this._isDisposed) {\n return undefined;\n }\n return this.getContextValuesContainer(this._myContextId).getValue(key);\n }\n setContext(key, value) {\n if (this._isDisposed) {\n return;\n }\n const myContext = this.getContextValuesContainer(this._myContextId);\n if (!myContext) {\n return;\n }\n if (myContext.setValue(key, value)) {\n this._onDidChangeContext.fire(new SimpleContextKeyChangeEvent(key));\n }\n }\n removeContext(key) {\n if (this._isDisposed) {\n return;\n }\n if (this.getContextValuesContainer(this._myContextId).removeValue(key)) {\n this._onDidChangeContext.fire(new SimpleContextKeyChangeEvent(key));\n }\n }\n getContext(target) {\n if (this._isDisposed) {\n return NullContext.INSTANCE;\n }\n return this.getContextValuesContainer(findContextAttr(target));\n }\n dispose() {\n super.dispose();\n this._isDisposed = true;\n }\n}\nlet ContextKeyService = class ContextKeyService extends AbstractContextKeyService {\n constructor(configurationService) {\n super(0);\n this._contexts = new Map();\n this._lastContextId = 0;\n const myContext = this._register(new ConfigAwareContextValuesContainer(this._myContextId, configurationService, this._onDidChangeContext));\n this._contexts.set(this._myContextId, myContext);\n // Uncomment this to see the contexts continuously logged\n // let lastLoggedValue: string | null = null;\n // setInterval(() => {\n // \tlet values = Object.keys(this._contexts).map((key) => this._contexts[key]);\n // \tlet logValue = values.map(v => JSON.stringify(v._value, null, '\\t')).join('\\n');\n // \tif (lastLoggedValue !== logValue) {\n // \t\tlastLoggedValue = logValue;\n // \t\tconsole.log(lastLoggedValue);\n // \t}\n // }, 2000);\n }\n getContextValuesContainer(contextId) {\n if (this._isDisposed) {\n return NullContext.INSTANCE;\n }\n return this._contexts.get(contextId) || NullContext.INSTANCE;\n }\n createChildContext(parentContextId = this._myContextId) {\n if (this._isDisposed) {\n throw new Error(`ContextKeyService has been disposed`);\n }\n const id = (++this._lastContextId);\n this._contexts.set(id, new Context(id, this.getContextValuesContainer(parentContextId)));\n return id;\n }\n disposeContext(contextId) {\n if (!this._isDisposed) {\n this._contexts.delete(contextId);\n }\n }\n};\nContextKeyService = __decorate([\n __param(0, IConfigurationService)\n], ContextKeyService);\nexport { ContextKeyService };\nclass ScopedContextKeyService extends AbstractContextKeyService {\n constructor(parent, domNode) {\n super(parent.createChildContext());\n this._parentChangeListener = this._register(new MutableDisposable());\n this._parent = parent;\n this._updateParentChangeListener();\n this._domNode = domNode;\n if (this._domNode.hasAttribute(KEYBINDING_CONTEXT_ATTR)) {\n let extraInfo = '';\n if (this._domNode.classList) {\n extraInfo = Array.from(this._domNode.classList.values()).join(', ');\n }\n console.error(`Element already has context attribute${extraInfo ? ': ' + extraInfo : ''}`);\n }\n this._domNode.setAttribute(KEYBINDING_CONTEXT_ATTR, String(this._myContextId));\n }\n _updateParentChangeListener() {\n // Forward parent events to this listener. Parent will change.\n this._parentChangeListener.value = this._parent.onDidChangeContext(e => {\n const thisContainer = this._parent.getContextValuesContainer(this._myContextId);\n const thisContextValues = thisContainer.value;\n if (!allEventKeysInContext(e, thisContextValues)) {\n this._onDidChangeContext.fire(e);\n }\n });\n }\n dispose() {\n if (this._isDisposed) {\n return;\n }\n this._parent.disposeContext(this._myContextId);\n this._domNode.removeAttribute(KEYBINDING_CONTEXT_ATTR);\n super.dispose();\n }\n getContextValuesContainer(contextId) {\n if (this._isDisposed) {\n return NullContext.INSTANCE;\n }\n return this._parent.getContextValuesContainer(contextId);\n }\n createChildContext(parentContextId = this._myContextId) {\n if (this._isDisposed) {\n throw new Error(`ScopedContextKeyService has been disposed`);\n }\n return this._parent.createChildContext(parentContextId);\n }\n disposeContext(contextId) {\n if (this._isDisposed) {\n return;\n }\n this._parent.disposeContext(contextId);\n }\n}\nfunction findContextAttr(domNode) {\n while (domNode) {\n if (domNode.hasAttribute(KEYBINDING_CONTEXT_ATTR)) {\n const attr = domNode.getAttribute(KEYBINDING_CONTEXT_ATTR);\n if (attr) {\n return parseInt(attr, 10);\n }\n return NaN;\n }\n domNode = domNode.parentElement;\n }\n return 0;\n}\nexport function setContext(accessor, contextKey, contextValue) {\n const contextKeyService = accessor.get(IContextKeyService);\n contextKeyService.createKey(String(contextKey), stringifyURIs(contextValue));\n}\nfunction stringifyURIs(contextValue) {\n return cloneAndChange(contextValue, (obj) => {\n if (typeof obj === 'object' && obj.$mid === 1 /* MarshalledId.Uri */) {\n return URI.revive(obj).toString();\n }\n if (obj instanceof URI) {\n return obj.toString();\n }\n return undefined;\n });\n}\nCommandsRegistry.registerCommand('_setContext', setContext);\nCommandsRegistry.registerCommand({\n id: 'getContextKeyInfo',\n handler() {\n return [...RawContextKey.all()].sort((a, b) => a.key.localeCompare(b.key));\n },\n metadata: {\n description: localize('getContextKeyInfo', \"A command that returns information about context keys\"),\n args: []\n }\n});\nCommandsRegistry.registerCommand('_generateContextKeyInfo', function () {\n const result = [];\n const seen = new Set();\n for (const info of RawContextKey.all()) {\n if (!seen.has(info.key)) {\n seen.add(info.key);\n result.push(info);\n }\n }\n result.sort((a, b) => a.key.localeCompare(b.key));\n console.log(JSON.stringify(result, undefined, 2));\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 { illegalState } from '../../../base/common/errors.js';\nimport { localize } from '../../../nls.js';\nfunction hintDidYouMean(...meant) {\n switch (meant.length) {\n case 1:\n return localize('contextkey.scanner.hint.didYouMean1', \"Did you mean {0}?\", meant[0]);\n case 2:\n return localize('contextkey.scanner.hint.didYouMean2', \"Did you mean {0} or {1}?\", meant[0], meant[1]);\n case 3:\n return localize('contextkey.scanner.hint.didYouMean3', \"Did you mean {0}, {1} or {2}?\", meant[0], meant[1], meant[2]);\n default: // we just don't expect that many\n return undefined;\n }\n}\nconst hintDidYouForgetToOpenOrCloseQuote = localize('contextkey.scanner.hint.didYouForgetToOpenOrCloseQuote', \"Did you forget to open or close the quote?\");\nconst hintDidYouForgetToEscapeSlash = localize('contextkey.scanner.hint.didYouForgetToEscapeSlash', \"Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\\\\\/\\'.\");\n/**\n * A simple scanner for context keys.\n *\n * Example:\n *\n * ```ts\n * const scanner = new Scanner().reset('resourceFileName =~ /docker/ && !config.docker.enabled');\n * const tokens = [...scanner];\n * if (scanner.errorTokens.length > 0) {\n * scanner.errorTokens.forEach(err => console.error(`Unexpected token at ${err.offset}: ${err.lexeme}\\nHint: ${err.additional}`));\n * } else {\n * // process tokens\n * }\n * ```\n */\nexport class Scanner {\n constructor() {\n this._input = '';\n this._start = 0;\n this._current = 0;\n this._tokens = [];\n this._errors = [];\n // u - unicode, y - sticky // TODO@ulugbekna: we accept double quotes as part of the string rather than as a delimiter (to preserve old parser's behavior)\n this.stringRe = /[a-zA-Z0-9_<>\\-\\./\\\\:\\*\\?\\+\\[\\]\\^,#@;\"%\\$\\p{L}-]+/uy;\n }\n static getLexeme(token) {\n switch (token.type) {\n case 0 /* TokenType.LParen */:\n return '(';\n case 1 /* TokenType.RParen */:\n return ')';\n case 2 /* TokenType.Neg */:\n return '!';\n case 3 /* TokenType.Eq */:\n return token.isTripleEq ? '===' : '==';\n case 4 /* TokenType.NotEq */:\n return token.isTripleEq ? '!==' : '!=';\n case 5 /* TokenType.Lt */:\n return '<';\n case 6 /* TokenType.LtEq */:\n return '<=';\n case 7 /* TokenType.Gt */:\n return '>=';\n case 8 /* TokenType.GtEq */:\n return '>=';\n case 9 /* TokenType.RegexOp */:\n return '=~';\n case 10 /* TokenType.RegexStr */:\n return token.lexeme;\n case 11 /* TokenType.True */:\n return 'true';\n case 12 /* TokenType.False */:\n return 'false';\n case 13 /* TokenType.In */:\n return 'in';\n case 14 /* TokenType.Not */:\n return 'not';\n case 15 /* TokenType.And */:\n return '&&';\n case 16 /* TokenType.Or */:\n return '||';\n case 17 /* TokenType.Str */:\n return token.lexeme;\n case 18 /* TokenType.QuotedStr */:\n return token.lexeme;\n case 19 /* TokenType.Error */:\n return token.lexeme;\n case 20 /* TokenType.EOF */:\n return 'EOF';\n default:\n throw illegalState(`unhandled token type: ${JSON.stringify(token)}; have you forgotten to add a case?`);\n }\n }\n reset(value) {\n this._input = value;\n this._start = 0;\n this._current = 0;\n this._tokens = [];\n this._errors = [];\n return this;\n }\n scan() {\n while (!this._isAtEnd()) {\n this._start = this._current;\n const ch = this._advance();\n switch (ch) {\n case 40 /* CharCode.OpenParen */:\n this._addToken(0 /* TokenType.LParen */);\n break;\n case 41 /* CharCode.CloseParen */:\n this._addToken(1 /* TokenType.RParen */);\n break;\n case 33 /* CharCode.ExclamationMark */:\n if (this._match(61 /* CharCode.Equals */)) {\n const isTripleEq = this._match(61 /* CharCode.Equals */); // eat last `=` if `!==`\n this._tokens.push({ type: 4 /* TokenType.NotEq */, offset: this._start, isTripleEq });\n }\n else {\n this._addToken(2 /* TokenType.Neg */);\n }\n break;\n case 39 /* CharCode.SingleQuote */:\n this._quotedString();\n break;\n case 47 /* CharCode.Slash */:\n this._regex();\n break;\n case 61 /* CharCode.Equals */:\n if (this._match(61 /* CharCode.Equals */)) { // support `==`\n const isTripleEq = this._match(61 /* CharCode.Equals */); // eat last `=` if `===`\n this._tokens.push({ type: 3 /* TokenType.Eq */, offset: this._start, isTripleEq });\n }\n else if (this._match(126 /* CharCode.Tilde */)) {\n this._addToken(9 /* TokenType.RegexOp */);\n }\n else {\n this._error(hintDidYouMean('==', '=~'));\n }\n break;\n case 60 /* CharCode.LessThan */:\n this._addToken(this._match(61 /* CharCode.Equals */) ? 6 /* TokenType.LtEq */ : 5 /* TokenType.Lt */);\n break;\n case 62 /* CharCode.GreaterThan */:\n this._addToken(this._match(61 /* CharCode.Equals */) ? 8 /* TokenType.GtEq */ : 7 /* TokenType.Gt */);\n break;\n case 38 /* CharCode.Ampersand */:\n if (this._match(38 /* CharCode.Ampersand */)) {\n this._addToken(15 /* TokenType.And */);\n }\n else {\n this._error(hintDidYouMean('&&'));\n }\n break;\n case 124 /* CharCode.Pipe */:\n if (this._match(124 /* CharCode.Pipe */)) {\n this._addToken(16 /* TokenType.Or */);\n }\n else {\n this._error(hintDidYouMean('||'));\n }\n break;\n // TODO@ulugbekna: 1) rewrite using a regex 2) reconsider what characters are considered whitespace, including unicode, nbsp, etc.\n case 32 /* CharCode.Space */:\n case 13 /* CharCode.CarriageReturn */:\n case 9 /* CharCode.Tab */:\n case 10 /* CharCode.LineFeed */:\n case 160 /* CharCode.NoBreakSpace */: //  \n break;\n default:\n this._string();\n }\n }\n this._start = this._current;\n this._addToken(20 /* TokenType.EOF */);\n return Array.from(this._tokens);\n }\n _match(expected) {\n if (this._isAtEnd()) {\n return false;\n }\n if (this._input.charCodeAt(this._current) !== expected) {\n return false;\n }\n this._current++;\n return true;\n }\n _advance() {\n return this._input.charCodeAt(this._current++);\n }\n _peek() {\n return this._isAtEnd() ? 0 /* CharCode.Null */ : this._input.charCodeAt(this._current);\n }\n _addToken(type) {\n this._tokens.push({ type, offset: this._start });\n }\n _error(additional) {\n const offset = this._start;\n const lexeme = this._input.substring(this._start, this._current);\n const errToken = { type: 19 /* TokenType.Error */, offset: this._start, lexeme };\n this._errors.push({ offset, lexeme, additionalInfo: additional });\n this._tokens.push(errToken);\n }\n _string() {\n this.stringRe.lastIndex = this._start;\n const match = this.stringRe.exec(this._input);\n if (match) {\n this._current = this._start + match[0].length;\n const lexeme = this._input.substring(this._start, this._current);\n const keyword = Scanner._keywords.get(lexeme);\n if (keyword) {\n this._addToken(keyword);\n }\n else {\n this._tokens.push({ type: 17 /* TokenType.Str */, lexeme, offset: this._start });\n }\n }\n }\n // captures the lexeme without the leading and trailing '\n _quotedString() {\n while (this._peek() !== 39 /* CharCode.SingleQuote */ && !this._isAtEnd()) { // TODO@ulugbekna: add support for escaping ' ?\n this._advance();\n }\n if (this._isAtEnd()) {\n this._error(hintDidYouForgetToOpenOrCloseQuote);\n return;\n }\n // consume the closing '\n this._advance();\n this._tokens.push({ type: 18 /* TokenType.QuotedStr */, lexeme: this._input.substring(this._start + 1, this._current - 1), offset: this._start + 1 });\n }\n /*\n * Lexing a regex expression: /.../[igsmyu]*\n * Based on https://github.com/microsoft/TypeScript/blob/9247ef115e617805983740ba795d7a8164babf89/src/compiler/scanner.ts#L2129-L2181\n *\n * Note that we want slashes within a regex to be escaped, e.g., /file:\\\\/\\\\/\\\\// should match `file:///`\n */\n _regex() {\n let p = this._current;\n let inEscape = false;\n let inCharacterClass = false;\n while (true) {\n if (p >= this._input.length) {\n this._current = p;\n this._error(hintDidYouForgetToEscapeSlash);\n return;\n }\n const ch = this._input.charCodeAt(p);\n if (inEscape) { // parsing an escape character\n inEscape = false;\n }\n else if (ch === 47 /* CharCode.Slash */ && !inCharacterClass) { // end of regex\n p++;\n break;\n }\n else if (ch === 91 /* CharCode.OpenSquareBracket */) {\n inCharacterClass = true;\n }\n else if (ch === 92 /* CharCode.Backslash */) {\n inEscape = true;\n }\n else if (ch === 93 /* CharCode.CloseSquareBracket */) {\n inCharacterClass = false;\n }\n p++;\n }\n // Consume flags // TODO@ulugbekna: use regex instead\n while (p < this._input.length && Scanner._regexFlags.has(this._input.charCodeAt(p))) {\n p++;\n }\n this._current = p;\n const lexeme = this._input.substring(this._start, this._current);\n this._tokens.push({ type: 10 /* TokenType.RegexStr */, lexeme, offset: this._start });\n }\n _isAtEnd() {\n return this._current >= this._input.length;\n }\n}\nScanner._regexFlags = new Set(['i', 'g', 's', 'm', 'y', 'u'].map(ch => ch.charCodeAt(0)));\nScanner._keywords = new Map([\n ['not', 14 /* TokenType.Not */],\n ['in', 13 /* TokenType.In */],\n ['false', 12 /* TokenType.False */],\n ['true', 11 /* TokenType.True */],\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 { isChrome, isEdge, isFirefox, isLinux, isMacintosh, isSafari, isWeb, isWindows } from '../../../base/common/platform.js';\nimport { isFalsyOrWhitespace } from '../../../base/common/strings.js';\nimport { Scanner } from './scanner.js';\nimport { createDecorator } from '../../instantiation/common/instantiation.js';\nimport { localize } from '../../../nls.js';\nconst CONSTANT_VALUES = new Map();\nCONSTANT_VALUES.set('false', false);\nCONSTANT_VALUES.set('true', true);\nCONSTANT_VALUES.set('isMac', isMacintosh);\nCONSTANT_VALUES.set('isLinux', isLinux);\nCONSTANT_VALUES.set('isWindows', isWindows);\nCONSTANT_VALUES.set('isWeb', isWeb);\nCONSTANT_VALUES.set('isMacNative', isMacintosh && !isWeb);\nCONSTANT_VALUES.set('isEdge', isEdge);\nCONSTANT_VALUES.set('isFirefox', isFirefox);\nCONSTANT_VALUES.set('isChrome', isChrome);\nCONSTANT_VALUES.set('isSafari', isSafari);\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst defaultConfig = {\n regexParsingWithErrorRecovery: true\n};\nconst errorEmptyString = localize('contextkey.parser.error.emptyString', \"Empty context key expression\");\nconst hintEmptyString = localize('contextkey.parser.error.emptyString.hint', \"Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively.\");\nconst errorNoInAfterNot = localize('contextkey.parser.error.noInAfterNot', \"'in' after 'not'.\");\nconst errorClosingParenthesis = localize('contextkey.parser.error.closingParenthesis', \"closing parenthesis ')'\");\nconst errorUnexpectedToken = localize('contextkey.parser.error.unexpectedToken', \"Unexpected token\");\nconst hintUnexpectedToken = localize('contextkey.parser.error.unexpectedToken.hint', \"Did you forget to put && or || before the token?\");\nconst errorUnexpectedEOF = localize('contextkey.parser.error.unexpectedEOF', \"Unexpected end of expression\");\nconst hintUnexpectedEOF = localize('contextkey.parser.error.unexpectedEOF.hint', \"Did you forget to put a context key?\");\n/**\n * A parser for context key expressions.\n *\n * Example:\n * ```ts\n * const parser = new Parser();\n * const expr = parser.parse('foo == \"bar\" && baz == true');\n *\n * if (expr === undefined) {\n * \t// there were lexing or parsing errors\n * \t// process lexing errors with `parser.lexingErrors`\n * // process parsing errors with `parser.parsingErrors`\n * } else {\n * \t// expr is a valid expression\n * }\n * ```\n */\nexport class Parser {\n constructor(_config = defaultConfig) {\n this._config = _config;\n // lifetime note: `_scanner` lives as long as the parser does, i.e., is not reset between calls to `parse`\n this._scanner = new Scanner();\n // lifetime note: `_tokens`, `_current`, and `_parsingErrors` must be reset between calls to `parse`\n this._tokens = [];\n this._current = 0; // invariant: 0 <= this._current < this._tokens.length ; any incrementation of this value must first call `_isAtEnd`\n this._parsingErrors = [];\n this._flagsGYRe = /g|y/g;\n }\n /**\n * Parse a context key expression.\n *\n * @param input the expression to parse\n * @returns the parsed expression or `undefined` if there's an error - call `lexingErrors` and `parsingErrors` to see the errors\n */\n parse(input) {\n if (input === '') {\n this._parsingErrors.push({ message: errorEmptyString, offset: 0, lexeme: '', additionalInfo: hintEmptyString });\n return undefined;\n }\n this._tokens = this._scanner.reset(input).scan();\n // @ulugbekna: we do not stop parsing if there are lexing errors to be able to reconstruct regexes with unescaped slashes; TODO@ulugbekna: make this respect config option for recovery\n this._current = 0;\n this._parsingErrors = [];\n try {\n const expr = this._expr();\n if (!this._isAtEnd()) {\n const peek = this._peek();\n const additionalInfo = peek.type === 17 /* TokenType.Str */ ? hintUnexpectedToken : undefined;\n this._parsingErrors.push({ message: errorUnexpectedToken, offset: peek.offset, lexeme: Scanner.getLexeme(peek), additionalInfo });\n throw Parser._parseError;\n }\n return expr;\n }\n catch (e) {\n if (!(e === Parser._parseError)) {\n throw e;\n }\n return undefined;\n }\n }\n _expr() {\n return this._or();\n }\n _or() {\n const expr = [this._and()];\n while (this._matchOne(16 /* TokenType.Or */)) {\n const right = this._and();\n expr.push(right);\n }\n return expr.length === 1 ? expr[0] : ContextKeyExpr.or(...expr);\n }\n _and() {\n const expr = [this._term()];\n while (this._matchOne(15 /* TokenType.And */)) {\n const right = this._term();\n expr.push(right);\n }\n return expr.length === 1 ? expr[0] : ContextKeyExpr.and(...expr);\n }\n _term() {\n if (this._matchOne(2 /* TokenType.Neg */)) {\n const peek = this._peek();\n switch (peek.type) {\n case 11 /* TokenType.True */:\n this._advance();\n return ContextKeyFalseExpr.INSTANCE;\n case 12 /* TokenType.False */:\n this._advance();\n return ContextKeyTrueExpr.INSTANCE;\n case 0 /* TokenType.LParen */: {\n this._advance();\n const expr = this._expr();\n this._consume(1 /* TokenType.RParen */, errorClosingParenthesis);\n return expr === null || expr === void 0 ? void 0 : expr.negate();\n }\n case 17 /* TokenType.Str */:\n this._advance();\n return ContextKeyNotExpr.create(peek.lexeme);\n default:\n throw this._errExpectedButGot(`KEY | true | false | '(' expression ')'`, peek);\n }\n }\n return this._primary();\n }\n _primary() {\n const peek = this._peek();\n switch (peek.type) {\n case 11 /* TokenType.True */:\n this._advance();\n return ContextKeyExpr.true();\n case 12 /* TokenType.False */:\n this._advance();\n return ContextKeyExpr.false();\n case 0 /* TokenType.LParen */: {\n this._advance();\n const expr = this._expr();\n this._consume(1 /* TokenType.RParen */, errorClosingParenthesis);\n return expr;\n }\n case 17 /* TokenType.Str */: {\n // KEY\n const key = peek.lexeme;\n this._advance();\n // =~ regex\n if (this._matchOne(9 /* TokenType.RegexOp */)) {\n // @ulugbekna: we need to reconstruct the regex from the tokens because some extensions use unescaped slashes in regexes\n const expr = this._peek();\n if (!this._config.regexParsingWithErrorRecovery) {\n this._advance();\n if (expr.type !== 10 /* TokenType.RegexStr */) {\n throw this._errExpectedButGot(`REGEX`, expr);\n }\n const regexLexeme = expr.lexeme;\n const closingSlashIndex = regexLexeme.lastIndexOf('/');\n const flags = closingSlashIndex === regexLexeme.length - 1 ? undefined : this._removeFlagsGY(regexLexeme.substring(closingSlashIndex + 1));\n let regexp;\n try {\n regexp = new RegExp(regexLexeme.substring(1, closingSlashIndex), flags);\n }\n catch (e) {\n throw this._errExpectedButGot(`REGEX`, expr);\n }\n return ContextKeyRegexExpr.create(key, regexp);\n }\n switch (expr.type) {\n case 10 /* TokenType.RegexStr */:\n case 19 /* TokenType.Error */: { // also handle an ErrorToken in case of smth such as /(/file)/\n const lexemeReconstruction = [expr.lexeme]; // /REGEX/ or /REGEX/FLAGS\n this._advance();\n let followingToken = this._peek();\n let parenBalance = 0;\n for (let i = 0; i < expr.lexeme.length; i++) {\n if (expr.lexeme.charCodeAt(i) === 40 /* CharCode.OpenParen */) {\n parenBalance++;\n }\n else if (expr.lexeme.charCodeAt(i) === 41 /* CharCode.CloseParen */) {\n parenBalance--;\n }\n }\n while (!this._isAtEnd() && followingToken.type !== 15 /* TokenType.And */ && followingToken.type !== 16 /* TokenType.Or */) {\n switch (followingToken.type) {\n case 0 /* TokenType.LParen */:\n parenBalance++;\n break;\n case 1 /* TokenType.RParen */:\n parenBalance--;\n break;\n case 10 /* TokenType.RegexStr */:\n case 18 /* TokenType.QuotedStr */:\n for (let i = 0; i < followingToken.lexeme.length; i++) {\n if (followingToken.lexeme.charCodeAt(i) === 40 /* CharCode.OpenParen */) {\n parenBalance++;\n }\n else if (expr.lexeme.charCodeAt(i) === 41 /* CharCode.CloseParen */) {\n parenBalance--;\n }\n }\n }\n if (parenBalance < 0) {\n break;\n }\n lexemeReconstruction.push(Scanner.getLexeme(followingToken));\n this._advance();\n followingToken = this._peek();\n }\n const regexLexeme = lexemeReconstruction.join('');\n const closingSlashIndex = regexLexeme.lastIndexOf('/');\n const flags = closingSlashIndex === regexLexeme.length - 1 ? undefined : this._removeFlagsGY(regexLexeme.substring(closingSlashIndex + 1));\n let regexp;\n try {\n regexp = new RegExp(regexLexeme.substring(1, closingSlashIndex), flags);\n }\n catch (e) {\n throw this._errExpectedButGot(`REGEX`, expr);\n }\n return ContextKeyExpr.regex(key, regexp);\n }\n case 18 /* TokenType.QuotedStr */: {\n const serializedValue = expr.lexeme;\n this._advance();\n // replicate old regex parsing behavior\n let regex = null;\n if (!isFalsyOrWhitespace(serializedValue)) {\n const start = serializedValue.indexOf('/');\n const end = serializedValue.lastIndexOf('/');\n if (start !== end && start >= 0) {\n const value = serializedValue.slice(start + 1, end);\n const caseIgnoreFlag = serializedValue[end + 1] === 'i' ? 'i' : '';\n try {\n regex = new RegExp(value, caseIgnoreFlag);\n }\n catch (_e) {\n throw this._errExpectedButGot(`REGEX`, expr);\n }\n }\n }\n if (regex === null) {\n throw this._errExpectedButGot('REGEX', expr);\n }\n return ContextKeyRegexExpr.create(key, regex);\n }\n default:\n throw this._errExpectedButGot('REGEX', this._peek());\n }\n }\n // [ 'not' 'in' value ]\n if (this._matchOne(14 /* TokenType.Not */)) {\n this._consume(13 /* TokenType.In */, errorNoInAfterNot);\n const right = this._value();\n return ContextKeyExpr.notIn(key, right);\n }\n // [ ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in') value ]\n const maybeOp = this._peek().type;\n switch (maybeOp) {\n case 3 /* TokenType.Eq */: {\n this._advance();\n const right = this._value();\n if (this._previous().type === 18 /* TokenType.QuotedStr */) { // to preserve old parser behavior: \"foo == 'true'\" is preserved as \"foo == 'true'\", but \"foo == true\" is optimized as \"foo\"\n return ContextKeyExpr.equals(key, right);\n }\n switch (right) {\n case 'true':\n return ContextKeyExpr.has(key);\n case 'false':\n return ContextKeyExpr.not(key);\n default:\n return ContextKeyExpr.equals(key, right);\n }\n }\n case 4 /* TokenType.NotEq */: {\n this._advance();\n const right = this._value();\n if (this._previous().type === 18 /* TokenType.QuotedStr */) { // same as above with \"foo != 'true'\"\n return ContextKeyExpr.notEquals(key, right);\n }\n switch (right) {\n case 'true':\n return ContextKeyExpr.not(key);\n case 'false':\n return ContextKeyExpr.has(key);\n default:\n return ContextKeyExpr.notEquals(key, right);\n }\n }\n // TODO: ContextKeyExpr.smaller(key, right) accepts only `number` as `right` AND during eval of this node, we just eval to `false` if `right` is not a number\n // consequently, package.json linter should _warn_ the user if they're passing undesired things to ops\n case 5 /* TokenType.Lt */:\n this._advance();\n return ContextKeySmallerExpr.create(key, this._value());\n case 6 /* TokenType.LtEq */:\n this._advance();\n return ContextKeySmallerEqualsExpr.create(key, this._value());\n case 7 /* TokenType.Gt */:\n this._advance();\n return ContextKeyGreaterExpr.create(key, this._value());\n case 8 /* TokenType.GtEq */:\n this._advance();\n return ContextKeyGreaterEqualsExpr.create(key, this._value());\n case 13 /* TokenType.In */:\n this._advance();\n return ContextKeyExpr.in(key, this._value());\n default:\n return ContextKeyExpr.has(key);\n }\n }\n case 20 /* TokenType.EOF */:\n this._parsingErrors.push({ message: errorUnexpectedEOF, offset: peek.offset, lexeme: '', additionalInfo: hintUnexpectedEOF });\n throw Parser._parseError;\n default:\n throw this._errExpectedButGot(`true | false | KEY \\n\\t| KEY '=~' REGEX \\n\\t| KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`, this._peek());\n }\n }\n _value() {\n const token = this._peek();\n switch (token.type) {\n case 17 /* TokenType.Str */:\n case 18 /* TokenType.QuotedStr */:\n this._advance();\n return token.lexeme;\n case 11 /* TokenType.True */:\n this._advance();\n return 'true';\n case 12 /* TokenType.False */:\n this._advance();\n return 'false';\n case 13 /* TokenType.In */: // we support `in` as a value, e.g., \"when\": \"languageId == in\" - exists in existing extensions\n this._advance();\n return 'in';\n default:\n // this allows \"when\": \"foo == \" which's used by existing extensions\n // we do not call `_advance` on purpose - we don't want to eat unintended tokens\n return '';\n }\n }\n _removeFlagsGY(flags) {\n return flags.replaceAll(this._flagsGYRe, '');\n }\n // careful: this can throw if current token is the initial one (ie index = 0)\n _previous() {\n return this._tokens[this._current - 1];\n }\n _matchOne(token) {\n if (this._check(token)) {\n this._advance();\n return true;\n }\n return false;\n }\n _advance() {\n if (!this._isAtEnd()) {\n this._current++;\n }\n return this._previous();\n }\n _consume(type, message) {\n if (this._check(type)) {\n return this._advance();\n }\n throw this._errExpectedButGot(message, this._peek());\n }\n _errExpectedButGot(expected, got, additionalInfo) {\n const message = localize('contextkey.parser.error.expectedButGot', \"Expected: {0}\\nReceived: '{1}'.\", expected, Scanner.getLexeme(got));\n const offset = got.offset;\n const lexeme = Scanner.getLexeme(got);\n this._parsingErrors.push({ message, offset, lexeme, additionalInfo });\n return Parser._parseError;\n }\n _check(type) {\n return this._peek().type === type;\n }\n _peek() {\n return this._tokens[this._current];\n }\n _isAtEnd() {\n return this._peek().type === 20 /* TokenType.EOF */;\n }\n}\n// Note: this doesn't produce an exact syntax tree but a normalized one\n// ContextKeyExpression's that we use as AST nodes do not expose constructors that do not normalize\nParser._parseError = new Error();\nexport class ContextKeyExpr {\n static false() {\n return ContextKeyFalseExpr.INSTANCE;\n }\n static true() {\n return ContextKeyTrueExpr.INSTANCE;\n }\n static has(key) {\n return ContextKeyDefinedExpr.create(key);\n }\n static equals(key, value) {\n return ContextKeyEqualsExpr.create(key, value);\n }\n static notEquals(key, value) {\n return ContextKeyNotEqualsExpr.create(key, value);\n }\n static regex(key, value) {\n return ContextKeyRegexExpr.create(key, value);\n }\n static in(key, value) {\n return ContextKeyInExpr.create(key, value);\n }\n static notIn(key, value) {\n return ContextKeyNotInExpr.create(key, value);\n }\n static not(key) {\n return ContextKeyNotExpr.create(key);\n }\n static and(...expr) {\n return ContextKeyAndExpr.create(expr, null, true);\n }\n static or(...expr) {\n return ContextKeyOrExpr.create(expr, null, true);\n }\n static deserialize(serialized) {\n if (serialized === undefined || serialized === null) { // an empty string needs to be handled by the parser to get a corresponding parsing error reported\n return undefined;\n }\n const expr = this._parser.parse(serialized);\n return expr;\n }\n}\nContextKeyExpr._parser = new Parser({ regexParsingWithErrorRecovery: false });\nexport function expressionsAreEqualWithConstantSubstitution(a, b) {\n const aExpr = a ? a.substituteConstants() : undefined;\n const bExpr = b ? b.substituteConstants() : undefined;\n if (!aExpr && !bExpr) {\n return true;\n }\n if (!aExpr || !bExpr) {\n return false;\n }\n return aExpr.equals(bExpr);\n}\nfunction cmp(a, b) {\n return a.cmp(b);\n}\nexport class ContextKeyFalseExpr {\n constructor() {\n this.type = 0 /* ContextKeyExprType.False */;\n }\n cmp(other) {\n return this.type - other.type;\n }\n equals(other) {\n return (other.type === this.type);\n }\n substituteConstants() {\n return this;\n }\n evaluate(context) {\n return false;\n }\n serialize() {\n return 'false';\n }\n keys() {\n return [];\n }\n negate() {\n return ContextKeyTrueExpr.INSTANCE;\n }\n}\nContextKeyFalseExpr.INSTANCE = new ContextKeyFalseExpr();\nexport class ContextKeyTrueExpr {\n constructor() {\n this.type = 1 /* ContextKeyExprType.True */;\n }\n cmp(other) {\n return this.type - other.type;\n }\n equals(other) {\n return (other.type === this.type);\n }\n substituteConstants() {\n return this;\n }\n evaluate(context) {\n return true;\n }\n serialize() {\n return 'true';\n }\n keys() {\n return [];\n }\n negate() {\n return ContextKeyFalseExpr.INSTANCE;\n }\n}\nContextKeyTrueExpr.INSTANCE = new ContextKeyTrueExpr();\nexport class ContextKeyDefinedExpr {\n static create(key, negated = null) {\n const constantValue = CONSTANT_VALUES.get(key);\n if (typeof constantValue === 'boolean') {\n return constantValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE;\n }\n return new ContextKeyDefinedExpr(key, negated);\n }\n constructor(key, negated) {\n this.key = key;\n this.negated = negated;\n this.type = 2 /* ContextKeyExprType.Defined */;\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n return cmp1(this.key, other.key);\n }\n equals(other) {\n if (other.type === this.type) {\n return (this.key === other.key);\n }\n return false;\n }\n substituteConstants() {\n const constantValue = CONSTANT_VALUES.get(this.key);\n if (typeof constantValue === 'boolean') {\n return constantValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE;\n }\n return this;\n }\n evaluate(context) {\n return (!!context.getValue(this.key));\n }\n serialize() {\n return this.key;\n }\n keys() {\n return [this.key];\n }\n negate() {\n if (!this.negated) {\n this.negated = ContextKeyNotExpr.create(this.key, this);\n }\n return this.negated;\n }\n}\nexport class ContextKeyEqualsExpr {\n static create(key, value, negated = null) {\n if (typeof value === 'boolean') {\n return (value ? ContextKeyDefinedExpr.create(key, negated) : ContextKeyNotExpr.create(key, negated));\n }\n const constantValue = CONSTANT_VALUES.get(key);\n if (typeof constantValue === 'boolean') {\n const trueValue = constantValue ? 'true' : 'false';\n return (value === trueValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE);\n }\n return new ContextKeyEqualsExpr(key, value, negated);\n }\n constructor(key, value, negated) {\n this.key = key;\n this.value = value;\n this.negated = negated;\n this.type = 4 /* ContextKeyExprType.Equals */;\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n return cmp2(this.key, this.value, other.key, other.value);\n }\n equals(other) {\n if (other.type === this.type) {\n return (this.key === other.key && this.value === other.value);\n }\n return false;\n }\n substituteConstants() {\n const constantValue = CONSTANT_VALUES.get(this.key);\n if (typeof constantValue === 'boolean') {\n const trueValue = constantValue ? 'true' : 'false';\n return (this.value === trueValue ? ContextKeyTrueExpr.INSTANCE : ContextKeyFalseExpr.INSTANCE);\n }\n return this;\n }\n evaluate(context) {\n // Intentional ==\n // eslint-disable-next-line eqeqeq\n return (context.getValue(this.key) == this.value);\n }\n serialize() {\n return `${this.key} == '${this.value}'`;\n }\n keys() {\n return [this.key];\n }\n negate() {\n if (!this.negated) {\n this.negated = ContextKeyNotEqualsExpr.create(this.key, this.value, this);\n }\n return this.negated;\n }\n}\nexport class ContextKeyInExpr {\n static create(key, valueKey) {\n return new ContextKeyInExpr(key, valueKey);\n }\n constructor(key, valueKey) {\n this.key = key;\n this.valueKey = valueKey;\n this.type = 10 /* ContextKeyExprType.In */;\n this.negated = null;\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n return cmp2(this.key, this.valueKey, other.key, other.valueKey);\n }\n equals(other) {\n if (other.type === this.type) {\n return (this.key === other.key && this.valueKey === other.valueKey);\n }\n return false;\n }\n substituteConstants() {\n return this;\n }\n evaluate(context) {\n const source = context.getValue(this.valueKey);\n const item = context.getValue(this.key);\n if (Array.isArray(source)) {\n return source.includes(item);\n }\n if (typeof item === 'string' && typeof source === 'object' && source !== null) {\n return hasOwnProperty.call(source, item);\n }\n return false;\n }\n serialize() {\n return `${this.key} in '${this.valueKey}'`;\n }\n keys() {\n return [this.key, this.valueKey];\n }\n negate() {\n if (!this.negated) {\n this.negated = ContextKeyNotInExpr.create(this.key, this.valueKey);\n }\n return this.negated;\n }\n}\nexport class ContextKeyNotInExpr {\n static create(key, valueKey) {\n return new ContextKeyNotInExpr(key, valueKey);\n }\n constructor(key, valueKey) {\n this.key = key;\n this.valueKey = valueKey;\n this.type = 11 /* ContextKeyExprType.NotIn */;\n this._negated = ContextKeyInExpr.create(key, valueKey);\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n return this._negated.cmp(other._negated);\n }\n equals(other) {\n if (other.type === this.type) {\n return this._negated.equals(other._negated);\n }\n return false;\n }\n substituteConstants() {\n return this;\n }\n evaluate(context) {\n return !this._negated.evaluate(context);\n }\n serialize() {\n return `${this.key} not in '${this.valueKey}'`;\n }\n keys() {\n return this._negated.keys();\n }\n negate() {\n return this._negated;\n }\n}\nexport class ContextKeyNotEqualsExpr {\n static create(key, value, negated = null) {\n if (typeof value === 'boolean') {\n if (value) {\n return ContextKeyNotExpr.create(key, negated);\n }\n return ContextKeyDefinedExpr.create(key, negated);\n }\n const constantValue = CONSTANT_VALUES.get(key);\n if (typeof constantValue === 'boolean') {\n const falseValue = constantValue ? 'true' : 'false';\n return (value === falseValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);\n }\n return new ContextKeyNotEqualsExpr(key, value, negated);\n }\n constructor(key, value, negated) {\n this.key = key;\n this.value = value;\n this.negated = negated;\n this.type = 5 /* ContextKeyExprType.NotEquals */;\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n return cmp2(this.key, this.value, other.key, other.value);\n }\n equals(other) {\n if (other.type === this.type) {\n return (this.key === other.key && this.value === other.value);\n }\n return false;\n }\n substituteConstants() {\n const constantValue = CONSTANT_VALUES.get(this.key);\n if (typeof constantValue === 'boolean') {\n const falseValue = constantValue ? 'true' : 'false';\n return (this.value === falseValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);\n }\n return this;\n }\n evaluate(context) {\n // Intentional !=\n // eslint-disable-next-line eqeqeq\n return (context.getValue(this.key) != this.value);\n }\n serialize() {\n return `${this.key} != '${this.value}'`;\n }\n keys() {\n return [this.key];\n }\n negate() {\n if (!this.negated) {\n this.negated = ContextKeyEqualsExpr.create(this.key, this.value, this);\n }\n return this.negated;\n }\n}\nexport class ContextKeyNotExpr {\n static create(key, negated = null) {\n const constantValue = CONSTANT_VALUES.get(key);\n if (typeof constantValue === 'boolean') {\n return (constantValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);\n }\n return new ContextKeyNotExpr(key, negated);\n }\n constructor(key, negated) {\n this.key = key;\n this.negated = negated;\n this.type = 3 /* ContextKeyExprType.Not */;\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n return cmp1(this.key, other.key);\n }\n equals(other) {\n if (other.type === this.type) {\n return (this.key === other.key);\n }\n return false;\n }\n substituteConstants() {\n const constantValue = CONSTANT_VALUES.get(this.key);\n if (typeof constantValue === 'boolean') {\n return (constantValue ? ContextKeyFalseExpr.INSTANCE : ContextKeyTrueExpr.INSTANCE);\n }\n return this;\n }\n evaluate(context) {\n return (!context.getValue(this.key));\n }\n serialize() {\n return `!${this.key}`;\n }\n keys() {\n return [this.key];\n }\n negate() {\n if (!this.negated) {\n this.negated = ContextKeyDefinedExpr.create(this.key, this);\n }\n return this.negated;\n }\n}\nfunction withFloatOrStr(value, callback) {\n if (typeof value === 'string') {\n const n = parseFloat(value);\n if (!isNaN(n)) {\n value = n;\n }\n }\n if (typeof value === 'string' || typeof value === 'number') {\n return callback(value);\n }\n return ContextKeyFalseExpr.INSTANCE;\n}\nexport class ContextKeyGreaterExpr {\n static create(key, _value, negated = null) {\n return withFloatOrStr(_value, (value) => new ContextKeyGreaterExpr(key, value, negated));\n }\n constructor(key, value, negated) {\n this.key = key;\n this.value = value;\n this.negated = negated;\n this.type = 12 /* ContextKeyExprType.Greater */;\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n return cmp2(this.key, this.value, other.key, other.value);\n }\n equals(other) {\n if (other.type === this.type) {\n return (this.key === other.key && this.value === other.value);\n }\n return false;\n }\n substituteConstants() {\n return this;\n }\n evaluate(context) {\n if (typeof this.value === 'string') {\n return false;\n }\n return (parseFloat(context.getValue(this.key)) > this.value);\n }\n serialize() {\n return `${this.key} > ${this.value}`;\n }\n keys() {\n return [this.key];\n }\n negate() {\n if (!this.negated) {\n this.negated = ContextKeySmallerEqualsExpr.create(this.key, this.value, this);\n }\n return this.negated;\n }\n}\nexport class ContextKeyGreaterEqualsExpr {\n static create(key, _value, negated = null) {\n return withFloatOrStr(_value, (value) => new ContextKeyGreaterEqualsExpr(key, value, negated));\n }\n constructor(key, value, negated) {\n this.key = key;\n this.value = value;\n this.negated = negated;\n this.type = 13 /* ContextKeyExprType.GreaterEquals */;\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n return cmp2(this.key, this.value, other.key, other.value);\n }\n equals(other) {\n if (other.type === this.type) {\n return (this.key === other.key && this.value === other.value);\n }\n return false;\n }\n substituteConstants() {\n return this;\n }\n evaluate(context) {\n if (typeof this.value === 'string') {\n return false;\n }\n return (parseFloat(context.getValue(this.key)) >= this.value);\n }\n serialize() {\n return `${this.key} >= ${this.value}`;\n }\n keys() {\n return [this.key];\n }\n negate() {\n if (!this.negated) {\n this.negated = ContextKeySmallerExpr.create(this.key, this.value, this);\n }\n return this.negated;\n }\n}\nexport class ContextKeySmallerExpr {\n static create(key, _value, negated = null) {\n return withFloatOrStr(_value, (value) => new ContextKeySmallerExpr(key, value, negated));\n }\n constructor(key, value, negated) {\n this.key = key;\n this.value = value;\n this.negated = negated;\n this.type = 14 /* ContextKeyExprType.Smaller */;\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n return cmp2(this.key, this.value, other.key, other.value);\n }\n equals(other) {\n if (other.type === this.type) {\n return (this.key === other.key && this.value === other.value);\n }\n return false;\n }\n substituteConstants() {\n return this;\n }\n evaluate(context) {\n if (typeof this.value === 'string') {\n return false;\n }\n return (parseFloat(context.getValue(this.key)) < this.value);\n }\n serialize() {\n return `${this.key} < ${this.value}`;\n }\n keys() {\n return [this.key];\n }\n negate() {\n if (!this.negated) {\n this.negated = ContextKeyGreaterEqualsExpr.create(this.key, this.value, this);\n }\n return this.negated;\n }\n}\nexport class ContextKeySmallerEqualsExpr {\n static create(key, _value, negated = null) {\n return withFloatOrStr(_value, (value) => new ContextKeySmallerEqualsExpr(key, value, negated));\n }\n constructor(key, value, negated) {\n this.key = key;\n this.value = value;\n this.negated = negated;\n this.type = 15 /* ContextKeyExprType.SmallerEquals */;\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n return cmp2(this.key, this.value, other.key, other.value);\n }\n equals(other) {\n if (other.type === this.type) {\n return (this.key === other.key && this.value === other.value);\n }\n return false;\n }\n substituteConstants() {\n return this;\n }\n evaluate(context) {\n if (typeof this.value === 'string') {\n return false;\n }\n return (parseFloat(context.getValue(this.key)) <= this.value);\n }\n serialize() {\n return `${this.key} <= ${this.value}`;\n }\n keys() {\n return [this.key];\n }\n negate() {\n if (!this.negated) {\n this.negated = ContextKeyGreaterExpr.create(this.key, this.value, this);\n }\n return this.negated;\n }\n}\nexport class ContextKeyRegexExpr {\n static create(key, regexp) {\n return new ContextKeyRegexExpr(key, regexp);\n }\n constructor(key, regexp) {\n this.key = key;\n this.regexp = regexp;\n this.type = 7 /* ContextKeyExprType.Regex */;\n this.negated = null;\n //\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n if (this.key < other.key) {\n return -1;\n }\n if (this.key > other.key) {\n return 1;\n }\n const thisSource = this.regexp ? this.regexp.source : '';\n const otherSource = other.regexp ? other.regexp.source : '';\n if (thisSource < otherSource) {\n return -1;\n }\n if (thisSource > otherSource) {\n return 1;\n }\n return 0;\n }\n equals(other) {\n if (other.type === this.type) {\n const thisSource = this.regexp ? this.regexp.source : '';\n const otherSource = other.regexp ? other.regexp.source : '';\n return (this.key === other.key && thisSource === otherSource);\n }\n return false;\n }\n substituteConstants() {\n return this;\n }\n evaluate(context) {\n const value = context.getValue(this.key);\n return this.regexp ? this.regexp.test(value) : false;\n }\n serialize() {\n const value = this.regexp\n ? `/${this.regexp.source}/${this.regexp.flags}`\n : '/invalid/';\n return `${this.key} =~ ${value}`;\n }\n keys() {\n return [this.key];\n }\n negate() {\n if (!this.negated) {\n this.negated = ContextKeyNotRegexExpr.create(this);\n }\n return this.negated;\n }\n}\nexport class ContextKeyNotRegexExpr {\n static create(actual) {\n return new ContextKeyNotRegexExpr(actual);\n }\n constructor(_actual) {\n this._actual = _actual;\n this.type = 8 /* ContextKeyExprType.NotRegex */;\n //\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n return this._actual.cmp(other._actual);\n }\n equals(other) {\n if (other.type === this.type) {\n return this._actual.equals(other._actual);\n }\n return false;\n }\n substituteConstants() {\n return this;\n }\n evaluate(context) {\n return !this._actual.evaluate(context);\n }\n serialize() {\n return `!(${this._actual.serialize()})`;\n }\n keys() {\n return this._actual.keys();\n }\n negate() {\n return this._actual;\n }\n}\n/**\n * @returns the same instance if nothing changed.\n */\nfunction eliminateConstantsInArray(arr) {\n // Allocate array only if there is a difference\n let newArr = null;\n for (let i = 0, len = arr.length; i < len; i++) {\n const newExpr = arr[i].substituteConstants();\n if (arr[i] !== newExpr) {\n // something has changed!\n // allocate array on first difference\n if (newArr === null) {\n newArr = [];\n for (let j = 0; j < i; j++) {\n newArr[j] = arr[j];\n }\n }\n }\n if (newArr !== null) {\n newArr[i] = newExpr;\n }\n }\n if (newArr === null) {\n return arr;\n }\n return newArr;\n}\nexport class ContextKeyAndExpr {\n static create(_expr, negated, extraRedundantCheck) {\n return ContextKeyAndExpr._normalizeArr(_expr, negated, extraRedundantCheck);\n }\n constructor(expr, negated) {\n this.expr = expr;\n this.negated = negated;\n this.type = 6 /* ContextKeyExprType.And */;\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n if (this.expr.length < other.expr.length) {\n return -1;\n }\n if (this.expr.length > other.expr.length) {\n return 1;\n }\n for (let i = 0, len = this.expr.length; i < len; i++) {\n const r = cmp(this.expr[i], other.expr[i]);\n if (r !== 0) {\n return r;\n }\n }\n return 0;\n }\n equals(other) {\n if (other.type === this.type) {\n if (this.expr.length !== other.expr.length) {\n return false;\n }\n for (let i = 0, len = this.expr.length; i < len; i++) {\n if (!this.expr[i].equals(other.expr[i])) {\n return false;\n }\n }\n return true;\n }\n return false;\n }\n substituteConstants() {\n const exprArr = eliminateConstantsInArray(this.expr);\n if (exprArr === this.expr) {\n // no change\n return this;\n }\n return ContextKeyAndExpr.create(exprArr, this.negated, false);\n }\n evaluate(context) {\n for (let i = 0, len = this.expr.length; i < len; i++) {\n if (!this.expr[i].evaluate(context)) {\n return false;\n }\n }\n return true;\n }\n static _normalizeArr(arr, negated, extraRedundantCheck) {\n const expr = [];\n let hasTrue = false;\n for (const e of arr) {\n if (!e) {\n continue;\n }\n if (e.type === 1 /* ContextKeyExprType.True */) {\n // anything && true ==> anything\n hasTrue = true;\n continue;\n }\n if (e.type === 0 /* ContextKeyExprType.False */) {\n // anything && false ==> false\n return ContextKeyFalseExpr.INSTANCE;\n }\n if (e.type === 6 /* ContextKeyExprType.And */) {\n expr.push(...e.expr);\n continue;\n }\n expr.push(e);\n }\n if (expr.length === 0 && hasTrue) {\n return ContextKeyTrueExpr.INSTANCE;\n }\n if (expr.length === 0) {\n return undefined;\n }\n if (expr.length === 1) {\n return expr[0];\n }\n expr.sort(cmp);\n // eliminate duplicate terms\n for (let i = 1; i < expr.length; i++) {\n if (expr[i - 1].equals(expr[i])) {\n expr.splice(i, 1);\n i--;\n }\n }\n if (expr.length === 1) {\n return expr[0];\n }\n // We must distribute any OR expression because we don't support parens\n // OR extensions will be at the end (due to sorting rules)\n while (expr.length > 1) {\n const lastElement = expr[expr.length - 1];\n if (lastElement.type !== 9 /* ContextKeyExprType.Or */) {\n break;\n }\n // pop the last element\n expr.pop();\n // pop the second to last element\n const secondToLastElement = expr.pop();\n const isFinished = (expr.length === 0);\n // distribute `lastElement` over `secondToLastElement`\n const resultElement = ContextKeyOrExpr.create(lastElement.expr.map(el => ContextKeyAndExpr.create([el, secondToLastElement], null, extraRedundantCheck)), null, isFinished);\n if (resultElement) {\n expr.push(resultElement);\n expr.sort(cmp);\n }\n }\n if (expr.length === 1) {\n return expr[0];\n }\n // resolve false AND expressions\n if (extraRedundantCheck) {\n for (let i = 0; i < expr.length; i++) {\n for (let j = i + 1; j < expr.length; j++) {\n if (expr[i].negate().equals(expr[j])) {\n // A && !A case\n return ContextKeyFalseExpr.INSTANCE;\n }\n }\n }\n if (expr.length === 1) {\n return expr[0];\n }\n }\n return new ContextKeyAndExpr(expr, negated);\n }\n serialize() {\n return this.expr.map(e => e.serialize()).join(' && ');\n }\n keys() {\n const result = [];\n for (const expr of this.expr) {\n result.push(...expr.keys());\n }\n return result;\n }\n negate() {\n if (!this.negated) {\n const result = [];\n for (const expr of this.expr) {\n result.push(expr.negate());\n }\n this.negated = ContextKeyOrExpr.create(result, this, true);\n }\n return this.negated;\n }\n}\nexport class ContextKeyOrExpr {\n static create(_expr, negated, extraRedundantCheck) {\n return ContextKeyOrExpr._normalizeArr(_expr, negated, extraRedundantCheck);\n }\n constructor(expr, negated) {\n this.expr = expr;\n this.negated = negated;\n this.type = 9 /* ContextKeyExprType.Or */;\n }\n cmp(other) {\n if (other.type !== this.type) {\n return this.type - other.type;\n }\n if (this.expr.length < other.expr.length) {\n return -1;\n }\n if (this.expr.length > other.expr.length) {\n return 1;\n }\n for (let i = 0, len = this.expr.length; i < len; i++) {\n const r = cmp(this.expr[i], other.expr[i]);\n if (r !== 0) {\n return r;\n }\n }\n return 0;\n }\n equals(other) {\n if (other.type === this.type) {\n if (this.expr.length !== other.expr.length) {\n return false;\n }\n for (let i = 0, len = this.expr.length; i < len; i++) {\n if (!this.expr[i].equals(other.expr[i])) {\n return false;\n }\n }\n return true;\n }\n return false;\n }\n substituteConstants() {\n const exprArr = eliminateConstantsInArray(this.expr);\n if (exprArr === this.expr) {\n // no change\n return this;\n }\n return ContextKeyOrExpr.create(exprArr, this.negated, false);\n }\n evaluate(context) {\n for (let i = 0, len = this.expr.length; i < len; i++) {\n if (this.expr[i].evaluate(context)) {\n return true;\n }\n }\n return false;\n }\n static _normalizeArr(arr, negated, extraRedundantCheck) {\n let expr = [];\n let hasFalse = false;\n if (arr) {\n for (let i = 0, len = arr.length; i < len; i++) {\n const e = arr[i];\n if (!e) {\n continue;\n }\n if (e.type === 0 /* ContextKeyExprType.False */) {\n // anything || false ==> anything\n hasFalse = true;\n continue;\n }\n if (e.type === 1 /* ContextKeyExprType.True */) {\n // anything || true ==> true\n return ContextKeyTrueExpr.INSTANCE;\n }\n if (e.type === 9 /* ContextKeyExprType.Or */) {\n expr = expr.concat(e.expr);\n continue;\n }\n expr.push(e);\n }\n if (expr.length === 0 && hasFalse) {\n return ContextKeyFalseExpr.INSTANCE;\n }\n expr.sort(cmp);\n }\n if (expr.length === 0) {\n return undefined;\n }\n if (expr.length === 1) {\n return expr[0];\n }\n // eliminate duplicate terms\n for (let i = 1; i < expr.length; i++) {\n if (expr[i - 1].equals(expr[i])) {\n expr.splice(i, 1);\n i--;\n }\n }\n if (expr.length === 1) {\n return expr[0];\n }\n // resolve true OR expressions\n if (extraRedundantCheck) {\n for (let i = 0; i < expr.length; i++) {\n for (let j = i + 1; j < expr.length; j++) {\n if (expr[i].negate().equals(expr[j])) {\n // A || !A case\n return ContextKeyTrueExpr.INSTANCE;\n }\n }\n }\n if (expr.length === 1) {\n return expr[0];\n }\n }\n return new ContextKeyOrExpr(expr, negated);\n }\n serialize() {\n return this.expr.map(e => e.serialize()).join(' || ');\n }\n keys() {\n const result = [];\n for (const expr of this.expr) {\n result.push(...expr.keys());\n }\n return result;\n }\n negate() {\n if (!this.negated) {\n const result = [];\n for (const expr of this.expr) {\n result.push(expr.negate());\n }\n // We don't support parens, so here we distribute the AND over the OR terminals\n // We always take the first 2 AND pairs and distribute them\n while (result.length > 1) {\n const LEFT = result.shift();\n const RIGHT = result.shift();\n const all = [];\n for (const left of getTerminals(LEFT)) {\n for (const right of getTerminals(RIGHT)) {\n all.push(ContextKeyAndExpr.create([left, right], null, false));\n }\n }\n result.unshift(ContextKeyOrExpr.create(all, null, false));\n }\n this.negated = ContextKeyOrExpr.create(result, this, true);\n }\n return this.negated;\n }\n}\nexport class RawContextKey extends ContextKeyDefinedExpr {\n static all() {\n return RawContextKey._info.values();\n }\n constructor(key, defaultValue, metaOrHide) {\n super(key, null);\n this._defaultValue = defaultValue;\n // collect all context keys into a central place\n if (typeof metaOrHide === 'object') {\n RawContextKey._info.push({ ...metaOrHide, key });\n }\n else if (metaOrHide !== true) {\n RawContextKey._info.push({ key, description: metaOrHide, type: defaultValue !== null && defaultValue !== undefined ? typeof defaultValue : undefined });\n }\n }\n bindTo(target) {\n return target.createKey(this.key, this._defaultValue);\n }\n getValue(target) {\n return target.getContextKeyValue(this.key);\n }\n toNegated() {\n return this.negate();\n }\n isEqualTo(value) {\n return ContextKeyEqualsExpr.create(this.key, value);\n }\n}\nRawContextKey._info = [];\nexport const IContextKeyService = createDecorator('contextKeyService');\nfunction cmp1(key1, key2) {\n if (key1 < key2) {\n return -1;\n }\n if (key1 > key2) {\n return 1;\n }\n return 0;\n}\nfunction cmp2(key1, value1, key2, value2) {\n if (key1 < key2) {\n return -1;\n }\n if (key1 > key2) {\n return 1;\n }\n if (value1 < value2) {\n return -1;\n }\n if (value1 > value2) {\n return 1;\n }\n return 0;\n}\n/**\n * Returns true if it is provable `p` implies `q`.\n */\nexport function implies(p, q) {\n if (p.type === 0 /* ContextKeyExprType.False */ || q.type === 1 /* ContextKeyExprType.True */) {\n // false implies anything\n // anything implies true\n return true;\n }\n if (p.type === 9 /* ContextKeyExprType.Or */) {\n if (q.type === 9 /* ContextKeyExprType.Or */) {\n // `a || b || c` can only imply something like `a || b || c || d`\n return allElementsIncluded(p.expr, q.expr);\n }\n return false;\n }\n if (q.type === 9 /* ContextKeyExprType.Or */) {\n for (const element of q.expr) {\n if (implies(p, element)) {\n return true;\n }\n }\n return false;\n }\n if (p.type === 6 /* ContextKeyExprType.And */) {\n if (q.type === 6 /* ContextKeyExprType.And */) {\n // `a && b && c` implies `a && c`\n return allElementsIncluded(q.expr, p.expr);\n }\n for (const element of p.expr) {\n if (implies(element, q)) {\n return true;\n }\n }\n return false;\n }\n return p.equals(q);\n}\n/**\n * Returns true if all elements in `p` are also present in `q`.\n * The two arrays are assumed to be sorted\n */\nfunction allElementsIncluded(p, q) {\n let pIndex = 0;\n let qIndex = 0;\n while (pIndex < p.length && qIndex < q.length) {\n const cmp = p[pIndex].cmp(q[qIndex]);\n if (cmp < 0) {\n // an element from `p` is missing from `q`\n return false;\n }\n else if (cmp === 0) {\n pIndex++;\n qIndex++;\n }\n else {\n qIndex++;\n }\n }\n return (pIndex === p.length);\n}\nfunction getTerminals(node) {\n if (node.type === 9 /* ContextKeyExprType.Or */) {\n return node.expr;\n }\n return [node];\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 { isIOS, isLinux, isMacintosh, isMobile, isWeb, isWindows } from '../../../base/common/platform.js';\nimport { localize } from '../../../nls.js';\nimport { RawContextKey } from './contextkey.js';\nexport const IsMacContext = new RawContextKey('isMac', isMacintosh, localize('isMac', \"Whether the operating system is macOS\"));\nexport const IsLinuxContext = new RawContextKey('isLinux', isLinux, localize('isLinux', \"Whether the operating system is Linux\"));\nexport const IsWindowsContext = new RawContextKey('isWindows', isWindows, localize('isWindows', \"Whether the operating system is Windows\"));\nexport const IsWebContext = new RawContextKey('isWeb', isWeb, localize('isWeb', \"Whether the platform is a web browser\"));\nexport const IsMacNativeContext = new RawContextKey('isMacNative', isMacintosh && !isWeb, localize('isMacNative', \"Whether the operating system is macOS on a non-browser platform\"));\nexport const IsIOSContext = new RawContextKey('isIOS', isIOS, localize('isIOS', \"Whether the operating system is iOS\"));\nexport const IsMobileContext = new RawContextKey('isMobile', isMobile, localize('isMobile', \"Whether the platform is a mobile web browser\"));\nexport const IsDevelopmentContext = new RawContextKey('isDevelopment', false, true);\nexport const ProductQualityContext = new RawContextKey('productQualityType', '', localize('productQualityType', \"Quality type of VS Code\"));\nexport const InputFocusedContextKey = 'inputFocus';\nexport const InputFocusedContext = new RawContextKey(InputFocusedContextKey, false, localize('inputFocus', \"Whether keyboard focus is inside an input box\"));\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 { $, addDisposableListener, EventType, getActiveElement, getWindow, isAncestor, isHTMLElement } from '../../../base/browser/dom.js';\nimport { StandardMouseEvent } from '../../../base/browser/mouseEvent.js';\nimport { Menu } from '../../../base/browser/ui/menu/menu.js';\nimport { ActionRunner } from '../../../base/common/actions.js';\nimport { isCancellationError } from '../../../base/common/errors.js';\nimport { combinedDisposable, DisposableStore } from '../../../base/common/lifecycle.js';\nimport { defaultMenuStyles } from '../../theme/browser/defaultStyles.js';\nexport class ContextMenuHandler {\n constructor(contextViewService, telemetryService, notificationService, keybindingService) {\n this.contextViewService = contextViewService;\n this.telemetryService = telemetryService;\n this.notificationService = notificationService;\n this.keybindingService = keybindingService;\n this.focusToReturn = null;\n this.lastContainer = null;\n this.block = null;\n this.blockDisposable = null;\n this.options = { blockMouse: true };\n }\n configure(options) {\n this.options = options;\n }\n showContextMenu(delegate) {\n const actions = delegate.getActions();\n if (!actions.length) {\n return; // Don't render an empty context menu\n }\n this.focusToReturn = getActiveElement();\n let menu;\n const shadowRootElement = isHTMLElement(delegate.domForShadowRoot) ? delegate.domForShadowRoot : undefined;\n this.contextViewService.showContextView({\n getAnchor: () => delegate.getAnchor(),\n canRelayout: false,\n anchorAlignment: delegate.anchorAlignment,\n anchorAxisAlignment: delegate.anchorAxisAlignment,\n render: (container) => {\n var _a;\n this.lastContainer = container;\n const className = delegate.getMenuClassName ? delegate.getMenuClassName() : '';\n if (className) {\n container.className += ' ' + className;\n }\n // Render invisible div to block mouse interaction in the rest of the UI\n if (this.options.blockMouse) {\n this.block = container.appendChild($('.context-view-block'));\n this.block.style.position = 'fixed';\n this.block.style.cursor = 'initial';\n this.block.style.left = '0';\n this.block.style.top = '0';\n this.block.style.width = '100%';\n this.block.style.height = '100%';\n this.block.style.zIndex = '-1';\n (_a = this.blockDisposable) === null || _a === void 0 ? void 0 : _a.dispose();\n this.blockDisposable = addDisposableListener(this.block, EventType.MOUSE_DOWN, e => e.stopPropagation());\n }\n const menuDisposables = new DisposableStore();\n const actionRunner = delegate.actionRunner || new ActionRunner();\n actionRunner.onWillRun(evt => this.onActionRun(evt, !delegate.skipTelemetry), this, menuDisposables);\n actionRunner.onDidRun(this.onDidActionRun, this, menuDisposables);\n menu = new Menu(container, actions, {\n actionViewItemProvider: delegate.getActionViewItem,\n context: delegate.getActionsContext ? delegate.getActionsContext() : null,\n actionRunner,\n getKeyBinding: delegate.getKeyBinding ? delegate.getKeyBinding : action => this.keybindingService.lookupKeybinding(action.id)\n }, defaultMenuStyles);\n menu.onDidCancel(() => this.contextViewService.hideContextView(true), null, menuDisposables);\n menu.onDidBlur(() => this.contextViewService.hideContextView(true), null, menuDisposables);\n const targetWindow = getWindow(container);\n menuDisposables.add(addDisposableListener(targetWindow, EventType.BLUR, () => this.contextViewService.hideContextView(true)));\n menuDisposables.add(addDisposableListener(targetWindow, EventType.MOUSE_DOWN, (e) => {\n if (e.defaultPrevented) {\n return;\n }\n const event = new StandardMouseEvent(targetWindow, e);\n let element = event.target;\n // Don't do anything as we are likely creating a context menu\n if (event.rightButton) {\n return;\n }\n while (element) {\n if (element === container) {\n return;\n }\n element = element.parentElement;\n }\n this.contextViewService.hideContextView(true);\n }));\n return combinedDisposable(menuDisposables, menu);\n },\n focus: () => {\n menu === null || menu === void 0 ? void 0 : menu.focus(!!delegate.autoSelectFirstItem);\n },\n onHide: (didCancel) => {\n var _a, _b, _c;\n (_a = delegate.onHide) === null || _a === void 0 ? void 0 : _a.call(delegate, !!didCancel);\n if (this.block) {\n this.block.remove();\n this.block = null;\n }\n (_b = this.blockDisposable) === null || _b === void 0 ? void 0 : _b.dispose();\n this.blockDisposable = null;\n if (!!this.lastContainer && (getActiveElement() === this.lastContainer || isAncestor(getActiveElement(), this.lastContainer))) {\n (_c = this.focusToReturn) === null || _c === void 0 ? void 0 : _c.focus();\n }\n this.lastContainer = null;\n }\n }, shadowRootElement, !!shadowRootElement);\n }\n onActionRun(e, logTelemetry) {\n if (logTelemetry) {\n this.telemetryService.publicLog2('workbenchActionExecuted', { id: e.action.id, from: 'contextMenu' });\n }\n this.contextViewService.hideContextView(false);\n }\n onDidActionRun(e) {\n if (e.error && !isCancellationError(e.error)) {\n this.notificationService.error(e.error);\n }\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 { ModifierKeyEmitter } from '../../../base/browser/dom.js';\nimport { Separator } from '../../../base/common/actions.js';\nimport { Emitter } from '../../../base/common/event.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { createAndFillInContextMenuActions } from '../../actions/browser/menuEntryActionViewItem.js';\nimport { IMenuService, MenuId } from '../../actions/common/actions.js';\nimport { IContextKeyService } from '../../contextkey/common/contextkey.js';\nimport { IKeybindingService } from '../../keybinding/common/keybinding.js';\nimport { INotificationService } from '../../notification/common/notification.js';\nimport { ITelemetryService } from '../../telemetry/common/telemetry.js';\nimport { ContextMenuHandler } from './contextMenuHandler.js';\nimport { IContextViewService } from './contextView.js';\nlet ContextMenuService = class ContextMenuService extends Disposable {\n get contextMenuHandler() {\n if (!this._contextMenuHandler) {\n this._contextMenuHandler = new ContextMenuHandler(this.contextViewService, this.telemetryService, this.notificationService, this.keybindingService);\n }\n return this._contextMenuHandler;\n }\n constructor(telemetryService, notificationService, contextViewService, keybindingService, menuService, contextKeyService) {\n super();\n this.telemetryService = telemetryService;\n this.notificationService = notificationService;\n this.contextViewService = contextViewService;\n this.keybindingService = keybindingService;\n this.menuService = menuService;\n this.contextKeyService = contextKeyService;\n this._contextMenuHandler = undefined;\n this._onDidShowContextMenu = this._store.add(new Emitter());\n this.onDidShowContextMenu = this._onDidShowContextMenu.event;\n this._onDidHideContextMenu = this._store.add(new Emitter());\n }\n configure(options) {\n this.contextMenuHandler.configure(options);\n }\n // ContextMenu\n showContextMenu(delegate) {\n delegate = ContextMenuMenuDelegate.transform(delegate, this.menuService, this.contextKeyService);\n this.contextMenuHandler.showContextMenu({\n ...delegate,\n onHide: (didCancel) => {\n var _a;\n (_a = delegate.onHide) === null || _a === void 0 ? void 0 : _a.call(delegate, didCancel);\n this._onDidHideContextMenu.fire();\n }\n });\n ModifierKeyEmitter.getInstance().resetKeyStatus();\n this._onDidShowContextMenu.fire();\n }\n};\nContextMenuService = __decorate([\n __param(0, ITelemetryService),\n __param(1, INotificationService),\n __param(2, IContextViewService),\n __param(3, IKeybindingService),\n __param(4, IMenuService),\n __param(5, IContextKeyService)\n], ContextMenuService);\nexport { ContextMenuService };\nexport var ContextMenuMenuDelegate;\n(function (ContextMenuMenuDelegate) {\n function is(thing) {\n return thing && thing.menuId instanceof MenuId;\n }\n function transform(delegate, menuService, globalContextKeyService) {\n if (!is(delegate)) {\n return delegate;\n }\n const { menuId, menuActionOptions, contextKeyService } = delegate;\n return {\n ...delegate,\n getActions: () => {\n const target = [];\n if (menuId) {\n const menu = menuService.createMenu(menuId, contextKeyService !== null && contextKeyService !== void 0 ? contextKeyService : globalContextKeyService);\n createAndFillInContextMenuActions(menu, menuActionOptions, target);\n menu.dispose();\n }\n if (!delegate.getActions) {\n return target;\n }\n else {\n return Separator.join(delegate.getActions(), target);\n }\n }\n };\n }\n ContextMenuMenuDelegate.transform = transform;\n})(ContextMenuMenuDelegate || (ContextMenuMenuDelegate = {}));\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 '../../instantiation/common/instantiation.js';\nexport const IContextViewService = createDecorator('contextViewService');\nexport const IContextMenuService = createDecorator('contextMenuService');\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 { ContextView } from '../../../base/browser/ui/contextview/contextview.js';\nimport { Disposable } from '../../../base/common/lifecycle.js';\nimport { ILayoutService } from '../../layout/browser/layoutService.js';\nimport { getWindow } from '../../../base/browser/dom.js';\nlet ContextViewHandler = class ContextViewHandler extends Disposable {\n constructor(layoutService) {\n super();\n this.layoutService = layoutService;\n this.contextView = this._register(new ContextView(this.layoutService.mainContainer, 1 /* ContextViewDOMPosition.ABSOLUTE */));\n this.layout();\n this._register(layoutService.onDidLayoutContainer(() => this.layout()));\n }\n // ContextView\n showContextView(delegate, container, shadowRoot) {\n let domPosition;\n if (container) {\n if (container === this.layoutService.getContainer(getWindow(container))) {\n domPosition = 1 /* ContextViewDOMPosition.ABSOLUTE */;\n }\n else if (shadowRoot) {\n domPosition = 3 /* ContextViewDOMPosition.FIXED_SHADOW */;\n }\n else {\n domPosition = 2 /* ContextViewDOMPosition.FIXED */;\n }\n }\n else {\n domPosition = 1 /* ContextViewDOMPosition.ABSOLUTE */;\n }\n this.contextView.setContainer(container !== null && container !== void 0 ? container : this.layoutService.activeContainer, domPosition);\n this.contextView.show(delegate);\n const openContextView = {\n close: () => {\n if (this.openContextView === openContextView) {\n this.hideContextView();\n }\n }\n };\n this.openContextView = openContextView;\n return openContextView;\n }\n layout() {\n this.contextView.layout();\n }\n hideContextView(data) {\n this.contextView.hide(data);\n this.openContextView = undefined;\n }\n};\nContextViewHandler = __decorate([\n __param(0, ILayoutService)\n], ContextViewHandler);\nexport { ContextViewHandler };\nexport class ContextViewService extends ContextViewHandler {\n getContextViewElement() {\n return this.contextView.getViewElement();\n }\n}\n","import { createDecorator } from '../../instantiation/common/instantiation.js';\nexport const IDialogService = createDecorator('dialogService');\n","import { Registry } from '../../registry/common/platform.js';\n//#region Editor / Resources DND\nexport const CodeDataTransfers = {\n EDITORS: 'CodeEditors',\n FILES: 'CodeFiles'\n};\nclass DragAndDropContributionRegistry {\n}\nexport const Extensions = {\n DragAndDropContribution: 'workbench.contributions.dragAndDrop'\n};\nRegistry.add(Extensions.DragAndDropContribution, new DragAndDropContributionRegistry());\n//#endregion\n//#region DND Utilities\n/**\n * A singleton to store transfer data during drag & drop operations that are only valid within the application.\n */\nexport class LocalSelectionTransfer {\n constructor() {\n // protect against external instantiation\n }\n static getInstance() {\n return LocalSelectionTransfer.INSTANCE;\n }\n hasData(proto) {\n return proto && proto === this.proto;\n }\n getData(proto) {\n if (this.hasData(proto)) {\n return this.data;\n }\n return undefined;\n }\n}\nLocalSelectionTransfer.INSTANCE = new LocalSelectionTransfer();\n//#endregion\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 var EditorOpenSource;\n(function (EditorOpenSource) {\n /**\n * Default: the editor is opening via a programmatic call\n * to the editor service API.\n */\n EditorOpenSource[EditorOpenSource[\"API\"] = 0] = \"API\";\n /**\n * Indicates that a user action triggered the opening, e.g.\n * via mouse or keyboard use.\n */\n EditorOpenSource[EditorOpenSource[\"USER\"] = 1] = \"USER\";\n})(EditorOpenSource || (EditorOpenSource = {}));\n"],"names":["BrowserClipboardService_1","__decorate","decorators","target","key","desc","d","c","arguments","length","r","Object","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","__param","paramIndex","decorator","BrowserClipboardService","constructor","layoutService","logService","super","this","mapTextToType","Map","findText","resources","resourcesStateHash","undefined","installWebKitWriteTextWorkaround","_register","window","disposables","add","document","clearResources","_store","handler","currentWritePromise","webKitPendingClipboardWritePromise","isSettled","cancel","navigator","clipboard","write","ClipboardItem","p","catch","async","err","Error","name","isRejected","error","onDidAddContainer","container","mainContainer","writeText","text","type","writeResources","set","complete","console","fallbackWriteText","activeDocument","activeElement","textArea","body","appendChild","$","style","height","width","position","value","focus","select","execCommand","removeChild","readText","get","readFindText","writeFindText","computeResourcesStateHash","readResources","clipboardText","substring","MAX_RESOURCE_STATE_SOURCE_LENGTH","IClipboardService","ICommandService","CommandsRegistry","_commands","_onDidRegisterCommand","onDidRegisterCommand","event","registerCommand","idOrCommand","id","metadata","Array","isArray","args","constraints","arg","push","constraint","actualHandler","accessor","commands","removeFn","unshift","ret","command","isEmpty","delete","fire","registerCommandAlias","oldId","newId","executeCommand","getCommand","list","getCommands","result","keys","IConfigurationService","toValuesTree","properties","conflictReporter","root","create","addToValueTree","settingsTreeRoot","segments","split","last","pop","curr","s","obj","slice","join","JSON","stringify","e","removeFromValueTree","valueTree","doRemoveFromValueTree","first","shift","indexOf","getConfigurationValue","config","settingPath","defaultValue","path","current","component","accessSetting","getLanguageTagSettingPlainKey","settingKey","replace","freeze","data","isFrozen","ConfigurationModel","createEmptyModel","_contents","_keys","_overrides","raw","overrideConfigurations","rawConfiguration","_a","_rawConfiguration","rawConfigurationModels","map","parser","ConfigurationModelParser","parseRaw","configurationModel","reduce","previous","merge","contents","overrides","getValue","section","inspect","overrideIdentifier","that","override","getOverrideValue","merged","identifiers","overrideContents","getContentsForOverrideIdentifer","identifier","overrideConfigurationModel","createOverrideConfigurationModel","others","_b","raws","other","mergeContents","otherOverride","filter","o","every","contentsForKey","overrideContentsForKey","source","contentsForIdentifierOnly","contentsToMerge","includes","toJSON","addValue","updateValue","setValue","removeValue","index","splice","findIndex","message","_name","_raw","_configurationModel","_restrictedConfigurations","options","restricted","hasExcludedProperties","doParseRaw","configurationProperties","getConfigurationProperties","filtered","toOverrides","filterOverriddenProperties","_c","scopes","skipRestricted","exclude","propertySchema","scope","include","overrideRaw","keyInOverrideRaw","ConfigurationInspectValue","_value","overrideIdentifiers","defaultConfiguration","policyConfiguration","applicationConfiguration","userConfiguration","localUserConfiguration","remoteUserConfiguration","workspaceConfiguration","folderConfigurationModel","memoryConfigurationModel","toInspectValue","inspectValue","userInspectValue","_userInspectValue","user","Configuration","_defaultConfiguration","_policyConfiguration","_applicationConfiguration","_localUserConfiguration","_remoteUserConfiguration","_workspaceConfiguration","_folderConfigurations","_memoryConfiguration","_memoryConfigurationByResource","_workspaceConsolidatedConfiguration","_foldersConsolidatedConfigurations","_userConfiguration","workspace","getConsolidatedConfigurationModel","memoryConfiguration","resource","consolidateConfigurationModel","getFolderConfigurationModelForResource","Set","size","getConsolidatedConfigurationModelForResource","consolidateConfiguration","getWorkspaceConsolidatedConfiguration","getFolder","getFolderConsolidatedConfiguration","uri","memoryConfigurationForResource","folder","folderConsolidatedConfiguration","workspaceConsolidateConfiguration","folderConfiguration","toData","defaults","policy","application","folders","parse","parseConfigurationModel","model","ConfigurationChangeEvent","change","currentConfiguraiton","currentWorkspace","_marker","_markerCode1","charCodeAt","_markerCode2","affectedKeys","_previousConfiguration","_affectsConfigStr","previousConfiguration","affectsConfiguration","needle","idx","pos","code","value1","value2","Extensions","allSettings","patternProperties","applicationSettings","machineSettings","machineOverridableSettings","windowSettings","resourceSettings","resourceLanguageSettingsSchemaId","contributionRegistry","OVERRIDE_IDENTIFIER_PATTERN","OVERRIDE_IDENTIFIER_REGEX","RegExp","OVERRIDE_PROPERTY_PATTERN","OVERRIDE_PROPERTY_REGEX","overrideIdentifiersFromKey","test","matches","exec","trim","configurationRegistry","_onDidSchemaChange","_onDidUpdateConfiguration","configurationDefaultsOverrides","defaultLanguageConfigurationOverridesNode","title","configurationContributors","resourceLanguageSettingsSchema","additionalProperties","allowTrailingCommas","allowComments","policyConfigurations","excludedConfigurationProperties","registerSchema","registerOverridePropertyPatternKey","registerConfiguration","configuration","validate","registerConfigurations","configurations","doRegisterConfigurations","registerDefaultConfigurations","configurationDefaults","doRegisterDefaultConfigurations","defaultsOverrides","bucket","configurationDefaultOverride","valuesSources","plainKey","property","default","description","$ref","defaultDefaultValue","defaultValueSource","updatePropertyDefaultValue","updateSchema","doRegisterOverrideIdentifiers","registerOverrideIdentifiers","updateOverridePropertyPatternKey","forEach","validateAndRegisterProperties","extensionInfo","restrictedProperties","registerJSONConfiguration","validateProperty","hasOwnProperty","included","deprecationMessage","markdownDeprecationMessage","subNodes","allOf","node","getPolicyConfigurations","register","values","overrideIdentifierProperty","resourceLanguagePropertiesSchema","errorMessage","configurationdefaultOverride","defaultSource","getDefaultValue","schema","_d","DefaultConfiguration","reload","resetConfigurationModel","getConfigurationDefaultOverrides","updateConfigurationModel","defaultOverrideValue","KEYBINDING_CONTEXT_ATTR","Context","parent","_id","_parent","NullContext","INSTANCE","ConfigAwareContextValuesContainer","_configurationService","emitter","_values","_listener","onDidChangeConfiguration","allKeys","from","k","clear","ArrayContextKeyChangeEvent","changedKeys","configKey","contextKey","cachedItems","findSuperstr","deleteSuperstr","has","dispose","_keyPrefix","substr","configValue","ContextKey","service","_service","_key","_defaultValue","reset","setContext","removeContext","getContextKeyValue","SimpleContextKeyChangeEvent","affectsSome","allKeysContainedIn","CompositeContextKeyChangeEvent","events","evt","AbstractContextKeyService","myContextId","_onDidChangeContext","input","onDidChangeContext","_isDisposed","_myContextId","createKey","bufferChangeEvents","callback","pause","resume","createScoped","domNode","ScopedContextKeyService","contextMatchesRules","rules","context","getContextValuesContainer","evaluate","myContext","getContext","hasAttribute","attr","getAttribute","parseInt","NaN","parentElement","findContextAttr","ContextKeyService","configurationService","_contexts","_lastContextId","contextId","createChildContext","parentContextId","disposeContext","_parentChangeListener","_updateParentChangeListener","_domNode","extraInfo","classList","setAttribute","String","thisContextValues","removeAttribute","contextValue","$mid","toString","stringifyURIs","sort","a","b","localeCompare","seen","info","log","hintDidYouMean","meant","hintDidYouForgetToOpenOrCloseQuote","hintDidYouForgetToEscapeSlash","Scanner","_input","_start","_current","_tokens","_errors","stringRe","getLexeme","token","isTripleEq","lexeme","scan","_isAtEnd","_advance","_addToken","_match","offset","_quotedString","_regex","_error","_string","expected","_peek","additional","errToken","additionalInfo","lastIndex","match","keyword","_keywords","inEscape","inCharacterClass","ch","_regexFlags","CONSTANT_VALUES","prototype","defaultConfig","regexParsingWithErrorRecovery","errorEmptyString","hintEmptyString","errorNoInAfterNot","errorClosingParenthesis","errorUnexpectedToken","hintUnexpectedToken","errorUnexpectedEOF","hintUnexpectedEOF","Parser","_config","_scanner","_parsingErrors","_flagsGYRe","expr","_expr","peek","_parseError","_or","_and","_matchOne","right","ContextKeyExpr","or","_term","and","ContextKeyFalseExpr","ContextKeyTrueExpr","_consume","negate","ContextKeyNotExpr","_errExpectedButGot","_primary","true","false","regexLexeme","closingSlashIndex","lastIndexOf","flags","_removeFlagsGY","regexp","ContextKeyRegexExpr","lexemeReconstruction","followingToken","parenBalance","regex","serializedValue","start","end","caseIgnoreFlag","_e","notIn","_previous","equals","not","notEquals","ContextKeySmallerExpr","ContextKeySmallerEqualsExpr","ContextKeyGreaterExpr","ContextKeyGreaterEqualsExpr","in","replaceAll","_check","got","ContextKeyDefinedExpr","ContextKeyEqualsExpr","ContextKeyNotEqualsExpr","ContextKeyInExpr","ContextKeyNotInExpr","ContextKeyAndExpr","ContextKeyOrExpr","deserialize","serialized","_parser","expressionsAreEqualWithConstantSubstitution","aExpr","substituteConstants","bExpr","cmp","serialize","negated","constantValue","cmp1","cmp2","trueValue","valueKey","item","call","_negated","falseValue","withFloatOrStr","n","parseFloat","isNaN","thisSource","otherSource","ContextKeyNotRegexExpr","actual","_actual","eliminateConstantsInArray","arr","newArr","len","newExpr","j","extraRedundantCheck","_normalizeArr","exprArr","hasTrue","lastElement","secondToLastElement","isFinished","resultElement","el","hasFalse","concat","LEFT","RIGHT","all","left","getTerminals","RawContextKey","_info","metaOrHide","bindTo","toNegated","isEqualTo","IContextKeyService","key1","key2","implies","q","allElementsIncluded","element","pIndex","qIndex","IsWindowsContext","IsWebContext","InputFocusedContextKey","InputFocusedContext","ContextMenuHandler","contextViewService","telemetryService","notificationService","keybindingService","focusToReturn","lastContainer","block","blockDisposable","blockMouse","configure","showContextMenu","delegate","actions","getActions","menu","shadowRootElement","domForShadowRoot","showContextView","getAnchor","canRelayout","anchorAlignment","anchorAxisAlignment","render","className","getMenuClassName","cursor","top","zIndex","stopPropagation","menuDisposables","actionRunner","onWillRun","onActionRun","skipTelemetry","onDidRun","onDidActionRun","actionViewItemProvider","getActionViewItem","getActionsContext","getKeyBinding","action","lookupKeybinding","onDidCancel","hideContextView","onDidBlur","targetWindow","defaultPrevented","rightButton","autoSelectFirstItem","onHide","didCancel","remove","logTelemetry","publicLog2","ContextMenuService","contextMenuHandler","_contextMenuHandler","menuService","contextKeyService","_onDidShowContextMenu","onDidShowContextMenu","_onDidHideContextMenu","ContextMenuMenuDelegate","transform","resetKeyStatus","globalContextKeyService","thing","menuId","menuActionOptions","createMenu","IContextViewService","IContextMenuService","ContextViewHandler","contextView","layout","onDidLayoutContainer","shadowRoot","domPosition","getContainer","setContainer","activeContainer","show","openContextView","close","hide","ContextViewService","getContextViewElement","getViewElement","IDialogService","CodeDataTransfers","EDITORS","FILES","LocalSelectionTransfer","getInstance","hasData","proto","getData","EditorOpenSource"],"sourceRoot":""}