@rescript/language-server 1.40.0 → 1.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/analysis_binaries/darwin/rescript-editor-analysis.exe +0 -0
- package/analysis_binaries/darwinarm64/rescript-editor-analysis.exe +0 -0
- package/analysis_binaries/linux/rescript-editor-analysis.exe +0 -0
- package/analysis_binaries/win32/rescript-editor-analysis.exe +0 -0
- package/out/cli.js +93 -32
- package/out/cli.js.map +7 -1
- package/package.json +1 -1
- package/out/buildSchema.js +0 -21
- package/out/buildSchema.js.map +0 -1
- package/out/codeActions.js +0 -573
- package/out/codeActions.js.map +0 -1
- package/out/constants.js +0 -58
- package/out/constants.js.map +0 -1
- package/out/errorReporter.js +0 -22
- package/out/errorReporter.js.map +0 -1
- package/out/lookup.js +0 -147
- package/out/lookup.js.map +0 -1
- package/out/server.js +0 -1108
- package/out/server.js.map +0 -1
- package/out/utils.js +0 -582
- package/out/utils.js.map +0 -1
package/out/cli.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../node_modules/vscode-jsonrpc/lib/common/ral.js", "../node_modules/vscode-jsonrpc/lib/common/disposable.js", "../node_modules/vscode-jsonrpc/lib/common/messageBuffer.js", "../node_modules/vscode-jsonrpc/lib/node/ril.js", "../node_modules/vscode-jsonrpc/lib/common/is.js", "../node_modules/vscode-jsonrpc/lib/common/messages.js", "../node_modules/vscode-jsonrpc/lib/common/linkedMap.js", "../node_modules/vscode-jsonrpc/lib/common/events.js", "../node_modules/vscode-jsonrpc/lib/common/cancellation.js", "../node_modules/vscode-jsonrpc/lib/common/messageReader.js", "../node_modules/vscode-jsonrpc/lib/common/semaphore.js", "../node_modules/vscode-jsonrpc/lib/common/messageWriter.js", "../node_modules/vscode-jsonrpc/lib/common/connection.js", "../node_modules/vscode-jsonrpc/lib/common/api.js", "../node_modules/vscode-jsonrpc/lib/node/main.js", "../node_modules/vscode-jsonrpc/node.js", "../node_modules/vscode-languageserver-types/lib/umd/main.js", "../node_modules/vscode-languageserver-protocol/lib/common/messages.js", "../node_modules/vscode-languageserver-protocol/lib/common/utils/is.js", "../node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js", "../node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js", "../node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js", "../node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js", "../node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js", "../node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js", "../node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js", "../node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js", "../node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js", "../node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js", "../node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js", "../node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js", "../node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js", "../node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js", "../node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js", "../node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js", "../node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js", "../node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js", "../node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js", "../node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js", "../node_modules/vscode-languageserver-protocol/lib/common/protocol.js", "../node_modules/vscode-languageserver-protocol/lib/common/connection.js", "../node_modules/vscode-languageserver-protocol/lib/common/api.js", "../node_modules/vscode-languageserver-protocol/lib/node/main.js", "../node_modules/vscode-languageserver/lib/common/utils/is.js", "../node_modules/vscode-languageserver/lib/common/utils/uuid.js", "../node_modules/vscode-languageserver/lib/common/progress.js", "../node_modules/vscode-languageserver/lib/common/configuration.js", "../node_modules/vscode-languageserver/lib/common/workspaceFolder.js", "../node_modules/vscode-languageserver/lib/common/callHierarchy.js", "../node_modules/vscode-languageserver/lib/common/semanticTokens.js", "../node_modules/vscode-languageserver/lib/common/showDocument.js", "../node_modules/vscode-languageserver/lib/common/fileOperations.js", "../node_modules/vscode-languageserver/lib/common/linkedEditingRange.js", "../node_modules/vscode-languageserver/lib/common/typeHierarchy.js", "../node_modules/vscode-languageserver/lib/common/inlineValue.js", "../node_modules/vscode-languageserver/lib/common/inlayHint.js", "../node_modules/vscode-languageserver/lib/common/diagnostic.js", "../node_modules/vscode-languageserver/lib/common/textDocuments.js", "../node_modules/vscode-languageserver/lib/common/notebook.js", "../node_modules/vscode-languageserver/lib/common/moniker.js", "../node_modules/vscode-languageserver/lib/common/server.js", "../node_modules/vscode-languageserver/lib/node/files.js", "../node_modules/vscode-languageserver-protocol/node.js", "../node_modules/vscode-languageserver/lib/common/api.js", "../node_modules/vscode-languageserver/lib/node/main.js", "../node_modules/picomatch/lib/constants.js", "../node_modules/picomatch/lib/utils.js", "../node_modules/picomatch/lib/scan.js", "../node_modules/picomatch/lib/parse.js", "../node_modules/picomatch/lib/picomatch.js", "../node_modules/picomatch/index.js", "../node_modules/readdirp/index.js", "../node_modules/normalize-path/index.js", "../node_modules/anymatch/index.js", "../node_modules/is-extglob/index.js", "../node_modules/is-glob/index.js", "../node_modules/glob-parent/index.js", "../node_modules/braces/lib/utils.js", "../node_modules/braces/lib/stringify.js", "../node_modules/is-number/index.js", "../node_modules/to-regex-range/index.js", "../node_modules/fill-range/index.js", "../node_modules/braces/lib/compile.js", "../node_modules/braces/lib/expand.js", "../node_modules/braces/lib/constants.js", "../node_modules/braces/lib/parse.js", "../node_modules/braces/index.js", "../node_modules/binary-extensions/binary-extensions.json", "../node_modules/binary-extensions/index.js", "../node_modules/is-binary-path/index.js", "../node_modules/chokidar/lib/constants.js", "../node_modules/chokidar/lib/nodefs-handler.js", "../node_modules/chokidar/lib/fsevents-handler.js", "../node_modules/chokidar/index.js", "../src/cli.ts", "../src/server.ts", "../src/lookup.ts", "../src/constants.ts", "../src/utils.ts", "../src/codeActions.ts", "../src/errorReporter.ts", "../src/config.ts", "../src/incrementalCompilation.ts"],
|
|
4
|
+
"sourcesContent": ["\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nlet _ral;\nfunction RAL() {\n if (_ral === undefined) {\n throw new Error(`No runtime abstraction layer installed`);\n }\n return _ral;\n}\n(function (RAL) {\n function install(ral) {\n if (ral === undefined) {\n throw new Error(`No runtime abstraction layer provided`);\n }\n _ral = ral;\n }\n RAL.install = install;\n})(RAL || (RAL = {}));\nexports.default = RAL;\n//# sourceMappingURL=ral.js.map", "\"use strict\";\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 *--------------------------------------------------------------------------------------------*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Disposable = void 0;\nvar Disposable;\n(function (Disposable) {\n function create(func) {\n return {\n dispose: func\n };\n }\n Disposable.create = create;\n})(Disposable = exports.Disposable || (exports.Disposable = {}));\n//# sourceMappingURL=disposable.js.map", "\"use strict\";\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 *--------------------------------------------------------------------------------------------*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AbstractMessageBuffer = void 0;\nconst CR = 13;\nconst LF = 10;\nconst CRLF = '\\r\\n';\nclass AbstractMessageBuffer {\n constructor(encoding = 'utf-8') {\n this._encoding = encoding;\n this._chunks = [];\n this._totalLength = 0;\n }\n get encoding() {\n return this._encoding;\n }\n append(chunk) {\n const toAppend = typeof chunk === 'string' ? this.fromString(chunk, this._encoding) : chunk;\n this._chunks.push(toAppend);\n this._totalLength += toAppend.byteLength;\n }\n tryReadHeaders() {\n if (this._chunks.length === 0) {\n return undefined;\n }\n let state = 0;\n let chunkIndex = 0;\n let offset = 0;\n let chunkBytesRead = 0;\n row: while (chunkIndex < this._chunks.length) {\n const chunk = this._chunks[chunkIndex];\n offset = 0;\n column: while (offset < chunk.length) {\n const value = chunk[offset];\n switch (value) {\n case CR:\n switch (state) {\n case 0:\n state = 1;\n break;\n case 2:\n state = 3;\n break;\n default:\n state = 0;\n }\n break;\n case LF:\n switch (state) {\n case 1:\n state = 2;\n break;\n case 3:\n state = 4;\n offset++;\n break row;\n default:\n state = 0;\n }\n break;\n default:\n state = 0;\n }\n offset++;\n }\n chunkBytesRead += chunk.byteLength;\n chunkIndex++;\n }\n if (state !== 4) {\n return undefined;\n }\n // The buffer contains the two CRLF at the end. So we will\n // have two empty lines after the split at the end as well.\n const buffer = this._read(chunkBytesRead + offset);\n const result = new Map();\n const headers = this.toString(buffer, 'ascii').split(CRLF);\n if (headers.length < 2) {\n return result;\n }\n for (let i = 0; i < headers.length - 2; i++) {\n const header = headers[i];\n const index = header.indexOf(':');\n if (index === -1) {\n throw new Error('Message header must separate key and value using :');\n }\n const key = header.substr(0, index);\n const value = header.substr(index + 1).trim();\n result.set(key, value);\n }\n return result;\n }\n tryReadBody(length) {\n if (this._totalLength < length) {\n return undefined;\n }\n return this._read(length);\n }\n get numberOfBytes() {\n return this._totalLength;\n }\n _read(byteCount) {\n if (byteCount === 0) {\n return this.emptyBuffer();\n }\n if (byteCount > this._totalLength) {\n throw new Error(`Cannot read so many bytes!`);\n }\n if (this._chunks[0].byteLength === byteCount) {\n // super fast path, precisely first chunk must be returned\n const chunk = this._chunks[0];\n this._chunks.shift();\n this._totalLength -= byteCount;\n return this.asNative(chunk);\n }\n if (this._chunks[0].byteLength > byteCount) {\n // fast path, the reading is entirely within the first chunk\n const chunk = this._chunks[0];\n const result = this.asNative(chunk, byteCount);\n this._chunks[0] = chunk.slice(byteCount);\n this._totalLength -= byteCount;\n return result;\n }\n const result = this.allocNative(byteCount);\n let resultOffset = 0;\n let chunkIndex = 0;\n while (byteCount > 0) {\n const chunk = this._chunks[chunkIndex];\n if (chunk.byteLength > byteCount) {\n // this chunk will survive\n const chunkPart = chunk.slice(0, byteCount);\n result.set(chunkPart, resultOffset);\n resultOffset += byteCount;\n this._chunks[chunkIndex] = chunk.slice(byteCount);\n this._totalLength -= byteCount;\n byteCount -= byteCount;\n }\n else {\n // this chunk will be entirely read\n result.set(chunk, resultOffset);\n resultOffset += chunk.byteLength;\n this._chunks.shift();\n this._totalLength -= chunk.byteLength;\n byteCount -= chunk.byteLength;\n }\n }\n return result;\n }\n}\nexports.AbstractMessageBuffer = AbstractMessageBuffer;\n//# sourceMappingURL=messageBuffer.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst ral_1 = require(\"../common/ral\");\nconst util_1 = require(\"util\");\nconst disposable_1 = require(\"../common/disposable\");\nconst messageBuffer_1 = require(\"../common/messageBuffer\");\nclass MessageBuffer extends messageBuffer_1.AbstractMessageBuffer {\n constructor(encoding = 'utf-8') {\n super(encoding);\n }\n emptyBuffer() {\n return MessageBuffer.emptyBuffer;\n }\n fromString(value, encoding) {\n return Buffer.from(value, encoding);\n }\n toString(value, encoding) {\n if (value instanceof Buffer) {\n return value.toString(encoding);\n }\n else {\n return new util_1.TextDecoder(encoding).decode(value);\n }\n }\n asNative(buffer, length) {\n if (length === undefined) {\n return buffer instanceof Buffer ? buffer : Buffer.from(buffer);\n }\n else {\n return buffer instanceof Buffer ? buffer.slice(0, length) : Buffer.from(buffer, 0, length);\n }\n }\n allocNative(length) {\n return Buffer.allocUnsafe(length);\n }\n}\nMessageBuffer.emptyBuffer = Buffer.allocUnsafe(0);\nclass ReadableStreamWrapper {\n constructor(stream) {\n this.stream = stream;\n }\n onClose(listener) {\n this.stream.on('close', listener);\n return disposable_1.Disposable.create(() => this.stream.off('close', listener));\n }\n onError(listener) {\n this.stream.on('error', listener);\n return disposable_1.Disposable.create(() => this.stream.off('error', listener));\n }\n onEnd(listener) {\n this.stream.on('end', listener);\n return disposable_1.Disposable.create(() => this.stream.off('end', listener));\n }\n onData(listener) {\n this.stream.on('data', listener);\n return disposable_1.Disposable.create(() => this.stream.off('data', listener));\n }\n}\nclass WritableStreamWrapper {\n constructor(stream) {\n this.stream = stream;\n }\n onClose(listener) {\n this.stream.on('close', listener);\n return disposable_1.Disposable.create(() => this.stream.off('close', listener));\n }\n onError(listener) {\n this.stream.on('error', listener);\n return disposable_1.Disposable.create(() => this.stream.off('error', listener));\n }\n onEnd(listener) {\n this.stream.on('end', listener);\n return disposable_1.Disposable.create(() => this.stream.off('end', listener));\n }\n write(data, encoding) {\n return new Promise((resolve, reject) => {\n const callback = (error) => {\n if (error === undefined || error === null) {\n resolve();\n }\n else {\n reject(error);\n }\n };\n if (typeof data === 'string') {\n this.stream.write(data, encoding, callback);\n }\n else {\n this.stream.write(data, callback);\n }\n });\n }\n end() {\n this.stream.end();\n }\n}\nconst _ril = Object.freeze({\n messageBuffer: Object.freeze({\n create: (encoding) => new MessageBuffer(encoding)\n }),\n applicationJson: Object.freeze({\n encoder: Object.freeze({\n name: 'application/json',\n encode: (msg, options) => {\n try {\n return Promise.resolve(Buffer.from(JSON.stringify(msg, undefined, 0), options.charset));\n }\n catch (err) {\n return Promise.reject(err);\n }\n }\n }),\n decoder: Object.freeze({\n name: 'application/json',\n decode: (buffer, options) => {\n try {\n if (buffer instanceof Buffer) {\n return Promise.resolve(JSON.parse(buffer.toString(options.charset)));\n }\n else {\n return Promise.resolve(JSON.parse(new util_1.TextDecoder(options.charset).decode(buffer)));\n }\n }\n catch (err) {\n return Promise.reject(err);\n }\n }\n })\n }),\n stream: Object.freeze({\n asReadableStream: (stream) => new ReadableStreamWrapper(stream),\n asWritableStream: (stream) => new WritableStreamWrapper(stream)\n }),\n console: console,\n timer: Object.freeze({\n setTimeout(callback, ms, ...args) {\n const handle = setTimeout(callback, ms, ...args);\n return { dispose: () => clearTimeout(handle) };\n },\n setImmediate(callback, ...args) {\n const handle = setImmediate(callback, ...args);\n return { dispose: () => clearImmediate(handle) };\n },\n setInterval(callback, ms, ...args) {\n const handle = setInterval(callback, ms, ...args);\n return { dispose: () => clearInterval(handle) };\n }\n })\n});\nfunction RIL() {\n return _ril;\n}\n(function (RIL) {\n function install() {\n ral_1.default.install(_ril);\n }\n RIL.install = install;\n})(RIL || (RIL = {}));\nexports.default = RIL;\n//# sourceMappingURL=ril.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.stringArray = exports.array = exports.func = exports.error = exports.number = exports.string = exports.boolean = void 0;\nfunction boolean(value) {\n return value === true || value === false;\n}\nexports.boolean = boolean;\nfunction string(value) {\n return typeof value === 'string' || value instanceof String;\n}\nexports.string = string;\nfunction number(value) {\n return typeof value === 'number' || value instanceof Number;\n}\nexports.number = number;\nfunction error(value) {\n return value instanceof Error;\n}\nexports.error = error;\nfunction func(value) {\n return typeof value === 'function';\n}\nexports.func = func;\nfunction array(value) {\n return Array.isArray(value);\n}\nexports.array = array;\nfunction stringArray(value) {\n return array(value) && value.every(elem => string(elem));\n}\nexports.stringArray = stringArray;\n//# sourceMappingURL=is.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Message = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType = exports.RequestType0 = exports.AbstractMessageSignature = exports.ParameterStructures = exports.ResponseError = exports.ErrorCodes = void 0;\nconst is = require(\"./is\");\n/**\n * Predefined error codes.\n */\nvar ErrorCodes;\n(function (ErrorCodes) {\n // Defined by JSON RPC\n ErrorCodes.ParseError = -32700;\n ErrorCodes.InvalidRequest = -32600;\n ErrorCodes.MethodNotFound = -32601;\n ErrorCodes.InvalidParams = -32602;\n ErrorCodes.InternalError = -32603;\n /**\n * This is the start range of JSON RPC reserved error codes.\n * It doesn't denote a real error code. No application error codes should\n * be defined between the start and end range. For backwards\n * compatibility the `ServerNotInitialized` and the `UnknownErrorCode`\n * are left in the range.\n *\n * @since 3.16.0\n */\n ErrorCodes.jsonrpcReservedErrorRangeStart = -32099;\n /** @deprecated use jsonrpcReservedErrorRangeStart */\n ErrorCodes.serverErrorStart = -32099;\n /**\n * An error occurred when write a message to the transport layer.\n */\n ErrorCodes.MessageWriteError = -32099;\n /**\n * An error occurred when reading a message from the transport layer.\n */\n ErrorCodes.MessageReadError = -32098;\n /**\n * The connection got disposed or lost and all pending responses got\n * rejected.\n */\n ErrorCodes.PendingResponseRejected = -32097;\n /**\n * The connection is inactive and a use of it failed.\n */\n ErrorCodes.ConnectionInactive = -32096;\n /**\n * Error code indicating that a server received a notification or\n * request before the server has received the `initialize` request.\n */\n ErrorCodes.ServerNotInitialized = -32002;\n ErrorCodes.UnknownErrorCode = -32001;\n /**\n * This is the end range of JSON RPC reserved error codes.\n * It doesn't denote a real error code.\n *\n * @since 3.16.0\n */\n ErrorCodes.jsonrpcReservedErrorRangeEnd = -32000;\n /** @deprecated use jsonrpcReservedErrorRangeEnd */\n ErrorCodes.serverErrorEnd = -32000;\n})(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {}));\n/**\n * An error object return in a response in case a request\n * has failed.\n */\nclass ResponseError extends Error {\n constructor(code, message, data) {\n super(message);\n this.code = is.number(code) ? code : ErrorCodes.UnknownErrorCode;\n this.data = data;\n Object.setPrototypeOf(this, ResponseError.prototype);\n }\n toJson() {\n const result = {\n code: this.code,\n message: this.message\n };\n if (this.data !== undefined) {\n result.data = this.data;\n }\n return result;\n }\n}\nexports.ResponseError = ResponseError;\nclass ParameterStructures {\n constructor(kind) {\n this.kind = kind;\n }\n static is(value) {\n return value === ParameterStructures.auto || value === ParameterStructures.byName || value === ParameterStructures.byPosition;\n }\n toString() {\n return this.kind;\n }\n}\nexports.ParameterStructures = ParameterStructures;\n/**\n * The parameter structure is automatically inferred on the number of parameters\n * and the parameter type in case of a single param.\n */\nParameterStructures.auto = new ParameterStructures('auto');\n/**\n * Forces `byPosition` parameter structure. This is useful if you have a single\n * parameter which has a literal type.\n */\nParameterStructures.byPosition = new ParameterStructures('byPosition');\n/**\n * Forces `byName` parameter structure. This is only useful when having a single\n * parameter. The library will report errors if used with a different number of\n * parameters.\n */\nParameterStructures.byName = new ParameterStructures('byName');\n/**\n * An abstract implementation of a MessageType.\n */\nclass AbstractMessageSignature {\n constructor(method, numberOfParams) {\n this.method = method;\n this.numberOfParams = numberOfParams;\n }\n get parameterStructures() {\n return ParameterStructures.auto;\n }\n}\nexports.AbstractMessageSignature = AbstractMessageSignature;\n/**\n * Classes to type request response pairs\n */\nclass RequestType0 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 0);\n }\n}\nexports.RequestType0 = RequestType0;\nclass RequestType extends AbstractMessageSignature {\n constructor(method, _parameterStructures = ParameterStructures.auto) {\n super(method, 1);\n this._parameterStructures = _parameterStructures;\n }\n get parameterStructures() {\n return this._parameterStructures;\n }\n}\nexports.RequestType = RequestType;\nclass RequestType1 extends AbstractMessageSignature {\n constructor(method, _parameterStructures = ParameterStructures.auto) {\n super(method, 1);\n this._parameterStructures = _parameterStructures;\n }\n get parameterStructures() {\n return this._parameterStructures;\n }\n}\nexports.RequestType1 = RequestType1;\nclass RequestType2 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 2);\n }\n}\nexports.RequestType2 = RequestType2;\nclass RequestType3 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 3);\n }\n}\nexports.RequestType3 = RequestType3;\nclass RequestType4 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 4);\n }\n}\nexports.RequestType4 = RequestType4;\nclass RequestType5 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 5);\n }\n}\nexports.RequestType5 = RequestType5;\nclass RequestType6 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 6);\n }\n}\nexports.RequestType6 = RequestType6;\nclass RequestType7 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 7);\n }\n}\nexports.RequestType7 = RequestType7;\nclass RequestType8 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 8);\n }\n}\nexports.RequestType8 = RequestType8;\nclass RequestType9 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 9);\n }\n}\nexports.RequestType9 = RequestType9;\nclass NotificationType extends AbstractMessageSignature {\n constructor(method, _parameterStructures = ParameterStructures.auto) {\n super(method, 1);\n this._parameterStructures = _parameterStructures;\n }\n get parameterStructures() {\n return this._parameterStructures;\n }\n}\nexports.NotificationType = NotificationType;\nclass NotificationType0 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 0);\n }\n}\nexports.NotificationType0 = NotificationType0;\nclass NotificationType1 extends AbstractMessageSignature {\n constructor(method, _parameterStructures = ParameterStructures.auto) {\n super(method, 1);\n this._parameterStructures = _parameterStructures;\n }\n get parameterStructures() {\n return this._parameterStructures;\n }\n}\nexports.NotificationType1 = NotificationType1;\nclass NotificationType2 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 2);\n }\n}\nexports.NotificationType2 = NotificationType2;\nclass NotificationType3 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 3);\n }\n}\nexports.NotificationType3 = NotificationType3;\nclass NotificationType4 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 4);\n }\n}\nexports.NotificationType4 = NotificationType4;\nclass NotificationType5 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 5);\n }\n}\nexports.NotificationType5 = NotificationType5;\nclass NotificationType6 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 6);\n }\n}\nexports.NotificationType6 = NotificationType6;\nclass NotificationType7 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 7);\n }\n}\nexports.NotificationType7 = NotificationType7;\nclass NotificationType8 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 8);\n }\n}\nexports.NotificationType8 = NotificationType8;\nclass NotificationType9 extends AbstractMessageSignature {\n constructor(method) {\n super(method, 9);\n }\n}\nexports.NotificationType9 = NotificationType9;\nvar Message;\n(function (Message) {\n /**\n * Tests if the given message is a request message\n */\n function isRequest(message) {\n const candidate = message;\n return candidate && is.string(candidate.method) && (is.string(candidate.id) || is.number(candidate.id));\n }\n Message.isRequest = isRequest;\n /**\n * Tests if the given message is a notification message\n */\n function isNotification(message) {\n const candidate = message;\n return candidate && is.string(candidate.method) && message.id === void 0;\n }\n Message.isNotification = isNotification;\n /**\n * Tests if the given message is a response message\n */\n function isResponse(message) {\n const candidate = message;\n return candidate && (candidate.result !== void 0 || !!candidate.error) && (is.string(candidate.id) || is.number(candidate.id) || candidate.id === null);\n }\n Message.isResponse = isResponse;\n})(Message = exports.Message || (exports.Message = {}));\n//# sourceMappingURL=messages.js.map", "\"use strict\";\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 _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LRUCache = exports.LinkedMap = exports.Touch = void 0;\nvar Touch;\n(function (Touch) {\n Touch.None = 0;\n Touch.First = 1;\n Touch.AsOld = Touch.First;\n Touch.Last = 2;\n Touch.AsNew = Touch.Last;\n})(Touch = exports.Touch || (exports.Touch = {}));\nclass LinkedMap {\n constructor() {\n this[_a] = 'LinkedMap';\n this._map = new Map();\n this._head = undefined;\n this._tail = undefined;\n this._size = 0;\n this._state = 0;\n }\n clear() {\n this._map.clear();\n this._head = undefined;\n this._tail = undefined;\n this._size = 0;\n this._state++;\n }\n isEmpty() {\n return !this._head && !this._tail;\n }\n get size() {\n return this._size;\n }\n get first() {\n return this._head?.value;\n }\n get last() {\n return this._tail?.value;\n }\n has(key) {\n return this._map.has(key);\n }\n get(key, touch = Touch.None) {\n const item = this._map.get(key);\n if (!item) {\n return undefined;\n }\n if (touch !== Touch.None) {\n this.touch(item, touch);\n }\n return item.value;\n }\n set(key, value, touch = Touch.None) {\n let item = this._map.get(key);\n if (item) {\n item.value = value;\n if (touch !== Touch.None) {\n this.touch(item, touch);\n }\n }\n else {\n item = { key, value, next: undefined, previous: undefined };\n switch (touch) {\n case Touch.None:\n this.addItemLast(item);\n break;\n case Touch.First:\n this.addItemFirst(item);\n break;\n case Touch.Last:\n this.addItemLast(item);\n break;\n default:\n this.addItemLast(item);\n break;\n }\n this._map.set(key, item);\n this._size++;\n }\n return this;\n }\n delete(key) {\n return !!this.remove(key);\n }\n remove(key) {\n const item = this._map.get(key);\n if (!item) {\n return undefined;\n }\n this._map.delete(key);\n this.removeItem(item);\n this._size--;\n return item.value;\n }\n shift() {\n if (!this._head && !this._tail) {\n return undefined;\n }\n if (!this._head || !this._tail) {\n throw new Error('Invalid list');\n }\n const item = this._head;\n this._map.delete(item.key);\n this.removeItem(item);\n this._size--;\n return item.value;\n }\n forEach(callbackfn, thisArg) {\n const state = this._state;\n let current = this._head;\n while (current) {\n if (thisArg) {\n callbackfn.bind(thisArg)(current.value, current.key, this);\n }\n else {\n callbackfn(current.value, current.key, this);\n }\n if (this._state !== state) {\n throw new Error(`LinkedMap got modified during iteration.`);\n }\n current = current.next;\n }\n }\n keys() {\n const state = this._state;\n let current = this._head;\n const iterator = {\n [Symbol.iterator]: () => {\n return iterator;\n },\n next: () => {\n if (this._state !== state) {\n throw new Error(`LinkedMap got modified during iteration.`);\n }\n if (current) {\n const result = { value: current.key, done: false };\n current = current.next;\n return result;\n }\n else {\n return { value: undefined, done: true };\n }\n }\n };\n return iterator;\n }\n values() {\n const state = this._state;\n let current = this._head;\n const iterator = {\n [Symbol.iterator]: () => {\n return iterator;\n },\n next: () => {\n if (this._state !== state) {\n throw new Error(`LinkedMap got modified during iteration.`);\n }\n if (current) {\n const result = { value: current.value, done: false };\n current = current.next;\n return result;\n }\n else {\n return { value: undefined, done: true };\n }\n }\n };\n return iterator;\n }\n entries() {\n const state = this._state;\n let current = this._head;\n const iterator = {\n [Symbol.iterator]: () => {\n return iterator;\n },\n next: () => {\n if (this._state !== state) {\n throw new Error(`LinkedMap got modified during iteration.`);\n }\n if (current) {\n const result = { value: [current.key, current.value], done: false };\n current = current.next;\n return result;\n }\n else {\n return { value: undefined, done: true };\n }\n }\n };\n return iterator;\n }\n [(_a = Symbol.toStringTag, Symbol.iterator)]() {\n return this.entries();\n }\n trimOld(newSize) {\n if (newSize >= this.size) {\n return;\n }\n if (newSize === 0) {\n this.clear();\n return;\n }\n let current = this._head;\n let currentSize = this.size;\n while (current && currentSize > newSize) {\n this._map.delete(current.key);\n current = current.next;\n currentSize--;\n }\n this._head = current;\n this._size = currentSize;\n if (current) {\n current.previous = undefined;\n }\n this._state++;\n }\n addItemFirst(item) {\n // First time Insert\n if (!this._head && !this._tail) {\n this._tail = item;\n }\n else if (!this._head) {\n throw new Error('Invalid list');\n }\n else {\n item.next = this._head;\n this._head.previous = item;\n }\n this._head = item;\n this._state++;\n }\n addItemLast(item) {\n // First time Insert\n if (!this._head && !this._tail) {\n this._head = item;\n }\n else if (!this._tail) {\n throw new Error('Invalid list');\n }\n else {\n item.previous = this._tail;\n this._tail.next = item;\n }\n this._tail = item;\n this._state++;\n }\n removeItem(item) {\n if (item === this._head && item === this._tail) {\n this._head = undefined;\n this._tail = undefined;\n }\n else if (item === this._head) {\n // This can only happened if size === 1 which is handle\n // by the case above.\n if (!item.next) {\n throw new Error('Invalid list');\n }\n item.next.previous = undefined;\n this._head = item.next;\n }\n else if (item === this._tail) {\n // This can only happened if size === 1 which is handle\n // by the case above.\n if (!item.previous) {\n throw new Error('Invalid list');\n }\n item.previous.next = undefined;\n this._tail = item.previous;\n }\n else {\n const next = item.next;\n const previous = item.previous;\n if (!next || !previous) {\n throw new Error('Invalid list');\n }\n next.previous = previous;\n previous.next = next;\n }\n item.next = undefined;\n item.previous = undefined;\n this._state++;\n }\n touch(item, touch) {\n if (!this._head || !this._tail) {\n throw new Error('Invalid list');\n }\n if ((touch !== Touch.First && touch !== Touch.Last)) {\n return;\n }\n if (touch === Touch.First) {\n if (item === this._head) {\n return;\n }\n const next = item.next;\n const previous = item.previous;\n // Unlink the item\n if (item === this._tail) {\n // previous must be defined since item was not head but is tail\n // So there are more than on item in the map\n previous.next = undefined;\n this._tail = previous;\n }\n else {\n // Both next and previous are not undefined since item was neither head nor tail.\n next.previous = previous;\n previous.next = next;\n }\n // Insert the node at head\n item.previous = undefined;\n item.next = this._head;\n this._head.previous = item;\n this._head = item;\n this._state++;\n }\n else if (touch === Touch.Last) {\n if (item === this._tail) {\n return;\n }\n const next = item.next;\n const previous = item.previous;\n // Unlink the item.\n if (item === this._head) {\n // next must be defined since item was not tail but is head\n // So there are more than on item in the map\n next.previous = undefined;\n this._head = next;\n }\n else {\n // Both next and previous are not undefined since item was neither head nor tail.\n next.previous = previous;\n previous.next = next;\n }\n item.next = undefined;\n item.previous = this._tail;\n this._tail.next = item;\n this._tail = item;\n this._state++;\n }\n }\n toJSON() {\n const data = [];\n this.forEach((value, key) => {\n data.push([key, value]);\n });\n return data;\n }\n fromJSON(data) {\n this.clear();\n for (const [key, value] of data) {\n this.set(key, value);\n }\n }\n}\nexports.LinkedMap = LinkedMap;\nclass LRUCache extends LinkedMap {\n constructor(limit, ratio = 1) {\n super();\n this._limit = limit;\n this._ratio = Math.min(Math.max(0, ratio), 1);\n }\n get limit() {\n return this._limit;\n }\n set limit(limit) {\n this._limit = limit;\n this.checkTrim();\n }\n get ratio() {\n return this._ratio;\n }\n set ratio(ratio) {\n this._ratio = Math.min(Math.max(0, ratio), 1);\n this.checkTrim();\n }\n get(key, touch = Touch.AsNew) {\n return super.get(key, touch);\n }\n peek(key) {\n return super.get(key, Touch.None);\n }\n set(key, value) {\n super.set(key, value, Touch.Last);\n this.checkTrim();\n return this;\n }\n checkTrim() {\n if (this.size > this._limit) {\n this.trimOld(Math.round(this._limit * this._ratio));\n }\n }\n}\nexports.LRUCache = LRUCache;\n//# sourceMappingURL=linkedMap.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Emitter = exports.Event = void 0;\nconst ral_1 = require(\"./ral\");\nvar Event;\n(function (Event) {\n const _disposable = { dispose() { } };\n Event.None = function () { return _disposable; };\n})(Event = exports.Event || (exports.Event = {}));\nclass CallbackList {\n add(callback, context = null, bucket) {\n if (!this._callbacks) {\n this._callbacks = [];\n this._contexts = [];\n }\n this._callbacks.push(callback);\n this._contexts.push(context);\n if (Array.isArray(bucket)) {\n bucket.push({ dispose: () => this.remove(callback, context) });\n }\n }\n remove(callback, context = null) {\n if (!this._callbacks) {\n return;\n }\n let foundCallbackWithDifferentContext = false;\n for (let i = 0, len = this._callbacks.length; i < len; i++) {\n if (this._callbacks[i] === callback) {\n if (this._contexts[i] === context) {\n // callback & context match => remove it\n this._callbacks.splice(i, 1);\n this._contexts.splice(i, 1);\n return;\n }\n else {\n foundCallbackWithDifferentContext = true;\n }\n }\n }\n if (foundCallbackWithDifferentContext) {\n throw new Error('When adding a listener with a context, you should remove it with the same context');\n }\n }\n invoke(...args) {\n if (!this._callbacks) {\n return [];\n }\n const ret = [], callbacks = this._callbacks.slice(0), contexts = this._contexts.slice(0);\n for (let i = 0, len = callbacks.length; i < len; i++) {\n try {\n ret.push(callbacks[i].apply(contexts[i], args));\n }\n catch (e) {\n // eslint-disable-next-line no-console\n (0, ral_1.default)().console.error(e);\n }\n }\n return ret;\n }\n isEmpty() {\n return !this._callbacks || this._callbacks.length === 0;\n }\n dispose() {\n this._callbacks = undefined;\n this._contexts = undefined;\n }\n}\nclass Emitter {\n constructor(_options) {\n this._options = _options;\n }\n /**\n * For the public to allow to subscribe\n * to events from this Emitter\n */\n get event() {\n if (!this._event) {\n this._event = (listener, thisArgs, disposables) => {\n if (!this._callbacks) {\n this._callbacks = new CallbackList();\n }\n if (this._options && this._options.onFirstListenerAdd && this._callbacks.isEmpty()) {\n this._options.onFirstListenerAdd(this);\n }\n this._callbacks.add(listener, thisArgs);\n const result = {\n dispose: () => {\n if (!this._callbacks) {\n // disposable is disposed after emitter is disposed.\n return;\n }\n this._callbacks.remove(listener, thisArgs);\n result.dispose = Emitter._noop;\n if (this._options && this._options.onLastListenerRemove && this._callbacks.isEmpty()) {\n this._options.onLastListenerRemove(this);\n }\n }\n };\n if (Array.isArray(disposables)) {\n disposables.push(result);\n }\n return result;\n };\n }\n return this._event;\n }\n /**\n * To be kept private to fire an event to\n * subscribers\n */\n fire(event) {\n if (this._callbacks) {\n this._callbacks.invoke.call(this._callbacks, event);\n }\n }\n dispose() {\n if (this._callbacks) {\n this._callbacks.dispose();\n this._callbacks = undefined;\n }\n }\n}\nexports.Emitter = Emitter;\nEmitter._noop = function () { };\n//# sourceMappingURL=events.js.map", "\"use strict\";\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 *--------------------------------------------------------------------------------------------*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CancellationTokenSource = exports.CancellationToken = void 0;\nconst ral_1 = require(\"./ral\");\nconst Is = require(\"./is\");\nconst events_1 = require(\"./events\");\nvar CancellationToken;\n(function (CancellationToken) {\n CancellationToken.None = Object.freeze({\n isCancellationRequested: false,\n onCancellationRequested: events_1.Event.None\n });\n CancellationToken.Cancelled = Object.freeze({\n isCancellationRequested: true,\n onCancellationRequested: events_1.Event.None\n });\n function is(value) {\n const candidate = value;\n return candidate && (candidate === CancellationToken.None\n || candidate === CancellationToken.Cancelled\n || (Is.boolean(candidate.isCancellationRequested) && !!candidate.onCancellationRequested));\n }\n CancellationToken.is = is;\n})(CancellationToken = exports.CancellationToken || (exports.CancellationToken = {}));\nconst shortcutEvent = Object.freeze(function (callback, context) {\n const handle = (0, ral_1.default)().timer.setTimeout(callback.bind(context), 0);\n return { dispose() { handle.dispose(); } };\n});\nclass MutableToken {\n constructor() {\n this._isCancelled = false;\n }\n cancel() {\n if (!this._isCancelled) {\n this._isCancelled = true;\n if (this._emitter) {\n this._emitter.fire(undefined);\n this.dispose();\n }\n }\n }\n get isCancellationRequested() {\n return this._isCancelled;\n }\n get onCancellationRequested() {\n if (this._isCancelled) {\n return shortcutEvent;\n }\n if (!this._emitter) {\n this._emitter = new events_1.Emitter();\n }\n return this._emitter.event;\n }\n dispose() {\n if (this._emitter) {\n this._emitter.dispose();\n this._emitter = undefined;\n }\n }\n}\nclass CancellationTokenSource {\n get token() {\n if (!this._token) {\n // be lazy and create the token only when\n // actually needed\n this._token = new MutableToken();\n }\n return this._token;\n }\n cancel() {\n if (!this._token) {\n // save an object by returning the default\n // cancelled token when cancellation happens\n // before someone asks for the token\n this._token = CancellationToken.Cancelled;\n }\n else {\n this._token.cancel();\n }\n }\n dispose() {\n if (!this._token) {\n // ensure to initialize with an empty token if we had none\n this._token = CancellationToken.None;\n }\n else if (this._token instanceof MutableToken) {\n // actually dispose\n this._token.dispose();\n }\n }\n}\nexports.CancellationTokenSource = CancellationTokenSource;\n//# sourceMappingURL=cancellation.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = void 0;\nconst ral_1 = require(\"./ral\");\nconst Is = require(\"./is\");\nconst events_1 = require(\"./events\");\nvar MessageReader;\n(function (MessageReader) {\n function is(value) {\n let candidate = value;\n return candidate && Is.func(candidate.listen) && Is.func(candidate.dispose) &&\n Is.func(candidate.onError) && Is.func(candidate.onClose) && Is.func(candidate.onPartialMessage);\n }\n MessageReader.is = is;\n})(MessageReader = exports.MessageReader || (exports.MessageReader = {}));\nclass AbstractMessageReader {\n constructor() {\n this.errorEmitter = new events_1.Emitter();\n this.closeEmitter = new events_1.Emitter();\n this.partialMessageEmitter = new events_1.Emitter();\n }\n dispose() {\n this.errorEmitter.dispose();\n this.closeEmitter.dispose();\n }\n get onError() {\n return this.errorEmitter.event;\n }\n fireError(error) {\n this.errorEmitter.fire(this.asError(error));\n }\n get onClose() {\n return this.closeEmitter.event;\n }\n fireClose() {\n this.closeEmitter.fire(undefined);\n }\n get onPartialMessage() {\n return this.partialMessageEmitter.event;\n }\n firePartialMessage(info) {\n this.partialMessageEmitter.fire(info);\n }\n asError(error) {\n if (error instanceof Error) {\n return error;\n }\n else {\n return new Error(`Reader received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);\n }\n }\n}\nexports.AbstractMessageReader = AbstractMessageReader;\nvar ResolvedMessageReaderOptions;\n(function (ResolvedMessageReaderOptions) {\n function fromOptions(options) {\n let charset;\n let result;\n let contentDecoder;\n const contentDecoders = new Map();\n let contentTypeDecoder;\n const contentTypeDecoders = new Map();\n if (options === undefined || typeof options === 'string') {\n charset = options ?? 'utf-8';\n }\n else {\n charset = options.charset ?? 'utf-8';\n if (options.contentDecoder !== undefined) {\n contentDecoder = options.contentDecoder;\n contentDecoders.set(contentDecoder.name, contentDecoder);\n }\n if (options.contentDecoders !== undefined) {\n for (const decoder of options.contentDecoders) {\n contentDecoders.set(decoder.name, decoder);\n }\n }\n if (options.contentTypeDecoder !== undefined) {\n contentTypeDecoder = options.contentTypeDecoder;\n contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder);\n }\n if (options.contentTypeDecoders !== undefined) {\n for (const decoder of options.contentTypeDecoders) {\n contentTypeDecoders.set(decoder.name, decoder);\n }\n }\n }\n if (contentTypeDecoder === undefined) {\n contentTypeDecoder = (0, ral_1.default)().applicationJson.decoder;\n contentTypeDecoders.set(contentTypeDecoder.name, contentTypeDecoder);\n }\n return { charset, contentDecoder, contentDecoders, contentTypeDecoder, contentTypeDecoders };\n }\n ResolvedMessageReaderOptions.fromOptions = fromOptions;\n})(ResolvedMessageReaderOptions || (ResolvedMessageReaderOptions = {}));\nclass ReadableStreamMessageReader extends AbstractMessageReader {\n constructor(readable, options) {\n super();\n this.readable = readable;\n this.options = ResolvedMessageReaderOptions.fromOptions(options);\n this.buffer = (0, ral_1.default)().messageBuffer.create(this.options.charset);\n this._partialMessageTimeout = 10000;\n this.nextMessageLength = -1;\n this.messageToken = 0;\n }\n set partialMessageTimeout(timeout) {\n this._partialMessageTimeout = timeout;\n }\n get partialMessageTimeout() {\n return this._partialMessageTimeout;\n }\n listen(callback) {\n this.nextMessageLength = -1;\n this.messageToken = 0;\n this.partialMessageTimer = undefined;\n this.callback = callback;\n const result = this.readable.onData((data) => {\n this.onData(data);\n });\n this.readable.onError((error) => this.fireError(error));\n this.readable.onClose(() => this.fireClose());\n return result;\n }\n onData(data) {\n this.buffer.append(data);\n while (true) {\n if (this.nextMessageLength === -1) {\n const headers = this.buffer.tryReadHeaders();\n if (!headers) {\n return;\n }\n const contentLength = headers.get('Content-Length');\n if (!contentLength) {\n throw new Error('Header must provide a Content-Length property.');\n }\n const length = parseInt(contentLength);\n if (isNaN(length)) {\n throw new Error('Content-Length value must be a number.');\n }\n this.nextMessageLength = length;\n }\n const body = this.buffer.tryReadBody(this.nextMessageLength);\n if (body === undefined) {\n /** We haven't received the full message yet. */\n this.setPartialMessageTimer();\n return;\n }\n this.clearPartialMessageTimer();\n this.nextMessageLength = -1;\n let p;\n if (this.options.contentDecoder !== undefined) {\n p = this.options.contentDecoder.decode(body);\n }\n else {\n p = Promise.resolve(body);\n }\n p.then((value) => {\n this.options.contentTypeDecoder.decode(value, this.options).then((msg) => {\n this.callback(msg);\n }, (error) => {\n this.fireError(error);\n });\n }, (error) => {\n this.fireError(error);\n });\n }\n }\n clearPartialMessageTimer() {\n if (this.partialMessageTimer) {\n this.partialMessageTimer.dispose();\n this.partialMessageTimer = undefined;\n }\n }\n setPartialMessageTimer() {\n this.clearPartialMessageTimer();\n if (this._partialMessageTimeout <= 0) {\n return;\n }\n this.partialMessageTimer = (0, ral_1.default)().timer.setTimeout((token, timeout) => {\n this.partialMessageTimer = undefined;\n if (token === this.messageToken) {\n this.firePartialMessage({ messageToken: token, waitingTime: timeout });\n this.setPartialMessageTimer();\n }\n }, this._partialMessageTimeout, this.messageToken, this._partialMessageTimeout);\n }\n}\nexports.ReadableStreamMessageReader = ReadableStreamMessageReader;\n//# sourceMappingURL=messageReader.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Semaphore = void 0;\nconst ral_1 = require(\"./ral\");\nclass Semaphore {\n constructor(capacity = 1) {\n if (capacity <= 0) {\n throw new Error('Capacity must be greater than 0');\n }\n this._capacity = capacity;\n this._active = 0;\n this._waiting = [];\n }\n lock(thunk) {\n return new Promise((resolve, reject) => {\n this._waiting.push({ thunk, resolve, reject });\n this.runNext();\n });\n }\n get active() {\n return this._active;\n }\n runNext() {\n if (this._waiting.length === 0 || this._active === this._capacity) {\n return;\n }\n (0, ral_1.default)().timer.setImmediate(() => this.doRunNext());\n }\n doRunNext() {\n if (this._waiting.length === 0 || this._active === this._capacity) {\n return;\n }\n const next = this._waiting.shift();\n this._active++;\n if (this._active > this._capacity) {\n throw new Error(`To many thunks active`);\n }\n try {\n const result = next.thunk();\n if (result instanceof Promise) {\n result.then((value) => {\n this._active--;\n next.resolve(value);\n this.runNext();\n }, (err) => {\n this._active--;\n next.reject(err);\n this.runNext();\n });\n }\n else {\n this._active--;\n next.resolve(result);\n this.runNext();\n }\n }\n catch (err) {\n this._active--;\n next.reject(err);\n this.runNext();\n }\n }\n}\nexports.Semaphore = Semaphore;\n//# sourceMappingURL=semaphore.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = void 0;\nconst ral_1 = require(\"./ral\");\nconst Is = require(\"./is\");\nconst semaphore_1 = require(\"./semaphore\");\nconst events_1 = require(\"./events\");\nconst ContentLength = 'Content-Length: ';\nconst CRLF = '\\r\\n';\nvar MessageWriter;\n(function (MessageWriter) {\n function is(value) {\n let candidate = value;\n return candidate && Is.func(candidate.dispose) && Is.func(candidate.onClose) &&\n Is.func(candidate.onError) && Is.func(candidate.write);\n }\n MessageWriter.is = is;\n})(MessageWriter = exports.MessageWriter || (exports.MessageWriter = {}));\nclass AbstractMessageWriter {\n constructor() {\n this.errorEmitter = new events_1.Emitter();\n this.closeEmitter = new events_1.Emitter();\n }\n dispose() {\n this.errorEmitter.dispose();\n this.closeEmitter.dispose();\n }\n get onError() {\n return this.errorEmitter.event;\n }\n fireError(error, message, count) {\n this.errorEmitter.fire([this.asError(error), message, count]);\n }\n get onClose() {\n return this.closeEmitter.event;\n }\n fireClose() {\n this.closeEmitter.fire(undefined);\n }\n asError(error) {\n if (error instanceof Error) {\n return error;\n }\n else {\n return new Error(`Writer received error. Reason: ${Is.string(error.message) ? error.message : 'unknown'}`);\n }\n }\n}\nexports.AbstractMessageWriter = AbstractMessageWriter;\nvar ResolvedMessageWriterOptions;\n(function (ResolvedMessageWriterOptions) {\n function fromOptions(options) {\n if (options === undefined || typeof options === 'string') {\n return { charset: options ?? 'utf-8', contentTypeEncoder: (0, ral_1.default)().applicationJson.encoder };\n }\n else {\n return { charset: options.charset ?? 'utf-8', contentEncoder: options.contentEncoder, contentTypeEncoder: options.contentTypeEncoder ?? (0, ral_1.default)().applicationJson.encoder };\n }\n }\n ResolvedMessageWriterOptions.fromOptions = fromOptions;\n})(ResolvedMessageWriterOptions || (ResolvedMessageWriterOptions = {}));\nclass WriteableStreamMessageWriter extends AbstractMessageWriter {\n constructor(writable, options) {\n super();\n this.writable = writable;\n this.options = ResolvedMessageWriterOptions.fromOptions(options);\n this.errorCount = 0;\n this.writeSemaphore = new semaphore_1.Semaphore(1);\n this.writable.onError((error) => this.fireError(error));\n this.writable.onClose(() => this.fireClose());\n }\n async write(msg) {\n return this.writeSemaphore.lock(async () => {\n const payload = this.options.contentTypeEncoder.encode(msg, this.options).then((buffer) => {\n if (this.options.contentEncoder !== undefined) {\n return this.options.contentEncoder.encode(buffer);\n }\n else {\n return buffer;\n }\n });\n return payload.then((buffer) => {\n const headers = [];\n headers.push(ContentLength, buffer.byteLength.toString(), CRLF);\n headers.push(CRLF);\n return this.doWrite(msg, headers, buffer);\n }, (error) => {\n this.fireError(error);\n throw error;\n });\n });\n }\n async doWrite(msg, headers, data) {\n try {\n await this.writable.write(headers.join(''), 'ascii');\n return this.writable.write(data);\n }\n catch (error) {\n this.handleError(error, msg);\n return Promise.reject(error);\n }\n }\n handleError(error, msg) {\n this.errorCount++;\n this.fireError(error, msg, this.errorCount);\n }\n end() {\n this.writable.end();\n }\n}\nexports.WriteableStreamMessageWriter = WriteableStreamMessageWriter;\n//# sourceMappingURL=messageWriter.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createMessageConnection = exports.ConnectionOptions = exports.CancellationStrategy = exports.CancellationSenderStrategy = exports.CancellationReceiverStrategy = exports.ConnectionStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = exports.SetTraceNotification = exports.TraceFormat = exports.Trace = exports.NullLogger = exports.ProgressType = exports.ProgressToken = void 0;\nconst ral_1 = require(\"./ral\");\nconst Is = require(\"./is\");\nconst messages_1 = require(\"./messages\");\nconst linkedMap_1 = require(\"./linkedMap\");\nconst events_1 = require(\"./events\");\nconst cancellation_1 = require(\"./cancellation\");\nvar CancelNotification;\n(function (CancelNotification) {\n CancelNotification.type = new messages_1.NotificationType('$/cancelRequest');\n})(CancelNotification || (CancelNotification = {}));\nvar ProgressToken;\n(function (ProgressToken) {\n function is(value) {\n return typeof value === 'string' || typeof value === 'number';\n }\n ProgressToken.is = is;\n})(ProgressToken = exports.ProgressToken || (exports.ProgressToken = {}));\nvar ProgressNotification;\n(function (ProgressNotification) {\n ProgressNotification.type = new messages_1.NotificationType('$/progress');\n})(ProgressNotification || (ProgressNotification = {}));\nclass ProgressType {\n constructor() {\n }\n}\nexports.ProgressType = ProgressType;\nvar StarRequestHandler;\n(function (StarRequestHandler) {\n function is(value) {\n return Is.func(value);\n }\n StarRequestHandler.is = is;\n})(StarRequestHandler || (StarRequestHandler = {}));\nexports.NullLogger = Object.freeze({\n error: () => { },\n warn: () => { },\n info: () => { },\n log: () => { }\n});\nvar Trace;\n(function (Trace) {\n Trace[Trace[\"Off\"] = 0] = \"Off\";\n Trace[Trace[\"Messages\"] = 1] = \"Messages\";\n Trace[Trace[\"Compact\"] = 2] = \"Compact\";\n Trace[Trace[\"Verbose\"] = 3] = \"Verbose\";\n})(Trace = exports.Trace || (exports.Trace = {}));\n(function (Trace) {\n function fromString(value) {\n if (!Is.string(value)) {\n return Trace.Off;\n }\n value = value.toLowerCase();\n switch (value) {\n case 'off':\n return Trace.Off;\n case 'messages':\n return Trace.Messages;\n case 'compact':\n return Trace.Compact;\n case 'verbose':\n return Trace.Verbose;\n default:\n return Trace.Off;\n }\n }\n Trace.fromString = fromString;\n function toString(value) {\n switch (value) {\n case Trace.Off:\n return 'off';\n case Trace.Messages:\n return 'messages';\n case Trace.Compact:\n return 'compact';\n case Trace.Verbose:\n return 'verbose';\n default:\n return 'off';\n }\n }\n Trace.toString = toString;\n})(Trace = exports.Trace || (exports.Trace = {}));\nvar TraceFormat;\n(function (TraceFormat) {\n TraceFormat[\"Text\"] = \"text\";\n TraceFormat[\"JSON\"] = \"json\";\n})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));\n(function (TraceFormat) {\n function fromString(value) {\n if (!Is.string(value)) {\n return TraceFormat.Text;\n }\n value = value.toLowerCase();\n if (value === 'json') {\n return TraceFormat.JSON;\n }\n else {\n return TraceFormat.Text;\n }\n }\n TraceFormat.fromString = fromString;\n})(TraceFormat = exports.TraceFormat || (exports.TraceFormat = {}));\nvar SetTraceNotification;\n(function (SetTraceNotification) {\n SetTraceNotification.type = new messages_1.NotificationType('$/setTrace');\n})(SetTraceNotification = exports.SetTraceNotification || (exports.SetTraceNotification = {}));\nvar LogTraceNotification;\n(function (LogTraceNotification) {\n LogTraceNotification.type = new messages_1.NotificationType('$/logTrace');\n})(LogTraceNotification = exports.LogTraceNotification || (exports.LogTraceNotification = {}));\nvar ConnectionErrors;\n(function (ConnectionErrors) {\n /**\n * The connection is closed.\n */\n ConnectionErrors[ConnectionErrors[\"Closed\"] = 1] = \"Closed\";\n /**\n * The connection got disposed.\n */\n ConnectionErrors[ConnectionErrors[\"Disposed\"] = 2] = \"Disposed\";\n /**\n * The connection is already in listening mode.\n */\n ConnectionErrors[ConnectionErrors[\"AlreadyListening\"] = 3] = \"AlreadyListening\";\n})(ConnectionErrors = exports.ConnectionErrors || (exports.ConnectionErrors = {}));\nclass ConnectionError extends Error {\n constructor(code, message) {\n super(message);\n this.code = code;\n Object.setPrototypeOf(this, ConnectionError.prototype);\n }\n}\nexports.ConnectionError = ConnectionError;\nvar ConnectionStrategy;\n(function (ConnectionStrategy) {\n function is(value) {\n const candidate = value;\n return candidate && Is.func(candidate.cancelUndispatched);\n }\n ConnectionStrategy.is = is;\n})(ConnectionStrategy = exports.ConnectionStrategy || (exports.ConnectionStrategy = {}));\nvar CancellationReceiverStrategy;\n(function (CancellationReceiverStrategy) {\n CancellationReceiverStrategy.Message = Object.freeze({\n createCancellationTokenSource(_) {\n return new cancellation_1.CancellationTokenSource();\n }\n });\n function is(value) {\n const candidate = value;\n return candidate && Is.func(candidate.createCancellationTokenSource);\n }\n CancellationReceiverStrategy.is = is;\n})(CancellationReceiverStrategy = exports.CancellationReceiverStrategy || (exports.CancellationReceiverStrategy = {}));\nvar CancellationSenderStrategy;\n(function (CancellationSenderStrategy) {\n CancellationSenderStrategy.Message = Object.freeze({\n sendCancellation(conn, id) {\n return conn.sendNotification(CancelNotification.type, { id });\n },\n cleanup(_) { }\n });\n function is(value) {\n const candidate = value;\n return candidate && Is.func(candidate.sendCancellation) && Is.func(candidate.cleanup);\n }\n CancellationSenderStrategy.is = is;\n})(CancellationSenderStrategy = exports.CancellationSenderStrategy || (exports.CancellationSenderStrategy = {}));\nvar CancellationStrategy;\n(function (CancellationStrategy) {\n CancellationStrategy.Message = Object.freeze({\n receiver: CancellationReceiverStrategy.Message,\n sender: CancellationSenderStrategy.Message\n });\n function is(value) {\n const candidate = value;\n return candidate && CancellationReceiverStrategy.is(candidate.receiver) && CancellationSenderStrategy.is(candidate.sender);\n }\n CancellationStrategy.is = is;\n})(CancellationStrategy = exports.CancellationStrategy || (exports.CancellationStrategy = {}));\nvar ConnectionOptions;\n(function (ConnectionOptions) {\n function is(value) {\n const candidate = value;\n return candidate && (CancellationStrategy.is(candidate.cancellationStrategy) || ConnectionStrategy.is(candidate.connectionStrategy));\n }\n ConnectionOptions.is = is;\n})(ConnectionOptions = exports.ConnectionOptions || (exports.ConnectionOptions = {}));\nvar ConnectionState;\n(function (ConnectionState) {\n ConnectionState[ConnectionState[\"New\"] = 1] = \"New\";\n ConnectionState[ConnectionState[\"Listening\"] = 2] = \"Listening\";\n ConnectionState[ConnectionState[\"Closed\"] = 3] = \"Closed\";\n ConnectionState[ConnectionState[\"Disposed\"] = 4] = \"Disposed\";\n})(ConnectionState || (ConnectionState = {}));\nfunction createMessageConnection(messageReader, messageWriter, _logger, options) {\n const logger = _logger !== undefined ? _logger : exports.NullLogger;\n let sequenceNumber = 0;\n let notificationSequenceNumber = 0;\n let unknownResponseSequenceNumber = 0;\n const version = '2.0';\n let starRequestHandler = undefined;\n const requestHandlers = new Map();\n let starNotificationHandler = undefined;\n const notificationHandlers = new Map();\n const progressHandlers = new Map();\n let timer;\n let messageQueue = new linkedMap_1.LinkedMap();\n let responsePromises = new Map();\n let knownCanceledRequests = new Set();\n let requestTokens = new Map();\n let trace = Trace.Off;\n let traceFormat = TraceFormat.Text;\n let tracer;\n let state = ConnectionState.New;\n const errorEmitter = new events_1.Emitter();\n const closeEmitter = new events_1.Emitter();\n const unhandledNotificationEmitter = new events_1.Emitter();\n const unhandledProgressEmitter = new events_1.Emitter();\n const disposeEmitter = new events_1.Emitter();\n const cancellationStrategy = (options && options.cancellationStrategy) ? options.cancellationStrategy : CancellationStrategy.Message;\n function createRequestQueueKey(id) {\n if (id === null) {\n throw new Error(`Can't send requests with id null since the response can't be correlated.`);\n }\n return 'req-' + id.toString();\n }\n function createResponseQueueKey(id) {\n if (id === null) {\n return 'res-unknown-' + (++unknownResponseSequenceNumber).toString();\n }\n else {\n return 'res-' + id.toString();\n }\n }\n function createNotificationQueueKey() {\n return 'not-' + (++notificationSequenceNumber).toString();\n }\n function addMessageToQueue(queue, message) {\n if (messages_1.Message.isRequest(message)) {\n queue.set(createRequestQueueKey(message.id), message);\n }\n else if (messages_1.Message.isResponse(message)) {\n queue.set(createResponseQueueKey(message.id), message);\n }\n else {\n queue.set(createNotificationQueueKey(), message);\n }\n }\n function cancelUndispatched(_message) {\n return undefined;\n }\n function isListening() {\n return state === ConnectionState.Listening;\n }\n function isClosed() {\n return state === ConnectionState.Closed;\n }\n function isDisposed() {\n return state === ConnectionState.Disposed;\n }\n function closeHandler() {\n if (state === ConnectionState.New || state === ConnectionState.Listening) {\n state = ConnectionState.Closed;\n closeEmitter.fire(undefined);\n }\n // If the connection is disposed don't sent close events.\n }\n function readErrorHandler(error) {\n errorEmitter.fire([error, undefined, undefined]);\n }\n function writeErrorHandler(data) {\n errorEmitter.fire(data);\n }\n messageReader.onClose(closeHandler);\n messageReader.onError(readErrorHandler);\n messageWriter.onClose(closeHandler);\n messageWriter.onError(writeErrorHandler);\n function triggerMessageQueue() {\n if (timer || messageQueue.size === 0) {\n return;\n }\n timer = (0, ral_1.default)().timer.setImmediate(() => {\n timer = undefined;\n processMessageQueue();\n });\n }\n function processMessageQueue() {\n if (messageQueue.size === 0) {\n return;\n }\n const message = messageQueue.shift();\n try {\n if (messages_1.Message.isRequest(message)) {\n handleRequest(message);\n }\n else if (messages_1.Message.isNotification(message)) {\n handleNotification(message);\n }\n else if (messages_1.Message.isResponse(message)) {\n handleResponse(message);\n }\n else {\n handleInvalidMessage(message);\n }\n }\n finally {\n triggerMessageQueue();\n }\n }\n const callback = (message) => {\n try {\n // We have received a cancellation message. Check if the message is still in the queue\n // and cancel it if allowed to do so.\n if (messages_1.Message.isNotification(message) && message.method === CancelNotification.type.method) {\n const cancelId = message.params.id;\n const key = createRequestQueueKey(cancelId);\n const toCancel = messageQueue.get(key);\n if (messages_1.Message.isRequest(toCancel)) {\n const strategy = options?.connectionStrategy;\n const response = (strategy && strategy.cancelUndispatched) ? strategy.cancelUndispatched(toCancel, cancelUndispatched) : cancelUndispatched(toCancel);\n if (response && (response.error !== undefined || response.result !== undefined)) {\n messageQueue.delete(key);\n requestTokens.delete(cancelId);\n response.id = toCancel.id;\n traceSendingResponse(response, message.method, Date.now());\n messageWriter.write(response).catch(() => logger.error(`Sending response for canceled message failed.`));\n return;\n }\n }\n const cancellationToken = requestTokens.get(cancelId);\n // The request is already running. Cancel the token\n if (cancellationToken !== undefined) {\n cancellationToken.cancel();\n traceReceivedNotification(message);\n return;\n }\n else {\n // Remember the cancel but still queue the message to\n // clean up state in process message.\n knownCanceledRequests.add(cancelId);\n }\n }\n addMessageToQueue(messageQueue, message);\n }\n finally {\n triggerMessageQueue();\n }\n };\n function handleRequest(requestMessage) {\n if (isDisposed()) {\n // we return here silently since we fired an event when the\n // connection got disposed.\n return;\n }\n function reply(resultOrError, method, startTime) {\n const message = {\n jsonrpc: version,\n id: requestMessage.id\n };\n if (resultOrError instanceof messages_1.ResponseError) {\n message.error = resultOrError.toJson();\n }\n else {\n message.result = resultOrError === undefined ? null : resultOrError;\n }\n traceSendingResponse(message, method, startTime);\n messageWriter.write(message).catch(() => logger.error(`Sending response failed.`));\n }\n function replyError(error, method, startTime) {\n const message = {\n jsonrpc: version,\n id: requestMessage.id,\n error: error.toJson()\n };\n traceSendingResponse(message, method, startTime);\n messageWriter.write(message).catch(() => logger.error(`Sending response failed.`));\n }\n function replySuccess(result, method, startTime) {\n // The JSON RPC defines that a response must either have a result or an error\n // So we can't treat undefined as a valid response result.\n if (result === undefined) {\n result = null;\n }\n const message = {\n jsonrpc: version,\n id: requestMessage.id,\n result: result\n };\n traceSendingResponse(message, method, startTime);\n messageWriter.write(message).catch(() => logger.error(`Sending response failed.`));\n }\n traceReceivedRequest(requestMessage);\n const element = requestHandlers.get(requestMessage.method);\n let type;\n let requestHandler;\n if (element) {\n type = element.type;\n requestHandler = element.handler;\n }\n const startTime = Date.now();\n if (requestHandler || starRequestHandler) {\n const tokenKey = requestMessage.id ?? String(Date.now()); //\n const cancellationSource = cancellationStrategy.receiver.createCancellationTokenSource(tokenKey);\n if (requestMessage.id !== null && knownCanceledRequests.has(requestMessage.id)) {\n cancellationSource.cancel();\n }\n if (requestMessage.id !== null) {\n requestTokens.set(tokenKey, cancellationSource);\n }\n try {\n let handlerResult;\n if (requestHandler) {\n if (requestMessage.params === undefined) {\n if (type !== undefined && type.numberOfParams !== 0) {\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines ${type.numberOfParams} params but received none.`), requestMessage.method, startTime);\n return;\n }\n handlerResult = requestHandler(cancellationSource.token);\n }\n else if (Array.isArray(requestMessage.params)) {\n if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byName) {\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by name but received parameters by position`), requestMessage.method, startTime);\n return;\n }\n handlerResult = requestHandler(...requestMessage.params, cancellationSource.token);\n }\n else {\n if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) {\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InvalidParams, `Request ${requestMessage.method} defines parameters by position but received parameters by name`), requestMessage.method, startTime);\n return;\n }\n handlerResult = requestHandler(requestMessage.params, cancellationSource.token);\n }\n }\n else if (starRequestHandler) {\n handlerResult = starRequestHandler(requestMessage.method, requestMessage.params, cancellationSource.token);\n }\n const promise = handlerResult;\n if (!handlerResult) {\n requestTokens.delete(tokenKey);\n replySuccess(handlerResult, requestMessage.method, startTime);\n }\n else if (promise.then) {\n promise.then((resultOrError) => {\n requestTokens.delete(tokenKey);\n reply(resultOrError, requestMessage.method, startTime);\n }, error => {\n requestTokens.delete(tokenKey);\n if (error instanceof messages_1.ResponseError) {\n replyError(error, requestMessage.method, startTime);\n }\n else if (error && Is.string(error.message)) {\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);\n }\n else {\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);\n }\n });\n }\n else {\n requestTokens.delete(tokenKey);\n reply(handlerResult, requestMessage.method, startTime);\n }\n }\n catch (error) {\n requestTokens.delete(tokenKey);\n if (error instanceof messages_1.ResponseError) {\n reply(error, requestMessage.method, startTime);\n }\n else if (error && Is.string(error.message)) {\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed with message: ${error.message}`), requestMessage.method, startTime);\n }\n else {\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.InternalError, `Request ${requestMessage.method} failed unexpectedly without providing any details.`), requestMessage.method, startTime);\n }\n }\n }\n else {\n replyError(new messages_1.ResponseError(messages_1.ErrorCodes.MethodNotFound, `Unhandled method ${requestMessage.method}`), requestMessage.method, startTime);\n }\n }\n function handleResponse(responseMessage) {\n if (isDisposed()) {\n // See handle request.\n return;\n }\n if (responseMessage.id === null) {\n if (responseMessage.error) {\n logger.error(`Received response message without id: Error is: \\n${JSON.stringify(responseMessage.error, undefined, 4)}`);\n }\n else {\n logger.error(`Received response message without id. No further error information provided.`);\n }\n }\n else {\n const key = responseMessage.id;\n const responsePromise = responsePromises.get(key);\n traceReceivedResponse(responseMessage, responsePromise);\n if (responsePromise !== undefined) {\n responsePromises.delete(key);\n try {\n if (responseMessage.error) {\n const error = responseMessage.error;\n responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data));\n }\n else if (responseMessage.result !== undefined) {\n responsePromise.resolve(responseMessage.result);\n }\n else {\n throw new Error('Should never happen.');\n }\n }\n catch (error) {\n if (error.message) {\n logger.error(`Response handler '${responsePromise.method}' failed with message: ${error.message}`);\n }\n else {\n logger.error(`Response handler '${responsePromise.method}' failed unexpectedly.`);\n }\n }\n }\n }\n }\n function handleNotification(message) {\n if (isDisposed()) {\n // See handle request.\n return;\n }\n let type = undefined;\n let notificationHandler;\n if (message.method === CancelNotification.type.method) {\n const cancelId = message.params.id;\n knownCanceledRequests.delete(cancelId);\n traceReceivedNotification(message);\n return;\n }\n else {\n const element = notificationHandlers.get(message.method);\n if (element) {\n notificationHandler = element.handler;\n type = element.type;\n }\n }\n if (notificationHandler || starNotificationHandler) {\n try {\n traceReceivedNotification(message);\n if (notificationHandler) {\n if (message.params === undefined) {\n if (type !== undefined) {\n if (type.numberOfParams !== 0 && type.parameterStructures !== messages_1.ParameterStructures.byName) {\n logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received none.`);\n }\n }\n notificationHandler();\n }\n else if (Array.isArray(message.params)) {\n // There are JSON-RPC libraries that send progress message as positional params although\n // specified as named. So convert them if this is the case.\n const params = message.params;\n if (message.method === ProgressNotification.type.method && params.length === 2 && ProgressToken.is(params[0])) {\n notificationHandler({ token: params[0], value: params[1] });\n }\n else {\n if (type !== undefined) {\n if (type.parameterStructures === messages_1.ParameterStructures.byName) {\n logger.error(`Notification ${message.method} defines parameters by name but received parameters by position`);\n }\n if (type.numberOfParams !== message.params.length) {\n logger.error(`Notification ${message.method} defines ${type.numberOfParams} params but received ${params.length} arguments`);\n }\n }\n notificationHandler(...params);\n }\n }\n else {\n if (type !== undefined && type.parameterStructures === messages_1.ParameterStructures.byPosition) {\n logger.error(`Notification ${message.method} defines parameters by position but received parameters by name`);\n }\n notificationHandler(message.params);\n }\n }\n else if (starNotificationHandler) {\n starNotificationHandler(message.method, message.params);\n }\n }\n catch (error) {\n if (error.message) {\n logger.error(`Notification handler '${message.method}' failed with message: ${error.message}`);\n }\n else {\n logger.error(`Notification handler '${message.method}' failed unexpectedly.`);\n }\n }\n }\n else {\n unhandledNotificationEmitter.fire(message);\n }\n }\n function handleInvalidMessage(message) {\n if (!message) {\n logger.error('Received empty message.');\n return;\n }\n logger.error(`Received message which is neither a response nor a notification message:\\n${JSON.stringify(message, null, 4)}`);\n // Test whether we find an id to reject the promise\n const responseMessage = message;\n if (Is.string(responseMessage.id) || Is.number(responseMessage.id)) {\n const key = responseMessage.id;\n const responseHandler = responsePromises.get(key);\n if (responseHandler) {\n responseHandler.reject(new Error('The received response has neither a result nor an error property.'));\n }\n }\n }\n function stringifyTrace(params) {\n if (params === undefined || params === null) {\n return undefined;\n }\n switch (trace) {\n case Trace.Verbose:\n return JSON.stringify(params, null, 4);\n case Trace.Compact:\n return JSON.stringify(params);\n default:\n return undefined;\n }\n }\n function traceSendingRequest(message) {\n if (trace === Trace.Off || !tracer) {\n return;\n }\n if (traceFormat === TraceFormat.Text) {\n let data = undefined;\n if ((trace === Trace.Verbose || trace === Trace.Compact) && message.params) {\n data = `Params: ${stringifyTrace(message.params)}\\n\\n`;\n }\n tracer.log(`Sending request '${message.method} - (${message.id})'.`, data);\n }\n else {\n logLSPMessage('send-request', message);\n }\n }\n function traceSendingNotification(message) {\n if (trace === Trace.Off || !tracer) {\n return;\n }\n if (traceFormat === TraceFormat.Text) {\n let data = undefined;\n if (trace === Trace.Verbose || trace === Trace.Compact) {\n if (message.params) {\n data = `Params: ${stringifyTrace(message.params)}\\n\\n`;\n }\n else {\n data = 'No parameters provided.\\n\\n';\n }\n }\n tracer.log(`Sending notification '${message.method}'.`, data);\n }\n else {\n logLSPMessage('send-notification', message);\n }\n }\n function traceSendingResponse(message, method, startTime) {\n if (trace === Trace.Off || !tracer) {\n return;\n }\n if (traceFormat === TraceFormat.Text) {\n let data = undefined;\n if (trace === Trace.Verbose || trace === Trace.Compact) {\n if (message.error && message.error.data) {\n data = `Error data: ${stringifyTrace(message.error.data)}\\n\\n`;\n }\n else {\n if (message.result) {\n data = `Result: ${stringifyTrace(message.result)}\\n\\n`;\n }\n else if (message.error === undefined) {\n data = 'No result returned.\\n\\n';\n }\n }\n }\n tracer.log(`Sending response '${method} - (${message.id})'. Processing request took ${Date.now() - startTime}ms`, data);\n }\n else {\n logLSPMessage('send-response', message);\n }\n }\n function traceReceivedRequest(message) {\n if (trace === Trace.Off || !tracer) {\n return;\n }\n if (traceFormat === TraceFormat.Text) {\n let data = undefined;\n if ((trace === Trace.Verbose || trace === Trace.Compact) && message.params) {\n data = `Params: ${stringifyTrace(message.params)}\\n\\n`;\n }\n tracer.log(`Received request '${message.method} - (${message.id})'.`, data);\n }\n else {\n logLSPMessage('receive-request', message);\n }\n }\n function traceReceivedNotification(message) {\n if (trace === Trace.Off || !tracer || message.method === LogTraceNotification.type.method) {\n return;\n }\n if (traceFormat === TraceFormat.Text) {\n let data = undefined;\n if (trace === Trace.Verbose || trace === Trace.Compact) {\n if (message.params) {\n data = `Params: ${stringifyTrace(message.params)}\\n\\n`;\n }\n else {\n data = 'No parameters provided.\\n\\n';\n }\n }\n tracer.log(`Received notification '${message.method}'.`, data);\n }\n else {\n logLSPMessage('receive-notification', message);\n }\n }\n function traceReceivedResponse(message, responsePromise) {\n if (trace === Trace.Off || !tracer) {\n return;\n }\n if (traceFormat === TraceFormat.Text) {\n let data = undefined;\n if (trace === Trace.Verbose || trace === Trace.Compact) {\n if (message.error && message.error.data) {\n data = `Error data: ${stringifyTrace(message.error.data)}\\n\\n`;\n }\n else {\n if (message.result) {\n data = `Result: ${stringifyTrace(message.result)}\\n\\n`;\n }\n else if (message.error === undefined) {\n data = 'No result returned.\\n\\n';\n }\n }\n }\n if (responsePromise) {\n const error = message.error ? ` Request failed: ${message.error.message} (${message.error.code}).` : '';\n tracer.log(`Received response '${responsePromise.method} - (${message.id})' in ${Date.now() - responsePromise.timerStart}ms.${error}`, data);\n }\n else {\n tracer.log(`Received response ${message.id} without active response promise.`, data);\n }\n }\n else {\n logLSPMessage('receive-response', message);\n }\n }\n function logLSPMessage(type, message) {\n if (!tracer || trace === Trace.Off) {\n return;\n }\n const lspMessage = {\n isLSPMessage: true,\n type,\n message,\n timestamp: Date.now()\n };\n tracer.log(lspMessage);\n }\n function throwIfClosedOrDisposed() {\n if (isClosed()) {\n throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.');\n }\n if (isDisposed()) {\n throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.');\n }\n }\n function throwIfListening() {\n if (isListening()) {\n throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening');\n }\n }\n function throwIfNotListening() {\n if (!isListening()) {\n throw new Error('Call listen() first.');\n }\n }\n function undefinedToNull(param) {\n if (param === undefined) {\n return null;\n }\n else {\n return param;\n }\n }\n function nullToUndefined(param) {\n if (param === null) {\n return undefined;\n }\n else {\n return param;\n }\n }\n function isNamedParam(param) {\n return param !== undefined && param !== null && !Array.isArray(param) && typeof param === 'object';\n }\n function computeSingleParam(parameterStructures, param) {\n switch (parameterStructures) {\n case messages_1.ParameterStructures.auto:\n if (isNamedParam(param)) {\n return nullToUndefined(param);\n }\n else {\n return [undefinedToNull(param)];\n }\n case messages_1.ParameterStructures.byName:\n if (!isNamedParam(param)) {\n throw new Error(`Received parameters by name but param is not an object literal.`);\n }\n return nullToUndefined(param);\n case messages_1.ParameterStructures.byPosition:\n return [undefinedToNull(param)];\n default:\n throw new Error(`Unknown parameter structure ${parameterStructures.toString()}`);\n }\n }\n function computeMessageParams(type, params) {\n let result;\n const numberOfParams = type.numberOfParams;\n switch (numberOfParams) {\n case 0:\n result = undefined;\n break;\n case 1:\n result = computeSingleParam(type.parameterStructures, params[0]);\n break;\n default:\n result = [];\n for (let i = 0; i < params.length && i < numberOfParams; i++) {\n result.push(undefinedToNull(params[i]));\n }\n if (params.length < numberOfParams) {\n for (let i = params.length; i < numberOfParams; i++) {\n result.push(null);\n }\n }\n break;\n }\n return result;\n }\n const connection = {\n sendNotification: (type, ...args) => {\n throwIfClosedOrDisposed();\n let method;\n let messageParams;\n if (Is.string(type)) {\n method = type;\n const first = args[0];\n let paramStart = 0;\n let parameterStructures = messages_1.ParameterStructures.auto;\n if (messages_1.ParameterStructures.is(first)) {\n paramStart = 1;\n parameterStructures = first;\n }\n let paramEnd = args.length;\n const numberOfParams = paramEnd - paramStart;\n switch (numberOfParams) {\n case 0:\n messageParams = undefined;\n break;\n case 1:\n messageParams = computeSingleParam(parameterStructures, args[paramStart]);\n break;\n default:\n if (parameterStructures === messages_1.ParameterStructures.byName) {\n throw new Error(`Received ${numberOfParams} parameters for 'by Name' notification parameter structure.`);\n }\n messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value));\n break;\n }\n }\n else {\n const params = args;\n method = type.method;\n messageParams = computeMessageParams(type, params);\n }\n const notificationMessage = {\n jsonrpc: version,\n method: method,\n params: messageParams\n };\n traceSendingNotification(notificationMessage);\n return messageWriter.write(notificationMessage).catch(() => logger.error(`Sending notification failed.`));\n },\n onNotification: (type, handler) => {\n throwIfClosedOrDisposed();\n let method;\n if (Is.func(type)) {\n starNotificationHandler = type;\n }\n else if (handler) {\n if (Is.string(type)) {\n method = type;\n notificationHandlers.set(type, { type: undefined, handler });\n }\n else {\n method = type.method;\n notificationHandlers.set(type.method, { type, handler });\n }\n }\n return {\n dispose: () => {\n if (method !== undefined) {\n notificationHandlers.delete(method);\n }\n else {\n starNotificationHandler = undefined;\n }\n }\n };\n },\n onProgress: (_type, token, handler) => {\n if (progressHandlers.has(token)) {\n throw new Error(`Progress handler for token ${token} already registered`);\n }\n progressHandlers.set(token, handler);\n return {\n dispose: () => {\n progressHandlers.delete(token);\n }\n };\n },\n sendProgress: (_type, token, value) => {\n return connection.sendNotification(ProgressNotification.type, { token, value });\n },\n onUnhandledProgress: unhandledProgressEmitter.event,\n sendRequest: (type, ...args) => {\n throwIfClosedOrDisposed();\n throwIfNotListening();\n let method;\n let messageParams;\n let token = undefined;\n if (Is.string(type)) {\n method = type;\n const first = args[0];\n const last = args[args.length - 1];\n let paramStart = 0;\n let parameterStructures = messages_1.ParameterStructures.auto;\n if (messages_1.ParameterStructures.is(first)) {\n paramStart = 1;\n parameterStructures = first;\n }\n let paramEnd = args.length;\n if (cancellation_1.CancellationToken.is(last)) {\n paramEnd = paramEnd - 1;\n token = last;\n }\n const numberOfParams = paramEnd - paramStart;\n switch (numberOfParams) {\n case 0:\n messageParams = undefined;\n break;\n case 1:\n messageParams = computeSingleParam(parameterStructures, args[paramStart]);\n break;\n default:\n if (parameterStructures === messages_1.ParameterStructures.byName) {\n throw new Error(`Received ${numberOfParams} parameters for 'by Name' request parameter structure.`);\n }\n messageParams = args.slice(paramStart, paramEnd).map(value => undefinedToNull(value));\n break;\n }\n }\n else {\n const params = args;\n method = type.method;\n messageParams = computeMessageParams(type, params);\n const numberOfParams = type.numberOfParams;\n token = cancellation_1.CancellationToken.is(params[numberOfParams]) ? params[numberOfParams] : undefined;\n }\n const id = sequenceNumber++;\n let disposable;\n if (token) {\n disposable = token.onCancellationRequested(() => {\n const p = cancellationStrategy.sender.sendCancellation(connection, id);\n if (p === undefined) {\n logger.log(`Received no promise from cancellation strategy when cancelling id ${id}`);\n return Promise.resolve();\n }\n else {\n return p.catch(() => {\n logger.log(`Sending cancellation messages for id ${id} failed`);\n });\n }\n });\n }\n const result = new Promise((resolve, reject) => {\n const requestMessage = {\n jsonrpc: version,\n id: id,\n method: method,\n params: messageParams\n };\n const resolveWithCleanup = (r) => {\n resolve(r);\n cancellationStrategy.sender.cleanup(id);\n disposable?.dispose();\n };\n const rejectWithCleanup = (r) => {\n reject(r);\n cancellationStrategy.sender.cleanup(id);\n disposable?.dispose();\n };\n let responsePromise = { method: method, timerStart: Date.now(), resolve: resolveWithCleanup, reject: rejectWithCleanup };\n traceSendingRequest(requestMessage);\n try {\n messageWriter.write(requestMessage).catch(() => logger.error(`Sending request failed.`));\n }\n catch (e) {\n // Writing the message failed. So we need to reject the promise.\n responsePromise.reject(new messages_1.ResponseError(messages_1.ErrorCodes.MessageWriteError, e.message ? e.message : 'Unknown reason'));\n responsePromise = null;\n }\n if (responsePromise) {\n responsePromises.set(id, responsePromise);\n }\n });\n return result;\n },\n onRequest: (type, handler) => {\n throwIfClosedOrDisposed();\n let method = null;\n if (StarRequestHandler.is(type)) {\n method = undefined;\n starRequestHandler = type;\n }\n else if (Is.string(type)) {\n method = null;\n if (handler !== undefined) {\n method = type;\n requestHandlers.set(type, { handler: handler, type: undefined });\n }\n }\n else {\n if (handler !== undefined) {\n method = type.method;\n requestHandlers.set(type.method, { type, handler });\n }\n }\n return {\n dispose: () => {\n if (method === null) {\n return;\n }\n if (method !== undefined) {\n requestHandlers.delete(method);\n }\n else {\n starRequestHandler = undefined;\n }\n }\n };\n },\n hasPendingResponse: () => {\n return responsePromises.size > 0;\n },\n trace: async (_value, _tracer, sendNotificationOrTraceOptions) => {\n let _sendNotification = false;\n let _traceFormat = TraceFormat.Text;\n if (sendNotificationOrTraceOptions !== undefined) {\n if (Is.boolean(sendNotificationOrTraceOptions)) {\n _sendNotification = sendNotificationOrTraceOptions;\n }\n else {\n _sendNotification = sendNotificationOrTraceOptions.sendNotification || false;\n _traceFormat = sendNotificationOrTraceOptions.traceFormat || TraceFormat.Text;\n }\n }\n trace = _value;\n traceFormat = _traceFormat;\n if (trace === Trace.Off) {\n tracer = undefined;\n }\n else {\n tracer = _tracer;\n }\n if (_sendNotification && !isClosed() && !isDisposed()) {\n await connection.sendNotification(SetTraceNotification.type, { value: Trace.toString(_value) });\n }\n },\n onError: errorEmitter.event,\n onClose: closeEmitter.event,\n onUnhandledNotification: unhandledNotificationEmitter.event,\n onDispose: disposeEmitter.event,\n end: () => {\n messageWriter.end();\n },\n dispose: () => {\n if (isDisposed()) {\n return;\n }\n state = ConnectionState.Disposed;\n disposeEmitter.fire(undefined);\n const error = new messages_1.ResponseError(messages_1.ErrorCodes.PendingResponseRejected, 'Pending response rejected since connection got disposed');\n for (const promise of responsePromises.values()) {\n promise.reject(error);\n }\n responsePromises = new Map();\n requestTokens = new Map();\n knownCanceledRequests = new Set();\n messageQueue = new linkedMap_1.LinkedMap();\n // Test for backwards compatibility\n if (Is.func(messageWriter.dispose)) {\n messageWriter.dispose();\n }\n if (Is.func(messageReader.dispose)) {\n messageReader.dispose();\n }\n },\n listen: () => {\n throwIfClosedOrDisposed();\n throwIfListening();\n state = ConnectionState.Listening;\n messageReader.listen(callback);\n },\n inspect: () => {\n // eslint-disable-next-line no-console\n (0, ral_1.default)().console.log('inspect');\n }\n };\n connection.onNotification(LogTraceNotification.type, (params) => {\n if (trace === Trace.Off || !tracer) {\n return;\n }\n const verbose = trace === Trace.Verbose || trace === Trace.Compact;\n tracer.log(params.message, verbose ? params.verbose : undefined);\n });\n connection.onNotification(ProgressNotification.type, (params) => {\n const handler = progressHandlers.get(params.token);\n if (handler) {\n handler(params.value);\n }\n else {\n unhandledProgressEmitter.fire(params);\n }\n });\n return connection;\n}\nexports.createMessageConnection = createMessageConnection;\n//# sourceMappingURL=connection.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\n/// <reference path=\"../../typings/thenable.d.ts\" />\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SetTraceNotification = exports.TraceFormat = exports.Trace = exports.ProgressType = exports.ProgressToken = exports.createMessageConnection = exports.NullLogger = exports.ConnectionOptions = exports.ConnectionStrategy = exports.WriteableStreamMessageWriter = exports.AbstractMessageWriter = exports.MessageWriter = exports.ReadableStreamMessageReader = exports.AbstractMessageReader = exports.MessageReader = exports.CancellationToken = exports.CancellationTokenSource = exports.Emitter = exports.Event = exports.Disposable = exports.LRUCache = exports.Touch = exports.LinkedMap = exports.ParameterStructures = exports.NotificationType9 = exports.NotificationType8 = exports.NotificationType7 = exports.NotificationType6 = exports.NotificationType5 = exports.NotificationType4 = exports.NotificationType3 = exports.NotificationType2 = exports.NotificationType1 = exports.NotificationType0 = exports.NotificationType = exports.ErrorCodes = exports.ResponseError = exports.RequestType9 = exports.RequestType8 = exports.RequestType7 = exports.RequestType6 = exports.RequestType5 = exports.RequestType4 = exports.RequestType3 = exports.RequestType2 = exports.RequestType1 = exports.RequestType0 = exports.RequestType = exports.Message = exports.RAL = void 0;\nexports.CancellationStrategy = exports.CancellationSenderStrategy = exports.CancellationReceiverStrategy = exports.ConnectionError = exports.ConnectionErrors = exports.LogTraceNotification = void 0;\nconst messages_1 = require(\"./messages\");\nObject.defineProperty(exports, \"Message\", { enumerable: true, get: function () { return messages_1.Message; } });\nObject.defineProperty(exports, \"RequestType\", { enumerable: true, get: function () { return messages_1.RequestType; } });\nObject.defineProperty(exports, \"RequestType0\", { enumerable: true, get: function () { return messages_1.RequestType0; } });\nObject.defineProperty(exports, \"RequestType1\", { enumerable: true, get: function () { return messages_1.RequestType1; } });\nObject.defineProperty(exports, \"RequestType2\", { enumerable: true, get: function () { return messages_1.RequestType2; } });\nObject.defineProperty(exports, \"RequestType3\", { enumerable: true, get: function () { return messages_1.RequestType3; } });\nObject.defineProperty(exports, \"RequestType4\", { enumerable: true, get: function () { return messages_1.RequestType4; } });\nObject.defineProperty(exports, \"RequestType5\", { enumerable: true, get: function () { return messages_1.RequestType5; } });\nObject.defineProperty(exports, \"RequestType6\", { enumerable: true, get: function () { return messages_1.RequestType6; } });\nObject.defineProperty(exports, \"RequestType7\", { enumerable: true, get: function () { return messages_1.RequestType7; } });\nObject.defineProperty(exports, \"RequestType8\", { enumerable: true, get: function () { return messages_1.RequestType8; } });\nObject.defineProperty(exports, \"RequestType9\", { enumerable: true, get: function () { return messages_1.RequestType9; } });\nObject.defineProperty(exports, \"ResponseError\", { enumerable: true, get: function () { return messages_1.ResponseError; } });\nObject.defineProperty(exports, \"ErrorCodes\", { enumerable: true, get: function () { return messages_1.ErrorCodes; } });\nObject.defineProperty(exports, \"NotificationType\", { enumerable: true, get: function () { return messages_1.NotificationType; } });\nObject.defineProperty(exports, \"NotificationType0\", { enumerable: true, get: function () { return messages_1.NotificationType0; } });\nObject.defineProperty(exports, \"NotificationType1\", { enumerable: true, get: function () { return messages_1.NotificationType1; } });\nObject.defineProperty(exports, \"NotificationType2\", { enumerable: true, get: function () { return messages_1.NotificationType2; } });\nObject.defineProperty(exports, \"NotificationType3\", { enumerable: true, get: function () { return messages_1.NotificationType3; } });\nObject.defineProperty(exports, \"NotificationType4\", { enumerable: true, get: function () { return messages_1.NotificationType4; } });\nObject.defineProperty(exports, \"NotificationType5\", { enumerable: true, get: function () { return messages_1.NotificationType5; } });\nObject.defineProperty(exports, \"NotificationType6\", { enumerable: true, get: function () { return messages_1.NotificationType6; } });\nObject.defineProperty(exports, \"NotificationType7\", { enumerable: true, get: function () { return messages_1.NotificationType7; } });\nObject.defineProperty(exports, \"NotificationType8\", { enumerable: true, get: function () { return messages_1.NotificationType8; } });\nObject.defineProperty(exports, \"NotificationType9\", { enumerable: true, get: function () { return messages_1.NotificationType9; } });\nObject.defineProperty(exports, \"ParameterStructures\", { enumerable: true, get: function () { return messages_1.ParameterStructures; } });\nconst linkedMap_1 = require(\"./linkedMap\");\nObject.defineProperty(exports, \"LinkedMap\", { enumerable: true, get: function () { return linkedMap_1.LinkedMap; } });\nObject.defineProperty(exports, \"LRUCache\", { enumerable: true, get: function () { return linkedMap_1.LRUCache; } });\nObject.defineProperty(exports, \"Touch\", { enumerable: true, get: function () { return linkedMap_1.Touch; } });\nconst disposable_1 = require(\"./disposable\");\nObject.defineProperty(exports, \"Disposable\", { enumerable: true, get: function () { return disposable_1.Disposable; } });\nconst events_1 = require(\"./events\");\nObject.defineProperty(exports, \"Event\", { enumerable: true, get: function () { return events_1.Event; } });\nObject.defineProperty(exports, \"Emitter\", { enumerable: true, get: function () { return events_1.Emitter; } });\nconst cancellation_1 = require(\"./cancellation\");\nObject.defineProperty(exports, \"CancellationTokenSource\", { enumerable: true, get: function () { return cancellation_1.CancellationTokenSource; } });\nObject.defineProperty(exports, \"CancellationToken\", { enumerable: true, get: function () { return cancellation_1.CancellationToken; } });\nconst messageReader_1 = require(\"./messageReader\");\nObject.defineProperty(exports, \"MessageReader\", { enumerable: true, get: function () { return messageReader_1.MessageReader; } });\nObject.defineProperty(exports, \"AbstractMessageReader\", { enumerable: true, get: function () { return messageReader_1.AbstractMessageReader; } });\nObject.defineProperty(exports, \"ReadableStreamMessageReader\", { enumerable: true, get: function () { return messageReader_1.ReadableStreamMessageReader; } });\nconst messageWriter_1 = require(\"./messageWriter\");\nObject.defineProperty(exports, \"MessageWriter\", { enumerable: true, get: function () { return messageWriter_1.MessageWriter; } });\nObject.defineProperty(exports, \"AbstractMessageWriter\", { enumerable: true, get: function () { return messageWriter_1.AbstractMessageWriter; } });\nObject.defineProperty(exports, \"WriteableStreamMessageWriter\", { enumerable: true, get: function () { return messageWriter_1.WriteableStreamMessageWriter; } });\nconst connection_1 = require(\"./connection\");\nObject.defineProperty(exports, \"ConnectionStrategy\", { enumerable: true, get: function () { return connection_1.ConnectionStrategy; } });\nObject.defineProperty(exports, \"ConnectionOptions\", { enumerable: true, get: function () { return connection_1.ConnectionOptions; } });\nObject.defineProperty(exports, \"NullLogger\", { enumerable: true, get: function () { return connection_1.NullLogger; } });\nObject.defineProperty(exports, \"createMessageConnection\", { enumerable: true, get: function () { return connection_1.createMessageConnection; } });\nObject.defineProperty(exports, \"ProgressToken\", { enumerable: true, get: function () { return connection_1.ProgressToken; } });\nObject.defineProperty(exports, \"ProgressType\", { enumerable: true, get: function () { return connection_1.ProgressType; } });\nObject.defineProperty(exports, \"Trace\", { enumerable: true, get: function () { return connection_1.Trace; } });\nObject.defineProperty(exports, \"TraceFormat\", { enumerable: true, get: function () { return connection_1.TraceFormat; } });\nObject.defineProperty(exports, \"SetTraceNotification\", { enumerable: true, get: function () { return connection_1.SetTraceNotification; } });\nObject.defineProperty(exports, \"LogTraceNotification\", { enumerable: true, get: function () { return connection_1.LogTraceNotification; } });\nObject.defineProperty(exports, \"ConnectionErrors\", { enumerable: true, get: function () { return connection_1.ConnectionErrors; } });\nObject.defineProperty(exports, \"ConnectionError\", { enumerable: true, get: function () { return connection_1.ConnectionError; } });\nObject.defineProperty(exports, \"CancellationReceiverStrategy\", { enumerable: true, get: function () { return connection_1.CancellationReceiverStrategy; } });\nObject.defineProperty(exports, \"CancellationSenderStrategy\", { enumerable: true, get: function () { return connection_1.CancellationSenderStrategy; } });\nObject.defineProperty(exports, \"CancellationStrategy\", { enumerable: true, get: function () { return connection_1.CancellationStrategy; } });\nconst ral_1 = require(\"./ral\");\nexports.RAL = ral_1.default;\n//# sourceMappingURL=api.js.map", "\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createMessageConnection = exports.createServerSocketTransport = exports.createClientSocketTransport = exports.createServerPipeTransport = exports.createClientPipeTransport = exports.generateRandomPipeName = exports.StreamMessageWriter = exports.StreamMessageReader = exports.SocketMessageWriter = exports.SocketMessageReader = exports.IPCMessageWriter = exports.IPCMessageReader = void 0;\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 * ----------------------------------------------------------------------------------------- */\nconst ril_1 = require(\"./ril\");\n// Install the node runtime abstract.\nril_1.default.install();\nconst api_1 = require(\"../common/api\");\nconst path = require(\"path\");\nconst os = require(\"os\");\nconst crypto_1 = require(\"crypto\");\nconst net_1 = require(\"net\");\n__exportStar(require(\"../common/api\"), exports);\nclass IPCMessageReader extends api_1.AbstractMessageReader {\n constructor(process) {\n super();\n this.process = process;\n let eventEmitter = this.process;\n eventEmitter.on('error', (error) => this.fireError(error));\n eventEmitter.on('close', () => this.fireClose());\n }\n listen(callback) {\n this.process.on('message', callback);\n return api_1.Disposable.create(() => this.process.off('message', callback));\n }\n}\nexports.IPCMessageReader = IPCMessageReader;\nclass IPCMessageWriter extends api_1.AbstractMessageWriter {\n constructor(process) {\n super();\n this.process = process;\n this.errorCount = 0;\n let eventEmitter = this.process;\n eventEmitter.on('error', (error) => this.fireError(error));\n eventEmitter.on('close', () => this.fireClose);\n }\n write(msg) {\n try {\n if (typeof this.process.send === 'function') {\n this.process.send(msg, undefined, undefined, (error) => {\n if (error) {\n this.errorCount++;\n this.handleError(error, msg);\n }\n else {\n this.errorCount = 0;\n }\n });\n }\n return Promise.resolve();\n }\n catch (error) {\n this.handleError(error, msg);\n return Promise.reject(error);\n }\n }\n handleError(error, msg) {\n this.errorCount++;\n this.fireError(error, msg, this.errorCount);\n }\n end() {\n }\n}\nexports.IPCMessageWriter = IPCMessageWriter;\nclass SocketMessageReader extends api_1.ReadableStreamMessageReader {\n constructor(socket, encoding = 'utf-8') {\n super((0, ril_1.default)().stream.asReadableStream(socket), encoding);\n }\n}\nexports.SocketMessageReader = SocketMessageReader;\nclass SocketMessageWriter extends api_1.WriteableStreamMessageWriter {\n constructor(socket, options) {\n super((0, ril_1.default)().stream.asWritableStream(socket), options);\n this.socket = socket;\n }\n dispose() {\n super.dispose();\n this.socket.destroy();\n }\n}\nexports.SocketMessageWriter = SocketMessageWriter;\nclass StreamMessageReader extends api_1.ReadableStreamMessageReader {\n constructor(readble, encoding) {\n super((0, ril_1.default)().stream.asReadableStream(readble), encoding);\n }\n}\nexports.StreamMessageReader = StreamMessageReader;\nclass StreamMessageWriter extends api_1.WriteableStreamMessageWriter {\n constructor(writable, options) {\n super((0, ril_1.default)().stream.asWritableStream(writable), options);\n }\n}\nexports.StreamMessageWriter = StreamMessageWriter;\nconst XDG_RUNTIME_DIR = process.env['XDG_RUNTIME_DIR'];\nconst safeIpcPathLengths = new Map([\n ['linux', 107],\n ['darwin', 103]\n]);\nfunction generateRandomPipeName() {\n const randomSuffix = (0, crypto_1.randomBytes)(21).toString('hex');\n if (process.platform === 'win32') {\n return `\\\\\\\\.\\\\pipe\\\\vscode-jsonrpc-${randomSuffix}-sock`;\n }\n let result;\n if (XDG_RUNTIME_DIR) {\n result = path.join(XDG_RUNTIME_DIR, `vscode-ipc-${randomSuffix}.sock`);\n }\n else {\n result = path.join(os.tmpdir(), `vscode-${randomSuffix}.sock`);\n }\n const limit = safeIpcPathLengths.get(process.platform);\n if (limit !== undefined && result.length >= limit) {\n (0, ril_1.default)().console.warn(`WARNING: IPC handle \"${result}\" is longer than ${limit} characters.`);\n }\n return result;\n}\nexports.generateRandomPipeName = generateRandomPipeName;\nfunction createClientPipeTransport(pipeName, encoding = 'utf-8') {\n let connectResolve;\n const connected = new Promise((resolve, _reject) => {\n connectResolve = resolve;\n });\n return new Promise((resolve, reject) => {\n let server = (0, net_1.createServer)((socket) => {\n server.close();\n connectResolve([\n new SocketMessageReader(socket, encoding),\n new SocketMessageWriter(socket, encoding)\n ]);\n });\n server.on('error', reject);\n server.listen(pipeName, () => {\n server.removeListener('error', reject);\n resolve({\n onConnected: () => { return connected; }\n });\n });\n });\n}\nexports.createClientPipeTransport = createClientPipeTransport;\nfunction createServerPipeTransport(pipeName, encoding = 'utf-8') {\n const socket = (0, net_1.createConnection)(pipeName);\n return [\n new SocketMessageReader(socket, encoding),\n new SocketMessageWriter(socket, encoding)\n ];\n}\nexports.createServerPipeTransport = createServerPipeTransport;\nfunction createClientSocketTransport(port, encoding = 'utf-8') {\n let connectResolve;\n const connected = new Promise((resolve, _reject) => {\n connectResolve = resolve;\n });\n return new Promise((resolve, reject) => {\n const server = (0, net_1.createServer)((socket) => {\n server.close();\n connectResolve([\n new SocketMessageReader(socket, encoding),\n new SocketMessageWriter(socket, encoding)\n ]);\n });\n server.on('error', reject);\n server.listen(port, '127.0.0.1', () => {\n server.removeListener('error', reject);\n resolve({\n onConnected: () => { return connected; }\n });\n });\n });\n}\nexports.createClientSocketTransport = createClientSocketTransport;\nfunction createServerSocketTransport(port, encoding = 'utf-8') {\n const socket = (0, net_1.createConnection)(port, '127.0.0.1');\n return [\n new SocketMessageReader(socket, encoding),\n new SocketMessageWriter(socket, encoding)\n ];\n}\nexports.createServerSocketTransport = createServerSocketTransport;\nfunction isReadableStream(value) {\n const candidate = value;\n return candidate.read !== undefined && candidate.addListener !== undefined;\n}\nfunction isWritableStream(value) {\n const candidate = value;\n return candidate.write !== undefined && candidate.addListener !== undefined;\n}\nfunction createMessageConnection(input, output, logger, options) {\n if (!logger) {\n logger = api_1.NullLogger;\n }\n const reader = isReadableStream(input) ? new StreamMessageReader(input) : input;\n const writer = isWritableStream(output) ? new StreamMessageWriter(output) : output;\n if (api_1.ConnectionStrategy.is(options)) {\n options = { connectionStrategy: options };\n }\n return (0, api_1.createMessageConnection)(reader, writer, logger, options);\n}\nexports.createMessageConnection = createMessageConnection;\n//# sourceMappingURL=main.js.map", "/* --------------------------------------------------------------------------------------------\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 * ----------------------------------------------------------------------------------------- */\n'use strict';\n\nmodule.exports = require('./lib/node/main');", "(function (factory) {\n if (typeof module === \"object\" && typeof module.exports === \"object\") {\n var v = factory(require, exports);\n if (v !== undefined) module.exports = v;\n }\n else if (typeof define === \"function\" && define.amd) {\n define([\"require\", \"exports\"], factory);\n }\n})(function (require, exports) {\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 * ------------------------------------------------------------------------------------------ */\n 'use strict';\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.TextDocument = exports.EOL = exports.WorkspaceFolder = exports.InlayHint = exports.InlayHintLabelPart = exports.InlayHintKind = exports.InlineValueContext = exports.InlineValueEvaluatableExpression = exports.InlineValueVariableLookup = exports.InlineValueText = exports.SemanticTokens = exports.SemanticTokenModifiers = exports.SemanticTokenTypes = exports.SelectionRange = exports.DocumentLink = exports.FormattingOptions = exports.CodeLens = exports.CodeAction = exports.CodeActionContext = exports.CodeActionTriggerKind = exports.CodeActionKind = exports.DocumentSymbol = exports.WorkspaceSymbol = exports.SymbolInformation = exports.SymbolTag = exports.SymbolKind = exports.DocumentHighlight = exports.DocumentHighlightKind = exports.SignatureInformation = exports.ParameterInformation = exports.Hover = exports.MarkedString = exports.CompletionList = exports.CompletionItem = exports.CompletionItemLabelDetails = exports.InsertTextMode = exports.InsertReplaceEdit = exports.CompletionItemTag = exports.InsertTextFormat = exports.CompletionItemKind = exports.MarkupContent = exports.MarkupKind = exports.TextDocumentItem = exports.OptionalVersionedTextDocumentIdentifier = exports.VersionedTextDocumentIdentifier = exports.TextDocumentIdentifier = exports.WorkspaceChange = exports.WorkspaceEdit = exports.DeleteFile = exports.RenameFile = exports.CreateFile = exports.TextDocumentEdit = exports.AnnotatedTextEdit = exports.ChangeAnnotationIdentifier = exports.ChangeAnnotation = exports.TextEdit = exports.Command = exports.Diagnostic = exports.CodeDescription = exports.DiagnosticTag = exports.DiagnosticSeverity = exports.DiagnosticRelatedInformation = exports.FoldingRange = exports.FoldingRangeKind = exports.ColorPresentation = exports.ColorInformation = exports.Color = exports.LocationLink = exports.Location = exports.Range = exports.Position = exports.uinteger = exports.integer = exports.URI = exports.DocumentUri = void 0;\n var DocumentUri;\n (function (DocumentUri) {\n function is(value) {\n return typeof value === 'string';\n }\n DocumentUri.is = is;\n })(DocumentUri = exports.DocumentUri || (exports.DocumentUri = {}));\n var URI;\n (function (URI) {\n function is(value) {\n return typeof value === 'string';\n }\n URI.is = is;\n })(URI = exports.URI || (exports.URI = {}));\n var integer;\n (function (integer) {\n integer.MIN_VALUE = -2147483648;\n integer.MAX_VALUE = 2147483647;\n function is(value) {\n return typeof value === 'number' && integer.MIN_VALUE <= value && value <= integer.MAX_VALUE;\n }\n integer.is = is;\n })(integer = exports.integer || (exports.integer = {}));\n var uinteger;\n (function (uinteger) {\n uinteger.MIN_VALUE = 0;\n uinteger.MAX_VALUE = 2147483647;\n function is(value) {\n return typeof value === 'number' && uinteger.MIN_VALUE <= value && value <= uinteger.MAX_VALUE;\n }\n uinteger.is = is;\n })(uinteger = exports.uinteger || (exports.uinteger = {}));\n /**\n * The Position namespace provides helper functions to work with\n * [Position](#Position) literals.\n */\n var Position;\n (function (Position) {\n /**\n * Creates a new Position literal from the given line and character.\n * @param line The position's line.\n * @param character The position's character.\n */\n function create(line, character) {\n if (line === Number.MAX_VALUE) {\n line = uinteger.MAX_VALUE;\n }\n if (character === Number.MAX_VALUE) {\n character = uinteger.MAX_VALUE;\n }\n return { line: line, character: character };\n }\n Position.create = create;\n /**\n * Checks whether the given literal conforms to the [Position](#Position) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character);\n }\n Position.is = is;\n })(Position = exports.Position || (exports.Position = {}));\n /**\n * The Range namespace provides helper functions to work with\n * [Range](#Range) literals.\n */\n var Range;\n (function (Range) {\n function create(one, two, three, four) {\n if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) {\n return { start: Position.create(one, two), end: Position.create(three, four) };\n }\n else if (Position.is(one) && Position.is(two)) {\n return { start: one, end: two };\n }\n else {\n throw new Error(\"Range#create called with invalid arguments[\".concat(one, \", \").concat(two, \", \").concat(three, \", \").concat(four, \"]\"));\n }\n }\n Range.create = create;\n /**\n * Checks whether the given literal conforms to the [Range](#Range) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);\n }\n Range.is = is;\n })(Range = exports.Range || (exports.Range = {}));\n /**\n * The Location namespace provides helper functions to work with\n * [Location](#Location) literals.\n */\n var Location;\n (function (Location) {\n /**\n * Creates a Location literal.\n * @param uri The location's uri.\n * @param range The location's range.\n */\n function create(uri, range) {\n return { uri: uri, range: range };\n }\n Location.create = create;\n /**\n * Checks whether the given literal conforms to the [Location](#Location) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));\n }\n Location.is = is;\n })(Location = exports.Location || (exports.Location = {}));\n /**\n * The LocationLink namespace provides helper functions to work with\n * [LocationLink](#LocationLink) literals.\n */\n var LocationLink;\n (function (LocationLink) {\n /**\n * Creates a LocationLink literal.\n * @param targetUri The definition's uri.\n * @param targetRange The full range of the definition.\n * @param targetSelectionRange The span of the symbol definition at the target.\n * @param originSelectionRange The span of the symbol being defined in the originating source file.\n */\n function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {\n return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };\n }\n LocationLink.create = create;\n /**\n * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)\n && Range.is(candidate.targetSelectionRange)\n && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));\n }\n LocationLink.is = is;\n })(LocationLink = exports.LocationLink || (exports.LocationLink = {}));\n /**\n * The Color namespace provides helper functions to work with\n * [Color](#Color) literals.\n */\n var Color;\n (function (Color) {\n /**\n * Creates a new Color literal.\n */\n function create(red, green, blue, alpha) {\n return {\n red: red,\n green: green,\n blue: blue,\n alpha: alpha,\n };\n }\n Color.create = create;\n /**\n * Checks whether the given literal conforms to the [Color](#Color) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Is.numberRange(candidate.red, 0, 1)\n && Is.numberRange(candidate.green, 0, 1)\n && Is.numberRange(candidate.blue, 0, 1)\n && Is.numberRange(candidate.alpha, 0, 1);\n }\n Color.is = is;\n })(Color = exports.Color || (exports.Color = {}));\n /**\n * The ColorInformation namespace provides helper functions to work with\n * [ColorInformation](#ColorInformation) literals.\n */\n var ColorInformation;\n (function (ColorInformation) {\n /**\n * Creates a new ColorInformation literal.\n */\n function create(range, color) {\n return {\n range: range,\n color: color,\n };\n }\n ColorInformation.create = create;\n /**\n * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Range.is(candidate.range) && Color.is(candidate.color);\n }\n ColorInformation.is = is;\n })(ColorInformation = exports.ColorInformation || (exports.ColorInformation = {}));\n /**\n * The Color namespace provides helper functions to work with\n * [ColorPresentation](#ColorPresentation) literals.\n */\n var ColorPresentation;\n (function (ColorPresentation) {\n /**\n * Creates a new ColorInformation literal.\n */\n function create(label, textEdit, additionalTextEdits) {\n return {\n label: label,\n textEdit: textEdit,\n additionalTextEdits: additionalTextEdits,\n };\n }\n ColorPresentation.create = create;\n /**\n * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Is.string(candidate.label)\n && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))\n && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));\n }\n ColorPresentation.is = is;\n })(ColorPresentation = exports.ColorPresentation || (exports.ColorPresentation = {}));\n /**\n * A set of predefined range kinds.\n */\n var FoldingRangeKind;\n (function (FoldingRangeKind) {\n /**\n * Folding range for a comment\n */\n FoldingRangeKind.Comment = 'comment';\n /**\n * Folding range for a imports or includes\n */\n FoldingRangeKind.Imports = 'imports';\n /**\n * Folding range for a region (e.g. `#region`)\n */\n FoldingRangeKind.Region = 'region';\n })(FoldingRangeKind = exports.FoldingRangeKind || (exports.FoldingRangeKind = {}));\n /**\n * The folding range namespace provides helper functions to work with\n * [FoldingRange](#FoldingRange) literals.\n */\n var FoldingRange;\n (function (FoldingRange) {\n /**\n * Creates a new FoldingRange literal.\n */\n function create(startLine, endLine, startCharacter, endCharacter, kind, collapsedText) {\n var result = {\n startLine: startLine,\n endLine: endLine\n };\n if (Is.defined(startCharacter)) {\n result.startCharacter = startCharacter;\n }\n if (Is.defined(endCharacter)) {\n result.endCharacter = endCharacter;\n }\n if (Is.defined(kind)) {\n result.kind = kind;\n }\n if (Is.defined(collapsedText)) {\n result.collapsedText = collapsedText;\n }\n return result;\n }\n FoldingRange.create = create;\n /**\n * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine)\n && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter))\n && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter))\n && (Is.undefined(candidate.kind) || Is.string(candidate.kind));\n }\n FoldingRange.is = is;\n })(FoldingRange = exports.FoldingRange || (exports.FoldingRange = {}));\n /**\n * The DiagnosticRelatedInformation namespace provides helper functions to work with\n * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.\n */\n var DiagnosticRelatedInformation;\n (function (DiagnosticRelatedInformation) {\n /**\n * Creates a new DiagnosticRelatedInformation literal.\n */\n function create(location, message) {\n return {\n location: location,\n message: message\n };\n }\n DiagnosticRelatedInformation.create = create;\n /**\n * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);\n }\n DiagnosticRelatedInformation.is = is;\n })(DiagnosticRelatedInformation = exports.DiagnosticRelatedInformation || (exports.DiagnosticRelatedInformation = {}));\n /**\n * The diagnostic's severity.\n */\n var DiagnosticSeverity;\n (function (DiagnosticSeverity) {\n /**\n * Reports an error.\n */\n DiagnosticSeverity.Error = 1;\n /**\n * Reports a warning.\n */\n DiagnosticSeverity.Warning = 2;\n /**\n * Reports an information.\n */\n DiagnosticSeverity.Information = 3;\n /**\n * Reports a hint.\n */\n DiagnosticSeverity.Hint = 4;\n })(DiagnosticSeverity = exports.DiagnosticSeverity || (exports.DiagnosticSeverity = {}));\n /**\n * The diagnostic tags.\n *\n * @since 3.15.0\n */\n var DiagnosticTag;\n (function (DiagnosticTag) {\n /**\n * Unused or unnecessary code.\n *\n * Clients are allowed to render diagnostics with this tag faded out instead of having\n * an error squiggle.\n */\n DiagnosticTag.Unnecessary = 1;\n /**\n * Deprecated or obsolete code.\n *\n * Clients are allowed to rendered diagnostics with this tag strike through.\n */\n DiagnosticTag.Deprecated = 2;\n })(DiagnosticTag = exports.DiagnosticTag || (exports.DiagnosticTag = {}));\n /**\n * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes.\n *\n * @since 3.16.0\n */\n var CodeDescription;\n (function (CodeDescription) {\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Is.string(candidate.href);\n }\n CodeDescription.is = is;\n })(CodeDescription = exports.CodeDescription || (exports.CodeDescription = {}));\n /**\n * The Diagnostic namespace provides helper functions to work with\n * [Diagnostic](#Diagnostic) literals.\n */\n var Diagnostic;\n (function (Diagnostic) {\n /**\n * Creates a new Diagnostic literal.\n */\n function create(range, message, severity, code, source, relatedInformation) {\n var result = { range: range, message: message };\n if (Is.defined(severity)) {\n result.severity = severity;\n }\n if (Is.defined(code)) {\n result.code = code;\n }\n if (Is.defined(source)) {\n result.source = source;\n }\n if (Is.defined(relatedInformation)) {\n result.relatedInformation = relatedInformation;\n }\n return result;\n }\n Diagnostic.create = create;\n /**\n * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.\n */\n function is(value) {\n var _a;\n var candidate = value;\n return Is.defined(candidate)\n && Range.is(candidate.range)\n && Is.string(candidate.message)\n && (Is.number(candidate.severity) || Is.undefined(candidate.severity))\n && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))\n && (Is.undefined(candidate.codeDescription) || (Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href)))\n && (Is.string(candidate.source) || Is.undefined(candidate.source))\n && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));\n }\n Diagnostic.is = is;\n })(Diagnostic = exports.Diagnostic || (exports.Diagnostic = {}));\n /**\n * The Command namespace provides helper functions to work with\n * [Command](#Command) literals.\n */\n var Command;\n (function (Command) {\n /**\n * Creates a new Command literal.\n */\n function create(title, command) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n var result = { title: title, command: command };\n if (Is.defined(args) && args.length > 0) {\n result.arguments = args;\n }\n return result;\n }\n Command.create = create;\n /**\n * Checks whether the given literal conforms to the [Command](#Command) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);\n }\n Command.is = is;\n })(Command = exports.Command || (exports.Command = {}));\n /**\n * The TextEdit namespace provides helper function to create replace,\n * insert and delete edits more easily.\n */\n var TextEdit;\n (function (TextEdit) {\n /**\n * Creates a replace text edit.\n * @param range The range of text to be replaced.\n * @param newText The new text.\n */\n function replace(range, newText) {\n return { range: range, newText: newText };\n }\n TextEdit.replace = replace;\n /**\n * Creates a insert text edit.\n * @param position The position to insert the text at.\n * @param newText The text to be inserted.\n */\n function insert(position, newText) {\n return { range: { start: position, end: position }, newText: newText };\n }\n TextEdit.insert = insert;\n /**\n * Creates a delete text edit.\n * @param range The range of text to be deleted.\n */\n function del(range) {\n return { range: range, newText: '' };\n }\n TextEdit.del = del;\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate)\n && Is.string(candidate.newText)\n && Range.is(candidate.range);\n }\n TextEdit.is = is;\n })(TextEdit = exports.TextEdit || (exports.TextEdit = {}));\n var ChangeAnnotation;\n (function (ChangeAnnotation) {\n function create(label, needsConfirmation, description) {\n var result = { label: label };\n if (needsConfirmation !== undefined) {\n result.needsConfirmation = needsConfirmation;\n }\n if (description !== undefined) {\n result.description = description;\n }\n return result;\n }\n ChangeAnnotation.create = create;\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Is.string(candidate.label) &&\n (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) &&\n (Is.string(candidate.description) || candidate.description === undefined);\n }\n ChangeAnnotation.is = is;\n })(ChangeAnnotation = exports.ChangeAnnotation || (exports.ChangeAnnotation = {}));\n var ChangeAnnotationIdentifier;\n (function (ChangeAnnotationIdentifier) {\n function is(value) {\n var candidate = value;\n return Is.string(candidate);\n }\n ChangeAnnotationIdentifier.is = is;\n })(ChangeAnnotationIdentifier = exports.ChangeAnnotationIdentifier || (exports.ChangeAnnotationIdentifier = {}));\n var AnnotatedTextEdit;\n (function (AnnotatedTextEdit) {\n /**\n * Creates an annotated replace text edit.\n *\n * @param range The range of text to be replaced.\n * @param newText The new text.\n * @param annotation The annotation.\n */\n function replace(range, newText, annotation) {\n return { range: range, newText: newText, annotationId: annotation };\n }\n AnnotatedTextEdit.replace = replace;\n /**\n * Creates an annotated insert text edit.\n *\n * @param position The position to insert the text at.\n * @param newText The text to be inserted.\n * @param annotation The annotation.\n */\n function insert(position, newText, annotation) {\n return { range: { start: position, end: position }, newText: newText, annotationId: annotation };\n }\n AnnotatedTextEdit.insert = insert;\n /**\n * Creates an annotated delete text edit.\n *\n * @param range The range of text to be deleted.\n * @param annotation The annotation.\n */\n function del(range, annotation) {\n return { range: range, newText: '', annotationId: annotation };\n }\n AnnotatedTextEdit.del = del;\n function is(value) {\n var candidate = value;\n return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n AnnotatedTextEdit.is = is;\n })(AnnotatedTextEdit = exports.AnnotatedTextEdit || (exports.AnnotatedTextEdit = {}));\n /**\n * The TextDocumentEdit namespace provides helper function to create\n * an edit that manipulates a text document.\n */\n var TextDocumentEdit;\n (function (TextDocumentEdit) {\n /**\n * Creates a new `TextDocumentEdit`\n */\n function create(textDocument, edits) {\n return { textDocument: textDocument, edits: edits };\n }\n TextDocumentEdit.create = create;\n function is(value) {\n var candidate = value;\n return Is.defined(candidate)\n && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument)\n && Array.isArray(candidate.edits);\n }\n TextDocumentEdit.is = is;\n })(TextDocumentEdit = exports.TextDocumentEdit || (exports.TextDocumentEdit = {}));\n var CreateFile;\n (function (CreateFile) {\n function create(uri, options, annotation) {\n var result = {\n kind: 'create',\n uri: uri\n };\n if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {\n result.options = options;\n }\n if (annotation !== undefined) {\n result.annotationId = annotation;\n }\n return result;\n }\n CreateFile.create = create;\n function is(value) {\n var candidate = value;\n return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined ||\n ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n CreateFile.is = is;\n })(CreateFile = exports.CreateFile || (exports.CreateFile = {}));\n var RenameFile;\n (function (RenameFile) {\n function create(oldUri, newUri, options, annotation) {\n var result = {\n kind: 'rename',\n oldUri: oldUri,\n newUri: newUri\n };\n if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {\n result.options = options;\n }\n if (annotation !== undefined) {\n result.annotationId = annotation;\n }\n return result;\n }\n RenameFile.create = create;\n function is(value) {\n var candidate = value;\n return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined ||\n ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n RenameFile.is = is;\n })(RenameFile = exports.RenameFile || (exports.RenameFile = {}));\n var DeleteFile;\n (function (DeleteFile) {\n function create(uri, options, annotation) {\n var result = {\n kind: 'delete',\n uri: uri\n };\n if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) {\n result.options = options;\n }\n if (annotation !== undefined) {\n result.annotationId = annotation;\n }\n return result;\n }\n DeleteFile.create = create;\n function is(value) {\n var candidate = value;\n return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined ||\n ((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n DeleteFile.is = is;\n })(DeleteFile = exports.DeleteFile || (exports.DeleteFile = {}));\n var WorkspaceEdit;\n (function (WorkspaceEdit) {\n function is(value) {\n var candidate = value;\n return candidate &&\n (candidate.changes !== undefined || candidate.documentChanges !== undefined) &&\n (candidate.documentChanges === undefined || candidate.documentChanges.every(function (change) {\n if (Is.string(change.kind)) {\n return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);\n }\n else {\n return TextDocumentEdit.is(change);\n }\n }));\n }\n WorkspaceEdit.is = is;\n })(WorkspaceEdit = exports.WorkspaceEdit || (exports.WorkspaceEdit = {}));\n var TextEditChangeImpl = /** @class */ (function () {\n function TextEditChangeImpl(edits, changeAnnotations) {\n this.edits = edits;\n this.changeAnnotations = changeAnnotations;\n }\n TextEditChangeImpl.prototype.insert = function (position, newText, annotation) {\n var edit;\n var id;\n if (annotation === undefined) {\n edit = TextEdit.insert(position, newText);\n }\n else if (ChangeAnnotationIdentifier.is(annotation)) {\n id = annotation;\n edit = AnnotatedTextEdit.insert(position, newText, annotation);\n }\n else {\n this.assertChangeAnnotations(this.changeAnnotations);\n id = this.changeAnnotations.manage(annotation);\n edit = AnnotatedTextEdit.insert(position, newText, id);\n }\n this.edits.push(edit);\n if (id !== undefined) {\n return id;\n }\n };\n TextEditChangeImpl.prototype.replace = function (range, newText, annotation) {\n var edit;\n var id;\n if (annotation === undefined) {\n edit = TextEdit.replace(range, newText);\n }\n else if (ChangeAnnotationIdentifier.is(annotation)) {\n id = annotation;\n edit = AnnotatedTextEdit.replace(range, newText, annotation);\n }\n else {\n this.assertChangeAnnotations(this.changeAnnotations);\n id = this.changeAnnotations.manage(annotation);\n edit = AnnotatedTextEdit.replace(range, newText, id);\n }\n this.edits.push(edit);\n if (id !== undefined) {\n return id;\n }\n };\n TextEditChangeImpl.prototype.delete = function (range, annotation) {\n var edit;\n var id;\n if (annotation === undefined) {\n edit = TextEdit.del(range);\n }\n else if (ChangeAnnotationIdentifier.is(annotation)) {\n id = annotation;\n edit = AnnotatedTextEdit.del(range, annotation);\n }\n else {\n this.assertChangeAnnotations(this.changeAnnotations);\n id = this.changeAnnotations.manage(annotation);\n edit = AnnotatedTextEdit.del(range, id);\n }\n this.edits.push(edit);\n if (id !== undefined) {\n return id;\n }\n };\n TextEditChangeImpl.prototype.add = function (edit) {\n this.edits.push(edit);\n };\n TextEditChangeImpl.prototype.all = function () {\n return this.edits;\n };\n TextEditChangeImpl.prototype.clear = function () {\n this.edits.splice(0, this.edits.length);\n };\n TextEditChangeImpl.prototype.assertChangeAnnotations = function (value) {\n if (value === undefined) {\n throw new Error(\"Text edit change is not configured to manage change annotations.\");\n }\n };\n return TextEditChangeImpl;\n }());\n /**\n * A helper class\n */\n var ChangeAnnotations = /** @class */ (function () {\n function ChangeAnnotations(annotations) {\n this._annotations = annotations === undefined ? Object.create(null) : annotations;\n this._counter = 0;\n this._size = 0;\n }\n ChangeAnnotations.prototype.all = function () {\n return this._annotations;\n };\n Object.defineProperty(ChangeAnnotations.prototype, \"size\", {\n get: function () {\n return this._size;\n },\n enumerable: false,\n configurable: true\n });\n ChangeAnnotations.prototype.manage = function (idOrAnnotation, annotation) {\n var id;\n if (ChangeAnnotationIdentifier.is(idOrAnnotation)) {\n id = idOrAnnotation;\n }\n else {\n id = this.nextId();\n annotation = idOrAnnotation;\n }\n if (this._annotations[id] !== undefined) {\n throw new Error(\"Id \".concat(id, \" is already in use.\"));\n }\n if (annotation === undefined) {\n throw new Error(\"No annotation provided for id \".concat(id));\n }\n this._annotations[id] = annotation;\n this._size++;\n return id;\n };\n ChangeAnnotations.prototype.nextId = function () {\n this._counter++;\n return this._counter.toString();\n };\n return ChangeAnnotations;\n }());\n /**\n * A workspace change helps constructing changes to a workspace.\n */\n var WorkspaceChange = /** @class */ (function () {\n function WorkspaceChange(workspaceEdit) {\n var _this = this;\n this._textEditChanges = Object.create(null);\n if (workspaceEdit !== undefined) {\n this._workspaceEdit = workspaceEdit;\n if (workspaceEdit.documentChanges) {\n this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations);\n workspaceEdit.changeAnnotations = this._changeAnnotations.all();\n workspaceEdit.documentChanges.forEach(function (change) {\n if (TextDocumentEdit.is(change)) {\n var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations);\n _this._textEditChanges[change.textDocument.uri] = textEditChange;\n }\n });\n }\n else if (workspaceEdit.changes) {\n Object.keys(workspaceEdit.changes).forEach(function (key) {\n var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);\n _this._textEditChanges[key] = textEditChange;\n });\n }\n }\n else {\n this._workspaceEdit = {};\n }\n }\n Object.defineProperty(WorkspaceChange.prototype, \"edit\", {\n /**\n * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal\n * use to be returned from a workspace edit operation like rename.\n */\n get: function () {\n this.initDocumentChanges();\n if (this._changeAnnotations !== undefined) {\n if (this._changeAnnotations.size === 0) {\n this._workspaceEdit.changeAnnotations = undefined;\n }\n else {\n this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();\n }\n }\n return this._workspaceEdit;\n },\n enumerable: false,\n configurable: true\n });\n WorkspaceChange.prototype.getTextEditChange = function (key) {\n if (OptionalVersionedTextDocumentIdentifier.is(key)) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n var textDocument = { uri: key.uri, version: key.version };\n var result = this._textEditChanges[textDocument.uri];\n if (!result) {\n var edits = [];\n var textDocumentEdit = {\n textDocument: textDocument,\n edits: edits\n };\n this._workspaceEdit.documentChanges.push(textDocumentEdit);\n result = new TextEditChangeImpl(edits, this._changeAnnotations);\n this._textEditChanges[textDocument.uri] = result;\n }\n return result;\n }\n else {\n this.initChanges();\n if (this._workspaceEdit.changes === undefined) {\n throw new Error('Workspace edit is not configured for normal text edit changes.');\n }\n var result = this._textEditChanges[key];\n if (!result) {\n var edits = [];\n this._workspaceEdit.changes[key] = edits;\n result = new TextEditChangeImpl(edits);\n this._textEditChanges[key] = result;\n }\n return result;\n }\n };\n WorkspaceChange.prototype.initDocumentChanges = function () {\n if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {\n this._changeAnnotations = new ChangeAnnotations();\n this._workspaceEdit.documentChanges = [];\n this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();\n }\n };\n WorkspaceChange.prototype.initChanges = function () {\n if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {\n this._workspaceEdit.changes = Object.create(null);\n }\n };\n WorkspaceChange.prototype.createFile = function (uri, optionsOrAnnotation, options) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n var annotation;\n if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {\n annotation = optionsOrAnnotation;\n }\n else {\n options = optionsOrAnnotation;\n }\n var operation;\n var id;\n if (annotation === undefined) {\n operation = CreateFile.create(uri, options);\n }\n else {\n id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);\n operation = CreateFile.create(uri, options, id);\n }\n this._workspaceEdit.documentChanges.push(operation);\n if (id !== undefined) {\n return id;\n }\n };\n WorkspaceChange.prototype.renameFile = function (oldUri, newUri, optionsOrAnnotation, options) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n var annotation;\n if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {\n annotation = optionsOrAnnotation;\n }\n else {\n options = optionsOrAnnotation;\n }\n var operation;\n var id;\n if (annotation === undefined) {\n operation = RenameFile.create(oldUri, newUri, options);\n }\n else {\n id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);\n operation = RenameFile.create(oldUri, newUri, options, id);\n }\n this._workspaceEdit.documentChanges.push(operation);\n if (id !== undefined) {\n return id;\n }\n };\n WorkspaceChange.prototype.deleteFile = function (uri, optionsOrAnnotation, options) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n var annotation;\n if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {\n annotation = optionsOrAnnotation;\n }\n else {\n options = optionsOrAnnotation;\n }\n var operation;\n var id;\n if (annotation === undefined) {\n operation = DeleteFile.create(uri, options);\n }\n else {\n id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);\n operation = DeleteFile.create(uri, options, id);\n }\n this._workspaceEdit.documentChanges.push(operation);\n if (id !== undefined) {\n return id;\n }\n };\n return WorkspaceChange;\n }());\n exports.WorkspaceChange = WorkspaceChange;\n /**\n * The TextDocumentIdentifier namespace provides helper functions to work with\n * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.\n */\n var TextDocumentIdentifier;\n (function (TextDocumentIdentifier) {\n /**\n * Creates a new TextDocumentIdentifier literal.\n * @param uri The document's uri.\n */\n function create(uri) {\n return { uri: uri };\n }\n TextDocumentIdentifier.create = create;\n /**\n * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri);\n }\n TextDocumentIdentifier.is = is;\n })(TextDocumentIdentifier = exports.TextDocumentIdentifier || (exports.TextDocumentIdentifier = {}));\n /**\n * The VersionedTextDocumentIdentifier namespace provides helper functions to work with\n * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.\n */\n var VersionedTextDocumentIdentifier;\n (function (VersionedTextDocumentIdentifier) {\n /**\n * Creates a new VersionedTextDocumentIdentifier literal.\n * @param uri The document's uri.\n * @param version The document's version.\n */\n function create(uri, version) {\n return { uri: uri, version: version };\n }\n VersionedTextDocumentIdentifier.create = create;\n /**\n * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version);\n }\n VersionedTextDocumentIdentifier.is = is;\n })(VersionedTextDocumentIdentifier = exports.VersionedTextDocumentIdentifier || (exports.VersionedTextDocumentIdentifier = {}));\n /**\n * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with\n * [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) literals.\n */\n var OptionalVersionedTextDocumentIdentifier;\n (function (OptionalVersionedTextDocumentIdentifier) {\n /**\n * Creates a new OptionalVersionedTextDocumentIdentifier literal.\n * @param uri The document's uri.\n * @param version The document's version.\n */\n function create(uri, version) {\n return { uri: uri, version: version };\n }\n OptionalVersionedTextDocumentIdentifier.create = create;\n /**\n * Checks whether the given literal conforms to the [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version));\n }\n OptionalVersionedTextDocumentIdentifier.is = is;\n })(OptionalVersionedTextDocumentIdentifier = exports.OptionalVersionedTextDocumentIdentifier || (exports.OptionalVersionedTextDocumentIdentifier = {}));\n /**\n * The TextDocumentItem namespace provides helper functions to work with\n * [TextDocumentItem](#TextDocumentItem) literals.\n */\n var TextDocumentItem;\n (function (TextDocumentItem) {\n /**\n * Creates a new TextDocumentItem literal.\n * @param uri The document's uri.\n * @param languageId The document's language identifier.\n * @param version The document's version number.\n * @param text The document's text.\n */\n function create(uri, languageId, version, text) {\n return { uri: uri, languageId: languageId, version: version, text: text };\n }\n TextDocumentItem.create = create;\n /**\n * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text);\n }\n TextDocumentItem.is = is;\n })(TextDocumentItem = exports.TextDocumentItem || (exports.TextDocumentItem = {}));\n /**\n * Describes the content type that a client supports in various\n * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.\n *\n * Please note that `MarkupKinds` must not start with a `$`. This kinds\n * are reserved for internal usage.\n */\n var MarkupKind;\n (function (MarkupKind) {\n /**\n * Plain text is supported as a content format\n */\n MarkupKind.PlainText = 'plaintext';\n /**\n * Markdown is supported as a content format\n */\n MarkupKind.Markdown = 'markdown';\n /**\n * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.\n */\n function is(value) {\n var candidate = value;\n return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;\n }\n MarkupKind.is = is;\n })(MarkupKind = exports.MarkupKind || (exports.MarkupKind = {}));\n var MarkupContent;\n (function (MarkupContent) {\n /**\n * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);\n }\n MarkupContent.is = is;\n })(MarkupContent = exports.MarkupContent || (exports.MarkupContent = {}));\n /**\n * The kind of a completion entry.\n */\n var CompletionItemKind;\n (function (CompletionItemKind) {\n CompletionItemKind.Text = 1;\n CompletionItemKind.Method = 2;\n CompletionItemKind.Function = 3;\n CompletionItemKind.Constructor = 4;\n CompletionItemKind.Field = 5;\n CompletionItemKind.Variable = 6;\n CompletionItemKind.Class = 7;\n CompletionItemKind.Interface = 8;\n CompletionItemKind.Module = 9;\n CompletionItemKind.Property = 10;\n CompletionItemKind.Unit = 11;\n CompletionItemKind.Value = 12;\n CompletionItemKind.Enum = 13;\n CompletionItemKind.Keyword = 14;\n CompletionItemKind.Snippet = 15;\n CompletionItemKind.Color = 16;\n CompletionItemKind.File = 17;\n CompletionItemKind.Reference = 18;\n CompletionItemKind.Folder = 19;\n CompletionItemKind.EnumMember = 20;\n CompletionItemKind.Constant = 21;\n CompletionItemKind.Struct = 22;\n CompletionItemKind.Event = 23;\n CompletionItemKind.Operator = 24;\n CompletionItemKind.TypeParameter = 25;\n })(CompletionItemKind = exports.CompletionItemKind || (exports.CompletionItemKind = {}));\n /**\n * Defines whether the insert text in a completion item should be interpreted as\n * plain text or a snippet.\n */\n var InsertTextFormat;\n (function (InsertTextFormat) {\n /**\n * The primary text to be inserted is treated as a plain string.\n */\n InsertTextFormat.PlainText = 1;\n /**\n * The primary text to be inserted is treated as a snippet.\n *\n * A snippet can define tab stops and placeholders with `$1`, `$2`\n * and `${3:foo}`. `$0` defines the final tab stop, it defaults to\n * the end of the snippet. Placeholders with equal identifiers are linked,\n * that is typing in one will update others too.\n *\n * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax\n */\n InsertTextFormat.Snippet = 2;\n })(InsertTextFormat = exports.InsertTextFormat || (exports.InsertTextFormat = {}));\n /**\n * Completion item tags are extra annotations that tweak the rendering of a completion\n * item.\n *\n * @since 3.15.0\n */\n var CompletionItemTag;\n (function (CompletionItemTag) {\n /**\n * Render a completion as obsolete, usually using a strike-out.\n */\n CompletionItemTag.Deprecated = 1;\n })(CompletionItemTag = exports.CompletionItemTag || (exports.CompletionItemTag = {}));\n /**\n * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.\n *\n * @since 3.16.0\n */\n var InsertReplaceEdit;\n (function (InsertReplaceEdit) {\n /**\n * Creates a new insert / replace edit\n */\n function create(newText, insert, replace) {\n return { newText: newText, insert: insert, replace: replace };\n }\n InsertReplaceEdit.create = create;\n /**\n * Checks whether the given literal conforms to the [InsertReplaceEdit](#InsertReplaceEdit) interface.\n */\n function is(value) {\n var candidate = value;\n return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);\n }\n InsertReplaceEdit.is = is;\n })(InsertReplaceEdit = exports.InsertReplaceEdit || (exports.InsertReplaceEdit = {}));\n /**\n * How whitespace and indentation is handled during completion\n * item insertion.\n *\n * @since 3.16.0\n */\n var InsertTextMode;\n (function (InsertTextMode) {\n /**\n * The insertion or replace strings is taken as it is. If the\n * value is multi line the lines below the cursor will be\n * inserted using the indentation defined in the string value.\n * The client will not apply any kind of adjustments to the\n * string.\n */\n InsertTextMode.asIs = 1;\n /**\n * The editor adjusts leading whitespace of new lines so that\n * they match the indentation up to the cursor of the line for\n * which the item is accepted.\n *\n * Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a\n * multi line completion item is indented using 2 tabs and all\n * following lines inserted will be indented using 2 tabs as well.\n */\n InsertTextMode.adjustIndentation = 2;\n })(InsertTextMode = exports.InsertTextMode || (exports.InsertTextMode = {}));\n var CompletionItemLabelDetails;\n (function (CompletionItemLabelDetails) {\n function is(value) {\n var candidate = value;\n return candidate && (Is.string(candidate.detail) || candidate.detail === undefined) &&\n (Is.string(candidate.description) || candidate.description === undefined);\n }\n CompletionItemLabelDetails.is = is;\n })(CompletionItemLabelDetails = exports.CompletionItemLabelDetails || (exports.CompletionItemLabelDetails = {}));\n /**\n * The CompletionItem namespace provides functions to deal with\n * completion items.\n */\n var CompletionItem;\n (function (CompletionItem) {\n /**\n * Create a completion item and seed it with a label.\n * @param label The completion item's label\n */\n function create(label) {\n return { label: label };\n }\n CompletionItem.create = create;\n })(CompletionItem = exports.CompletionItem || (exports.CompletionItem = {}));\n /**\n * The CompletionList namespace provides functions to deal with\n * completion lists.\n */\n var CompletionList;\n (function (CompletionList) {\n /**\n * Creates a new completion list.\n *\n * @param items The completion items.\n * @param isIncomplete The list is not complete.\n */\n function create(items, isIncomplete) {\n return { items: items ? items : [], isIncomplete: !!isIncomplete };\n }\n CompletionList.create = create;\n })(CompletionList = exports.CompletionList || (exports.CompletionList = {}));\n var MarkedString;\n (function (MarkedString) {\n /**\n * Creates a marked string from plain text.\n *\n * @param plainText The plain text.\n */\n function fromPlainText(plainText) {\n return plainText.replace(/[\\\\`*_{}[\\]()#+\\-.!]/g, '\\\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash\n }\n MarkedString.fromPlainText = fromPlainText;\n /**\n * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.\n */\n function is(value) {\n var candidate = value;\n return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));\n }\n MarkedString.is = is;\n })(MarkedString = exports.MarkedString || (exports.MarkedString = {}));\n var Hover;\n (function (Hover) {\n /**\n * Checks whether the given value conforms to the [Hover](#Hover) interface.\n */\n function is(value) {\n var candidate = value;\n return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||\n MarkedString.is(candidate.contents) ||\n Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range));\n }\n Hover.is = is;\n })(Hover = exports.Hover || (exports.Hover = {}));\n /**\n * The ParameterInformation namespace provides helper functions to work with\n * [ParameterInformation](#ParameterInformation) literals.\n */\n var ParameterInformation;\n (function (ParameterInformation) {\n /**\n * Creates a new parameter information literal.\n *\n * @param label A label string.\n * @param documentation A doc string.\n */\n function create(label, documentation) {\n return documentation ? { label: label, documentation: documentation } : { label: label };\n }\n ParameterInformation.create = create;\n })(ParameterInformation = exports.ParameterInformation || (exports.ParameterInformation = {}));\n /**\n * The SignatureInformation namespace provides helper functions to work with\n * [SignatureInformation](#SignatureInformation) literals.\n */\n var SignatureInformation;\n (function (SignatureInformation) {\n function create(label, documentation) {\n var parameters = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n parameters[_i - 2] = arguments[_i];\n }\n var result = { label: label };\n if (Is.defined(documentation)) {\n result.documentation = documentation;\n }\n if (Is.defined(parameters)) {\n result.parameters = parameters;\n }\n else {\n result.parameters = [];\n }\n return result;\n }\n SignatureInformation.create = create;\n })(SignatureInformation = exports.SignatureInformation || (exports.SignatureInformation = {}));\n /**\n * A document highlight kind.\n */\n var DocumentHighlightKind;\n (function (DocumentHighlightKind) {\n /**\n * A textual occurrence.\n */\n DocumentHighlightKind.Text = 1;\n /**\n * Read-access of a symbol, like reading a variable.\n */\n DocumentHighlightKind.Read = 2;\n /**\n * Write-access of a symbol, like writing to a variable.\n */\n DocumentHighlightKind.Write = 3;\n })(DocumentHighlightKind = exports.DocumentHighlightKind || (exports.DocumentHighlightKind = {}));\n /**\n * DocumentHighlight namespace to provide helper functions to work with\n * [DocumentHighlight](#DocumentHighlight) literals.\n */\n var DocumentHighlight;\n (function (DocumentHighlight) {\n /**\n * Create a DocumentHighlight object.\n * @param range The range the highlight applies to.\n * @param kind The highlight kind\n */\n function create(range, kind) {\n var result = { range: range };\n if (Is.number(kind)) {\n result.kind = kind;\n }\n return result;\n }\n DocumentHighlight.create = create;\n })(DocumentHighlight = exports.DocumentHighlight || (exports.DocumentHighlight = {}));\n /**\n * A symbol kind.\n */\n var SymbolKind;\n (function (SymbolKind) {\n SymbolKind.File = 1;\n SymbolKind.Module = 2;\n SymbolKind.Namespace = 3;\n SymbolKind.Package = 4;\n SymbolKind.Class = 5;\n SymbolKind.Method = 6;\n SymbolKind.Property = 7;\n SymbolKind.Field = 8;\n SymbolKind.Constructor = 9;\n SymbolKind.Enum = 10;\n SymbolKind.Interface = 11;\n SymbolKind.Function = 12;\n SymbolKind.Variable = 13;\n SymbolKind.Constant = 14;\n SymbolKind.String = 15;\n SymbolKind.Number = 16;\n SymbolKind.Boolean = 17;\n SymbolKind.Array = 18;\n SymbolKind.Object = 19;\n SymbolKind.Key = 20;\n SymbolKind.Null = 21;\n SymbolKind.EnumMember = 22;\n SymbolKind.Struct = 23;\n SymbolKind.Event = 24;\n SymbolKind.Operator = 25;\n SymbolKind.TypeParameter = 26;\n })(SymbolKind = exports.SymbolKind || (exports.SymbolKind = {}));\n /**\n * Symbol tags are extra annotations that tweak the rendering of a symbol.\n * @since 3.16\n */\n var SymbolTag;\n (function (SymbolTag) {\n /**\n * Render a symbol as obsolete, usually using a strike-out.\n */\n SymbolTag.Deprecated = 1;\n })(SymbolTag = exports.SymbolTag || (exports.SymbolTag = {}));\n var SymbolInformation;\n (function (SymbolInformation) {\n /**\n * Creates a new symbol information literal.\n *\n * @param name The name of the symbol.\n * @param kind The kind of the symbol.\n * @param range The range of the location of the symbol.\n * @param uri The resource of the location of symbol.\n * @param containerName The name of the symbol containing the symbol.\n */\n function create(name, kind, range, uri, containerName) {\n var result = {\n name: name,\n kind: kind,\n location: { uri: uri, range: range }\n };\n if (containerName) {\n result.containerName = containerName;\n }\n return result;\n }\n SymbolInformation.create = create;\n })(SymbolInformation = exports.SymbolInformation || (exports.SymbolInformation = {}));\n var WorkspaceSymbol;\n (function (WorkspaceSymbol) {\n /**\n * Create a new workspace symbol.\n *\n * @param name The name of the symbol.\n * @param kind The kind of the symbol.\n * @param uri The resource of the location of the symbol.\n * @param range An options range of the location.\n * @returns A WorkspaceSymbol.\n */\n function create(name, kind, uri, range) {\n return range !== undefined\n ? { name: name, kind: kind, location: { uri: uri, range: range } }\n : { name: name, kind: kind, location: { uri: uri } };\n }\n WorkspaceSymbol.create = create;\n })(WorkspaceSymbol = exports.WorkspaceSymbol || (exports.WorkspaceSymbol = {}));\n var DocumentSymbol;\n (function (DocumentSymbol) {\n /**\n * Creates a new symbol information literal.\n *\n * @param name The name of the symbol.\n * @param detail The detail of the symbol.\n * @param kind The kind of the symbol.\n * @param range The range of the symbol.\n * @param selectionRange The selectionRange of the symbol.\n * @param children Children of the symbol.\n */\n function create(name, detail, kind, range, selectionRange, children) {\n var result = {\n name: name,\n detail: detail,\n kind: kind,\n range: range,\n selectionRange: selectionRange\n };\n if (children !== undefined) {\n result.children = children;\n }\n return result;\n }\n DocumentSymbol.create = create;\n /**\n * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.\n */\n function is(value) {\n var candidate = value;\n return candidate &&\n Is.string(candidate.name) && Is.number(candidate.kind) &&\n Range.is(candidate.range) && Range.is(candidate.selectionRange) &&\n (candidate.detail === undefined || Is.string(candidate.detail)) &&\n (candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) &&\n (candidate.children === undefined || Array.isArray(candidate.children)) &&\n (candidate.tags === undefined || Array.isArray(candidate.tags));\n }\n DocumentSymbol.is = is;\n })(DocumentSymbol = exports.DocumentSymbol || (exports.DocumentSymbol = {}));\n /**\n * A set of predefined code action kinds\n */\n var CodeActionKind;\n (function (CodeActionKind) {\n /**\n * Empty kind.\n */\n CodeActionKind.Empty = '';\n /**\n * Base kind for quickfix actions: 'quickfix'\n */\n CodeActionKind.QuickFix = 'quickfix';\n /**\n * Base kind for refactoring actions: 'refactor'\n */\n CodeActionKind.Refactor = 'refactor';\n /**\n * Base kind for refactoring extraction actions: 'refactor.extract'\n *\n * Example extract actions:\n *\n * - Extract method\n * - Extract function\n * - Extract variable\n * - Extract interface from class\n * - ...\n */\n CodeActionKind.RefactorExtract = 'refactor.extract';\n /**\n * Base kind for refactoring inline actions: 'refactor.inline'\n *\n * Example inline actions:\n *\n * - Inline function\n * - Inline variable\n * - Inline constant\n * - ...\n */\n CodeActionKind.RefactorInline = 'refactor.inline';\n /**\n * Base kind for refactoring rewrite actions: 'refactor.rewrite'\n *\n * Example rewrite actions:\n *\n * - Convert JavaScript function to class\n * - Add or remove parameter\n * - Encapsulate field\n * - Make method static\n * - Move method to base class\n * - ...\n */\n CodeActionKind.RefactorRewrite = 'refactor.rewrite';\n /**\n * Base kind for source actions: `source`\n *\n * Source code actions apply to the entire file.\n */\n CodeActionKind.Source = 'source';\n /**\n * Base kind for an organize imports source action: `source.organizeImports`\n */\n CodeActionKind.SourceOrganizeImports = 'source.organizeImports';\n /**\n * Base kind for auto-fix source actions: `source.fixAll`.\n *\n * Fix all actions automatically fix errors that have a clear fix that do not require user input.\n * They should not suppress errors or perform unsafe fixes such as generating new types or classes.\n *\n * @since 3.15.0\n */\n CodeActionKind.SourceFixAll = 'source.fixAll';\n })(CodeActionKind = exports.CodeActionKind || (exports.CodeActionKind = {}));\n /**\n * The reason why code actions were requested.\n *\n * @since 3.17.0\n */\n var CodeActionTriggerKind;\n (function (CodeActionTriggerKind) {\n /**\n * Code actions were explicitly requested by the user or by an extension.\n */\n CodeActionTriggerKind.Invoked = 1;\n /**\n * Code actions were requested automatically.\n *\n * This typically happens when current selection in a file changes, but can\n * also be triggered when file content changes.\n */\n CodeActionTriggerKind.Automatic = 2;\n })(CodeActionTriggerKind = exports.CodeActionTriggerKind || (exports.CodeActionTriggerKind = {}));\n /**\n * The CodeActionContext namespace provides helper functions to work with\n * [CodeActionContext](#CodeActionContext) literals.\n */\n var CodeActionContext;\n (function (CodeActionContext) {\n /**\n * Creates a new CodeActionContext literal.\n */\n function create(diagnostics, only, triggerKind) {\n var result = { diagnostics: diagnostics };\n if (only !== undefined && only !== null) {\n result.only = only;\n }\n if (triggerKind !== undefined && triggerKind !== null) {\n result.triggerKind = triggerKind;\n }\n return result;\n }\n CodeActionContext.create = create;\n /**\n * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is)\n && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string))\n && (candidate.triggerKind === undefined || candidate.triggerKind === CodeActionTriggerKind.Invoked || candidate.triggerKind === CodeActionTriggerKind.Automatic);\n }\n CodeActionContext.is = is;\n })(CodeActionContext = exports.CodeActionContext || (exports.CodeActionContext = {}));\n var CodeAction;\n (function (CodeAction) {\n function create(title, kindOrCommandOrEdit, kind) {\n var result = { title: title };\n var checkKind = true;\n if (typeof kindOrCommandOrEdit === 'string') {\n checkKind = false;\n result.kind = kindOrCommandOrEdit;\n }\n else if (Command.is(kindOrCommandOrEdit)) {\n result.command = kindOrCommandOrEdit;\n }\n else {\n result.edit = kindOrCommandOrEdit;\n }\n if (checkKind && kind !== undefined) {\n result.kind = kind;\n }\n return result;\n }\n CodeAction.create = create;\n function is(value) {\n var candidate = value;\n return candidate && Is.string(candidate.title) &&\n (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&\n (candidate.kind === undefined || Is.string(candidate.kind)) &&\n (candidate.edit !== undefined || candidate.command !== undefined) &&\n (candidate.command === undefined || Command.is(candidate.command)) &&\n (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) &&\n (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit));\n }\n CodeAction.is = is;\n })(CodeAction = exports.CodeAction || (exports.CodeAction = {}));\n /**\n * The CodeLens namespace provides helper functions to work with\n * [CodeLens](#CodeLens) literals.\n */\n var CodeLens;\n (function (CodeLens) {\n /**\n * Creates a new CodeLens literal.\n */\n function create(range, data) {\n var result = { range: range };\n if (Is.defined(data)) {\n result.data = data;\n }\n return result;\n }\n CodeLens.create = create;\n /**\n * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));\n }\n CodeLens.is = is;\n })(CodeLens = exports.CodeLens || (exports.CodeLens = {}));\n /**\n * The FormattingOptions namespace provides helper functions to work with\n * [FormattingOptions](#FormattingOptions) literals.\n */\n var FormattingOptions;\n (function (FormattingOptions) {\n /**\n * Creates a new FormattingOptions literal.\n */\n function create(tabSize, insertSpaces) {\n return { tabSize: tabSize, insertSpaces: insertSpaces };\n }\n FormattingOptions.create = create;\n /**\n * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces);\n }\n FormattingOptions.is = is;\n })(FormattingOptions = exports.FormattingOptions || (exports.FormattingOptions = {}));\n /**\n * The DocumentLink namespace provides helper functions to work with\n * [DocumentLink](#DocumentLink) literals.\n */\n var DocumentLink;\n (function (DocumentLink) {\n /**\n * Creates a new DocumentLink literal.\n */\n function create(range, target, data) {\n return { range: range, target: target, data: data };\n }\n DocumentLink.create = create;\n /**\n * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));\n }\n DocumentLink.is = is;\n })(DocumentLink = exports.DocumentLink || (exports.DocumentLink = {}));\n /**\n * The SelectionRange namespace provides helper function to work with\n * SelectionRange literals.\n */\n var SelectionRange;\n (function (SelectionRange) {\n /**\n * Creates a new SelectionRange\n * @param range the range.\n * @param parent an optional parent.\n */\n function create(range, parent) {\n return { range: range, parent: parent };\n }\n SelectionRange.create = create;\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));\n }\n SelectionRange.is = is;\n })(SelectionRange = exports.SelectionRange || (exports.SelectionRange = {}));\n /**\n * A set of predefined token types. This set is not fixed\n * an clients can specify additional token types via the\n * corresponding client capabilities.\n *\n * @since 3.16.0\n */\n var SemanticTokenTypes;\n (function (SemanticTokenTypes) {\n SemanticTokenTypes[\"namespace\"] = \"namespace\";\n /**\n * Represents a generic type. Acts as a fallback for types which can't be mapped to\n * a specific type like class or enum.\n */\n SemanticTokenTypes[\"type\"] = \"type\";\n SemanticTokenTypes[\"class\"] = \"class\";\n SemanticTokenTypes[\"enum\"] = \"enum\";\n SemanticTokenTypes[\"interface\"] = \"interface\";\n SemanticTokenTypes[\"struct\"] = \"struct\";\n SemanticTokenTypes[\"typeParameter\"] = \"typeParameter\";\n SemanticTokenTypes[\"parameter\"] = \"parameter\";\n SemanticTokenTypes[\"variable\"] = \"variable\";\n SemanticTokenTypes[\"property\"] = \"property\";\n SemanticTokenTypes[\"enumMember\"] = \"enumMember\";\n SemanticTokenTypes[\"event\"] = \"event\";\n SemanticTokenTypes[\"function\"] = \"function\";\n SemanticTokenTypes[\"method\"] = \"method\";\n SemanticTokenTypes[\"macro\"] = \"macro\";\n SemanticTokenTypes[\"keyword\"] = \"keyword\";\n SemanticTokenTypes[\"modifier\"] = \"modifier\";\n SemanticTokenTypes[\"comment\"] = \"comment\";\n SemanticTokenTypes[\"string\"] = \"string\";\n SemanticTokenTypes[\"number\"] = \"number\";\n SemanticTokenTypes[\"regexp\"] = \"regexp\";\n SemanticTokenTypes[\"operator\"] = \"operator\";\n /**\n * @since 3.17.0\n */\n SemanticTokenTypes[\"decorator\"] = \"decorator\";\n })(SemanticTokenTypes = exports.SemanticTokenTypes || (exports.SemanticTokenTypes = {}));\n /**\n * A set of predefined token modifiers. This set is not fixed\n * an clients can specify additional token types via the\n * corresponding client capabilities.\n *\n * @since 3.16.0\n */\n var SemanticTokenModifiers;\n (function (SemanticTokenModifiers) {\n SemanticTokenModifiers[\"declaration\"] = \"declaration\";\n SemanticTokenModifiers[\"definition\"] = \"definition\";\n SemanticTokenModifiers[\"readonly\"] = \"readonly\";\n SemanticTokenModifiers[\"static\"] = \"static\";\n SemanticTokenModifiers[\"deprecated\"] = \"deprecated\";\n SemanticTokenModifiers[\"abstract\"] = \"abstract\";\n SemanticTokenModifiers[\"async\"] = \"async\";\n SemanticTokenModifiers[\"modification\"] = \"modification\";\n SemanticTokenModifiers[\"documentation\"] = \"documentation\";\n SemanticTokenModifiers[\"defaultLibrary\"] = \"defaultLibrary\";\n })(SemanticTokenModifiers = exports.SemanticTokenModifiers || (exports.SemanticTokenModifiers = {}));\n /**\n * @since 3.16.0\n */\n var SemanticTokens;\n (function (SemanticTokens) {\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&\n Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');\n }\n SemanticTokens.is = is;\n })(SemanticTokens = exports.SemanticTokens || (exports.SemanticTokens = {}));\n /**\n * The InlineValueText namespace provides functions to deal with InlineValueTexts.\n *\n * @since 3.17.0\n */\n var InlineValueText;\n (function (InlineValueText) {\n /**\n * Creates a new InlineValueText literal.\n */\n function create(range, text) {\n return { range: range, text: text };\n }\n InlineValueText.create = create;\n function is(value) {\n var candidate = value;\n return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.string(candidate.text);\n }\n InlineValueText.is = is;\n })(InlineValueText = exports.InlineValueText || (exports.InlineValueText = {}));\n /**\n * The InlineValueVariableLookup namespace provides functions to deal with InlineValueVariableLookups.\n *\n * @since 3.17.0\n */\n var InlineValueVariableLookup;\n (function (InlineValueVariableLookup) {\n /**\n * Creates a new InlineValueText literal.\n */\n function create(range, variableName, caseSensitiveLookup) {\n return { range: range, variableName: variableName, caseSensitiveLookup: caseSensitiveLookup };\n }\n InlineValueVariableLookup.create = create;\n function is(value) {\n var candidate = value;\n return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.boolean(candidate.caseSensitiveLookup)\n && (Is.string(candidate.variableName) || candidate.variableName === undefined);\n }\n InlineValueVariableLookup.is = is;\n })(InlineValueVariableLookup = exports.InlineValueVariableLookup || (exports.InlineValueVariableLookup = {}));\n /**\n * The InlineValueEvaluatableExpression namespace provides functions to deal with InlineValueEvaluatableExpression.\n *\n * @since 3.17.0\n */\n var InlineValueEvaluatableExpression;\n (function (InlineValueEvaluatableExpression) {\n /**\n * Creates a new InlineValueEvaluatableExpression literal.\n */\n function create(range, expression) {\n return { range: range, expression: expression };\n }\n InlineValueEvaluatableExpression.create = create;\n function is(value) {\n var candidate = value;\n return candidate !== undefined && candidate !== null && Range.is(candidate.range)\n && (Is.string(candidate.expression) || candidate.expression === undefined);\n }\n InlineValueEvaluatableExpression.is = is;\n })(InlineValueEvaluatableExpression = exports.InlineValueEvaluatableExpression || (exports.InlineValueEvaluatableExpression = {}));\n /**\n * The InlineValueContext namespace provides helper functions to work with\n * [InlineValueContext](#InlineValueContext) literals.\n *\n * @since 3.17.0\n */\n var InlineValueContext;\n (function (InlineValueContext) {\n /**\n * Creates a new InlineValueContext literal.\n */\n function create(frameId, stoppedLocation) {\n return { frameId: frameId, stoppedLocation: stoppedLocation };\n }\n InlineValueContext.create = create;\n /**\n * Checks whether the given literal conforms to the [InlineValueContext](#InlineValueContext) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Range.is(value.stoppedLocation);\n }\n InlineValueContext.is = is;\n })(InlineValueContext = exports.InlineValueContext || (exports.InlineValueContext = {}));\n /**\n * Inlay hint kinds.\n *\n * @since 3.17.0\n */\n var InlayHintKind;\n (function (InlayHintKind) {\n /**\n * An inlay hint that for a type annotation.\n */\n InlayHintKind.Type = 1;\n /**\n * An inlay hint that is for a parameter.\n */\n InlayHintKind.Parameter = 2;\n function is(value) {\n return value === 1 || value === 2;\n }\n InlayHintKind.is = is;\n })(InlayHintKind = exports.InlayHintKind || (exports.InlayHintKind = {}));\n var InlayHintLabelPart;\n (function (InlayHintLabelPart) {\n function create(value) {\n return { value: value };\n }\n InlayHintLabelPart.create = create;\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate)\n && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip))\n && (candidate.location === undefined || Location.is(candidate.location))\n && (candidate.command === undefined || Command.is(candidate.command));\n }\n InlayHintLabelPart.is = is;\n })(InlayHintLabelPart = exports.InlayHintLabelPart || (exports.InlayHintLabelPart = {}));\n var InlayHint;\n (function (InlayHint) {\n function create(position, label, kind) {\n var result = { position: position, label: label };\n if (kind !== undefined) {\n result.kind = kind;\n }\n return result;\n }\n InlayHint.create = create;\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Position.is(candidate.position)\n && (Is.string(candidate.label) || Is.typedArray(candidate.label, InlayHintLabelPart.is))\n && (candidate.kind === undefined || InlayHintKind.is(candidate.kind))\n && (candidate.textEdits === undefined) || Is.typedArray(candidate.textEdits, TextEdit.is)\n && (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip))\n && (candidate.paddingLeft === undefined || Is.boolean(candidate.paddingLeft))\n && (candidate.paddingRight === undefined || Is.boolean(candidate.paddingRight));\n }\n InlayHint.is = is;\n })(InlayHint = exports.InlayHint || (exports.InlayHint = {}));\n var WorkspaceFolder;\n (function (WorkspaceFolder) {\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && URI.is(candidate.uri) && Is.string(candidate.name);\n }\n WorkspaceFolder.is = is;\n })(WorkspaceFolder = exports.WorkspaceFolder || (exports.WorkspaceFolder = {}));\n exports.EOL = ['\\n', '\\r\\n', '\\r'];\n /**\n * @deprecated Use the text document from the new vscode-languageserver-textdocument package.\n */\n var TextDocument;\n (function (TextDocument) {\n /**\n * Creates a new ITextDocument literal from the given uri and content.\n * @param uri The document's uri.\n * @param languageId The document's language Id.\n * @param version The document's version.\n * @param content The document's content.\n */\n function create(uri, languageId, version, content) {\n return new FullTextDocument(uri, languageId, version, content);\n }\n TextDocument.create = create;\n /**\n * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount)\n && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;\n }\n TextDocument.is = is;\n function applyEdits(document, edits) {\n var text = document.getText();\n var sortedEdits = mergeSort(edits, function (a, b) {\n var diff = a.range.start.line - b.range.start.line;\n if (diff === 0) {\n return a.range.start.character - b.range.start.character;\n }\n return diff;\n });\n var lastModifiedOffset = text.length;\n for (var i = sortedEdits.length - 1; i >= 0; i--) {\n var e = sortedEdits[i];\n var startOffset = document.offsetAt(e.range.start);\n var endOffset = document.offsetAt(e.range.end);\n if (endOffset <= lastModifiedOffset) {\n text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);\n }\n else {\n throw new Error('Overlapping edit');\n }\n lastModifiedOffset = startOffset;\n }\n return text;\n }\n TextDocument.applyEdits = applyEdits;\n function mergeSort(data, compare) {\n if (data.length <= 1) {\n // sorted\n return data;\n }\n var p = (data.length / 2) | 0;\n var left = data.slice(0, p);\n var right = data.slice(p);\n mergeSort(left, compare);\n mergeSort(right, compare);\n var leftIdx = 0;\n var rightIdx = 0;\n var i = 0;\n while (leftIdx < left.length && rightIdx < right.length) {\n var ret = compare(left[leftIdx], right[rightIdx]);\n if (ret <= 0) {\n // smaller_equal -> take left to preserve order\n data[i++] = left[leftIdx++];\n }\n else {\n // greater -> take right\n data[i++] = right[rightIdx++];\n }\n }\n while (leftIdx < left.length) {\n data[i++] = left[leftIdx++];\n }\n while (rightIdx < right.length) {\n data[i++] = right[rightIdx++];\n }\n return data;\n }\n })(TextDocument = exports.TextDocument || (exports.TextDocument = {}));\n /**\n * @deprecated Use the text document from the new vscode-languageserver-textdocument package.\n */\n var FullTextDocument = /** @class */ (function () {\n function FullTextDocument(uri, languageId, version, content) {\n this._uri = uri;\n this._languageId = languageId;\n this._version = version;\n this._content = content;\n this._lineOffsets = undefined;\n }\n Object.defineProperty(FullTextDocument.prototype, \"uri\", {\n get: function () {\n return this._uri;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(FullTextDocument.prototype, \"languageId\", {\n get: function () {\n return this._languageId;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(FullTextDocument.prototype, \"version\", {\n get: function () {\n return this._version;\n },\n enumerable: false,\n configurable: true\n });\n FullTextDocument.prototype.getText = function (range) {\n if (range) {\n var start = this.offsetAt(range.start);\n var end = this.offsetAt(range.end);\n return this._content.substring(start, end);\n }\n return this._content;\n };\n FullTextDocument.prototype.update = function (event, version) {\n this._content = event.text;\n this._version = version;\n this._lineOffsets = undefined;\n };\n FullTextDocument.prototype.getLineOffsets = function () {\n if (this._lineOffsets === undefined) {\n var lineOffsets = [];\n var text = this._content;\n var isLineStart = true;\n for (var i = 0; i < text.length; i++) {\n if (isLineStart) {\n lineOffsets.push(i);\n isLineStart = false;\n }\n var ch = text.charAt(i);\n isLineStart = (ch === '\\r' || ch === '\\n');\n if (ch === '\\r' && i + 1 < text.length && text.charAt(i + 1) === '\\n') {\n i++;\n }\n }\n if (isLineStart && text.length > 0) {\n lineOffsets.push(text.length);\n }\n this._lineOffsets = lineOffsets;\n }\n return this._lineOffsets;\n };\n FullTextDocument.prototype.positionAt = function (offset) {\n offset = Math.max(Math.min(offset, this._content.length), 0);\n var lineOffsets = this.getLineOffsets();\n var low = 0, high = lineOffsets.length;\n if (high === 0) {\n return Position.create(0, offset);\n }\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (lineOffsets[mid] > offset) {\n high = mid;\n }\n else {\n low = mid + 1;\n }\n }\n // low is the least x for which the line offset is larger than the current offset\n // or array.length if no line offset is larger than the current offset\n var line = low - 1;\n return Position.create(line, offset - lineOffsets[line]);\n };\n FullTextDocument.prototype.offsetAt = function (position) {\n var lineOffsets = this.getLineOffsets();\n if (position.line >= lineOffsets.length) {\n return this._content.length;\n }\n else if (position.line < 0) {\n return 0;\n }\n var lineOffset = lineOffsets[position.line];\n var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;\n return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);\n };\n Object.defineProperty(FullTextDocument.prototype, \"lineCount\", {\n get: function () {\n return this.getLineOffsets().length;\n },\n enumerable: false,\n configurable: true\n });\n return FullTextDocument;\n }());\n var Is;\n (function (Is) {\n var toString = Object.prototype.toString;\n function defined(value) {\n return typeof value !== 'undefined';\n }\n Is.defined = defined;\n function undefined(value) {\n return typeof value === 'undefined';\n }\n Is.undefined = undefined;\n function boolean(value) {\n return value === true || value === false;\n }\n Is.boolean = boolean;\n function string(value) {\n return toString.call(value) === '[object String]';\n }\n Is.string = string;\n function number(value) {\n return toString.call(value) === '[object Number]';\n }\n Is.number = number;\n function numberRange(value, min, max) {\n return toString.call(value) === '[object Number]' && min <= value && value <= max;\n }\n Is.numberRange = numberRange;\n function integer(value) {\n return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647;\n }\n Is.integer = integer;\n function uinteger(value) {\n return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647;\n }\n Is.uinteger = uinteger;\n function func(value) {\n return toString.call(value) === '[object Function]';\n }\n Is.func = func;\n function objectLiteral(value) {\n // Strictly speaking class instances pass this check as well. Since the LSP\n // doesn't use classes we ignore this for now. If we do we need to add something\n // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`\n return value !== null && typeof value === 'object';\n }\n Is.objectLiteral = objectLiteral;\n function typedArray(value, check) {\n return Array.isArray(value) && value.every(check);\n }\n Is.typedArray = typedArray;\n })(Is || (Is = {}));\n});\n//# sourceMappingURL=main.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ProtocolNotificationType = exports.ProtocolNotificationType0 = exports.ProtocolRequestType = exports.ProtocolRequestType0 = exports.RegistrationType = void 0;\nconst vscode_jsonrpc_1 = require(\"vscode-jsonrpc\");\nclass RegistrationType {\n constructor(method) {\n this.method = method;\n }\n}\nexports.RegistrationType = RegistrationType;\nclass ProtocolRequestType0 extends vscode_jsonrpc_1.RequestType0 {\n constructor(method) {\n super(method);\n }\n}\nexports.ProtocolRequestType0 = ProtocolRequestType0;\nclass ProtocolRequestType extends vscode_jsonrpc_1.RequestType {\n constructor(method) {\n super(method, vscode_jsonrpc_1.ParameterStructures.byName);\n }\n}\nexports.ProtocolRequestType = ProtocolRequestType;\nclass ProtocolNotificationType0 extends vscode_jsonrpc_1.NotificationType0 {\n constructor(method) {\n super(method);\n }\n}\nexports.ProtocolNotificationType0 = ProtocolNotificationType0;\nclass ProtocolNotificationType extends vscode_jsonrpc_1.NotificationType {\n constructor(method) {\n super(method, vscode_jsonrpc_1.ParameterStructures.byName);\n }\n}\nexports.ProtocolNotificationType = ProtocolNotificationType;\n//# sourceMappingURL=messages.js.map", "/* --------------------------------------------------------------------------------------------\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 * ------------------------------------------------------------------------------------------ */\n'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.objectLiteral = exports.typedArray = exports.stringArray = exports.array = exports.func = exports.error = exports.number = exports.string = exports.boolean = void 0;\nfunction boolean(value) {\n return value === true || value === false;\n}\nexports.boolean = boolean;\nfunction string(value) {\n return typeof value === 'string' || value instanceof String;\n}\nexports.string = string;\nfunction number(value) {\n return typeof value === 'number' || value instanceof Number;\n}\nexports.number = number;\nfunction error(value) {\n return value instanceof Error;\n}\nexports.error = error;\nfunction func(value) {\n return typeof value === 'function';\n}\nexports.func = func;\nfunction array(value) {\n return Array.isArray(value);\n}\nexports.array = array;\nfunction stringArray(value) {\n return array(value) && value.every(elem => string(elem));\n}\nexports.stringArray = stringArray;\nfunction typedArray(value, check) {\n return Array.isArray(value) && value.every(check);\n}\nexports.typedArray = typedArray;\nfunction objectLiteral(value) {\n // Strictly speaking class instances pass this check as well. Since the LSP\n // doesn't use classes we ignore this for now. If we do we need to add something\n // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`\n return value !== null && typeof value === 'object';\n}\nexports.objectLiteral = objectLiteral;\n//# sourceMappingURL=is.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ImplementationRequest = void 0;\nconst messages_1 = require(\"./messages\");\n// @ts-ignore: to avoid inlining LocationLink as dynamic import\nlet __noDynamicImport;\n/**\n * A request to resolve the implementation locations of a symbol at a given text\n * document position. The request's parameter is of type [TextDocumentPositionParams]\n * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a\n * Thenable that resolves to such.\n */\nvar ImplementationRequest;\n(function (ImplementationRequest) {\n ImplementationRequest.method = 'textDocument/implementation';\n ImplementationRequest.type = new messages_1.ProtocolRequestType(ImplementationRequest.method);\n})(ImplementationRequest = exports.ImplementationRequest || (exports.ImplementationRequest = {}));\n//# sourceMappingURL=protocol.implementation.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TypeDefinitionRequest = void 0;\nconst messages_1 = require(\"./messages\");\n// @ts-ignore: to avoid inlining LocatioLink as dynamic import\nlet __noDynamicImport;\n/**\n * A request to resolve the type definition locations of a symbol at a given text\n * document position. The request's parameter is of type [TextDocumentPositioParams]\n * (#TextDocumentPositionParams) the response is of type [Definition](#Definition) or a\n * Thenable that resolves to such.\n */\nvar TypeDefinitionRequest;\n(function (TypeDefinitionRequest) {\n TypeDefinitionRequest.method = 'textDocument/typeDefinition';\n TypeDefinitionRequest.type = new messages_1.ProtocolRequestType(TypeDefinitionRequest.method);\n})(TypeDefinitionRequest = exports.TypeDefinitionRequest || (exports.TypeDefinitionRequest = {}));\n//# sourceMappingURL=protocol.typeDefinition.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = void 0;\nconst messages_1 = require(\"./messages\");\n/**\n * The `workspace/workspaceFolders` is sent from the server to the client to fetch the open workspace folders.\n */\nvar WorkspaceFoldersRequest;\n(function (WorkspaceFoldersRequest) {\n WorkspaceFoldersRequest.type = new messages_1.ProtocolRequestType0('workspace/workspaceFolders');\n})(WorkspaceFoldersRequest = exports.WorkspaceFoldersRequest || (exports.WorkspaceFoldersRequest = {}));\n/**\n * The `workspace/didChangeWorkspaceFolders` notification is sent from the client to the server when the workspace\n * folder configuration changes.\n */\nvar DidChangeWorkspaceFoldersNotification;\n(function (DidChangeWorkspaceFoldersNotification) {\n DidChangeWorkspaceFoldersNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWorkspaceFolders');\n})(DidChangeWorkspaceFoldersNotification = exports.DidChangeWorkspaceFoldersNotification || (exports.DidChangeWorkspaceFoldersNotification = {}));\n//# sourceMappingURL=protocol.workspaceFolder.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ConfigurationRequest = void 0;\nconst messages_1 = require(\"./messages\");\n//---- Get Configuration request ----\n/**\n * The 'workspace/configuration' request is sent from the server to the client to fetch a certain\n * configuration setting.\n *\n * This pull model replaces the old push model were the client signaled configuration change via an\n * event. If the server still needs to react to configuration changes (since the server caches the\n * result of `workspace/configuration` requests) the server should register for an empty configuration\n * change event and empty the cache if such an event is received.\n */\nvar ConfigurationRequest;\n(function (ConfigurationRequest) {\n ConfigurationRequest.type = new messages_1.ProtocolRequestType('workspace/configuration');\n})(ConfigurationRequest = exports.ConfigurationRequest || (exports.ConfigurationRequest = {}));\n//# sourceMappingURL=protocol.configuration.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ColorPresentationRequest = exports.DocumentColorRequest = void 0;\nconst messages_1 = require(\"./messages\");\n/**\n * A request to list all color symbols found in a given text document. The request's\n * parameter is of type [DocumentColorParams](#DocumentColorParams) the\n * response is of type [ColorInformation[]](#ColorInformation) or a Thenable\n * that resolves to such.\n */\nvar DocumentColorRequest;\n(function (DocumentColorRequest) {\n DocumentColorRequest.method = 'textDocument/documentColor';\n DocumentColorRequest.type = new messages_1.ProtocolRequestType(DocumentColorRequest.method);\n})(DocumentColorRequest = exports.DocumentColorRequest || (exports.DocumentColorRequest = {}));\n/**\n * A request to list all presentation for a color. The request's\n * parameter is of type [ColorPresentationParams](#ColorPresentationParams) the\n * response is of type [ColorInformation[]](#ColorInformation) or a Thenable\n * that resolves to such.\n */\nvar ColorPresentationRequest;\n(function (ColorPresentationRequest) {\n ColorPresentationRequest.type = new messages_1.ProtocolRequestType('textDocument/colorPresentation');\n})(ColorPresentationRequest = exports.ColorPresentationRequest || (exports.ColorPresentationRequest = {}));\n//# sourceMappingURL=protocol.colorProvider.js.map", "\"use strict\";\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 *--------------------------------------------------------------------------------------------*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FoldingRangeRequest = void 0;\nconst messages_1 = require(\"./messages\");\n/**\n * A request to provide folding ranges in a document. The request's\n * parameter is of type [FoldingRangeParams](#FoldingRangeParams), the\n * response is of type [FoldingRangeList](#FoldingRangeList) or a Thenable\n * that resolves to such.\n */\nvar FoldingRangeRequest;\n(function (FoldingRangeRequest) {\n FoldingRangeRequest.method = 'textDocument/foldingRange';\n FoldingRangeRequest.type = new messages_1.ProtocolRequestType(FoldingRangeRequest.method);\n})(FoldingRangeRequest = exports.FoldingRangeRequest || (exports.FoldingRangeRequest = {}));\n//# sourceMappingURL=protocol.foldingRange.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DeclarationRequest = void 0;\nconst messages_1 = require(\"./messages\");\n// @ts-ignore: to avoid inlining LocationLink as dynamic import\nlet __noDynamicImport;\n/**\n * A request to resolve the type definition locations of a symbol at a given text\n * document position. The request's parameter is of type [TextDocumentPositionParams]\n * (#TextDocumentPositionParams) the response is of type [Declaration](#Declaration)\n * or a typed array of [DeclarationLink](#DeclarationLink) or a Thenable that resolves\n * to such.\n */\nvar DeclarationRequest;\n(function (DeclarationRequest) {\n DeclarationRequest.method = 'textDocument/declaration';\n DeclarationRequest.type = new messages_1.ProtocolRequestType(DeclarationRequest.method);\n})(DeclarationRequest = exports.DeclarationRequest || (exports.DeclarationRequest = {}));\n//# sourceMappingURL=protocol.declaration.js.map", "\"use strict\";\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 *--------------------------------------------------------------------------------------------*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SelectionRangeRequest = void 0;\nconst messages_1 = require(\"./messages\");\n/**\n * A request to provide selection ranges in a document. The request's\n * parameter is of type [SelectionRangeParams](#SelectionRangeParams), the\n * response is of type [SelectionRange[]](#SelectionRange[]) or a Thenable\n * that resolves to such.\n */\nvar SelectionRangeRequest;\n(function (SelectionRangeRequest) {\n SelectionRangeRequest.method = 'textDocument/selectionRange';\n SelectionRangeRequest.type = new messages_1.ProtocolRequestType(SelectionRangeRequest.method);\n})(SelectionRangeRequest = exports.SelectionRangeRequest || (exports.SelectionRangeRequest = {}));\n//# sourceMappingURL=protocol.selectionRange.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = void 0;\nconst vscode_jsonrpc_1 = require(\"vscode-jsonrpc\");\nconst messages_1 = require(\"./messages\");\nvar WorkDoneProgress;\n(function (WorkDoneProgress) {\n WorkDoneProgress.type = new vscode_jsonrpc_1.ProgressType();\n function is(value) {\n return value === WorkDoneProgress.type;\n }\n WorkDoneProgress.is = is;\n})(WorkDoneProgress = exports.WorkDoneProgress || (exports.WorkDoneProgress = {}));\n/**\n * The `window/workDoneProgress/create` request is sent from the server to the client to initiate progress\n * reporting from the server.\n */\nvar WorkDoneProgressCreateRequest;\n(function (WorkDoneProgressCreateRequest) {\n WorkDoneProgressCreateRequest.method = 'window/workDoneProgress/create';\n WorkDoneProgressCreateRequest.type = new messages_1.ProtocolRequestType(WorkDoneProgressCreateRequest.method);\n})(WorkDoneProgressCreateRequest = exports.WorkDoneProgressCreateRequest || (exports.WorkDoneProgressCreateRequest = {}));\n/**\n * The `window/workDoneProgress/cancel` notification is sent from the client to the server to cancel a progress\n * initiated on the server side.\n */\nvar WorkDoneProgressCancelNotification;\n(function (WorkDoneProgressCancelNotification) {\n WorkDoneProgressCancelNotification.method = 'window/workDoneProgress/cancel';\n WorkDoneProgressCancelNotification.type = new messages_1.ProtocolNotificationType(WorkDoneProgressCancelNotification.method);\n})(WorkDoneProgressCancelNotification = exports.WorkDoneProgressCancelNotification || (exports.WorkDoneProgressCancelNotification = {}));\n//# sourceMappingURL=protocol.progress.js.map", "\"use strict\";\n/* --------------------------------------------------------------------------------------------\n * Copyright (c) TypeFox, Microsoft and others. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.CallHierarchyPrepareRequest = void 0;\nconst messages_1 = require(\"./messages\");\n/**\n * A request to result a `CallHierarchyItem` in a document at a given position.\n * Can be used as an input to a incoming or outgoing call hierarchy.\n *\n * @since 3.16.0\n */\nvar CallHierarchyPrepareRequest;\n(function (CallHierarchyPrepareRequest) {\n CallHierarchyPrepareRequest.method = 'textDocument/prepareCallHierarchy';\n CallHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(CallHierarchyPrepareRequest.method);\n})(CallHierarchyPrepareRequest = exports.CallHierarchyPrepareRequest || (exports.CallHierarchyPrepareRequest = {}));\n/**\n * A request to resolve the incoming calls for a given `CallHierarchyItem`.\n *\n * @since 3.16.0\n */\nvar CallHierarchyIncomingCallsRequest;\n(function (CallHierarchyIncomingCallsRequest) {\n CallHierarchyIncomingCallsRequest.method = 'callHierarchy/incomingCalls';\n CallHierarchyIncomingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyIncomingCallsRequest.method);\n})(CallHierarchyIncomingCallsRequest = exports.CallHierarchyIncomingCallsRequest || (exports.CallHierarchyIncomingCallsRequest = {}));\n/**\n * A request to resolve the outgoing calls for a given `CallHierarchyItem`.\n *\n * @since 3.16.0\n */\nvar CallHierarchyOutgoingCallsRequest;\n(function (CallHierarchyOutgoingCallsRequest) {\n CallHierarchyOutgoingCallsRequest.method = 'callHierarchy/outgoingCalls';\n CallHierarchyOutgoingCallsRequest.type = new messages_1.ProtocolRequestType(CallHierarchyOutgoingCallsRequest.method);\n})(CallHierarchyOutgoingCallsRequest = exports.CallHierarchyOutgoingCallsRequest || (exports.CallHierarchyOutgoingCallsRequest = {}));\n//# sourceMappingURL=protocol.callHierarchy.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.SemanticTokensRegistrationType = exports.TokenFormat = void 0;\nconst messages_1 = require(\"./messages\");\n//------- 'textDocument/semanticTokens' -----\nvar TokenFormat;\n(function (TokenFormat) {\n TokenFormat.Relative = 'relative';\n})(TokenFormat = exports.TokenFormat || (exports.TokenFormat = {}));\nvar SemanticTokensRegistrationType;\n(function (SemanticTokensRegistrationType) {\n SemanticTokensRegistrationType.method = 'textDocument/semanticTokens';\n SemanticTokensRegistrationType.type = new messages_1.RegistrationType(SemanticTokensRegistrationType.method);\n})(SemanticTokensRegistrationType = exports.SemanticTokensRegistrationType || (exports.SemanticTokensRegistrationType = {}));\n/**\n * @since 3.16.0\n */\nvar SemanticTokensRequest;\n(function (SemanticTokensRequest) {\n SemanticTokensRequest.method = 'textDocument/semanticTokens/full';\n SemanticTokensRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRequest.method);\n})(SemanticTokensRequest = exports.SemanticTokensRequest || (exports.SemanticTokensRequest = {}));\n/**\n * @since 3.16.0\n */\nvar SemanticTokensDeltaRequest;\n(function (SemanticTokensDeltaRequest) {\n SemanticTokensDeltaRequest.method = 'textDocument/semanticTokens/full/delta';\n SemanticTokensDeltaRequest.type = new messages_1.ProtocolRequestType(SemanticTokensDeltaRequest.method);\n})(SemanticTokensDeltaRequest = exports.SemanticTokensDeltaRequest || (exports.SemanticTokensDeltaRequest = {}));\n/**\n * @since 3.16.0\n */\nvar SemanticTokensRangeRequest;\n(function (SemanticTokensRangeRequest) {\n SemanticTokensRangeRequest.method = 'textDocument/semanticTokens/range';\n SemanticTokensRangeRequest.type = new messages_1.ProtocolRequestType(SemanticTokensRangeRequest.method);\n})(SemanticTokensRangeRequest = exports.SemanticTokensRangeRequest || (exports.SemanticTokensRangeRequest = {}));\n/**\n * @since 3.16.0\n */\nvar SemanticTokensRefreshRequest;\n(function (SemanticTokensRefreshRequest) {\n SemanticTokensRefreshRequest.method = `workspace/semanticTokens/refresh`;\n SemanticTokensRefreshRequest.type = new messages_1.ProtocolRequestType0(SemanticTokensRefreshRequest.method);\n})(SemanticTokensRefreshRequest = exports.SemanticTokensRefreshRequest || (exports.SemanticTokensRefreshRequest = {}));\n//# sourceMappingURL=protocol.semanticTokens.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ShowDocumentRequest = void 0;\nconst messages_1 = require(\"./messages\");\n/**\n * A request to show a document. This request might open an\n * external program depending on the value of the URI to open.\n * For example a request to open `https://code.visualstudio.com/`\n * will very likely open the URI in a WEB browser.\n *\n * @since 3.16.0\n*/\nvar ShowDocumentRequest;\n(function (ShowDocumentRequest) {\n ShowDocumentRequest.method = 'window/showDocument';\n ShowDocumentRequest.type = new messages_1.ProtocolRequestType(ShowDocumentRequest.method);\n})(ShowDocumentRequest = exports.ShowDocumentRequest || (exports.ShowDocumentRequest = {}));\n//# sourceMappingURL=protocol.showDocument.js.map", "\"use strict\";\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 *--------------------------------------------------------------------------------------------*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LinkedEditingRangeRequest = void 0;\nconst messages_1 = require(\"./messages\");\n/**\n * A request to provide ranges that can be edited together.\n *\n * @since 3.16.0\n */\nvar LinkedEditingRangeRequest;\n(function (LinkedEditingRangeRequest) {\n LinkedEditingRangeRequest.method = 'textDocument/linkedEditingRange';\n LinkedEditingRangeRequest.type = new messages_1.ProtocolRequestType(LinkedEditingRangeRequest.method);\n})(LinkedEditingRangeRequest = exports.LinkedEditingRangeRequest || (exports.LinkedEditingRangeRequest = {}));\n//# sourceMappingURL=protocol.linkedEditingRange.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.DidRenameFilesNotification = exports.WillRenameFilesRequest = exports.DidCreateFilesNotification = exports.WillCreateFilesRequest = exports.FileOperationPatternKind = void 0;\nconst messages_1 = require(\"./messages\");\n/**\n * A pattern kind describing if a glob pattern matches a file a folder or\n * both.\n *\n * @since 3.16.0\n */\nvar FileOperationPatternKind;\n(function (FileOperationPatternKind) {\n /**\n * The pattern matches a file only.\n */\n FileOperationPatternKind.file = 'file';\n /**\n * The pattern matches a folder only.\n */\n FileOperationPatternKind.folder = 'folder';\n})(FileOperationPatternKind = exports.FileOperationPatternKind || (exports.FileOperationPatternKind = {}));\n/**\n * The will create files request is sent from the client to the server before files are actually\n * created as long as the creation is triggered from within the client.\n *\n * @since 3.16.0\n */\nvar WillCreateFilesRequest;\n(function (WillCreateFilesRequest) {\n WillCreateFilesRequest.method = 'workspace/willCreateFiles';\n WillCreateFilesRequest.type = new messages_1.ProtocolRequestType(WillCreateFilesRequest.method);\n})(WillCreateFilesRequest = exports.WillCreateFilesRequest || (exports.WillCreateFilesRequest = {}));\n/**\n * The did create files notification is sent from the client to the server when\n * files were created from within the client.\n *\n * @since 3.16.0\n */\nvar DidCreateFilesNotification;\n(function (DidCreateFilesNotification) {\n DidCreateFilesNotification.method = 'workspace/didCreateFiles';\n DidCreateFilesNotification.type = new messages_1.ProtocolNotificationType(DidCreateFilesNotification.method);\n})(DidCreateFilesNotification = exports.DidCreateFilesNotification || (exports.DidCreateFilesNotification = {}));\n/**\n * The will rename files request is sent from the client to the server before files are actually\n * renamed as long as the rename is triggered from within the client.\n *\n * @since 3.16.0\n */\nvar WillRenameFilesRequest;\n(function (WillRenameFilesRequest) {\n WillRenameFilesRequest.method = 'workspace/willRenameFiles';\n WillRenameFilesRequest.type = new messages_1.ProtocolRequestType(WillRenameFilesRequest.method);\n})(WillRenameFilesRequest = exports.WillRenameFilesRequest || (exports.WillRenameFilesRequest = {}));\n/**\n * The did rename files notification is sent from the client to the server when\n * files were renamed from within the client.\n *\n * @since 3.16.0\n */\nvar DidRenameFilesNotification;\n(function (DidRenameFilesNotification) {\n DidRenameFilesNotification.method = 'workspace/didRenameFiles';\n DidRenameFilesNotification.type = new messages_1.ProtocolNotificationType(DidRenameFilesNotification.method);\n})(DidRenameFilesNotification = exports.DidRenameFilesNotification || (exports.DidRenameFilesNotification = {}));\n/**\n * The will delete files request is sent from the client to the server before files are actually\n * deleted as long as the deletion is triggered from within the client.\n *\n * @since 3.16.0\n */\nvar DidDeleteFilesNotification;\n(function (DidDeleteFilesNotification) {\n DidDeleteFilesNotification.method = 'workspace/didDeleteFiles';\n DidDeleteFilesNotification.type = new messages_1.ProtocolNotificationType(DidDeleteFilesNotification.method);\n})(DidDeleteFilesNotification = exports.DidDeleteFilesNotification || (exports.DidDeleteFilesNotification = {}));\n/**\n * The did delete files notification is sent from the client to the server when\n * files were deleted from within the client.\n *\n * @since 3.16.0\n */\nvar WillDeleteFilesRequest;\n(function (WillDeleteFilesRequest) {\n WillDeleteFilesRequest.method = 'workspace/willDeleteFiles';\n WillDeleteFilesRequest.type = new messages_1.ProtocolRequestType(WillDeleteFilesRequest.method);\n})(WillDeleteFilesRequest = exports.WillDeleteFilesRequest || (exports.WillDeleteFilesRequest = {}));\n//# sourceMappingURL=protocol.fileOperations.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MonikerRequest = exports.MonikerKind = exports.UniquenessLevel = void 0;\nconst messages_1 = require(\"./messages\");\n/**\n * Moniker uniqueness level to define scope of the moniker.\n *\n * @since 3.16.0\n */\nvar UniquenessLevel;\n(function (UniquenessLevel) {\n /**\n * The moniker is only unique inside a document\n */\n UniquenessLevel.document = 'document';\n /**\n * The moniker is unique inside a project for which a dump got created\n */\n UniquenessLevel.project = 'project';\n /**\n * The moniker is unique inside the group to which a project belongs\n */\n UniquenessLevel.group = 'group';\n /**\n * The moniker is unique inside the moniker scheme.\n */\n UniquenessLevel.scheme = 'scheme';\n /**\n * The moniker is globally unique\n */\n UniquenessLevel.global = 'global';\n})(UniquenessLevel = exports.UniquenessLevel || (exports.UniquenessLevel = {}));\n/**\n * The moniker kind.\n *\n * @since 3.16.0\n */\nvar MonikerKind;\n(function (MonikerKind) {\n /**\n * The moniker represent a symbol that is imported into a project\n */\n MonikerKind.$import = 'import';\n /**\n * The moniker represents a symbol that is exported from a project\n */\n MonikerKind.$export = 'export';\n /**\n * The moniker represents a symbol that is local to a project (e.g. a local\n * variable of a function, a class not visible outside the project, ...)\n */\n MonikerKind.local = 'local';\n})(MonikerKind = exports.MonikerKind || (exports.MonikerKind = {}));\n/**\n * A request to get the moniker of a symbol at a given text document position.\n * The request parameter is of type [TextDocumentPositionParams](#TextDocumentPositionParams).\n * The response is of type [Moniker[]](#Moniker[]) or `null`.\n */\nvar MonikerRequest;\n(function (MonikerRequest) {\n MonikerRequest.method = 'textDocument/moniker';\n MonikerRequest.type = new messages_1.ProtocolRequestType(MonikerRequest.method);\n})(MonikerRequest = exports.MonikerRequest || (exports.MonikerRequest = {}));\n//# sourceMappingURL=protocol.moniker.js.map", "\"use strict\";\n/* --------------------------------------------------------------------------------------------\n * Copyright (c) TypeFox, Microsoft and others. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TypeHierarchySubtypesRequest = exports.TypeHierarchySupertypesRequest = exports.TypeHierarchyPrepareRequest = void 0;\nconst messages_1 = require(\"./messages\");\n/**\n * A request to result a `TypeHierarchyItem` in a document at a given position.\n * Can be used as an input to a subtypes or supertypes type hierarchy.\n *\n * @since 3.17.0\n */\nvar TypeHierarchyPrepareRequest;\n(function (TypeHierarchyPrepareRequest) {\n TypeHierarchyPrepareRequest.method = 'textDocument/prepareTypeHierarchy';\n TypeHierarchyPrepareRequest.type = new messages_1.ProtocolRequestType(TypeHierarchyPrepareRequest.method);\n})(TypeHierarchyPrepareRequest = exports.TypeHierarchyPrepareRequest || (exports.TypeHierarchyPrepareRequest = {}));\n/**\n * A request to resolve the supertypes for a given `TypeHierarchyItem`.\n *\n * @since 3.17.0\n */\nvar TypeHierarchySupertypesRequest;\n(function (TypeHierarchySupertypesRequest) {\n TypeHierarchySupertypesRequest.method = 'typeHierarchy/supertypes';\n TypeHierarchySupertypesRequest.type = new messages_1.ProtocolRequestType(TypeHierarchySupertypesRequest.method);\n})(TypeHierarchySupertypesRequest = exports.TypeHierarchySupertypesRequest || (exports.TypeHierarchySupertypesRequest = {}));\n/**\n * A request to resolve the subtypes for a given `TypeHierarchyItem`.\n *\n * @since 3.17.0\n */\nvar TypeHierarchySubtypesRequest;\n(function (TypeHierarchySubtypesRequest) {\n TypeHierarchySubtypesRequest.method = 'typeHierarchy/subtypes';\n TypeHierarchySubtypesRequest.type = new messages_1.ProtocolRequestType(TypeHierarchySubtypesRequest.method);\n})(TypeHierarchySubtypesRequest = exports.TypeHierarchySubtypesRequest || (exports.TypeHierarchySubtypesRequest = {}));\n//# sourceMappingURL=protocol.typeHierarchy.js.map", "\"use strict\";\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 *--------------------------------------------------------------------------------------------*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InlineValueRefreshRequest = exports.InlineValueRequest = void 0;\nconst messages_1 = require(\"./messages\");\n/**\n * A request to provide inline values in a document. The request's parameter is of\n * type [InlineValueParams](#InlineValueParams), the response is of type\n * [InlineValue[]](#InlineValue[]) or a Thenable that resolves to such.\n *\n * @since 3.17.0\n */\nvar InlineValueRequest;\n(function (InlineValueRequest) {\n InlineValueRequest.method = 'textDocument/inlineValue';\n InlineValueRequest.type = new messages_1.ProtocolRequestType(InlineValueRequest.method);\n})(InlineValueRequest = exports.InlineValueRequest || (exports.InlineValueRequest = {}));\n/**\n * @since 3.17.0\n */\nvar InlineValueRefreshRequest;\n(function (InlineValueRefreshRequest) {\n InlineValueRefreshRequest.method = `workspace/inlineValue/refresh`;\n InlineValueRefreshRequest.type = new messages_1.ProtocolRequestType0(InlineValueRefreshRequest.method);\n})(InlineValueRefreshRequest = exports.InlineValueRefreshRequest || (exports.InlineValueRefreshRequest = {}));\n//# sourceMappingURL=protocol.inlineValue.js.map", "\"use strict\";\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 *--------------------------------------------------------------------------------------------*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InlayHintRefreshRequest = exports.InlayHintResolveRequest = exports.InlayHintRequest = void 0;\nconst messages_1 = require(\"./messages\");\n/**\n * A request to provide inlay hints in a document. The request's parameter is of\n * type [InlayHintsParams](#InlayHintsParams), the response is of type\n * [InlayHint[]](#InlayHint[]) or a Thenable that resolves to such.\n *\n * @since 3.17.0\n */\nvar InlayHintRequest;\n(function (InlayHintRequest) {\n InlayHintRequest.method = 'textDocument/inlayHint';\n InlayHintRequest.type = new messages_1.ProtocolRequestType(InlayHintRequest.method);\n})(InlayHintRequest = exports.InlayHintRequest || (exports.InlayHintRequest = {}));\n/**\n * A request to resolve additional properties for a inlay hint.\n * The request's parameter is of type [InlayHint](#InlayHint), the response is\n * of type [InlayHint](#InlayHint) or a Thenable that resolves to such.\n *\n * @since 3.17.0\n */\nvar InlayHintResolveRequest;\n(function (InlayHintResolveRequest) {\n InlayHintResolveRequest.method = 'inlayHint/resolve';\n InlayHintResolveRequest.type = new messages_1.ProtocolRequestType(InlayHintResolveRequest.method);\n})(InlayHintResolveRequest = exports.InlayHintResolveRequest || (exports.InlayHintResolveRequest = {}));\n/**\n * @since 3.17.0\n */\nvar InlayHintRefreshRequest;\n(function (InlayHintRefreshRequest) {\n InlayHintRefreshRequest.method = `workspace/inlayHint/refresh`;\n InlayHintRefreshRequest.type = new messages_1.ProtocolRequestType0(InlayHintRefreshRequest.method);\n})(InlayHintRefreshRequest = exports.InlayHintRefreshRequest || (exports.InlayHintRefreshRequest = {}));\n//# sourceMappingURL=protocol.inlayHint.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiagnosticRefreshRequest = exports.WorkspaceDiagnosticRequest = exports.DocumentDiagnosticRequest = exports.DocumentDiagnosticReportKind = exports.DiagnosticServerCancellationData = void 0;\nconst vscode_jsonrpc_1 = require(\"vscode-jsonrpc\");\nconst Is = require(\"./utils/is\");\nconst messages_1 = require(\"./messages\");\n/**\n * @since 3.17.0\n */\nvar DiagnosticServerCancellationData;\n(function (DiagnosticServerCancellationData) {\n function is(value) {\n const candidate = value;\n return candidate && Is.boolean(candidate.retriggerRequest);\n }\n DiagnosticServerCancellationData.is = is;\n})(DiagnosticServerCancellationData = exports.DiagnosticServerCancellationData || (exports.DiagnosticServerCancellationData = {}));\n/**\n * The document diagnostic report kinds.\n *\n * @since 3.17.0\n */\nvar DocumentDiagnosticReportKind;\n(function (DocumentDiagnosticReportKind) {\n /**\n * A diagnostic report with a full\n * set of problems.\n */\n DocumentDiagnosticReportKind.Full = 'full';\n /**\n * A report indicating that the last\n * returned report is still accurate.\n */\n DocumentDiagnosticReportKind.Unchanged = 'unchanged';\n})(DocumentDiagnosticReportKind = exports.DocumentDiagnosticReportKind || (exports.DocumentDiagnosticReportKind = {}));\n/**\n * The document diagnostic request definition.\n *\n * @since 3.17.0\n */\nvar DocumentDiagnosticRequest;\n(function (DocumentDiagnosticRequest) {\n DocumentDiagnosticRequest.method = 'textDocument/diagnostic';\n DocumentDiagnosticRequest.type = new messages_1.ProtocolRequestType(DocumentDiagnosticRequest.method);\n DocumentDiagnosticRequest.partialResult = new vscode_jsonrpc_1.ProgressType();\n})(DocumentDiagnosticRequest = exports.DocumentDiagnosticRequest || (exports.DocumentDiagnosticRequest = {}));\n/**\n * The workspace diagnostic request definition.\n *\n * @since 3.17.0\n */\nvar WorkspaceDiagnosticRequest;\n(function (WorkspaceDiagnosticRequest) {\n WorkspaceDiagnosticRequest.method = 'workspace/diagnostic';\n WorkspaceDiagnosticRequest.type = new messages_1.ProtocolRequestType(WorkspaceDiagnosticRequest.method);\n WorkspaceDiagnosticRequest.partialResult = new vscode_jsonrpc_1.ProgressType();\n})(WorkspaceDiagnosticRequest = exports.WorkspaceDiagnosticRequest || (exports.WorkspaceDiagnosticRequest = {}));\n/**\n * The diagnostic refresh request definition.\n *\n * @since 3.17.0\n */\nvar DiagnosticRefreshRequest;\n(function (DiagnosticRefreshRequest) {\n DiagnosticRefreshRequest.method = `workspace/diagnostic/refresh`;\n DiagnosticRefreshRequest.type = new messages_1.ProtocolRequestType0(DiagnosticRefreshRequest.method);\n})(DiagnosticRefreshRequest = exports.DiagnosticRefreshRequest || (exports.DiagnosticRefreshRequest = {}));\n//# sourceMappingURL=protocol.diagnostic.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DidCloseNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCell = exports.ExecutionSummary = exports.NotebookCellKind = void 0;\nconst vscode_languageserver_types_1 = require(\"vscode-languageserver-types\");\nconst Is = require(\"./utils/is\");\nconst messages_1 = require(\"./messages\");\n/**\n * A notebook cell kind.\n *\n * @since 3.17.0\n */\nvar NotebookCellKind;\n(function (NotebookCellKind) {\n /**\n * A markup-cell is formatted source that is used for display.\n */\n NotebookCellKind.Markup = 1;\n /**\n * A code-cell is source code.\n */\n NotebookCellKind.Code = 2;\n function is(value) {\n return value === 1 || value === 2;\n }\n NotebookCellKind.is = is;\n})(NotebookCellKind = exports.NotebookCellKind || (exports.NotebookCellKind = {}));\nvar ExecutionSummary;\n(function (ExecutionSummary) {\n function create(executionOrder, success) {\n const result = { executionOrder };\n if (success === true || success === false) {\n result.success = success;\n }\n return result;\n }\n ExecutionSummary.create = create;\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && vscode_languageserver_types_1.uinteger.is(candidate.executionOrder) && (candidate.success === undefined || Is.boolean(candidate.success));\n }\n ExecutionSummary.is = is;\n function equals(one, other) {\n if (one === other) {\n return true;\n }\n if (one === null || one === undefined || other === null || other === undefined) {\n return false;\n }\n return one.executionOrder === other.executionOrder && one.success === other.success;\n }\n ExecutionSummary.equals = equals;\n})(ExecutionSummary = exports.ExecutionSummary || (exports.ExecutionSummary = {}));\nvar NotebookCell;\n(function (NotebookCell) {\n function create(kind, document) {\n return { kind, document };\n }\n NotebookCell.create = create;\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && NotebookCellKind.is(candidate.kind) && vscode_languageserver_types_1.DocumentUri.is(candidate.document) &&\n (candidate.metadata === undefined || Is.objectLiteral(candidate.metadata));\n }\n NotebookCell.is = is;\n function diff(one, two) {\n const result = new Set();\n if (one.document !== two.document) {\n result.add('document');\n }\n if (one.kind !== two.kind) {\n result.add('kind');\n }\n if (one.executionSummary !== two.executionSummary) {\n result.add('executionSummary');\n }\n if ((one.metadata !== undefined || two.metadata !== undefined) && !equalsMetadata(one.metadata, two.metadata)) {\n result.add('metadata');\n }\n if ((one.executionSummary !== undefined || two.executionSummary !== undefined) && !ExecutionSummary.equals(one.executionSummary, two.executionSummary)) {\n result.add('executionSummary');\n }\n return result;\n }\n NotebookCell.diff = diff;\n function equalsMetadata(one, other) {\n if (one === other) {\n return true;\n }\n if (one === null || one === undefined || other === null || other === undefined) {\n return false;\n }\n if (typeof one !== typeof other) {\n return false;\n }\n if (typeof one !== 'object') {\n return false;\n }\n const oneArray = Array.isArray(one);\n const otherArray = Array.isArray(other);\n if (oneArray !== otherArray) {\n return false;\n }\n if (oneArray && otherArray) {\n if (one.length !== other.length) {\n return false;\n }\n for (let i = 0; i < one.length; i++) {\n if (!equalsMetadata(one[i], other[i])) {\n return false;\n }\n }\n }\n if (Is.objectLiteral(one) && Is.objectLiteral(other)) {\n const oneKeys = Object.keys(one);\n const otherKeys = Object.keys(other);\n if (oneKeys.length !== otherKeys.length) {\n return false;\n }\n oneKeys.sort();\n otherKeys.sort();\n if (!equalsMetadata(oneKeys, otherKeys)) {\n return false;\n }\n for (let i = 0; i < oneKeys.length; i++) {\n const prop = oneKeys[i];\n if (!equalsMetadata(one[prop], other[prop])) {\n return false;\n }\n }\n }\n return true;\n }\n})(NotebookCell = exports.NotebookCell || (exports.NotebookCell = {}));\nvar NotebookDocument;\n(function (NotebookDocument) {\n function create(uri, notebookType, version, cells) {\n return { uri, notebookType, version, cells };\n }\n NotebookDocument.create = create;\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && Is.string(candidate.uri) && vscode_languageserver_types_1.integer.is(candidate.version) && Is.typedArray(candidate.cells, NotebookCell.is);\n }\n NotebookDocument.is = is;\n})(NotebookDocument = exports.NotebookDocument || (exports.NotebookDocument = {}));\nvar NotebookDocumentSyncRegistrationType;\n(function (NotebookDocumentSyncRegistrationType) {\n NotebookDocumentSyncRegistrationType.method = 'notebookDocument/sync';\n NotebookDocumentSyncRegistrationType.type = new messages_1.RegistrationType(NotebookDocumentSyncRegistrationType.method);\n})(NotebookDocumentSyncRegistrationType = exports.NotebookDocumentSyncRegistrationType || (exports.NotebookDocumentSyncRegistrationType = {}));\n/**\n * A notification sent when a notebook opens.\n *\n * @since 3.17.0\n */\nvar DidOpenNotebookDocumentNotification;\n(function (DidOpenNotebookDocumentNotification) {\n DidOpenNotebookDocumentNotification.method = 'notebookDocument/didOpen';\n DidOpenNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenNotebookDocumentNotification.method);\n})(DidOpenNotebookDocumentNotification = exports.DidOpenNotebookDocumentNotification || (exports.DidOpenNotebookDocumentNotification = {}));\nvar NotebookCellArrayChange;\n(function (NotebookCellArrayChange) {\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && vscode_languageserver_types_1.uinteger.is(candidate.start) && vscode_languageserver_types_1.uinteger.is(candidate.deleteCount) && (candidate.cells === undefined || Is.typedArray(candidate.cells, NotebookCell.is));\n }\n NotebookCellArrayChange.is = is;\n function create(start, deleteCount, cells) {\n const result = { start, deleteCount };\n if (cells !== undefined) {\n result.cells = cells;\n }\n return result;\n }\n NotebookCellArrayChange.create = create;\n})(NotebookCellArrayChange = exports.NotebookCellArrayChange || (exports.NotebookCellArrayChange = {}));\nvar DidChangeNotebookDocumentNotification;\n(function (DidChangeNotebookDocumentNotification) {\n DidChangeNotebookDocumentNotification.method = 'notebookDocument/didChange';\n DidChangeNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeNotebookDocumentNotification.method);\n})(DidChangeNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification || (exports.DidChangeNotebookDocumentNotification = {}));\n/**\n * A notification sent when a notebook document is saved.\n *\n * @since 3.17.0\n */\nvar DidSaveNotebookDocumentNotification;\n(function (DidSaveNotebookDocumentNotification) {\n DidSaveNotebookDocumentNotification.method = 'notebookDocument/didSave';\n DidSaveNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveNotebookDocumentNotification.method);\n})(DidSaveNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification || (exports.DidSaveNotebookDocumentNotification = {}));\n/**\n * A notification sent when a notebook closes.\n *\n * @since 3.17.0\n */\nvar DidCloseNotebookDocumentNotification;\n(function (DidCloseNotebookDocumentNotification) {\n DidCloseNotebookDocumentNotification.method = 'notebookDocument/didClose';\n DidCloseNotebookDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseNotebookDocumentNotification.method);\n})(DidCloseNotebookDocumentNotification = exports.DidCloseNotebookDocumentNotification || (exports.DidCloseNotebookDocumentNotification = {}));\n//# sourceMappingURL=protocol.notebook.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WorkspaceSymbolRequest = exports.CodeActionResolveRequest = exports.CodeActionRequest = exports.DocumentSymbolRequest = exports.DocumentHighlightRequest = exports.ReferencesRequest = exports.DefinitionRequest = exports.SignatureHelpRequest = exports.SignatureHelpTriggerKind = exports.HoverRequest = exports.CompletionResolveRequest = exports.CompletionRequest = exports.CompletionTriggerKind = exports.PublishDiagnosticsNotification = exports.WatchKind = exports.RelativePattern = exports.FileChangeType = exports.DidChangeWatchedFilesNotification = exports.WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentNotification = exports.TextDocumentSaveReason = exports.DidSaveTextDocumentNotification = exports.DidCloseTextDocumentNotification = exports.DidChangeTextDocumentNotification = exports.TextDocumentContentChangeEvent = exports.DidOpenTextDocumentNotification = exports.TextDocumentSyncKind = exports.TelemetryEventNotification = exports.LogMessageNotification = exports.ShowMessageRequest = exports.ShowMessageNotification = exports.MessageType = exports.DidChangeConfigurationNotification = exports.ExitNotification = exports.ShutdownRequest = exports.InitializedNotification = exports.InitializeErrorCodes = exports.InitializeRequest = exports.WorkDoneProgressOptions = exports.TextDocumentRegistrationOptions = exports.StaticRegistrationOptions = exports.PositionEncodingKind = exports.FailureHandlingKind = exports.ResourceOperationKind = exports.UnregistrationRequest = exports.RegistrationRequest = exports.DocumentSelector = exports.NotebookCellTextDocumentFilter = exports.NotebookDocumentFilter = exports.TextDocumentFilter = void 0;\nexports.TypeHierarchySubtypesRequest = exports.TypeHierarchyPrepareRequest = exports.MonikerRequest = exports.MonikerKind = exports.UniquenessLevel = exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.WillRenameFilesRequest = exports.DidRenameFilesNotification = exports.WillCreateFilesRequest = exports.DidCreateFilesNotification = exports.FileOperationPatternKind = exports.LinkedEditingRangeRequest = exports.ShowDocumentRequest = exports.SemanticTokensRegistrationType = exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.TokenFormat = exports.CallHierarchyPrepareRequest = exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = exports.SelectionRangeRequest = exports.DeclarationRequest = exports.FoldingRangeRequest = exports.ColorPresentationRequest = exports.DocumentColorRequest = exports.ConfigurationRequest = exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = exports.TypeDefinitionRequest = exports.ImplementationRequest = exports.ApplyWorkspaceEditRequest = exports.ExecuteCommandRequest = exports.PrepareRenameRequest = exports.RenameRequest = exports.PrepareSupportDefaultBehavior = exports.DocumentOnTypeFormattingRequest = exports.DocumentRangeFormattingRequest = exports.DocumentFormattingRequest = exports.DocumentLinkResolveRequest = exports.DocumentLinkRequest = exports.CodeLensRefreshRequest = exports.CodeLensResolveRequest = exports.CodeLensRequest = exports.WorkspaceSymbolResolveRequest = void 0;\nexports.DidCloseNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCell = exports.ExecutionSummary = exports.NotebookCellKind = exports.DiagnosticRefreshRequest = exports.WorkspaceDiagnosticRequest = exports.DocumentDiagnosticRequest = exports.DocumentDiagnosticReportKind = exports.DiagnosticServerCancellationData = exports.InlayHintRefreshRequest = exports.InlayHintResolveRequest = exports.InlayHintRequest = exports.InlineValueRefreshRequest = exports.InlineValueRequest = exports.TypeHierarchySupertypesRequest = void 0;\nconst messages_1 = require(\"./messages\");\nconst vscode_languageserver_types_1 = require(\"vscode-languageserver-types\");\nconst Is = require(\"./utils/is\");\nconst protocol_implementation_1 = require(\"./protocol.implementation\");\nObject.defineProperty(exports, \"ImplementationRequest\", { enumerable: true, get: function () { return protocol_implementation_1.ImplementationRequest; } });\nconst protocol_typeDefinition_1 = require(\"./protocol.typeDefinition\");\nObject.defineProperty(exports, \"TypeDefinitionRequest\", { enumerable: true, get: function () { return protocol_typeDefinition_1.TypeDefinitionRequest; } });\nconst protocol_workspaceFolder_1 = require(\"./protocol.workspaceFolder\");\nObject.defineProperty(exports, \"WorkspaceFoldersRequest\", { enumerable: true, get: function () { return protocol_workspaceFolder_1.WorkspaceFoldersRequest; } });\nObject.defineProperty(exports, \"DidChangeWorkspaceFoldersNotification\", { enumerable: true, get: function () { return protocol_workspaceFolder_1.DidChangeWorkspaceFoldersNotification; } });\nconst protocol_configuration_1 = require(\"./protocol.configuration\");\nObject.defineProperty(exports, \"ConfigurationRequest\", { enumerable: true, get: function () { return protocol_configuration_1.ConfigurationRequest; } });\nconst protocol_colorProvider_1 = require(\"./protocol.colorProvider\");\nObject.defineProperty(exports, \"DocumentColorRequest\", { enumerable: true, get: function () { return protocol_colorProvider_1.DocumentColorRequest; } });\nObject.defineProperty(exports, \"ColorPresentationRequest\", { enumerable: true, get: function () { return protocol_colorProvider_1.ColorPresentationRequest; } });\nconst protocol_foldingRange_1 = require(\"./protocol.foldingRange\");\nObject.defineProperty(exports, \"FoldingRangeRequest\", { enumerable: true, get: function () { return protocol_foldingRange_1.FoldingRangeRequest; } });\nconst protocol_declaration_1 = require(\"./protocol.declaration\");\nObject.defineProperty(exports, \"DeclarationRequest\", { enumerable: true, get: function () { return protocol_declaration_1.DeclarationRequest; } });\nconst protocol_selectionRange_1 = require(\"./protocol.selectionRange\");\nObject.defineProperty(exports, \"SelectionRangeRequest\", { enumerable: true, get: function () { return protocol_selectionRange_1.SelectionRangeRequest; } });\nconst protocol_progress_1 = require(\"./protocol.progress\");\nObject.defineProperty(exports, \"WorkDoneProgress\", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgress; } });\nObject.defineProperty(exports, \"WorkDoneProgressCreateRequest\", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgressCreateRequest; } });\nObject.defineProperty(exports, \"WorkDoneProgressCancelNotification\", { enumerable: true, get: function () { return protocol_progress_1.WorkDoneProgressCancelNotification; } });\nconst protocol_callHierarchy_1 = require(\"./protocol.callHierarchy\");\nObject.defineProperty(exports, \"CallHierarchyIncomingCallsRequest\", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyIncomingCallsRequest; } });\nObject.defineProperty(exports, \"CallHierarchyOutgoingCallsRequest\", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyOutgoingCallsRequest; } });\nObject.defineProperty(exports, \"CallHierarchyPrepareRequest\", { enumerable: true, get: function () { return protocol_callHierarchy_1.CallHierarchyPrepareRequest; } });\nconst protocol_semanticTokens_1 = require(\"./protocol.semanticTokens\");\nObject.defineProperty(exports, \"TokenFormat\", { enumerable: true, get: function () { return protocol_semanticTokens_1.TokenFormat; } });\nObject.defineProperty(exports, \"SemanticTokensRequest\", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRequest; } });\nObject.defineProperty(exports, \"SemanticTokensDeltaRequest\", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensDeltaRequest; } });\nObject.defineProperty(exports, \"SemanticTokensRangeRequest\", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRangeRequest; } });\nObject.defineProperty(exports, \"SemanticTokensRefreshRequest\", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRefreshRequest; } });\nObject.defineProperty(exports, \"SemanticTokensRegistrationType\", { enumerable: true, get: function () { return protocol_semanticTokens_1.SemanticTokensRegistrationType; } });\nconst protocol_showDocument_1 = require(\"./protocol.showDocument\");\nObject.defineProperty(exports, \"ShowDocumentRequest\", { enumerable: true, get: function () { return protocol_showDocument_1.ShowDocumentRequest; } });\nconst protocol_linkedEditingRange_1 = require(\"./protocol.linkedEditingRange\");\nObject.defineProperty(exports, \"LinkedEditingRangeRequest\", { enumerable: true, get: function () { return protocol_linkedEditingRange_1.LinkedEditingRangeRequest; } });\nconst protocol_fileOperations_1 = require(\"./protocol.fileOperations\");\nObject.defineProperty(exports, \"FileOperationPatternKind\", { enumerable: true, get: function () { return protocol_fileOperations_1.FileOperationPatternKind; } });\nObject.defineProperty(exports, \"DidCreateFilesNotification\", { enumerable: true, get: function () { return protocol_fileOperations_1.DidCreateFilesNotification; } });\nObject.defineProperty(exports, \"WillCreateFilesRequest\", { enumerable: true, get: function () { return protocol_fileOperations_1.WillCreateFilesRequest; } });\nObject.defineProperty(exports, \"DidRenameFilesNotification\", { enumerable: true, get: function () { return protocol_fileOperations_1.DidRenameFilesNotification; } });\nObject.defineProperty(exports, \"WillRenameFilesRequest\", { enumerable: true, get: function () { return protocol_fileOperations_1.WillRenameFilesRequest; } });\nObject.defineProperty(exports, \"DidDeleteFilesNotification\", { enumerable: true, get: function () { return protocol_fileOperations_1.DidDeleteFilesNotification; } });\nObject.defineProperty(exports, \"WillDeleteFilesRequest\", { enumerable: true, get: function () { return protocol_fileOperations_1.WillDeleteFilesRequest; } });\nconst protocol_moniker_1 = require(\"./protocol.moniker\");\nObject.defineProperty(exports, \"UniquenessLevel\", { enumerable: true, get: function () { return protocol_moniker_1.UniquenessLevel; } });\nObject.defineProperty(exports, \"MonikerKind\", { enumerable: true, get: function () { return protocol_moniker_1.MonikerKind; } });\nObject.defineProperty(exports, \"MonikerRequest\", { enumerable: true, get: function () { return protocol_moniker_1.MonikerRequest; } });\nconst protocol_typeHierarchy_1 = require(\"./protocol.typeHierarchy\");\nObject.defineProperty(exports, \"TypeHierarchyPrepareRequest\", { enumerable: true, get: function () { return protocol_typeHierarchy_1.TypeHierarchyPrepareRequest; } });\nObject.defineProperty(exports, \"TypeHierarchySubtypesRequest\", { enumerable: true, get: function () { return protocol_typeHierarchy_1.TypeHierarchySubtypesRequest; } });\nObject.defineProperty(exports, \"TypeHierarchySupertypesRequest\", { enumerable: true, get: function () { return protocol_typeHierarchy_1.TypeHierarchySupertypesRequest; } });\nconst protocol_inlineValue_1 = require(\"./protocol.inlineValue\");\nObject.defineProperty(exports, \"InlineValueRequest\", { enumerable: true, get: function () { return protocol_inlineValue_1.InlineValueRequest; } });\nObject.defineProperty(exports, \"InlineValueRefreshRequest\", { enumerable: true, get: function () { return protocol_inlineValue_1.InlineValueRefreshRequest; } });\nconst protocol_inlayHint_1 = require(\"./protocol.inlayHint\");\nObject.defineProperty(exports, \"InlayHintRequest\", { enumerable: true, get: function () { return protocol_inlayHint_1.InlayHintRequest; } });\nObject.defineProperty(exports, \"InlayHintResolveRequest\", { enumerable: true, get: function () { return protocol_inlayHint_1.InlayHintResolveRequest; } });\nObject.defineProperty(exports, \"InlayHintRefreshRequest\", { enumerable: true, get: function () { return protocol_inlayHint_1.InlayHintRefreshRequest; } });\nconst protocol_diagnostic_1 = require(\"./protocol.diagnostic\");\nObject.defineProperty(exports, \"DiagnosticServerCancellationData\", { enumerable: true, get: function () { return protocol_diagnostic_1.DiagnosticServerCancellationData; } });\nObject.defineProperty(exports, \"DocumentDiagnosticReportKind\", { enumerable: true, get: function () { return protocol_diagnostic_1.DocumentDiagnosticReportKind; } });\nObject.defineProperty(exports, \"DocumentDiagnosticRequest\", { enumerable: true, get: function () { return protocol_diagnostic_1.DocumentDiagnosticRequest; } });\nObject.defineProperty(exports, \"WorkspaceDiagnosticRequest\", { enumerable: true, get: function () { return protocol_diagnostic_1.WorkspaceDiagnosticRequest; } });\nObject.defineProperty(exports, \"DiagnosticRefreshRequest\", { enumerable: true, get: function () { return protocol_diagnostic_1.DiagnosticRefreshRequest; } });\nconst protocol_notebook_1 = require(\"./protocol.notebook\");\nObject.defineProperty(exports, \"NotebookCellKind\", { enumerable: true, get: function () { return protocol_notebook_1.NotebookCellKind; } });\nObject.defineProperty(exports, \"ExecutionSummary\", { enumerable: true, get: function () { return protocol_notebook_1.ExecutionSummary; } });\nObject.defineProperty(exports, \"NotebookCell\", { enumerable: true, get: function () { return protocol_notebook_1.NotebookCell; } });\nObject.defineProperty(exports, \"NotebookDocument\", { enumerable: true, get: function () { return protocol_notebook_1.NotebookDocument; } });\nObject.defineProperty(exports, \"NotebookDocumentSyncRegistrationType\", { enumerable: true, get: function () { return protocol_notebook_1.NotebookDocumentSyncRegistrationType; } });\nObject.defineProperty(exports, \"DidOpenNotebookDocumentNotification\", { enumerable: true, get: function () { return protocol_notebook_1.DidOpenNotebookDocumentNotification; } });\nObject.defineProperty(exports, \"NotebookCellArrayChange\", { enumerable: true, get: function () { return protocol_notebook_1.NotebookCellArrayChange; } });\nObject.defineProperty(exports, \"DidChangeNotebookDocumentNotification\", { enumerable: true, get: function () { return protocol_notebook_1.DidChangeNotebookDocumentNotification; } });\nObject.defineProperty(exports, \"DidSaveNotebookDocumentNotification\", { enumerable: true, get: function () { return protocol_notebook_1.DidSaveNotebookDocumentNotification; } });\nObject.defineProperty(exports, \"DidCloseNotebookDocumentNotification\", { enumerable: true, get: function () { return protocol_notebook_1.DidCloseNotebookDocumentNotification; } });\n// @ts-ignore: to avoid inlining LocationLink as dynamic import\nlet __noDynamicImport;\n/**\n * The TextDocumentFilter namespace provides helper functions to work with\n * [TextDocumentFilter](#TextDocumentFilter) literals.\n *\n * @since 3.17.0\n */\nvar TextDocumentFilter;\n(function (TextDocumentFilter) {\n function is(value) {\n const candidate = value;\n return Is.string(candidate.language) || Is.string(candidate.scheme) || Is.string(candidate.pattern);\n }\n TextDocumentFilter.is = is;\n})(TextDocumentFilter = exports.TextDocumentFilter || (exports.TextDocumentFilter = {}));\n/**\n * The NotebookDocumentFilter namespace provides helper functions to work with\n * [NotebookDocumentFilter](#NotebookDocumentFilter) literals.\n *\n * @since 3.17.0\n */\nvar NotebookDocumentFilter;\n(function (NotebookDocumentFilter) {\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && (Is.string(candidate.notebookType) || Is.string(candidate.scheme) || Is.string(candidate.pattern));\n }\n NotebookDocumentFilter.is = is;\n})(NotebookDocumentFilter = exports.NotebookDocumentFilter || (exports.NotebookDocumentFilter = {}));\n/**\n * The NotebookCellTextDocumentFilter namespace provides helper functions to work with\n * [NotebookCellTextDocumentFilter](#NotebookCellTextDocumentFilter) literals.\n *\n * @since 3.17.0\n */\nvar NotebookCellTextDocumentFilter;\n(function (NotebookCellTextDocumentFilter) {\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate)\n && (Is.string(candidate.notebook) || NotebookDocumentFilter.is(candidate.notebook))\n && (candidate.language === undefined || Is.string(candidate.language));\n }\n NotebookCellTextDocumentFilter.is = is;\n})(NotebookCellTextDocumentFilter = exports.NotebookCellTextDocumentFilter || (exports.NotebookCellTextDocumentFilter = {}));\n/**\n * The DocumentSelector namespace provides helper functions to work with\n * [DocumentSelector](#DocumentSelector)s.\n */\nvar DocumentSelector;\n(function (DocumentSelector) {\n function is(value) {\n if (!Array.isArray(value)) {\n return false;\n }\n for (let elem of value) {\n if (!Is.string(elem) && !TextDocumentFilter.is(elem) && !NotebookCellTextDocumentFilter.is(elem)) {\n return false;\n }\n }\n return true;\n }\n DocumentSelector.is = is;\n})(DocumentSelector = exports.DocumentSelector || (exports.DocumentSelector = {}));\n/**\n * The `client/registerCapability` request is sent from the server to the client to register a new capability\n * handler on the client side.\n */\nvar RegistrationRequest;\n(function (RegistrationRequest) {\n RegistrationRequest.type = new messages_1.ProtocolRequestType('client/registerCapability');\n})(RegistrationRequest = exports.RegistrationRequest || (exports.RegistrationRequest = {}));\n/**\n * The `client/unregisterCapability` request is sent from the server to the client to unregister a previously registered capability\n * handler on the client side.\n */\nvar UnregistrationRequest;\n(function (UnregistrationRequest) {\n UnregistrationRequest.type = new messages_1.ProtocolRequestType('client/unregisterCapability');\n})(UnregistrationRequest = exports.UnregistrationRequest || (exports.UnregistrationRequest = {}));\nvar ResourceOperationKind;\n(function (ResourceOperationKind) {\n /**\n * Supports creating new files and folders.\n */\n ResourceOperationKind.Create = 'create';\n /**\n * Supports renaming existing files and folders.\n */\n ResourceOperationKind.Rename = 'rename';\n /**\n * Supports deleting existing files and folders.\n */\n ResourceOperationKind.Delete = 'delete';\n})(ResourceOperationKind = exports.ResourceOperationKind || (exports.ResourceOperationKind = {}));\nvar FailureHandlingKind;\n(function (FailureHandlingKind) {\n /**\n * Applying the workspace change is simply aborted if one of the changes provided\n * fails. All operations executed before the failing operation stay executed.\n */\n FailureHandlingKind.Abort = 'abort';\n /**\n * All operations are executed transactional. That means they either all\n * succeed or no changes at all are applied to the workspace.\n */\n FailureHandlingKind.Transactional = 'transactional';\n /**\n * If the workspace edit contains only textual file changes they are executed transactional.\n * If resource changes (create, rename or delete file) are part of the change the failure\n * handling strategy is abort.\n */\n FailureHandlingKind.TextOnlyTransactional = 'textOnlyTransactional';\n /**\n * The client tries to undo the operations already executed. But there is no\n * guarantee that this is succeeding.\n */\n FailureHandlingKind.Undo = 'undo';\n})(FailureHandlingKind = exports.FailureHandlingKind || (exports.FailureHandlingKind = {}));\n/**\n * A set of predefined position encoding kinds.\n *\n * @since 3.17.0\n */\nvar PositionEncodingKind;\n(function (PositionEncodingKind) {\n /**\n * Character offsets count UTF-8 code units.\n */\n PositionEncodingKind.UTF8 = 'utf-8';\n /**\n * Character offsets count UTF-16 code units.\n *\n * This is the default and must always be supported\n * by servers\n */\n PositionEncodingKind.UTF16 = 'utf-16';\n /**\n * Character offsets count UTF-32 code units.\n *\n * Implementation note: these are the same as Unicode code points,\n * so this `PositionEncodingKind` may also be used for an\n * encoding-agnostic representation of character offsets.\n */\n PositionEncodingKind.UTF32 = 'utf-32';\n})(PositionEncodingKind = exports.PositionEncodingKind || (exports.PositionEncodingKind = {}));\n/**\n * The StaticRegistrationOptions namespace provides helper functions to work with\n * [StaticRegistrationOptions](#StaticRegistrationOptions) literals.\n */\nvar StaticRegistrationOptions;\n(function (StaticRegistrationOptions) {\n function hasId(value) {\n const candidate = value;\n return candidate && Is.string(candidate.id) && candidate.id.length > 0;\n }\n StaticRegistrationOptions.hasId = hasId;\n})(StaticRegistrationOptions = exports.StaticRegistrationOptions || (exports.StaticRegistrationOptions = {}));\n/**\n * The TextDocumentRegistrationOptions namespace provides helper functions to work with\n * [TextDocumentRegistrationOptions](#TextDocumentRegistrationOptions) literals.\n */\nvar TextDocumentRegistrationOptions;\n(function (TextDocumentRegistrationOptions) {\n function is(value) {\n const candidate = value;\n return candidate && (candidate.documentSelector === null || DocumentSelector.is(candidate.documentSelector));\n }\n TextDocumentRegistrationOptions.is = is;\n})(TextDocumentRegistrationOptions = exports.TextDocumentRegistrationOptions || (exports.TextDocumentRegistrationOptions = {}));\n/**\n * The WorkDoneProgressOptions namespace provides helper functions to work with\n * [WorkDoneProgressOptions](#WorkDoneProgressOptions) literals.\n */\nvar WorkDoneProgressOptions;\n(function (WorkDoneProgressOptions) {\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && (candidate.workDoneProgress === undefined || Is.boolean(candidate.workDoneProgress));\n }\n WorkDoneProgressOptions.is = is;\n function hasWorkDoneProgress(value) {\n const candidate = value;\n return candidate && Is.boolean(candidate.workDoneProgress);\n }\n WorkDoneProgressOptions.hasWorkDoneProgress = hasWorkDoneProgress;\n})(WorkDoneProgressOptions = exports.WorkDoneProgressOptions || (exports.WorkDoneProgressOptions = {}));\n/**\n * The initialize request is sent from the client to the server.\n * It is sent once as the request after starting up the server.\n * The requests parameter is of type [InitializeParams](#InitializeParams)\n * the response if of type [InitializeResult](#InitializeResult) of a Thenable that\n * resolves to such.\n */\nvar InitializeRequest;\n(function (InitializeRequest) {\n InitializeRequest.type = new messages_1.ProtocolRequestType('initialize');\n})(InitializeRequest = exports.InitializeRequest || (exports.InitializeRequest = {}));\n/**\n * Known error codes for an `InitializeErrorCodes`;\n */\nvar InitializeErrorCodes;\n(function (InitializeErrorCodes) {\n /**\n * If the protocol version provided by the client can't be handled by the server.\n *\n * @deprecated This initialize error got replaced by client capabilities. There is\n * no version handshake in version 3.0x\n */\n InitializeErrorCodes.unknownProtocolVersion = 1;\n})(InitializeErrorCodes = exports.InitializeErrorCodes || (exports.InitializeErrorCodes = {}));\n/**\n * The initialized notification is sent from the client to the\n * server after the client is fully initialized and the server\n * is allowed to send requests from the server to the client.\n */\nvar InitializedNotification;\n(function (InitializedNotification) {\n InitializedNotification.type = new messages_1.ProtocolNotificationType('initialized');\n})(InitializedNotification = exports.InitializedNotification || (exports.InitializedNotification = {}));\n//---- Shutdown Method ----\n/**\n * A shutdown request is sent from the client to the server.\n * It is sent once when the client decides to shutdown the\n * server. The only notification that is sent after a shutdown request\n * is the exit event.\n */\nvar ShutdownRequest;\n(function (ShutdownRequest) {\n ShutdownRequest.type = new messages_1.ProtocolRequestType0('shutdown');\n})(ShutdownRequest = exports.ShutdownRequest || (exports.ShutdownRequest = {}));\n//---- Exit Notification ----\n/**\n * The exit event is sent from the client to the server to\n * ask the server to exit its process.\n */\nvar ExitNotification;\n(function (ExitNotification) {\n ExitNotification.type = new messages_1.ProtocolNotificationType0('exit');\n})(ExitNotification = exports.ExitNotification || (exports.ExitNotification = {}));\n/**\n * The configuration change notification is sent from the client to the server\n * when the client's configuration has changed. The notification contains\n * the changed configuration as defined by the language client.\n */\nvar DidChangeConfigurationNotification;\n(function (DidChangeConfigurationNotification) {\n DidChangeConfigurationNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeConfiguration');\n})(DidChangeConfigurationNotification = exports.DidChangeConfigurationNotification || (exports.DidChangeConfigurationNotification = {}));\n//---- Message show and log notifications ----\n/**\n * The message type\n */\nvar MessageType;\n(function (MessageType) {\n /**\n * An error message.\n */\n MessageType.Error = 1;\n /**\n * A warning message.\n */\n MessageType.Warning = 2;\n /**\n * An information message.\n */\n MessageType.Info = 3;\n /**\n * A log message.\n */\n MessageType.Log = 4;\n})(MessageType = exports.MessageType || (exports.MessageType = {}));\n/**\n * The show message notification is sent from a server to a client to ask\n * the client to display a particular message in the user interface.\n */\nvar ShowMessageNotification;\n(function (ShowMessageNotification) {\n ShowMessageNotification.type = new messages_1.ProtocolNotificationType('window/showMessage');\n})(ShowMessageNotification = exports.ShowMessageNotification || (exports.ShowMessageNotification = {}));\n/**\n * The show message request is sent from the server to the client to show a message\n * and a set of options actions to the user.\n */\nvar ShowMessageRequest;\n(function (ShowMessageRequest) {\n ShowMessageRequest.type = new messages_1.ProtocolRequestType('window/showMessageRequest');\n})(ShowMessageRequest = exports.ShowMessageRequest || (exports.ShowMessageRequest = {}));\n/**\n * The log message notification is sent from the server to the client to ask\n * the client to log a particular message.\n */\nvar LogMessageNotification;\n(function (LogMessageNotification) {\n LogMessageNotification.type = new messages_1.ProtocolNotificationType('window/logMessage');\n})(LogMessageNotification = exports.LogMessageNotification || (exports.LogMessageNotification = {}));\n//---- Telemetry notification\n/**\n * The telemetry event notification is sent from the server to the client to ask\n * the client to log telemetry data.\n */\nvar TelemetryEventNotification;\n(function (TelemetryEventNotification) {\n TelemetryEventNotification.type = new messages_1.ProtocolNotificationType('telemetry/event');\n})(TelemetryEventNotification = exports.TelemetryEventNotification || (exports.TelemetryEventNotification = {}));\n/**\n * Defines how the host (editor) should sync\n * document changes to the language server.\n */\nvar TextDocumentSyncKind;\n(function (TextDocumentSyncKind) {\n /**\n * Documents should not be synced at all.\n */\n TextDocumentSyncKind.None = 0;\n /**\n * Documents are synced by always sending the full content\n * of the document.\n */\n TextDocumentSyncKind.Full = 1;\n /**\n * Documents are synced by sending the full content on open.\n * After that only incremental updates to the document are\n * send.\n */\n TextDocumentSyncKind.Incremental = 2;\n})(TextDocumentSyncKind = exports.TextDocumentSyncKind || (exports.TextDocumentSyncKind = {}));\n/**\n * The document open notification is sent from the client to the server to signal\n * newly opened text documents. The document's truth is now managed by the client\n * and the server must not try to read the document's truth using the document's\n * uri. Open in this sense means it is managed by the client. It doesn't necessarily\n * mean that its content is presented in an editor. An open notification must not\n * be sent more than once without a corresponding close notification send before.\n * This means open and close notification must be balanced and the max open count\n * is one.\n */\nvar DidOpenTextDocumentNotification;\n(function (DidOpenTextDocumentNotification) {\n DidOpenTextDocumentNotification.method = 'textDocument/didOpen';\n DidOpenTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidOpenTextDocumentNotification.method);\n})(DidOpenTextDocumentNotification = exports.DidOpenTextDocumentNotification || (exports.DidOpenTextDocumentNotification = {}));\nvar TextDocumentContentChangeEvent;\n(function (TextDocumentContentChangeEvent) {\n /**\n * Checks whether the information describes a delta event.\n */\n function isIncremental(event) {\n let candidate = event;\n return candidate !== undefined && candidate !== null &&\n typeof candidate.text === 'string' && candidate.range !== undefined &&\n (candidate.rangeLength === undefined || typeof candidate.rangeLength === 'number');\n }\n TextDocumentContentChangeEvent.isIncremental = isIncremental;\n /**\n * Checks whether the information describes a full replacement event.\n */\n function isFull(event) {\n let candidate = event;\n return candidate !== undefined && candidate !== null &&\n typeof candidate.text === 'string' && candidate.range === undefined && candidate.rangeLength === undefined;\n }\n TextDocumentContentChangeEvent.isFull = isFull;\n})(TextDocumentContentChangeEvent = exports.TextDocumentContentChangeEvent || (exports.TextDocumentContentChangeEvent = {}));\n/**\n * The document change notification is sent from the client to the server to signal\n * changes to a text document.\n */\nvar DidChangeTextDocumentNotification;\n(function (DidChangeTextDocumentNotification) {\n DidChangeTextDocumentNotification.method = 'textDocument/didChange';\n DidChangeTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidChangeTextDocumentNotification.method);\n})(DidChangeTextDocumentNotification = exports.DidChangeTextDocumentNotification || (exports.DidChangeTextDocumentNotification = {}));\n/**\n * The document close notification is sent from the client to the server when\n * the document got closed in the client. The document's truth now exists where\n * the document's uri points to (e.g. if the document's uri is a file uri the\n * truth now exists on disk). As with the open notification the close notification\n * is about managing the document's content. Receiving a close notification\n * doesn't mean that the document was open in an editor before. A close\n * notification requires a previous open notification to be sent.\n */\nvar DidCloseTextDocumentNotification;\n(function (DidCloseTextDocumentNotification) {\n DidCloseTextDocumentNotification.method = 'textDocument/didClose';\n DidCloseTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidCloseTextDocumentNotification.method);\n})(DidCloseTextDocumentNotification = exports.DidCloseTextDocumentNotification || (exports.DidCloseTextDocumentNotification = {}));\n/**\n * The document save notification is sent from the client to the server when\n * the document got saved in the client.\n */\nvar DidSaveTextDocumentNotification;\n(function (DidSaveTextDocumentNotification) {\n DidSaveTextDocumentNotification.method = 'textDocument/didSave';\n DidSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(DidSaveTextDocumentNotification.method);\n})(DidSaveTextDocumentNotification = exports.DidSaveTextDocumentNotification || (exports.DidSaveTextDocumentNotification = {}));\n/**\n * Represents reasons why a text document is saved.\n */\nvar TextDocumentSaveReason;\n(function (TextDocumentSaveReason) {\n /**\n * Manually triggered, e.g. by the user pressing save, by starting debugging,\n * or by an API call.\n */\n TextDocumentSaveReason.Manual = 1;\n /**\n * Automatic after a delay.\n */\n TextDocumentSaveReason.AfterDelay = 2;\n /**\n * When the editor lost focus.\n */\n TextDocumentSaveReason.FocusOut = 3;\n})(TextDocumentSaveReason = exports.TextDocumentSaveReason || (exports.TextDocumentSaveReason = {}));\n/**\n * A document will save notification is sent from the client to the server before\n * the document is actually saved.\n */\nvar WillSaveTextDocumentNotification;\n(function (WillSaveTextDocumentNotification) {\n WillSaveTextDocumentNotification.method = 'textDocument/willSave';\n WillSaveTextDocumentNotification.type = new messages_1.ProtocolNotificationType(WillSaveTextDocumentNotification.method);\n})(WillSaveTextDocumentNotification = exports.WillSaveTextDocumentNotification || (exports.WillSaveTextDocumentNotification = {}));\n/**\n * A document will save request is sent from the client to the server before\n * the document is actually saved. The request can return an array of TextEdits\n * which will be applied to the text document before it is saved. Please note that\n * clients might drop results if computing the text edits took too long or if a\n * server constantly fails on this request. This is done to keep the save fast and\n * reliable.\n */\nvar WillSaveTextDocumentWaitUntilRequest;\n(function (WillSaveTextDocumentWaitUntilRequest) {\n WillSaveTextDocumentWaitUntilRequest.method = 'textDocument/willSaveWaitUntil';\n WillSaveTextDocumentWaitUntilRequest.type = new messages_1.ProtocolRequestType(WillSaveTextDocumentWaitUntilRequest.method);\n})(WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentWaitUntilRequest || (exports.WillSaveTextDocumentWaitUntilRequest = {}));\n/**\n * The watched files notification is sent from the client to the server when\n * the client detects changes to file watched by the language client.\n */\nvar DidChangeWatchedFilesNotification;\n(function (DidChangeWatchedFilesNotification) {\n DidChangeWatchedFilesNotification.type = new messages_1.ProtocolNotificationType('workspace/didChangeWatchedFiles');\n})(DidChangeWatchedFilesNotification = exports.DidChangeWatchedFilesNotification || (exports.DidChangeWatchedFilesNotification = {}));\n/**\n * The file event type\n */\nvar FileChangeType;\n(function (FileChangeType) {\n /**\n * The file got created.\n */\n FileChangeType.Created = 1;\n /**\n * The file got changed.\n */\n FileChangeType.Changed = 2;\n /**\n * The file got deleted.\n */\n FileChangeType.Deleted = 3;\n})(FileChangeType = exports.FileChangeType || (exports.FileChangeType = {}));\nvar RelativePattern;\n(function (RelativePattern) {\n function is(value) {\n const candidate = value;\n return Is.objectLiteral(candidate) && (vscode_languageserver_types_1.URI.is(candidate.baseUri) || vscode_languageserver_types_1.WorkspaceFolder.is(candidate.baseUri)) && Is.string(candidate.pattern);\n }\n RelativePattern.is = is;\n})(RelativePattern = exports.RelativePattern || (exports.RelativePattern = {}));\nvar WatchKind;\n(function (WatchKind) {\n /**\n * Interested in create events.\n */\n WatchKind.Create = 1;\n /**\n * Interested in change events\n */\n WatchKind.Change = 2;\n /**\n * Interested in delete events\n */\n WatchKind.Delete = 4;\n})(WatchKind = exports.WatchKind || (exports.WatchKind = {}));\n/**\n * Diagnostics notification are sent from the server to the client to signal\n * results of validation runs.\n */\nvar PublishDiagnosticsNotification;\n(function (PublishDiagnosticsNotification) {\n PublishDiagnosticsNotification.type = new messages_1.ProtocolNotificationType('textDocument/publishDiagnostics');\n})(PublishDiagnosticsNotification = exports.PublishDiagnosticsNotification || (exports.PublishDiagnosticsNotification = {}));\n/**\n * How a completion was triggered\n */\nvar CompletionTriggerKind;\n(function (CompletionTriggerKind) {\n /**\n * Completion was triggered by typing an identifier (24x7 code\n * complete), manual invocation (e.g Ctrl+Space) or via API.\n */\n CompletionTriggerKind.Invoked = 1;\n /**\n * Completion was triggered by a trigger character specified by\n * the `triggerCharacters` properties of the `CompletionRegistrationOptions`.\n */\n CompletionTriggerKind.TriggerCharacter = 2;\n /**\n * Completion was re-triggered as current completion list is incomplete\n */\n CompletionTriggerKind.TriggerForIncompleteCompletions = 3;\n})(CompletionTriggerKind = exports.CompletionTriggerKind || (exports.CompletionTriggerKind = {}));\n/**\n * Request to request completion at a given text document position. The request's\n * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response\n * is of type [CompletionItem[]](#CompletionItem) or [CompletionList](#CompletionList)\n * or a Thenable that resolves to such.\n *\n * The request can delay the computation of the [`detail`](#CompletionItem.detail)\n * and [`documentation`](#CompletionItem.documentation) properties to the `completionItem/resolve`\n * request. However, properties that are needed for the initial sorting and filtering, like `sortText`,\n * `filterText`, `insertText`, and `textEdit`, must not be changed during resolve.\n */\nvar CompletionRequest;\n(function (CompletionRequest) {\n CompletionRequest.method = 'textDocument/completion';\n CompletionRequest.type = new messages_1.ProtocolRequestType(CompletionRequest.method);\n})(CompletionRequest = exports.CompletionRequest || (exports.CompletionRequest = {}));\n/**\n * Request to resolve additional information for a given completion item.The request's\n * parameter is of type [CompletionItem](#CompletionItem) the response\n * is of type [CompletionItem](#CompletionItem) or a Thenable that resolves to such.\n */\nvar CompletionResolveRequest;\n(function (CompletionResolveRequest) {\n CompletionResolveRequest.method = 'completionItem/resolve';\n CompletionResolveRequest.type = new messages_1.ProtocolRequestType(CompletionResolveRequest.method);\n})(CompletionResolveRequest = exports.CompletionResolveRequest || (exports.CompletionResolveRequest = {}));\n/**\n * Request to request hover information at a given text document position. The request's\n * parameter is of type [TextDocumentPosition](#TextDocumentPosition) the response is of\n * type [Hover](#Hover) or a Thenable that resolves to such.\n */\nvar HoverRequest;\n(function (HoverRequest) {\n HoverRequest.method = 'textDocument/hover';\n HoverRequest.type = new messages_1.ProtocolRequestType(HoverRequest.method);\n})(HoverRequest = exports.HoverRequest || (exports.HoverRequest = {}));\n/**\n * How a signature help was triggered.\n *\n * @since 3.15.0\n */\nvar SignatureHelpTriggerKind;\n(function (SignatureHelpTriggerKind) {\n /**\n * Signature help was invoked manually by the user or by a command.\n */\n SignatureHelpTriggerKind.Invoked = 1;\n /**\n * Signature help was triggered by a trigger character.\n */\n SignatureHelpTriggerKind.TriggerCharacter = 2;\n /**\n * Signature help was triggered by the cursor moving or by the document content changing.\n */\n SignatureHelpTriggerKind.ContentChange = 3;\n})(SignatureHelpTriggerKind = exports.SignatureHelpTriggerKind || (exports.SignatureHelpTriggerKind = {}));\nvar SignatureHelpRequest;\n(function (SignatureHelpRequest) {\n SignatureHelpRequest.method = 'textDocument/signatureHelp';\n SignatureHelpRequest.type = new messages_1.ProtocolRequestType(SignatureHelpRequest.method);\n})(SignatureHelpRequest = exports.SignatureHelpRequest || (exports.SignatureHelpRequest = {}));\n/**\n * A request to resolve the definition location of a symbol at a given text\n * document position. The request's parameter is of type [TextDocumentPosition]\n * (#TextDocumentPosition) the response is of either type [Definition](#Definition)\n * or a typed array of [DefinitionLink](#DefinitionLink) or a Thenable that resolves\n * to such.\n */\nvar DefinitionRequest;\n(function (DefinitionRequest) {\n DefinitionRequest.method = 'textDocument/definition';\n DefinitionRequest.type = new messages_1.ProtocolRequestType(DefinitionRequest.method);\n})(DefinitionRequest = exports.DefinitionRequest || (exports.DefinitionRequest = {}));\n/**\n * A request to resolve project-wide references for the symbol denoted\n * by the given text document position. The request's parameter is of\n * type [ReferenceParams](#ReferenceParams) the response is of type\n * [Location[]](#Location) or a Thenable that resolves to such.\n */\nvar ReferencesRequest;\n(function (ReferencesRequest) {\n ReferencesRequest.method = 'textDocument/references';\n ReferencesRequest.type = new messages_1.ProtocolRequestType(ReferencesRequest.method);\n})(ReferencesRequest = exports.ReferencesRequest || (exports.ReferencesRequest = {}));\n/**\n * Request to resolve a [DocumentHighlight](#DocumentHighlight) for a given\n * text document position. The request's parameter is of type [TextDocumentPosition]\n * (#TextDocumentPosition) the request response is of type [DocumentHighlight[]]\n * (#DocumentHighlight) or a Thenable that resolves to such.\n */\nvar DocumentHighlightRequest;\n(function (DocumentHighlightRequest) {\n DocumentHighlightRequest.method = 'textDocument/documentHighlight';\n DocumentHighlightRequest.type = new messages_1.ProtocolRequestType(DocumentHighlightRequest.method);\n})(DocumentHighlightRequest = exports.DocumentHighlightRequest || (exports.DocumentHighlightRequest = {}));\n/**\n * A request to list all symbols found in a given text document. The request's\n * parameter is of type [TextDocumentIdentifier](#TextDocumentIdentifier) the\n * response is of type [SymbolInformation[]](#SymbolInformation) or a Thenable\n * that resolves to such.\n */\nvar DocumentSymbolRequest;\n(function (DocumentSymbolRequest) {\n DocumentSymbolRequest.method = 'textDocument/documentSymbol';\n DocumentSymbolRequest.type = new messages_1.ProtocolRequestType(DocumentSymbolRequest.method);\n})(DocumentSymbolRequest = exports.DocumentSymbolRequest || (exports.DocumentSymbolRequest = {}));\n/**\n * A request to provide commands for the given text document and range.\n */\nvar CodeActionRequest;\n(function (CodeActionRequest) {\n CodeActionRequest.method = 'textDocument/codeAction';\n CodeActionRequest.type = new messages_1.ProtocolRequestType(CodeActionRequest.method);\n})(CodeActionRequest = exports.CodeActionRequest || (exports.CodeActionRequest = {}));\n/**\n * Request to resolve additional information for a given code action.The request's\n * parameter is of type [CodeAction](#CodeAction) the response\n * is of type [CodeAction](#CodeAction) or a Thenable that resolves to such.\n */\nvar CodeActionResolveRequest;\n(function (CodeActionResolveRequest) {\n CodeActionResolveRequest.method = 'codeAction/resolve';\n CodeActionResolveRequest.type = new messages_1.ProtocolRequestType(CodeActionResolveRequest.method);\n})(CodeActionResolveRequest = exports.CodeActionResolveRequest || (exports.CodeActionResolveRequest = {}));\n/**\n * A request to list project-wide symbols matching the query string given\n * by the [WorkspaceSymbolParams](#WorkspaceSymbolParams). The response is\n * of type [SymbolInformation[]](#SymbolInformation) or a Thenable that\n * resolves to such.\n *\n * @since 3.17.0 - support for WorkspaceSymbol in the returned data. Clients\n * need to advertise support for WorkspaceSymbols via the client capability\n * `workspace.symbol.resolveSupport`.\n *\n */\nvar WorkspaceSymbolRequest;\n(function (WorkspaceSymbolRequest) {\n WorkspaceSymbolRequest.method = 'workspace/symbol';\n WorkspaceSymbolRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolRequest.method);\n})(WorkspaceSymbolRequest = exports.WorkspaceSymbolRequest || (exports.WorkspaceSymbolRequest = {}));\n/**\n * A request to resolve the range inside the workspace\n * symbol's location.\n *\n * @since 3.17.0\n */\nvar WorkspaceSymbolResolveRequest;\n(function (WorkspaceSymbolResolveRequest) {\n WorkspaceSymbolResolveRequest.method = 'workspaceSymbol/resolve';\n WorkspaceSymbolResolveRequest.type = new messages_1.ProtocolRequestType(WorkspaceSymbolResolveRequest.method);\n})(WorkspaceSymbolResolveRequest = exports.WorkspaceSymbolResolveRequest || (exports.WorkspaceSymbolResolveRequest = {}));\n/**\n * A request to provide code lens for the given text document.\n */\nvar CodeLensRequest;\n(function (CodeLensRequest) {\n CodeLensRequest.method = 'textDocument/codeLens';\n CodeLensRequest.type = new messages_1.ProtocolRequestType(CodeLensRequest.method);\n})(CodeLensRequest = exports.CodeLensRequest || (exports.CodeLensRequest = {}));\n/**\n * A request to resolve a command for a given code lens.\n */\nvar CodeLensResolveRequest;\n(function (CodeLensResolveRequest) {\n CodeLensResolveRequest.method = 'codeLens/resolve';\n CodeLensResolveRequest.type = new messages_1.ProtocolRequestType(CodeLensResolveRequest.method);\n})(CodeLensResolveRequest = exports.CodeLensResolveRequest || (exports.CodeLensResolveRequest = {}));\n/**\n * A request to refresh all code actions\n *\n * @since 3.16.0\n */\nvar CodeLensRefreshRequest;\n(function (CodeLensRefreshRequest) {\n CodeLensRefreshRequest.method = `workspace/codeLens/refresh`;\n CodeLensRefreshRequest.type = new messages_1.ProtocolRequestType0(CodeLensRefreshRequest.method);\n})(CodeLensRefreshRequest = exports.CodeLensRefreshRequest || (exports.CodeLensRefreshRequest = {}));\n/**\n * A request to provide document links\n */\nvar DocumentLinkRequest;\n(function (DocumentLinkRequest) {\n DocumentLinkRequest.method = 'textDocument/documentLink';\n DocumentLinkRequest.type = new messages_1.ProtocolRequestType(DocumentLinkRequest.method);\n})(DocumentLinkRequest = exports.DocumentLinkRequest || (exports.DocumentLinkRequest = {}));\n/**\n * Request to resolve additional information for a given document link. The request's\n * parameter is of type [DocumentLink](#DocumentLink) the response\n * is of type [DocumentLink](#DocumentLink) or a Thenable that resolves to such.\n */\nvar DocumentLinkResolveRequest;\n(function (DocumentLinkResolveRequest) {\n DocumentLinkResolveRequest.method = 'documentLink/resolve';\n DocumentLinkResolveRequest.type = new messages_1.ProtocolRequestType(DocumentLinkResolveRequest.method);\n})(DocumentLinkResolveRequest = exports.DocumentLinkResolveRequest || (exports.DocumentLinkResolveRequest = {}));\n/**\n * A request to to format a whole document.\n */\nvar DocumentFormattingRequest;\n(function (DocumentFormattingRequest) {\n DocumentFormattingRequest.method = 'textDocument/formatting';\n DocumentFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentFormattingRequest.method);\n})(DocumentFormattingRequest = exports.DocumentFormattingRequest || (exports.DocumentFormattingRequest = {}));\n/**\n * A request to to format a range in a document.\n */\nvar DocumentRangeFormattingRequest;\n(function (DocumentRangeFormattingRequest) {\n DocumentRangeFormattingRequest.method = 'textDocument/rangeFormatting';\n DocumentRangeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentRangeFormattingRequest.method);\n})(DocumentRangeFormattingRequest = exports.DocumentRangeFormattingRequest || (exports.DocumentRangeFormattingRequest = {}));\n/**\n * A request to format a document on type.\n */\nvar DocumentOnTypeFormattingRequest;\n(function (DocumentOnTypeFormattingRequest) {\n DocumentOnTypeFormattingRequest.method = 'textDocument/onTypeFormatting';\n DocumentOnTypeFormattingRequest.type = new messages_1.ProtocolRequestType(DocumentOnTypeFormattingRequest.method);\n})(DocumentOnTypeFormattingRequest = exports.DocumentOnTypeFormattingRequest || (exports.DocumentOnTypeFormattingRequest = {}));\n//---- Rename ----------------------------------------------\nvar PrepareSupportDefaultBehavior;\n(function (PrepareSupportDefaultBehavior) {\n /**\n * The client's default behavior is to select the identifier\n * according the to language's syntax rule.\n */\n PrepareSupportDefaultBehavior.Identifier = 1;\n})(PrepareSupportDefaultBehavior = exports.PrepareSupportDefaultBehavior || (exports.PrepareSupportDefaultBehavior = {}));\n/**\n * A request to rename a symbol.\n */\nvar RenameRequest;\n(function (RenameRequest) {\n RenameRequest.method = 'textDocument/rename';\n RenameRequest.type = new messages_1.ProtocolRequestType(RenameRequest.method);\n})(RenameRequest = exports.RenameRequest || (exports.RenameRequest = {}));\n/**\n * A request to test and perform the setup necessary for a rename.\n *\n * @since 3.16 - support for default behavior\n */\nvar PrepareRenameRequest;\n(function (PrepareRenameRequest) {\n PrepareRenameRequest.method = 'textDocument/prepareRename';\n PrepareRenameRequest.type = new messages_1.ProtocolRequestType(PrepareRenameRequest.method);\n})(PrepareRenameRequest = exports.PrepareRenameRequest || (exports.PrepareRenameRequest = {}));\n/**\n * A request send from the client to the server to execute a command. The request might return\n * a workspace edit which the client will apply to the workspace.\n */\nvar ExecuteCommandRequest;\n(function (ExecuteCommandRequest) {\n ExecuteCommandRequest.type = new messages_1.ProtocolRequestType('workspace/executeCommand');\n})(ExecuteCommandRequest = exports.ExecuteCommandRequest || (exports.ExecuteCommandRequest = {}));\n/**\n * A request sent from the server to the client to modified certain resources.\n */\nvar ApplyWorkspaceEditRequest;\n(function (ApplyWorkspaceEditRequest) {\n ApplyWorkspaceEditRequest.type = new messages_1.ProtocolRequestType('workspace/applyEdit');\n})(ApplyWorkspaceEditRequest = exports.ApplyWorkspaceEditRequest || (exports.ApplyWorkspaceEditRequest = {}));\n//# sourceMappingURL=protocol.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createProtocolConnection = void 0;\nconst vscode_jsonrpc_1 = require(\"vscode-jsonrpc\");\nfunction createProtocolConnection(input, output, logger, options) {\n if (vscode_jsonrpc_1.ConnectionStrategy.is(options)) {\n options = { connectionStrategy: options };\n }\n return (0, vscode_jsonrpc_1.createMessageConnection)(input, output, logger, options);\n}\nexports.createProtocolConnection = createProtocolConnection;\n//# sourceMappingURL=connection.js.map", "\"use strict\";\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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LSPErrorCodes = exports.createProtocolConnection = void 0;\n__exportStar(require(\"vscode-jsonrpc\"), exports);\n__exportStar(require(\"vscode-languageserver-types\"), exports);\n__exportStar(require(\"./messages\"), exports);\n__exportStar(require(\"./protocol\"), exports);\nvar connection_1 = require(\"./connection\");\nObject.defineProperty(exports, \"createProtocolConnection\", { enumerable: true, get: function () { return connection_1.createProtocolConnection; } });\nvar LSPErrorCodes;\n(function (LSPErrorCodes) {\n /**\n * This is the start range of LSP reserved error codes.\n * It doesn't denote a real error code.\n *\n * @since 3.16.0\n */\n LSPErrorCodes.lspReservedErrorRangeStart = -32899;\n /**\n * A request failed but it was syntactically correct, e.g the\n * method name was known and the parameters were valid. The error\n * message should contain human readable information about why\n * the request failed.\n *\n * @since 3.17.0\n */\n LSPErrorCodes.RequestFailed = -32803;\n /**\n * The server cancelled the request. This error code should\n * only be used for requests that explicitly support being\n * server cancellable.\n *\n * @since 3.17.0\n */\n LSPErrorCodes.ServerCancelled = -32802;\n /**\n * The server detected that the content of a document got\n * modified outside normal conditions. A server should\n * NOT send this error code if it detects a content change\n * in it unprocessed messages. The result even computed\n * on an older state might still be useful for the client.\n *\n * If a client decides that a result is not of any use anymore\n * the client should cancel the request.\n */\n LSPErrorCodes.ContentModified = -32801;\n /**\n * The client has canceled a request and a server as detected\n * the cancel.\n */\n LSPErrorCodes.RequestCancelled = -32800;\n /**\n * This is the end range of LSP reserved error codes.\n * It doesn't denote a real error code.\n *\n * @since 3.16.0\n */\n LSPErrorCodes.lspReservedErrorRangeEnd = -32800;\n})(LSPErrorCodes = exports.LSPErrorCodes || (exports.LSPErrorCodes = {}));\n//# sourceMappingURL=api.js.map", "\"use strict\";\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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createProtocolConnection = void 0;\nconst node_1 = require(\"vscode-jsonrpc/node\");\n__exportStar(require(\"vscode-jsonrpc/node\"), exports);\n__exportStar(require(\"../common/api\"), exports);\nfunction createProtocolConnection(input, output, logger, options) {\n return (0, node_1.createMessageConnection)(input, output, logger, options);\n}\nexports.createProtocolConnection = createProtocolConnection;\n//# sourceMappingURL=main.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.thenable = exports.typedArray = exports.stringArray = exports.array = exports.func = exports.error = exports.number = exports.string = exports.boolean = void 0;\nfunction boolean(value) {\n return value === true || value === false;\n}\nexports.boolean = boolean;\nfunction string(value) {\n return typeof value === 'string' || value instanceof String;\n}\nexports.string = string;\nfunction number(value) {\n return typeof value === 'number' || value instanceof Number;\n}\nexports.number = number;\nfunction error(value) {\n return value instanceof Error;\n}\nexports.error = error;\nfunction func(value) {\n return typeof value === 'function';\n}\nexports.func = func;\nfunction array(value) {\n return Array.isArray(value);\n}\nexports.array = array;\nfunction stringArray(value) {\n return array(value) && value.every(elem => string(elem));\n}\nexports.stringArray = stringArray;\nfunction typedArray(value, check) {\n return Array.isArray(value) && value.every(check);\n}\nexports.typedArray = typedArray;\nfunction thenable(value) {\n return value && func(value.then);\n}\nexports.thenable = thenable;\n//# sourceMappingURL=is.js.map", "\"use strict\";\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 *--------------------------------------------------------------------------------------------*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.generateUuid = exports.parse = exports.isUUID = exports.v4 = exports.empty = void 0;\nclass ValueUUID {\n constructor(_value) {\n this._value = _value;\n // empty\n }\n asHex() {\n return this._value;\n }\n equals(other) {\n return this.asHex() === other.asHex();\n }\n}\nclass V4UUID extends ValueUUID {\n constructor() {\n super([\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n '-',\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n '-',\n '4',\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n '-',\n V4UUID._oneOf(V4UUID._timeHighBits),\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n '-',\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n V4UUID._randomHex(),\n ].join(''));\n }\n static _oneOf(array) {\n return array[Math.floor(array.length * Math.random())];\n }\n static _randomHex() {\n return V4UUID._oneOf(V4UUID._chars);\n }\n}\nV4UUID._chars = ['0', '1', '2', '3', '4', '5', '6', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'];\nV4UUID._timeHighBits = ['8', '9', 'a', 'b'];\n/**\n * An empty UUID that contains only zeros.\n */\nexports.empty = new ValueUUID('00000000-0000-0000-0000-000000000000');\nfunction v4() {\n return new V4UUID();\n}\nexports.v4 = v4;\nconst _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;\nfunction isUUID(value) {\n return _UUIDPattern.test(value);\n}\nexports.isUUID = isUUID;\n/**\n * Parses a UUID that is of the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.\n * @param value A uuid string.\n */\nfunction parse(value) {\n if (!isUUID(value)) {\n throw new Error('invalid uuid');\n }\n return new ValueUUID(value);\n}\nexports.parse = parse;\nfunction generateUuid() {\n return v4().asHex();\n}\nexports.generateUuid = generateUuid;\n//# sourceMappingURL=uuid.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.attachPartialResult = exports.ProgressFeature = exports.attachWorkDone = void 0;\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst uuid_1 = require(\"./utils/uuid\");\nclass WorkDoneProgressReporterImpl {\n constructor(_connection, _token) {\n this._connection = _connection;\n this._token = _token;\n WorkDoneProgressReporterImpl.Instances.set(this._token, this);\n }\n begin(title, percentage, message, cancellable) {\n let param = {\n kind: 'begin',\n title,\n percentage,\n message,\n cancellable\n };\n this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param);\n }\n report(arg0, arg1) {\n let param = {\n kind: 'report'\n };\n if (typeof arg0 === 'number') {\n param.percentage = arg0;\n if (arg1 !== undefined) {\n param.message = arg1;\n }\n }\n else {\n param.message = arg0;\n }\n this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, param);\n }\n done() {\n WorkDoneProgressReporterImpl.Instances.delete(this._token);\n this._connection.sendProgress(vscode_languageserver_protocol_1.WorkDoneProgress.type, this._token, { kind: 'end' });\n }\n}\nWorkDoneProgressReporterImpl.Instances = new Map();\nclass WorkDoneProgressServerReporterImpl extends WorkDoneProgressReporterImpl {\n constructor(connection, token) {\n super(connection, token);\n this._source = new vscode_languageserver_protocol_1.CancellationTokenSource();\n }\n get token() {\n return this._source.token;\n }\n done() {\n this._source.dispose();\n super.done();\n }\n cancel() {\n this._source.cancel();\n }\n}\nclass NullProgressReporter {\n constructor() {\n }\n begin() {\n }\n report() {\n }\n done() {\n }\n}\nclass NullProgressServerReporter extends NullProgressReporter {\n constructor() {\n super();\n this._source = new vscode_languageserver_protocol_1.CancellationTokenSource();\n }\n get token() {\n return this._source.token;\n }\n done() {\n this._source.dispose();\n }\n cancel() {\n this._source.cancel();\n }\n}\nfunction attachWorkDone(connection, params) {\n if (params === undefined || params.workDoneToken === undefined) {\n return new NullProgressReporter();\n }\n const token = params.workDoneToken;\n delete params.workDoneToken;\n return new WorkDoneProgressReporterImpl(connection, token);\n}\nexports.attachWorkDone = attachWorkDone;\nconst ProgressFeature = (Base) => {\n return class extends Base {\n constructor() {\n super();\n this._progressSupported = false;\n }\n initialize(capabilities) {\n super.initialize(capabilities);\n if (capabilities?.window?.workDoneProgress === true) {\n this._progressSupported = true;\n this.connection.onNotification(vscode_languageserver_protocol_1.WorkDoneProgressCancelNotification.type, (params) => {\n let progress = WorkDoneProgressReporterImpl.Instances.get(params.token);\n if (progress instanceof WorkDoneProgressServerReporterImpl || progress instanceof NullProgressServerReporter) {\n progress.cancel();\n }\n });\n }\n }\n attachWorkDoneProgress(token) {\n if (token === undefined) {\n return new NullProgressReporter();\n }\n else {\n return new WorkDoneProgressReporterImpl(this.connection, token);\n }\n }\n createWorkDoneProgress() {\n if (this._progressSupported) {\n const token = (0, uuid_1.generateUuid)();\n return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkDoneProgressCreateRequest.type, { token }).then(() => {\n const result = new WorkDoneProgressServerReporterImpl(this.connection, token);\n return result;\n });\n }\n else {\n return Promise.resolve(new NullProgressServerReporter());\n }\n }\n };\n};\nexports.ProgressFeature = ProgressFeature;\nvar ResultProgress;\n(function (ResultProgress) {\n ResultProgress.type = new vscode_languageserver_protocol_1.ProgressType();\n})(ResultProgress || (ResultProgress = {}));\nclass ResultProgressReporterImpl {\n constructor(_connection, _token) {\n this._connection = _connection;\n this._token = _token;\n }\n report(data) {\n this._connection.sendProgress(ResultProgress.type, this._token, data);\n }\n}\nfunction attachPartialResult(connection, params) {\n if (params === undefined || params.partialResultToken === undefined) {\n return undefined;\n }\n const token = params.partialResultToken;\n delete params.partialResultToken;\n return new ResultProgressReporterImpl(connection, token);\n}\nexports.attachPartialResult = attachPartialResult;\n//# sourceMappingURL=progress.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ConfigurationFeature = void 0;\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst Is = require(\"./utils/is\");\nconst ConfigurationFeature = (Base) => {\n return class extends Base {\n getConfiguration(arg) {\n if (!arg) {\n return this._getConfiguration({});\n }\n else if (Is.string(arg)) {\n return this._getConfiguration({ section: arg });\n }\n else {\n return this._getConfiguration(arg);\n }\n }\n _getConfiguration(arg) {\n let params = {\n items: Array.isArray(arg) ? arg : [arg]\n };\n return this.connection.sendRequest(vscode_languageserver_protocol_1.ConfigurationRequest.type, params).then((result) => {\n if (Array.isArray(result)) {\n return Array.isArray(arg) ? result : result[0];\n }\n else {\n return Array.isArray(arg) ? [] : null;\n }\n });\n }\n };\n};\nexports.ConfigurationFeature = ConfigurationFeature;\n//# sourceMappingURL=configuration.js.map", "/* --------------------------------------------------------------------------------------------\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 * ------------------------------------------------------------------------------------------ */\n'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WorkspaceFoldersFeature = void 0;\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst WorkspaceFoldersFeature = (Base) => {\n return class extends Base {\n constructor() {\n super();\n this._notificationIsAutoRegistered = false;\n }\n initialize(capabilities) {\n super.initialize(capabilities);\n let workspaceCapabilities = capabilities.workspace;\n if (workspaceCapabilities && workspaceCapabilities.workspaceFolders) {\n this._onDidChangeWorkspaceFolders = new vscode_languageserver_protocol_1.Emitter();\n this.connection.onNotification(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type, (params) => {\n this._onDidChangeWorkspaceFolders.fire(params.event);\n });\n }\n }\n fillServerCapabilities(capabilities) {\n super.fillServerCapabilities(capabilities);\n const changeNotifications = capabilities.workspace?.workspaceFolders?.changeNotifications;\n this._notificationIsAutoRegistered = changeNotifications === true || typeof changeNotifications === 'string';\n }\n getWorkspaceFolders() {\n return this.connection.sendRequest(vscode_languageserver_protocol_1.WorkspaceFoldersRequest.type);\n }\n get onDidChangeWorkspaceFolders() {\n if (!this._onDidChangeWorkspaceFolders) {\n throw new Error('Client doesn\\'t support sending workspace folder change events.');\n }\n if (!this._notificationIsAutoRegistered && !this._unregistration) {\n this._unregistration = this.connection.client.register(vscode_languageserver_protocol_1.DidChangeWorkspaceFoldersNotification.type);\n }\n return this._onDidChangeWorkspaceFolders.event;\n }\n };\n};\nexports.WorkspaceFoldersFeature = WorkspaceFoldersFeature;\n//# sourceMappingURL=workspaceFolder.js.map", "/* --------------------------------------------------------------------------------------------\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 * ------------------------------------------------------------------------------------------ */\n'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CallHierarchyFeature = void 0;\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst CallHierarchyFeature = (Base) => {\n return class extends Base {\n get callHierarchy() {\n return {\n onPrepare: (handler) => {\n return this.connection.onRequest(vscode_languageserver_protocol_1.CallHierarchyPrepareRequest.type, (params, cancel) => {\n return handler(params, cancel, this.attachWorkDoneProgress(params), undefined);\n });\n },\n onIncomingCalls: (handler) => {\n const type = vscode_languageserver_protocol_1.CallHierarchyIncomingCallsRequest.type;\n return this.connection.onRequest(type, (params, cancel) => {\n return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));\n });\n },\n onOutgoingCalls: (handler) => {\n const type = vscode_languageserver_protocol_1.CallHierarchyOutgoingCallsRequest.type;\n return this.connection.onRequest(type, (params, cancel) => {\n return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));\n });\n }\n };\n }\n };\n};\nexports.CallHierarchyFeature = CallHierarchyFeature;\n//# sourceMappingURL=callHierarchy.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SemanticTokensBuilder = exports.SemanticTokensDiff = exports.SemanticTokensFeature = void 0;\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst SemanticTokensFeature = (Base) => {\n return class extends Base {\n get semanticTokens() {\n return {\n refresh: () => {\n return this.connection.sendRequest(vscode_languageserver_protocol_1.SemanticTokensRefreshRequest.type);\n },\n on: (handler) => {\n const type = vscode_languageserver_protocol_1.SemanticTokensRequest.type;\n return this.connection.onRequest(type, (params, cancel) => {\n return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));\n });\n },\n onDelta: (handler) => {\n const type = vscode_languageserver_protocol_1.SemanticTokensDeltaRequest.type;\n return this.connection.onRequest(type, (params, cancel) => {\n return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));\n });\n },\n onRange: (handler) => {\n const type = vscode_languageserver_protocol_1.SemanticTokensRangeRequest.type;\n return this.connection.onRequest(type, (params, cancel) => {\n return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));\n });\n }\n };\n }\n };\n};\nexports.SemanticTokensFeature = SemanticTokensFeature;\nclass SemanticTokensDiff {\n constructor(originalSequence, modifiedSequence) {\n this.originalSequence = originalSequence;\n this.modifiedSequence = modifiedSequence;\n }\n computeDiff() {\n const originalLength = this.originalSequence.length;\n const modifiedLength = this.modifiedSequence.length;\n let startIndex = 0;\n while (startIndex < modifiedLength && startIndex < originalLength && this.originalSequence[startIndex] === this.modifiedSequence[startIndex]) {\n startIndex++;\n }\n if (startIndex < modifiedLength && startIndex < originalLength) {\n let originalEndIndex = originalLength - 1;\n let modifiedEndIndex = modifiedLength - 1;\n while (originalEndIndex >= startIndex && modifiedEndIndex >= startIndex && this.originalSequence[originalEndIndex] === this.modifiedSequence[modifiedEndIndex]) {\n originalEndIndex--;\n modifiedEndIndex--;\n }\n // if one moved behind the start index move them forward again\n if (originalEndIndex < startIndex || modifiedEndIndex < startIndex) {\n originalEndIndex++;\n modifiedEndIndex++;\n }\n const deleteCount = originalEndIndex - startIndex + 1;\n const newData = this.modifiedSequence.slice(startIndex, modifiedEndIndex + 1);\n // If we moved behind the start index we could have missed a simple delete.\n if (newData.length === 1 && newData[0] === this.originalSequence[originalEndIndex]) {\n return [\n { start: startIndex, deleteCount: deleteCount - 1 }\n ];\n }\n else {\n return [\n { start: startIndex, deleteCount, data: newData }\n ];\n }\n }\n else if (startIndex < modifiedLength) {\n return [\n { start: startIndex, deleteCount: 0, data: this.modifiedSequence.slice(startIndex) }\n ];\n }\n else if (startIndex < originalLength) {\n return [\n { start: startIndex, deleteCount: originalLength - startIndex }\n ];\n }\n else {\n // The two arrays are the same.\n return [];\n }\n }\n}\nexports.SemanticTokensDiff = SemanticTokensDiff;\nclass SemanticTokensBuilder {\n constructor() {\n this._prevData = undefined;\n this.initialize();\n }\n initialize() {\n this._id = Date.now();\n this._prevLine = 0;\n this._prevChar = 0;\n this._data = [];\n this._dataLen = 0;\n }\n push(line, char, length, tokenType, tokenModifiers) {\n let pushLine = line;\n let pushChar = char;\n if (this._dataLen > 0) {\n pushLine -= this._prevLine;\n if (pushLine === 0) {\n pushChar -= this._prevChar;\n }\n }\n this._data[this._dataLen++] = pushLine;\n this._data[this._dataLen++] = pushChar;\n this._data[this._dataLen++] = length;\n this._data[this._dataLen++] = tokenType;\n this._data[this._dataLen++] = tokenModifiers;\n this._prevLine = line;\n this._prevChar = char;\n }\n get id() {\n return this._id.toString();\n }\n previousResult(id) {\n if (this.id === id) {\n this._prevData = this._data;\n }\n this.initialize();\n }\n build() {\n this._prevData = undefined;\n return {\n resultId: this.id,\n data: this._data\n };\n }\n canBuildEdits() {\n return this._prevData !== undefined;\n }\n buildEdits() {\n if (this._prevData !== undefined) {\n return {\n resultId: this.id,\n edits: (new SemanticTokensDiff(this._prevData, this._data)).computeDiff()\n };\n }\n else {\n return this.build();\n }\n }\n}\nexports.SemanticTokensBuilder = SemanticTokensBuilder;\n//# sourceMappingURL=semanticTokens.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ShowDocumentFeature = void 0;\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst ShowDocumentFeature = (Base) => {\n return class extends Base {\n showDocument(params) {\n return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowDocumentRequest.type, params);\n }\n };\n};\nexports.ShowDocumentFeature = ShowDocumentFeature;\n//# sourceMappingURL=showDocument.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FileOperationsFeature = void 0;\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst FileOperationsFeature = (Base) => {\n return class extends Base {\n onDidCreateFiles(handler) {\n return this.connection.onNotification(vscode_languageserver_protocol_1.DidCreateFilesNotification.type, (params) => {\n handler(params);\n });\n }\n onDidRenameFiles(handler) {\n return this.connection.onNotification(vscode_languageserver_protocol_1.DidRenameFilesNotification.type, (params) => {\n handler(params);\n });\n }\n onDidDeleteFiles(handler) {\n return this.connection.onNotification(vscode_languageserver_protocol_1.DidDeleteFilesNotification.type, (params) => {\n handler(params);\n });\n }\n onWillCreateFiles(handler) {\n return this.connection.onRequest(vscode_languageserver_protocol_1.WillCreateFilesRequest.type, (params, cancel) => {\n return handler(params, cancel);\n });\n }\n onWillRenameFiles(handler) {\n return this.connection.onRequest(vscode_languageserver_protocol_1.WillRenameFilesRequest.type, (params, cancel) => {\n return handler(params, cancel);\n });\n }\n onWillDeleteFiles(handler) {\n return this.connection.onRequest(vscode_languageserver_protocol_1.WillDeleteFilesRequest.type, (params, cancel) => {\n return handler(params, cancel);\n });\n }\n };\n};\nexports.FileOperationsFeature = FileOperationsFeature;\n//# sourceMappingURL=fileOperations.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LinkedEditingRangeFeature = void 0;\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst LinkedEditingRangeFeature = (Base) => {\n return class extends Base {\n onLinkedEditingRange(handler) {\n return this.connection.onRequest(vscode_languageserver_protocol_1.LinkedEditingRangeRequest.type, (params, cancel) => {\n return handler(params, cancel, this.attachWorkDoneProgress(params), undefined);\n });\n }\n };\n};\nexports.LinkedEditingRangeFeature = LinkedEditingRangeFeature;\n//# sourceMappingURL=linkedEditingRange.js.map", "/* --------------------------------------------------------------------------------------------\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 * ------------------------------------------------------------------------------------------ */\n'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TypeHierarchyFeature = void 0;\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst TypeHierarchyFeature = (Base) => {\n return class extends Base {\n get typeHierarchy() {\n return {\n onPrepare: (handler) => {\n return this.connection.onRequest(vscode_languageserver_protocol_1.TypeHierarchyPrepareRequest.type, (params, cancel) => {\n return handler(params, cancel, this.attachWorkDoneProgress(params), undefined);\n });\n },\n onSupertypes: (handler) => {\n const type = vscode_languageserver_protocol_1.TypeHierarchySupertypesRequest.type;\n return this.connection.onRequest(type, (params, cancel) => {\n return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));\n });\n },\n onSubtypes: (handler) => {\n const type = vscode_languageserver_protocol_1.TypeHierarchySubtypesRequest.type;\n return this.connection.onRequest(type, (params, cancel) => {\n return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));\n });\n }\n };\n }\n };\n};\nexports.TypeHierarchyFeature = TypeHierarchyFeature;\n//# sourceMappingURL=typeHierarchy.js.map", "/* --------------------------------------------------------------------------------------------\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 * ------------------------------------------------------------------------------------------ */\n'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InlineValueFeature = void 0;\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst InlineValueFeature = (Base) => {\n return class extends Base {\n get inlineValue() {\n return {\n refresh: () => {\n return this.connection.sendRequest(vscode_languageserver_protocol_1.InlineValueRefreshRequest.type);\n },\n on: (handler) => {\n return this.connection.onRequest(vscode_languageserver_protocol_1.InlineValueRequest.type, (params, cancel) => {\n return handler(params, cancel, this.attachWorkDoneProgress(params));\n });\n }\n };\n }\n };\n};\nexports.InlineValueFeature = InlineValueFeature;\n//# sourceMappingURL=inlineValue.js.map", "/* --------------------------------------------------------------------------------------------\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 * ------------------------------------------------------------------------------------------ */\n'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InlayHintFeature = void 0;\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst InlayHintFeature = (Base) => {\n return class extends Base {\n get inlayHint() {\n return {\n refresh: () => {\n return this.connection.sendRequest(vscode_languageserver_protocol_1.InlayHintRefreshRequest.type);\n },\n on: (handler) => {\n return this.connection.onRequest(vscode_languageserver_protocol_1.InlayHintRequest.type, (params, cancel) => {\n return handler(params, cancel, this.attachWorkDoneProgress(params));\n });\n },\n resolve: (handler) => {\n return this.connection.onRequest(vscode_languageserver_protocol_1.InlayHintResolveRequest.type, (params, cancel) => {\n return handler(params, cancel);\n });\n }\n };\n }\n };\n};\nexports.InlayHintFeature = InlayHintFeature;\n//# sourceMappingURL=inlayHint.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiagnosticFeature = void 0;\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst DiagnosticFeature = (Base) => {\n return class extends Base {\n get diagnostics() {\n return {\n refresh: () => {\n return this.connection.sendRequest(vscode_languageserver_protocol_1.DiagnosticRefreshRequest.type);\n },\n on: (handler) => {\n return this.connection.onRequest(vscode_languageserver_protocol_1.DocumentDiagnosticRequest.type, (params, cancel) => {\n return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(vscode_languageserver_protocol_1.DocumentDiagnosticRequest.partialResult, params));\n });\n },\n onWorkspace: (handler) => {\n return this.connection.onRequest(vscode_languageserver_protocol_1.WorkspaceDiagnosticRequest.type, (params, cancel) => {\n return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(vscode_languageserver_protocol_1.WorkspaceDiagnosticRequest.partialResult, params));\n });\n }\n };\n }\n };\n};\nexports.DiagnosticFeature = DiagnosticFeature;\n//# sourceMappingURL=diagnostic.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TextDocuments = void 0;\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\n/**\n * A manager for simple text documents. The manager requires at a minimum that\n * the server registered for the following text document sync events in the\n * initialize handler or via dynamic registration:\n *\n * - open and close events.\n * - change events.\n *\n * Registering for save and will save events is optional.\n */\nclass TextDocuments {\n /**\n * Create a new text document manager.\n */\n constructor(configuration) {\n this._configuration = configuration;\n this._syncedDocuments = new Map();\n this._onDidChangeContent = new vscode_languageserver_protocol_1.Emitter();\n this._onDidOpen = new vscode_languageserver_protocol_1.Emitter();\n this._onDidClose = new vscode_languageserver_protocol_1.Emitter();\n this._onDidSave = new vscode_languageserver_protocol_1.Emitter();\n this._onWillSave = new vscode_languageserver_protocol_1.Emitter();\n }\n /**\n * An event that fires when a text document managed by this manager\n * has been opened.\n */\n get onDidOpen() {\n return this._onDidOpen.event;\n }\n /**\n * An event that fires when a text document managed by this manager\n * has been opened or the content changes.\n */\n get onDidChangeContent() {\n return this._onDidChangeContent.event;\n }\n /**\n * An event that fires when a text document managed by this manager\n * will be saved.\n */\n get onWillSave() {\n return this._onWillSave.event;\n }\n /**\n * Sets a handler that will be called if a participant wants to provide\n * edits during a text document save.\n */\n onWillSaveWaitUntil(handler) {\n this._willSaveWaitUntil = handler;\n }\n /**\n * An event that fires when a text document managed by this manager\n * has been saved.\n */\n get onDidSave() {\n return this._onDidSave.event;\n }\n /**\n * An event that fires when a text document managed by this manager\n * has been closed.\n */\n get onDidClose() {\n return this._onDidClose.event;\n }\n /**\n * Returns the document for the given URI. Returns undefined if\n * the document is not managed by this instance.\n *\n * @param uri The text document's URI to retrieve.\n * @return the text document or `undefined`.\n */\n get(uri) {\n return this._syncedDocuments.get(uri);\n }\n /**\n * Returns all text documents managed by this instance.\n *\n * @return all text documents.\n */\n all() {\n return Array.from(this._syncedDocuments.values());\n }\n /**\n * Returns the URIs of all text documents managed by this instance.\n *\n * @return the URI's of all text documents.\n */\n keys() {\n return Array.from(this._syncedDocuments.keys());\n }\n /**\n * Listens for `low level` notification on the given connection to\n * update the text documents managed by this instance.\n *\n * Please note that the connection only provides handlers not an event model. Therefore\n * listening on a connection will overwrite the following handlers on a connection:\n * `onDidOpenTextDocument`, `onDidChangeTextDocument`, `onDidCloseTextDocument`,\n * `onWillSaveTextDocument`, `onWillSaveTextDocumentWaitUntil` and `onDidSaveTextDocument`.\n *\n * Use the corresponding events on the TextDocuments instance instead.\n *\n * @param connection The connection to listen on.\n */\n listen(connection) {\n connection.__textDocumentSync = vscode_languageserver_protocol_1.TextDocumentSyncKind.Incremental;\n const disposables = [];\n disposables.push(connection.onDidOpenTextDocument((event) => {\n const td = event.textDocument;\n const document = this._configuration.create(td.uri, td.languageId, td.version, td.text);\n this._syncedDocuments.set(td.uri, document);\n const toFire = Object.freeze({ document });\n this._onDidOpen.fire(toFire);\n this._onDidChangeContent.fire(toFire);\n }));\n disposables.push(connection.onDidChangeTextDocument((event) => {\n const td = event.textDocument;\n const changes = event.contentChanges;\n if (changes.length === 0) {\n return;\n }\n const { version } = td;\n if (version === null || version === undefined) {\n throw new Error(`Received document change event for ${td.uri} without valid version identifier`);\n }\n let syncedDocument = this._syncedDocuments.get(td.uri);\n if (syncedDocument !== undefined) {\n syncedDocument = this._configuration.update(syncedDocument, changes, version);\n this._syncedDocuments.set(td.uri, syncedDocument);\n this._onDidChangeContent.fire(Object.freeze({ document: syncedDocument }));\n }\n }));\n disposables.push(connection.onDidCloseTextDocument((event) => {\n let syncedDocument = this._syncedDocuments.get(event.textDocument.uri);\n if (syncedDocument !== undefined) {\n this._syncedDocuments.delete(event.textDocument.uri);\n this._onDidClose.fire(Object.freeze({ document: syncedDocument }));\n }\n }));\n disposables.push(connection.onWillSaveTextDocument((event) => {\n let syncedDocument = this._syncedDocuments.get(event.textDocument.uri);\n if (syncedDocument !== undefined) {\n this._onWillSave.fire(Object.freeze({ document: syncedDocument, reason: event.reason }));\n }\n }));\n disposables.push(connection.onWillSaveTextDocumentWaitUntil((event, token) => {\n let syncedDocument = this._syncedDocuments.get(event.textDocument.uri);\n if (syncedDocument !== undefined && this._willSaveWaitUntil) {\n return this._willSaveWaitUntil(Object.freeze({ document: syncedDocument, reason: event.reason }), token);\n }\n else {\n return [];\n }\n }));\n disposables.push(connection.onDidSaveTextDocument((event) => {\n let syncedDocument = this._syncedDocuments.get(event.textDocument.uri);\n if (syncedDocument !== undefined) {\n this._onDidSave.fire(Object.freeze({ document: syncedDocument }));\n }\n }));\n return vscode_languageserver_protocol_1.Disposable.create(() => { disposables.forEach(disposable => disposable.dispose()); });\n }\n}\nexports.TextDocuments = TextDocuments;\n//# sourceMappingURL=textDocuments.js.map", "/* --------------------------------------------------------------------------------------------\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 * ------------------------------------------------------------------------------------------ */\n'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NotebookDocuments = exports.NotebookSyncFeature = void 0;\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst textDocuments_1 = require(\"./textDocuments\");\nconst NotebookSyncFeature = (Base) => {\n return class extends Base {\n get synchronization() {\n return {\n onDidOpenNotebookDocument: (handler) => {\n return this.connection.onNotification(vscode_languageserver_protocol_1.DidOpenNotebookDocumentNotification.type, (params) => {\n handler(params);\n });\n },\n onDidChangeNotebookDocument: (handler) => {\n return this.connection.onNotification(vscode_languageserver_protocol_1.DidChangeNotebookDocumentNotification.type, (params) => {\n handler(params);\n });\n },\n onDidSaveNotebookDocument: (handler) => {\n return this.connection.onNotification(vscode_languageserver_protocol_1.DidSaveNotebookDocumentNotification.type, (params) => {\n handler(params);\n });\n },\n onDidCloseNotebookDocument: (handler) => {\n return this.connection.onNotification(vscode_languageserver_protocol_1.DidCloseNotebookDocumentNotification.type, (params) => {\n handler(params);\n });\n }\n };\n }\n };\n};\nexports.NotebookSyncFeature = NotebookSyncFeature;\nclass CellTextDocumentConnection {\n onDidOpenTextDocument(handler) {\n this.openHandler = handler;\n return vscode_languageserver_protocol_1.Disposable.create(() => { this.openHandler = undefined; });\n }\n openTextDocument(params) {\n this.openHandler && this.openHandler(params);\n }\n onDidChangeTextDocument(handler) {\n this.changeHandler = handler;\n return vscode_languageserver_protocol_1.Disposable.create(() => { this.changeHandler = handler; });\n }\n changeTextDocument(params) {\n this.changeHandler && this.changeHandler(params);\n }\n onDidCloseTextDocument(handler) {\n this.closeHandler = handler;\n return vscode_languageserver_protocol_1.Disposable.create(() => { this.closeHandler = undefined; });\n }\n closeTextDocument(params) {\n this.closeHandler && this.closeHandler(params);\n }\n onWillSaveTextDocument() {\n return CellTextDocumentConnection.NULL_DISPOSE;\n }\n onWillSaveTextDocumentWaitUntil() {\n return CellTextDocumentConnection.NULL_DISPOSE;\n }\n onDidSaveTextDocument() {\n return CellTextDocumentConnection.NULL_DISPOSE;\n }\n}\nCellTextDocumentConnection.NULL_DISPOSE = Object.freeze({ dispose: () => { } });\nclass NotebookDocuments {\n constructor(configurationOrTextDocuments) {\n if (configurationOrTextDocuments instanceof textDocuments_1.TextDocuments) {\n this._cellTextDocuments = configurationOrTextDocuments;\n }\n else {\n this._cellTextDocuments = new textDocuments_1.TextDocuments(configurationOrTextDocuments);\n }\n this.notebookDocuments = new Map();\n this.notebookCellMap = new Map();\n this._onDidOpen = new vscode_languageserver_protocol_1.Emitter();\n this._onDidChange = new vscode_languageserver_protocol_1.Emitter();\n this._onDidSave = new vscode_languageserver_protocol_1.Emitter();\n this._onDidClose = new vscode_languageserver_protocol_1.Emitter();\n }\n get cellTextDocuments() {\n return this._cellTextDocuments;\n }\n getCellTextDocument(cell) {\n return this._cellTextDocuments.get(cell.document);\n }\n getNotebookDocument(uri) {\n return this.notebookDocuments.get(uri);\n }\n getNotebookCell(uri) {\n const value = this.notebookCellMap.get(uri);\n return value && value[0];\n }\n findNotebookDocumentForCell(cell) {\n const key = typeof cell === 'string' ? cell : cell.document;\n const value = this.notebookCellMap.get(key);\n return value && value[1];\n }\n get onDidOpen() {\n return this._onDidOpen.event;\n }\n get onDidSave() {\n return this._onDidSave.event;\n }\n get onDidChange() {\n return this._onDidChange.event;\n }\n get onDidClose() {\n return this._onDidClose.event;\n }\n /**\n * Listens for `low level` notification on the given connection to\n * update the notebook documents managed by this instance.\n *\n * Please note that the connection only provides handlers not an event model. Therefore\n * listening on a connection will overwrite the following handlers on a connection:\n * `onDidOpenNotebookDocument`, `onDidChangeNotebookDocument`, `onDidSaveNotebookDocument`,\n * and `onDidCloseNotebookDocument`.\n *\n * @param connection The connection to listen on.\n */\n listen(connection) {\n const cellTextDocumentConnection = new CellTextDocumentConnection();\n const disposables = [];\n disposables.push(this.cellTextDocuments.listen(cellTextDocumentConnection));\n disposables.push(connection.notebooks.synchronization.onDidOpenNotebookDocument((params) => {\n this.notebookDocuments.set(params.notebookDocument.uri, params.notebookDocument);\n for (const cellTextDocument of params.cellTextDocuments) {\n cellTextDocumentConnection.openTextDocument({ textDocument: cellTextDocument });\n }\n this.updateCellMap(params.notebookDocument);\n this._onDidOpen.fire(params.notebookDocument);\n }));\n disposables.push(connection.notebooks.synchronization.onDidChangeNotebookDocument((params) => {\n const notebookDocument = this.notebookDocuments.get(params.notebookDocument.uri);\n if (notebookDocument === undefined) {\n return;\n }\n notebookDocument.version = params.notebookDocument.version;\n const oldMetadata = notebookDocument.metadata;\n let metadataChanged = false;\n const change = params.change;\n if (change.metadata !== undefined) {\n metadataChanged = true;\n notebookDocument.metadata = change.metadata;\n }\n const opened = [];\n const closed = [];\n const data = [];\n const text = [];\n if (change.cells !== undefined) {\n const changedCells = change.cells;\n if (changedCells.structure !== undefined) {\n const array = changedCells.structure.array;\n notebookDocument.cells.splice(array.start, array.deleteCount, ...(array.cells !== undefined ? array.cells : []));\n // Additional open cell text documents.\n if (changedCells.structure.didOpen !== undefined) {\n for (const open of changedCells.structure.didOpen) {\n cellTextDocumentConnection.openTextDocument({ textDocument: open });\n opened.push(open.uri);\n }\n }\n // Additional closed cell test documents.\n if (changedCells.structure.didClose) {\n for (const close of changedCells.structure.didClose) {\n cellTextDocumentConnection.closeTextDocument({ textDocument: close });\n closed.push(close.uri);\n }\n }\n }\n if (changedCells.data !== undefined) {\n const cellUpdates = new Map(changedCells.data.map(cell => [cell.document, cell]));\n for (let i = 0; i <= notebookDocument.cells.length; i++) {\n const change = cellUpdates.get(notebookDocument.cells[i].document);\n if (change !== undefined) {\n const old = notebookDocument.cells.splice(i, 1, change);\n data.push({ old: old[0], new: change });\n cellUpdates.delete(change.document);\n if (cellUpdates.size === 0) {\n break;\n }\n }\n }\n }\n if (changedCells.textContent !== undefined) {\n for (const cellTextDocument of changedCells.textContent) {\n cellTextDocumentConnection.changeTextDocument({ textDocument: cellTextDocument.document, contentChanges: cellTextDocument.changes });\n text.push(cellTextDocument.document.uri);\n }\n }\n }\n // Update internal data structure.\n this.updateCellMap(notebookDocument);\n const changeEvent = { notebookDocument };\n if (metadataChanged) {\n changeEvent.metadata = { old: oldMetadata, new: notebookDocument.metadata };\n }\n const added = [];\n for (const open of opened) {\n added.push(this.getNotebookCell(open));\n }\n const removed = [];\n for (const close of closed) {\n removed.push(this.getNotebookCell(close));\n }\n const textContent = [];\n for (const change of text) {\n textContent.push(this.getNotebookCell(change));\n }\n if (added.length > 0 || removed.length > 0 || data.length > 0 || textContent.length > 0) {\n changeEvent.cells = { added, removed, changed: { data, textContent } };\n }\n if (changeEvent.metadata !== undefined || changeEvent.cells !== undefined) {\n this._onDidChange.fire(changeEvent);\n }\n }));\n disposables.push(connection.notebooks.synchronization.onDidSaveNotebookDocument((params) => {\n const notebookDocument = this.notebookDocuments.get(params.notebookDocument.uri);\n if (notebookDocument === undefined) {\n return;\n }\n this._onDidSave.fire(notebookDocument);\n }));\n disposables.push(connection.notebooks.synchronization.onDidCloseNotebookDocument((params) => {\n const notebookDocument = this.notebookDocuments.get(params.notebookDocument.uri);\n if (notebookDocument === undefined) {\n return;\n }\n this._onDidClose.fire(notebookDocument);\n for (const cellTextDocument of params.cellTextDocuments) {\n cellTextDocumentConnection.closeTextDocument({ textDocument: cellTextDocument });\n }\n this.notebookDocuments.delete(params.notebookDocument.uri);\n for (const cell of notebookDocument.cells) {\n this.notebookCellMap.delete(cell.document);\n }\n }));\n return vscode_languageserver_protocol_1.Disposable.create(() => { disposables.forEach(disposable => disposable.dispose()); });\n }\n updateCellMap(notebookDocument) {\n for (const cell of notebookDocument.cells) {\n this.notebookCellMap.set(cell.document, [cell, notebookDocument]);\n }\n }\n}\nexports.NotebookDocuments = NotebookDocuments;\n//# sourceMappingURL=notebook.js.map", "/* --------------------------------------------------------------------------------------------\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 * ------------------------------------------------------------------------------------------ */\n'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MonikerFeature = void 0;\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst MonikerFeature = (Base) => {\n return class extends Base {\n get moniker() {\n return {\n on: (handler) => {\n const type = vscode_languageserver_protocol_1.MonikerRequest.type;\n return this.connection.onRequest(type, (params, cancel) => {\n return handler(params, cancel, this.attachWorkDoneProgress(params), this.attachPartialResultProgress(type, params));\n });\n },\n };\n }\n };\n};\nexports.MonikerFeature = MonikerFeature;\n//# sourceMappingURL=moniker.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createConnection = exports.combineFeatures = exports.combineNotebooksFeatures = exports.combineLanguagesFeatures = exports.combineWorkspaceFeatures = exports.combineWindowFeatures = exports.combineClientFeatures = exports.combineTracerFeatures = exports.combineTelemetryFeatures = exports.combineConsoleFeatures = exports._NotebooksImpl = exports._LanguagesImpl = exports.BulkUnregistration = exports.BulkRegistration = exports.ErrorMessageTracker = void 0;\nconst vscode_languageserver_protocol_1 = require(\"vscode-languageserver-protocol\");\nconst Is = require(\"./utils/is\");\nconst UUID = require(\"./utils/uuid\");\nconst progress_1 = require(\"./progress\");\nconst configuration_1 = require(\"./configuration\");\nconst workspaceFolder_1 = require(\"./workspaceFolder\");\nconst callHierarchy_1 = require(\"./callHierarchy\");\nconst semanticTokens_1 = require(\"./semanticTokens\");\nconst showDocument_1 = require(\"./showDocument\");\nconst fileOperations_1 = require(\"./fileOperations\");\nconst linkedEditingRange_1 = require(\"./linkedEditingRange\");\nconst typeHierarchy_1 = require(\"./typeHierarchy\");\nconst inlineValue_1 = require(\"./inlineValue\");\nconst inlayHint_1 = require(\"./inlayHint\");\nconst diagnostic_1 = require(\"./diagnostic\");\nconst notebook_1 = require(\"./notebook\");\nconst moniker_1 = require(\"./moniker\");\nfunction null2Undefined(value) {\n if (value === null) {\n return undefined;\n }\n return value;\n}\n/**\n * Helps tracking error message. Equal occurrences of the same\n * message are only stored once. This class is for example\n * useful if text documents are validated in a loop and equal\n * error message should be folded into one.\n */\nclass ErrorMessageTracker {\n constructor() {\n this._messages = Object.create(null);\n }\n /**\n * Add a message to the tracker.\n *\n * @param message The message to add.\n */\n add(message) {\n let count = this._messages[message];\n if (!count) {\n count = 0;\n }\n count++;\n this._messages[message] = count;\n }\n /**\n * Send all tracked messages to the connection's window.\n *\n * @param connection The connection established between client and server.\n */\n sendErrors(connection) {\n Object.keys(this._messages).forEach(message => {\n connection.window.showErrorMessage(message);\n });\n }\n}\nexports.ErrorMessageTracker = ErrorMessageTracker;\nclass RemoteConsoleImpl {\n constructor() {\n }\n rawAttach(connection) {\n this._rawConnection = connection;\n }\n attach(connection) {\n this._connection = connection;\n }\n get connection() {\n if (!this._connection) {\n throw new Error('Remote is not attached to a connection yet.');\n }\n return this._connection;\n }\n fillServerCapabilities(_capabilities) {\n }\n initialize(_capabilities) {\n }\n error(message) {\n this.send(vscode_languageserver_protocol_1.MessageType.Error, message);\n }\n warn(message) {\n this.send(vscode_languageserver_protocol_1.MessageType.Warning, message);\n }\n info(message) {\n this.send(vscode_languageserver_protocol_1.MessageType.Info, message);\n }\n log(message) {\n this.send(vscode_languageserver_protocol_1.MessageType.Log, message);\n }\n send(type, message) {\n if (this._rawConnection) {\n this._rawConnection.sendNotification(vscode_languageserver_protocol_1.LogMessageNotification.type, { type, message }).catch(() => {\n (0, vscode_languageserver_protocol_1.RAL)().console.error(`Sending log message failed`);\n });\n }\n }\n}\nclass _RemoteWindowImpl {\n constructor() {\n }\n attach(connection) {\n this._connection = connection;\n }\n get connection() {\n if (!this._connection) {\n throw new Error('Remote is not attached to a connection yet.');\n }\n return this._connection;\n }\n initialize(_capabilities) {\n }\n fillServerCapabilities(_capabilities) {\n }\n showErrorMessage(message, ...actions) {\n let params = { type: vscode_languageserver_protocol_1.MessageType.Error, message, actions };\n return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);\n }\n showWarningMessage(message, ...actions) {\n let params = { type: vscode_languageserver_protocol_1.MessageType.Warning, message, actions };\n return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);\n }\n showInformationMessage(message, ...actions) {\n let params = { type: vscode_languageserver_protocol_1.MessageType.Info, message, actions };\n return this.connection.sendRequest(vscode_languageserver_protocol_1.ShowMessageRequest.type, params).then(null2Undefined);\n }\n}\nconst RemoteWindowImpl = (0, showDocument_1.ShowDocumentFeature)((0, progress_1.ProgressFeature)(_RemoteWindowImpl));\nvar BulkRegistration;\n(function (BulkRegistration) {\n /**\n * Creates a new bulk registration.\n * @return an empty bulk registration.\n */\n function create() {\n return new BulkRegistrationImpl();\n }\n BulkRegistration.create = create;\n})(BulkRegistration = exports.BulkRegistration || (exports.BulkRegistration = {}));\nclass BulkRegistrationImpl {\n constructor() {\n this._registrations = [];\n this._registered = new Set();\n }\n add(type, registerOptions) {\n const method = Is.string(type) ? type : type.method;\n if (this._registered.has(method)) {\n throw new Error(`${method} is already added to this registration`);\n }\n const id = UUID.generateUuid();\n this._registrations.push({\n id: id,\n method: method,\n registerOptions: registerOptions || {}\n });\n this._registered.add(method);\n }\n asRegistrationParams() {\n return {\n registrations: this._registrations\n };\n }\n}\nvar BulkUnregistration;\n(function (BulkUnregistration) {\n function create() {\n return new BulkUnregistrationImpl(undefined, []);\n }\n BulkUnregistration.create = create;\n})(BulkUnregistration = exports.BulkUnregistration || (exports.BulkUnregistration = {}));\nclass BulkUnregistrationImpl {\n constructor(_connection, unregistrations) {\n this._connection = _connection;\n this._unregistrations = new Map();\n unregistrations.forEach(unregistration => {\n this._unregistrations.set(unregistration.method, unregistration);\n });\n }\n get isAttached() {\n return !!this._connection;\n }\n attach(connection) {\n this._connection = connection;\n }\n add(unregistration) {\n this._unregistrations.set(unregistration.method, unregistration);\n }\n dispose() {\n let unregistrations = [];\n for (let unregistration of this._unregistrations.values()) {\n unregistrations.push(unregistration);\n }\n let params = {\n unregisterations: unregistrations\n };\n this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).catch(() => {\n this._connection.console.info(`Bulk unregistration failed.`);\n });\n }\n disposeSingle(arg) {\n const method = Is.string(arg) ? arg : arg.method;\n const unregistration = this._unregistrations.get(method);\n if (!unregistration) {\n return false;\n }\n let params = {\n unregisterations: [unregistration]\n };\n this._connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).then(() => {\n this._unregistrations.delete(method);\n }, (_error) => {\n this._connection.console.info(`Un-registering request handler for ${unregistration.id} failed.`);\n });\n return true;\n }\n}\nclass RemoteClientImpl {\n attach(connection) {\n this._connection = connection;\n }\n get connection() {\n if (!this._connection) {\n throw new Error('Remote is not attached to a connection yet.');\n }\n return this._connection;\n }\n initialize(_capabilities) {\n }\n fillServerCapabilities(_capabilities) {\n }\n register(typeOrRegistrations, registerOptionsOrType, registerOptions) {\n if (typeOrRegistrations instanceof BulkRegistrationImpl) {\n return this.registerMany(typeOrRegistrations);\n }\n else if (typeOrRegistrations instanceof BulkUnregistrationImpl) {\n return this.registerSingle1(typeOrRegistrations, registerOptionsOrType, registerOptions);\n }\n else {\n return this.registerSingle2(typeOrRegistrations, registerOptionsOrType);\n }\n }\n registerSingle1(unregistration, type, registerOptions) {\n const method = Is.string(type) ? type : type.method;\n const id = UUID.generateUuid();\n let params = {\n registrations: [{ id, method, registerOptions: registerOptions || {} }]\n };\n if (!unregistration.isAttached) {\n unregistration.attach(this.connection);\n }\n return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {\n unregistration.add({ id: id, method: method });\n return unregistration;\n }, (_error) => {\n this.connection.console.info(`Registering request handler for ${method} failed.`);\n return Promise.reject(_error);\n });\n }\n registerSingle2(type, registerOptions) {\n const method = Is.string(type) ? type : type.method;\n const id = UUID.generateUuid();\n let params = {\n registrations: [{ id, method, registerOptions: registerOptions || {} }]\n };\n return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then((_result) => {\n return vscode_languageserver_protocol_1.Disposable.create(() => {\n this.unregisterSingle(id, method).catch(() => { this.connection.console.info(`Un-registering capability with id ${id} failed.`); });\n });\n }, (_error) => {\n this.connection.console.info(`Registering request handler for ${method} failed.`);\n return Promise.reject(_error);\n });\n }\n unregisterSingle(id, method) {\n let params = {\n unregisterations: [{ id, method }]\n };\n return this.connection.sendRequest(vscode_languageserver_protocol_1.UnregistrationRequest.type, params).catch(() => {\n this.connection.console.info(`Un-registering request handler for ${id} failed.`);\n });\n }\n registerMany(registrations) {\n let params = registrations.asRegistrationParams();\n return this.connection.sendRequest(vscode_languageserver_protocol_1.RegistrationRequest.type, params).then(() => {\n return new BulkUnregistrationImpl(this._connection, params.registrations.map(registration => { return { id: registration.id, method: registration.method }; }));\n }, (_error) => {\n this.connection.console.info(`Bulk registration failed.`);\n return Promise.reject(_error);\n });\n }\n}\nclass _RemoteWorkspaceImpl {\n constructor() {\n }\n attach(connection) {\n this._connection = connection;\n }\n get connection() {\n if (!this._connection) {\n throw new Error('Remote is not attached to a connection yet.');\n }\n return this._connection;\n }\n initialize(_capabilities) {\n }\n fillServerCapabilities(_capabilities) {\n }\n applyEdit(paramOrEdit) {\n function isApplyWorkspaceEditParams(value) {\n return value && !!value.edit;\n }\n let params = isApplyWorkspaceEditParams(paramOrEdit) ? paramOrEdit : { edit: paramOrEdit };\n return this.connection.sendRequest(vscode_languageserver_protocol_1.ApplyWorkspaceEditRequest.type, params);\n }\n}\nconst RemoteWorkspaceImpl = (0, fileOperations_1.FileOperationsFeature)((0, workspaceFolder_1.WorkspaceFoldersFeature)((0, configuration_1.ConfigurationFeature)(_RemoteWorkspaceImpl)));\nclass TracerImpl {\n constructor() {\n this._trace = vscode_languageserver_protocol_1.Trace.Off;\n }\n attach(connection) {\n this._connection = connection;\n }\n get connection() {\n if (!this._connection) {\n throw new Error('Remote is not attached to a connection yet.');\n }\n return this._connection;\n }\n initialize(_capabilities) {\n }\n fillServerCapabilities(_capabilities) {\n }\n set trace(value) {\n this._trace = value;\n }\n log(message, verbose) {\n if (this._trace === vscode_languageserver_protocol_1.Trace.Off) {\n return;\n }\n this.connection.sendNotification(vscode_languageserver_protocol_1.LogTraceNotification.type, {\n message: message,\n verbose: this._trace === vscode_languageserver_protocol_1.Trace.Verbose ? verbose : undefined\n }).catch(() => {\n // Very hard to decide what to do. We tried to send a log\n // message which failed so we can't simply send another :-(.\n });\n }\n}\nclass TelemetryImpl {\n constructor() {\n }\n attach(connection) {\n this._connection = connection;\n }\n get connection() {\n if (!this._connection) {\n throw new Error('Remote is not attached to a connection yet.');\n }\n return this._connection;\n }\n initialize(_capabilities) {\n }\n fillServerCapabilities(_capabilities) {\n }\n logEvent(data) {\n this.connection.sendNotification(vscode_languageserver_protocol_1.TelemetryEventNotification.type, data).catch(() => {\n this.connection.console.log(`Sending TelemetryEventNotification failed`);\n });\n }\n}\nclass _LanguagesImpl {\n constructor() {\n }\n attach(connection) {\n this._connection = connection;\n }\n get connection() {\n if (!this._connection) {\n throw new Error('Remote is not attached to a connection yet.');\n }\n return this._connection;\n }\n initialize(_capabilities) {\n }\n fillServerCapabilities(_capabilities) {\n }\n attachWorkDoneProgress(params) {\n return (0, progress_1.attachWorkDone)(this.connection, params);\n }\n attachPartialResultProgress(_type, params) {\n return (0, progress_1.attachPartialResult)(this.connection, params);\n }\n}\nexports._LanguagesImpl = _LanguagesImpl;\nconst LanguagesImpl = (0, moniker_1.MonikerFeature)((0, diagnostic_1.DiagnosticFeature)((0, inlayHint_1.InlayHintFeature)((0, inlineValue_1.InlineValueFeature)((0, typeHierarchy_1.TypeHierarchyFeature)((0, linkedEditingRange_1.LinkedEditingRangeFeature)((0, semanticTokens_1.SemanticTokensFeature)((0, callHierarchy_1.CallHierarchyFeature)(_LanguagesImpl))))))));\nclass _NotebooksImpl {\n constructor() {\n }\n attach(connection) {\n this._connection = connection;\n }\n get connection() {\n if (!this._connection) {\n throw new Error('Remote is not attached to a connection yet.');\n }\n return this._connection;\n }\n initialize(_capabilities) {\n }\n fillServerCapabilities(_capabilities) {\n }\n attachWorkDoneProgress(params) {\n return (0, progress_1.attachWorkDone)(this.connection, params);\n }\n attachPartialResultProgress(_type, params) {\n return (0, progress_1.attachPartialResult)(this.connection, params);\n }\n}\nexports._NotebooksImpl = _NotebooksImpl;\nconst NotebooksImpl = (0, notebook_1.NotebookSyncFeature)(_NotebooksImpl);\nfunction combineConsoleFeatures(one, two) {\n return function (Base) {\n return two(one(Base));\n };\n}\nexports.combineConsoleFeatures = combineConsoleFeatures;\nfunction combineTelemetryFeatures(one, two) {\n return function (Base) {\n return two(one(Base));\n };\n}\nexports.combineTelemetryFeatures = combineTelemetryFeatures;\nfunction combineTracerFeatures(one, two) {\n return function (Base) {\n return two(one(Base));\n };\n}\nexports.combineTracerFeatures = combineTracerFeatures;\nfunction combineClientFeatures(one, two) {\n return function (Base) {\n return two(one(Base));\n };\n}\nexports.combineClientFeatures = combineClientFeatures;\nfunction combineWindowFeatures(one, two) {\n return function (Base) {\n return two(one(Base));\n };\n}\nexports.combineWindowFeatures = combineWindowFeatures;\nfunction combineWorkspaceFeatures(one, two) {\n return function (Base) {\n return two(one(Base));\n };\n}\nexports.combineWorkspaceFeatures = combineWorkspaceFeatures;\nfunction combineLanguagesFeatures(one, two) {\n return function (Base) {\n return two(one(Base));\n };\n}\nexports.combineLanguagesFeatures = combineLanguagesFeatures;\nfunction combineNotebooksFeatures(one, two) {\n return function (Base) {\n return two(one(Base));\n };\n}\nexports.combineNotebooksFeatures = combineNotebooksFeatures;\nfunction combineFeatures(one, two) {\n function combine(one, two, func) {\n if (one && two) {\n return func(one, two);\n }\n else if (one) {\n return one;\n }\n else {\n return two;\n }\n }\n let result = {\n __brand: 'features',\n console: combine(one.console, two.console, combineConsoleFeatures),\n tracer: combine(one.tracer, two.tracer, combineTracerFeatures),\n telemetry: combine(one.telemetry, two.telemetry, combineTelemetryFeatures),\n client: combine(one.client, two.client, combineClientFeatures),\n window: combine(one.window, two.window, combineWindowFeatures),\n workspace: combine(one.workspace, two.workspace, combineWorkspaceFeatures),\n languages: combine(one.languages, two.languages, combineLanguagesFeatures),\n notebooks: combine(one.notebooks, two.notebooks, combineNotebooksFeatures)\n };\n return result;\n}\nexports.combineFeatures = combineFeatures;\nfunction createConnection(connectionFactory, watchDog, factories) {\n const logger = (factories && factories.console ? new (factories.console(RemoteConsoleImpl))() : new RemoteConsoleImpl());\n const connection = connectionFactory(logger);\n logger.rawAttach(connection);\n const tracer = (factories && factories.tracer ? new (factories.tracer(TracerImpl))() : new TracerImpl());\n const telemetry = (factories && factories.telemetry ? new (factories.telemetry(TelemetryImpl))() : new TelemetryImpl());\n const client = (factories && factories.client ? new (factories.client(RemoteClientImpl))() : new RemoteClientImpl());\n const remoteWindow = (factories && factories.window ? new (factories.window(RemoteWindowImpl))() : new RemoteWindowImpl());\n const workspace = (factories && factories.workspace ? new (factories.workspace(RemoteWorkspaceImpl))() : new RemoteWorkspaceImpl());\n const languages = (factories && factories.languages ? new (factories.languages(LanguagesImpl))() : new LanguagesImpl());\n const notebooks = (factories && factories.notebooks ? new (factories.notebooks(NotebooksImpl))() : new NotebooksImpl());\n const allRemotes = [logger, tracer, telemetry, client, remoteWindow, workspace, languages, notebooks];\n function asPromise(value) {\n if (value instanceof Promise) {\n return value;\n }\n else if (Is.thenable(value)) {\n return new Promise((resolve, reject) => {\n value.then((resolved) => resolve(resolved), (error) => reject(error));\n });\n }\n else {\n return Promise.resolve(value);\n }\n }\n let shutdownHandler = undefined;\n let initializeHandler = undefined;\n let exitHandler = undefined;\n let protocolConnection = {\n listen: () => connection.listen(),\n sendRequest: (type, ...params) => connection.sendRequest(Is.string(type) ? type : type.method, ...params),\n onRequest: (type, handler) => connection.onRequest(type, handler),\n sendNotification: (type, param) => {\n const method = Is.string(type) ? type : type.method;\n if (arguments.length === 1) {\n return connection.sendNotification(method);\n }\n else {\n return connection.sendNotification(method, param);\n }\n },\n onNotification: (type, handler) => connection.onNotification(type, handler),\n onProgress: connection.onProgress,\n sendProgress: connection.sendProgress,\n onInitialize: (handler) => {\n initializeHandler = handler;\n return {\n dispose: () => {\n initializeHandler = undefined;\n }\n };\n },\n onInitialized: (handler) => connection.onNotification(vscode_languageserver_protocol_1.InitializedNotification.type, handler),\n onShutdown: (handler) => {\n shutdownHandler = handler;\n return {\n dispose: () => {\n shutdownHandler = undefined;\n }\n };\n },\n onExit: (handler) => {\n exitHandler = handler;\n return {\n dispose: () => {\n exitHandler = undefined;\n }\n };\n },\n get console() { return logger; },\n get telemetry() { return telemetry; },\n get tracer() { return tracer; },\n get client() { return client; },\n get window() { return remoteWindow; },\n get workspace() { return workspace; },\n get languages() { return languages; },\n get notebooks() { return notebooks; },\n onDidChangeConfiguration: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type, handler),\n onDidChangeWatchedFiles: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeWatchedFilesNotification.type, handler),\n __textDocumentSync: undefined,\n onDidOpenTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidOpenTextDocumentNotification.type, handler),\n onDidChangeTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidChangeTextDocumentNotification.type, handler),\n onDidCloseTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidCloseTextDocumentNotification.type, handler),\n onWillSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.WillSaveTextDocumentNotification.type, handler),\n onWillSaveTextDocumentWaitUntil: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WillSaveTextDocumentWaitUntilRequest.type, handler),\n onDidSaveTextDocument: (handler) => connection.onNotification(vscode_languageserver_protocol_1.DidSaveTextDocumentNotification.type, handler),\n sendDiagnostics: (params) => connection.sendNotification(vscode_languageserver_protocol_1.PublishDiagnosticsNotification.type, params),\n onHover: (handler) => connection.onRequest(vscode_languageserver_protocol_1.HoverRequest.type, (params, cancel) => {\n return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), undefined);\n }),\n onCompletion: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionRequest.type, (params, cancel) => {\n return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));\n }),\n onCompletionResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CompletionResolveRequest.type, handler),\n onSignatureHelp: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SignatureHelpRequest.type, (params, cancel) => {\n return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), undefined);\n }),\n onDeclaration: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DeclarationRequest.type, (params, cancel) => {\n return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));\n }),\n onDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DefinitionRequest.type, (params, cancel) => {\n return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));\n }),\n onTypeDefinition: (handler) => connection.onRequest(vscode_languageserver_protocol_1.TypeDefinitionRequest.type, (params, cancel) => {\n return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));\n }),\n onImplementation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ImplementationRequest.type, (params, cancel) => {\n return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));\n }),\n onReferences: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ReferencesRequest.type, (params, cancel) => {\n return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));\n }),\n onDocumentHighlight: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentHighlightRequest.type, (params, cancel) => {\n return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));\n }),\n onDocumentSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentSymbolRequest.type, (params, cancel) => {\n return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));\n }),\n onWorkspaceSymbol: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WorkspaceSymbolRequest.type, (params, cancel) => {\n return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));\n }),\n onWorkspaceSymbolResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.WorkspaceSymbolResolveRequest.type, handler),\n onCodeAction: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeActionRequest.type, (params, cancel) => {\n return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));\n }),\n onCodeActionResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeActionResolveRequest.type, (params, cancel) => {\n return handler(params, cancel);\n }),\n onCodeLens: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensRequest.type, (params, cancel) => {\n return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));\n }),\n onCodeLensResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.CodeLensResolveRequest.type, (params, cancel) => {\n return handler(params, cancel);\n }),\n onDocumentFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentFormattingRequest.type, (params, cancel) => {\n return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), undefined);\n }),\n onDocumentRangeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentRangeFormattingRequest.type, (params, cancel) => {\n return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), undefined);\n }),\n onDocumentOnTypeFormatting: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentOnTypeFormattingRequest.type, (params, cancel) => {\n return handler(params, cancel);\n }),\n onRenameRequest: (handler) => connection.onRequest(vscode_languageserver_protocol_1.RenameRequest.type, (params, cancel) => {\n return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), undefined);\n }),\n onPrepareRename: (handler) => connection.onRequest(vscode_languageserver_protocol_1.PrepareRenameRequest.type, (params, cancel) => {\n return handler(params, cancel);\n }),\n onDocumentLinks: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkRequest.type, (params, cancel) => {\n return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));\n }),\n onDocumentLinkResolve: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentLinkResolveRequest.type, (params, cancel) => {\n return handler(params, cancel);\n }),\n onDocumentColor: (handler) => connection.onRequest(vscode_languageserver_protocol_1.DocumentColorRequest.type, (params, cancel) => {\n return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));\n }),\n onColorPresentation: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ColorPresentationRequest.type, (params, cancel) => {\n return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));\n }),\n onFoldingRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.FoldingRangeRequest.type, (params, cancel) => {\n return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));\n }),\n onSelectionRanges: (handler) => connection.onRequest(vscode_languageserver_protocol_1.SelectionRangeRequest.type, (params, cancel) => {\n return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), (0, progress_1.attachPartialResult)(connection, params));\n }),\n onExecuteCommand: (handler) => connection.onRequest(vscode_languageserver_protocol_1.ExecuteCommandRequest.type, (params, cancel) => {\n return handler(params, cancel, (0, progress_1.attachWorkDone)(connection, params), undefined);\n }),\n dispose: () => connection.dispose()\n };\n for (let remote of allRemotes) {\n remote.attach(protocolConnection);\n }\n connection.onRequest(vscode_languageserver_protocol_1.InitializeRequest.type, (params) => {\n watchDog.initialize(params);\n if (Is.string(params.trace)) {\n tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.trace);\n }\n for (let remote of allRemotes) {\n remote.initialize(params.capabilities);\n }\n if (initializeHandler) {\n let result = initializeHandler(params, new vscode_languageserver_protocol_1.CancellationTokenSource().token, (0, progress_1.attachWorkDone)(connection, params), undefined);\n return asPromise(result).then((value) => {\n if (value instanceof vscode_languageserver_protocol_1.ResponseError) {\n return value;\n }\n let result = value;\n if (!result) {\n result = { capabilities: {} };\n }\n let capabilities = result.capabilities;\n if (!capabilities) {\n capabilities = {};\n result.capabilities = capabilities;\n }\n if (capabilities.textDocumentSync === undefined || capabilities.textDocumentSync === null) {\n capabilities.textDocumentSync = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;\n }\n else if (!Is.number(capabilities.textDocumentSync) && !Is.number(capabilities.textDocumentSync.change)) {\n capabilities.textDocumentSync.change = Is.number(protocolConnection.__textDocumentSync) ? protocolConnection.__textDocumentSync : vscode_languageserver_protocol_1.TextDocumentSyncKind.None;\n }\n for (let remote of allRemotes) {\n remote.fillServerCapabilities(capabilities);\n }\n return result;\n });\n }\n else {\n let result = { capabilities: { textDocumentSync: vscode_languageserver_protocol_1.TextDocumentSyncKind.None } };\n for (let remote of allRemotes) {\n remote.fillServerCapabilities(result.capabilities);\n }\n return result;\n }\n });\n connection.onRequest(vscode_languageserver_protocol_1.ShutdownRequest.type, () => {\n watchDog.shutdownReceived = true;\n if (shutdownHandler) {\n return shutdownHandler(new vscode_languageserver_protocol_1.CancellationTokenSource().token);\n }\n else {\n return undefined;\n }\n });\n connection.onNotification(vscode_languageserver_protocol_1.ExitNotification.type, () => {\n try {\n if (exitHandler) {\n exitHandler();\n }\n }\n finally {\n if (watchDog.shutdownReceived) {\n watchDog.exit(0);\n }\n else {\n watchDog.exit(1);\n }\n }\n });\n connection.onNotification(vscode_languageserver_protocol_1.SetTraceNotification.type, (params) => {\n tracer.trace = vscode_languageserver_protocol_1.Trace.fromString(params.value);\n });\n return protocolConnection;\n}\nexports.createConnection = createConnection;\n//# sourceMappingURL=server.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveModulePath = exports.FileSystem = exports.resolveGlobalYarnPath = exports.resolveGlobalNodePath = exports.resolve = exports.uriToFilePath = void 0;\nconst url = require(\"url\");\nconst path = require(\"path\");\nconst fs = require(\"fs\");\nconst child_process_1 = require(\"child_process\");\n/**\n * @deprecated Use the `vscode-uri` npm module which provides a more\n * complete implementation of handling VS Code URIs.\n */\nfunction uriToFilePath(uri) {\n let parsed = url.parse(uri);\n if (parsed.protocol !== 'file:' || !parsed.path) {\n return undefined;\n }\n let segments = parsed.path.split('/');\n for (var i = 0, len = segments.length; i < len; i++) {\n segments[i] = decodeURIComponent(segments[i]);\n }\n if (process.platform === 'win32' && segments.length > 1) {\n let first = segments[0];\n let second = segments[1];\n // Do we have a drive letter and we started with a / which is the\n // case if the first segement is empty (see split above)\n if (first.length === 0 && second.length > 1 && second[1] === ':') {\n // Remove first slash\n segments.shift();\n }\n }\n return path.normalize(segments.join('/'));\n}\nexports.uriToFilePath = uriToFilePath;\nfunction isWindows() {\n return process.platform === 'win32';\n}\nfunction resolve(moduleName, nodePath, cwd, tracer) {\n const nodePathKey = 'NODE_PATH';\n const app = [\n 'var p = process;',\n 'p.on(\\'message\\',function(m){',\n 'if(m.c===\\'e\\'){',\n 'p.exit(0);',\n '}',\n 'else if(m.c===\\'rs\\'){',\n 'try{',\n 'var r=require.resolve(m.a);',\n 'p.send({c:\\'r\\',s:true,r:r});',\n '}',\n 'catch(err){',\n 'p.send({c:\\'r\\',s:false});',\n '}',\n '}',\n '});'\n ].join('');\n return new Promise((resolve, reject) => {\n let env = process.env;\n let newEnv = Object.create(null);\n Object.keys(env).forEach(key => newEnv[key] = env[key]);\n if (nodePath && fs.existsSync(nodePath) /* see issue 545 */) {\n if (newEnv[nodePathKey]) {\n newEnv[nodePathKey] = nodePath + path.delimiter + newEnv[nodePathKey];\n }\n else {\n newEnv[nodePathKey] = nodePath;\n }\n if (tracer) {\n tracer(`NODE_PATH value is: ${newEnv[nodePathKey]}`);\n }\n }\n newEnv['ELECTRON_RUN_AS_NODE'] = '1';\n try {\n let cp = (0, child_process_1.fork)('', [], {\n cwd: cwd,\n env: newEnv,\n execArgv: ['-e', app]\n });\n if (cp.pid === void 0) {\n reject(new Error(`Starting process to resolve node module ${moduleName} failed`));\n return;\n }\n cp.on('error', (error) => {\n reject(error);\n });\n cp.on('message', (message) => {\n if (message.c === 'r') {\n cp.send({ c: 'e' });\n if (message.s) {\n resolve(message.r);\n }\n else {\n reject(new Error(`Failed to resolve module: ${moduleName}`));\n }\n }\n });\n let message = {\n c: 'rs',\n a: moduleName\n };\n cp.send(message);\n }\n catch (error) {\n reject(error);\n }\n });\n}\nexports.resolve = resolve;\n/**\n * Resolve the global npm package path.\n * @deprecated Since this depends on the used package manager and their version the best is that servers\n * implement this themselves since they know best what kind of package managers to support.\n * @param tracer the tracer to use\n */\nfunction resolveGlobalNodePath(tracer) {\n let npmCommand = 'npm';\n const env = Object.create(null);\n Object.keys(process.env).forEach(key => env[key] = process.env[key]);\n env['NO_UPDATE_NOTIFIER'] = 'true';\n const options = {\n encoding: 'utf8',\n env\n };\n if (isWindows()) {\n npmCommand = 'npm.cmd';\n options.shell = true;\n }\n let handler = () => { };\n try {\n process.on('SIGPIPE', handler);\n let stdout = (0, child_process_1.spawnSync)(npmCommand, ['config', 'get', 'prefix'], options).stdout;\n if (!stdout) {\n if (tracer) {\n tracer(`'npm config get prefix' didn't return a value.`);\n }\n return undefined;\n }\n let prefix = stdout.trim();\n if (tracer) {\n tracer(`'npm config get prefix' value is: ${prefix}`);\n }\n if (prefix.length > 0) {\n if (isWindows()) {\n return path.join(prefix, 'node_modules');\n }\n else {\n return path.join(prefix, 'lib', 'node_modules');\n }\n }\n return undefined;\n }\n catch (err) {\n return undefined;\n }\n finally {\n process.removeListener('SIGPIPE', handler);\n }\n}\nexports.resolveGlobalNodePath = resolveGlobalNodePath;\n/*\n * Resolve the global yarn pakage path.\n * @deprecated Since this depends on the used package manager and their version the best is that servers\n * implement this themselves since they know best what kind of package managers to support.\n * @param tracer the tracer to use\n */\nfunction resolveGlobalYarnPath(tracer) {\n let yarnCommand = 'yarn';\n let options = {\n encoding: 'utf8'\n };\n if (isWindows()) {\n yarnCommand = 'yarn.cmd';\n options.shell = true;\n }\n let handler = () => { };\n try {\n process.on('SIGPIPE', handler);\n let results = (0, child_process_1.spawnSync)(yarnCommand, ['global', 'dir', '--json'], options);\n let stdout = results.stdout;\n if (!stdout) {\n if (tracer) {\n tracer(`'yarn global dir' didn't return a value.`);\n if (results.stderr) {\n tracer(results.stderr);\n }\n }\n return undefined;\n }\n let lines = stdout.trim().split(/\\r?\\n/);\n for (let line of lines) {\n try {\n let yarn = JSON.parse(line);\n if (yarn.type === 'log') {\n return path.join(yarn.data, 'node_modules');\n }\n }\n catch (e) {\n // Do nothing. Ignore the line\n }\n }\n return undefined;\n }\n catch (err) {\n return undefined;\n }\n finally {\n process.removeListener('SIGPIPE', handler);\n }\n}\nexports.resolveGlobalYarnPath = resolveGlobalYarnPath;\nvar FileSystem;\n(function (FileSystem) {\n let _isCaseSensitive = undefined;\n function isCaseSensitive() {\n if (_isCaseSensitive !== void 0) {\n return _isCaseSensitive;\n }\n if (process.platform === 'win32') {\n _isCaseSensitive = false;\n }\n else {\n // convert current file name to upper case / lower case and check if file exists\n // (guards against cases when name is already all uppercase or lowercase)\n _isCaseSensitive = !fs.existsSync(__filename.toUpperCase()) || !fs.existsSync(__filename.toLowerCase());\n }\n return _isCaseSensitive;\n }\n FileSystem.isCaseSensitive = isCaseSensitive;\n function isParent(parent, child) {\n if (isCaseSensitive()) {\n return path.normalize(child).indexOf(path.normalize(parent)) === 0;\n }\n else {\n return path.normalize(child).toLowerCase().indexOf(path.normalize(parent).toLowerCase()) === 0;\n }\n }\n FileSystem.isParent = isParent;\n})(FileSystem = exports.FileSystem || (exports.FileSystem = {}));\nfunction resolveModulePath(workspaceRoot, moduleName, nodePath, tracer) {\n if (nodePath) {\n if (!path.isAbsolute(nodePath)) {\n nodePath = path.join(workspaceRoot, nodePath);\n }\n return resolve(moduleName, nodePath, nodePath, tracer).then((value) => {\n if (FileSystem.isParent(nodePath, value)) {\n return value;\n }\n else {\n return Promise.reject(new Error(`Failed to load ${moduleName} from node path location.`));\n }\n }).then(undefined, (_error) => {\n return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);\n });\n }\n else {\n return resolve(moduleName, resolveGlobalNodePath(tracer), workspaceRoot, tracer);\n }\n}\nexports.resolveModulePath = resolveModulePath;\n//# sourceMappingURL=files.js.map", "/* --------------------------------------------------------------------------------------------\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 * ----------------------------------------------------------------------------------------- */\n'use strict';\n\nmodule.exports = require('./lib/node/main');", "\"use strict\";\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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ProposedFeatures = exports.NotebookDocuments = exports.TextDocuments = exports.SemanticTokensBuilder = void 0;\nconst semanticTokens_1 = require(\"./semanticTokens\");\nObject.defineProperty(exports, \"SemanticTokensBuilder\", { enumerable: true, get: function () { return semanticTokens_1.SemanticTokensBuilder; } });\n__exportStar(require(\"vscode-languageserver-protocol/\"), exports);\nconst textDocuments_1 = require(\"./textDocuments\");\nObject.defineProperty(exports, \"TextDocuments\", { enumerable: true, get: function () { return textDocuments_1.TextDocuments; } });\nconst notebook_1 = require(\"./notebook\");\nObject.defineProperty(exports, \"NotebookDocuments\", { enumerable: true, get: function () { return notebook_1.NotebookDocuments; } });\n__exportStar(require(\"./server\"), exports);\nvar ProposedFeatures;\n(function (ProposedFeatures) {\n ProposedFeatures.all = {\n __brand: 'features',\n };\n})(ProposedFeatures = exports.ProposedFeatures || (exports.ProposedFeatures = {}));\n//# sourceMappingURL=api.js.map", "\"use strict\";\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 * ------------------------------------------------------------------------------------------ */\n/// <reference path=\"../../typings/thenable.d.ts\" />\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createConnection = exports.Files = void 0;\nconst Is = require(\"../common/utils/is\");\nconst server_1 = require(\"../common/server\");\nconst fm = require(\"./files\");\nconst node_1 = require(\"vscode-languageserver-protocol/node\");\n__exportStar(require(\"vscode-languageserver-protocol/node\"), exports);\n__exportStar(require(\"../common/api\"), exports);\nvar Files;\n(function (Files) {\n Files.uriToFilePath = fm.uriToFilePath;\n Files.resolveGlobalNodePath = fm.resolveGlobalNodePath;\n Files.resolveGlobalYarnPath = fm.resolveGlobalYarnPath;\n Files.resolve = fm.resolve;\n Files.resolveModulePath = fm.resolveModulePath;\n})(Files = exports.Files || (exports.Files = {}));\nlet _protocolConnection;\nfunction endProtocolConnection() {\n if (_protocolConnection === undefined) {\n return;\n }\n try {\n _protocolConnection.end();\n }\n catch (_err) {\n // Ignore. The client process could have already\n // did and we can't send an end into the connection.\n }\n}\nlet _shutdownReceived = false;\nlet exitTimer = undefined;\nfunction setupExitTimer() {\n const argName = '--clientProcessId';\n function runTimer(value) {\n try {\n let processId = parseInt(value);\n if (!isNaN(processId)) {\n exitTimer = setInterval(() => {\n try {\n process.kill(processId, 0);\n }\n catch (ex) {\n // Parent process doesn't exist anymore. Exit the server.\n endProtocolConnection();\n process.exit(_shutdownReceived ? 0 : 1);\n }\n }, 3000);\n }\n }\n catch (e) {\n // Ignore errors;\n }\n }\n for (let i = 2; i < process.argv.length; i++) {\n let arg = process.argv[i];\n if (arg === argName && i + 1 < process.argv.length) {\n runTimer(process.argv[i + 1]);\n return;\n }\n else {\n let args = arg.split('=');\n if (args[0] === argName) {\n runTimer(args[1]);\n }\n }\n }\n}\nsetupExitTimer();\nconst watchDog = {\n initialize: (params) => {\n const processId = params.processId;\n if (Is.number(processId) && exitTimer === undefined) {\n // We received a parent process id. Set up a timer to periodically check\n // if the parent is still alive.\n setInterval(() => {\n try {\n process.kill(processId, 0);\n }\n catch (ex) {\n // Parent process doesn't exist anymore. Exit the server.\n process.exit(_shutdownReceived ? 0 : 1);\n }\n }, 3000);\n }\n },\n get shutdownReceived() {\n return _shutdownReceived;\n },\n set shutdownReceived(value) {\n _shutdownReceived = value;\n },\n exit: (code) => {\n endProtocolConnection();\n process.exit(code);\n }\n};\nfunction createConnection(arg1, arg2, arg3, arg4) {\n let factories;\n let input;\n let output;\n let options;\n if (arg1 !== void 0 && arg1.__brand === 'features') {\n factories = arg1;\n arg1 = arg2;\n arg2 = arg3;\n arg3 = arg4;\n }\n if (node_1.ConnectionStrategy.is(arg1) || node_1.ConnectionOptions.is(arg1)) {\n options = arg1;\n }\n else {\n input = arg1;\n output = arg2;\n options = arg3;\n }\n return _createConnection(input, output, options, factories);\n}\nexports.createConnection = createConnection;\nfunction _createConnection(input, output, options, factories) {\n if (!input && !output && process.argv.length > 2) {\n let port = void 0;\n let pipeName = void 0;\n let argv = process.argv.slice(2);\n for (let i = 0; i < argv.length; i++) {\n let arg = argv[i];\n if (arg === '--node-ipc') {\n input = new node_1.IPCMessageReader(process);\n output = new node_1.IPCMessageWriter(process);\n break;\n }\n else if (arg === '--stdio') {\n input = process.stdin;\n output = process.stdout;\n break;\n }\n else if (arg === '--socket') {\n port = parseInt(argv[i + 1]);\n break;\n }\n else if (arg === '--pipe') {\n pipeName = argv[i + 1];\n break;\n }\n else {\n var args = arg.split('=');\n if (args[0] === '--socket') {\n port = parseInt(args[1]);\n break;\n }\n else if (args[0] === '--pipe') {\n pipeName = args[1];\n break;\n }\n }\n }\n if (port) {\n let transport = (0, node_1.createServerSocketTransport)(port);\n input = transport[0];\n output = transport[1];\n }\n else if (pipeName) {\n let transport = (0, node_1.createServerPipeTransport)(pipeName);\n input = transport[0];\n output = transport[1];\n }\n }\n var commandLineMessage = 'Use arguments of createConnection or set command line parameters: \\'--node-ipc\\', \\'--stdio\\' or \\'--socket={number}\\'';\n if (!input) {\n throw new Error('Connection input stream is not set. ' + commandLineMessage);\n }\n if (!output) {\n throw new Error('Connection output stream is not set. ' + commandLineMessage);\n }\n // Backwards compatibility\n if (Is.func(input.read) && Is.func(input.on)) {\n let inputStream = input;\n inputStream.on('end', () => {\n endProtocolConnection();\n process.exit(_shutdownReceived ? 0 : 1);\n });\n inputStream.on('close', () => {\n endProtocolConnection();\n process.exit(_shutdownReceived ? 0 : 1);\n });\n }\n const connectionFactory = (logger) => {\n const result = (0, node_1.createProtocolConnection)(input, output, logger, options);\n return result;\n };\n return (0, server_1.createConnection)(connectionFactory, watchDog, factories);\n}\n//# sourceMappingURL=main.js.map", "'use strict';\n\nconst path = require('path');\nconst WIN_SLASH = '\\\\\\\\/';\nconst WIN_NO_SLASH = `[^${WIN_SLASH}]`;\n\n/**\n * Posix glob regex\n */\n\nconst DOT_LITERAL = '\\\\.';\nconst PLUS_LITERAL = '\\\\+';\nconst QMARK_LITERAL = '\\\\?';\nconst SLASH_LITERAL = '\\\\/';\nconst ONE_CHAR = '(?=.)';\nconst QMARK = '[^/]';\nconst END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;\nconst START_ANCHOR = `(?:^|${SLASH_LITERAL})`;\nconst DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;\nconst NO_DOT = `(?!${DOT_LITERAL})`;\nconst NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;\nconst NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;\nconst NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;\nconst QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;\nconst STAR = `${QMARK}*?`;\n\nconst POSIX_CHARS = {\n DOT_LITERAL,\n PLUS_LITERAL,\n QMARK_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n QMARK,\n END_ANCHOR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n};\n\n/**\n * Windows glob regex\n */\n\nconst WINDOWS_CHARS = {\n ...POSIX_CHARS,\n\n SLASH_LITERAL: `[${WIN_SLASH}]`,\n QMARK: WIN_NO_SLASH,\n STAR: `${WIN_NO_SLASH}*?`,\n DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,\n NO_DOT: `(?!${DOT_LITERAL})`,\n NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,\n NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n QMARK_NO_DOT: `[^.${WIN_SLASH}]`,\n START_ANCHOR: `(?:^|[${WIN_SLASH}])`,\n END_ANCHOR: `(?:[${WIN_SLASH}]|$)`\n};\n\n/**\n * POSIX Bracket Regex\n */\n\nconst POSIX_REGEX_SOURCE = {\n alnum: 'a-zA-Z0-9',\n alpha: 'a-zA-Z',\n ascii: '\\\\x00-\\\\x7F',\n blank: ' \\\\t',\n cntrl: '\\\\x00-\\\\x1F\\\\x7F',\n digit: '0-9',\n graph: '\\\\x21-\\\\x7E',\n lower: 'a-z',\n print: '\\\\x20-\\\\x7E ',\n punct: '\\\\-!\"#$%&\\'()\\\\*+,./:;<=>?@[\\\\]^_`{|}~',\n space: ' \\\\t\\\\r\\\\n\\\\v\\\\f',\n upper: 'A-Z',\n word: 'A-Za-z0-9_',\n xdigit: 'A-Fa-f0-9'\n};\n\nmodule.exports = {\n MAX_LENGTH: 1024 * 64,\n POSIX_REGEX_SOURCE,\n\n // regular expressions\n REGEX_BACKSLASH: /\\\\(?![*+?^${}(|)[\\]])/g,\n REGEX_NON_SPECIAL_CHARS: /^[^@![\\].,$*+?^{}()|\\\\/]+/,\n REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\\]]/,\n REGEX_SPECIAL_CHARS_BACKREF: /(\\\\?)((\\W)(\\3*))/g,\n REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\\]])/g,\n REGEX_REMOVE_BACKSLASH: /(?:\\[.*?[^\\\\]\\]|\\\\(?=.))/g,\n\n // Replace globs with equivalent patterns to reduce parsing time.\n REPLACEMENTS: {\n '***': '*',\n '**/**': '**',\n '**/**/**': '**'\n },\n\n // Digits\n CHAR_0: 48, /* 0 */\n CHAR_9: 57, /* 9 */\n\n // Alphabet chars.\n CHAR_UPPERCASE_A: 65, /* A */\n CHAR_LOWERCASE_A: 97, /* a */\n CHAR_UPPERCASE_Z: 90, /* Z */\n CHAR_LOWERCASE_Z: 122, /* z */\n\n CHAR_LEFT_PARENTHESES: 40, /* ( */\n CHAR_RIGHT_PARENTHESES: 41, /* ) */\n\n CHAR_ASTERISK: 42, /* * */\n\n // Non-alphabetic chars.\n CHAR_AMPERSAND: 38, /* & */\n CHAR_AT: 64, /* @ */\n CHAR_BACKWARD_SLASH: 92, /* \\ */\n CHAR_CARRIAGE_RETURN: 13, /* \\r */\n CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */\n CHAR_COLON: 58, /* : */\n CHAR_COMMA: 44, /* , */\n CHAR_DOT: 46, /* . */\n CHAR_DOUBLE_QUOTE: 34, /* \" */\n CHAR_EQUAL: 61, /* = */\n CHAR_EXCLAMATION_MARK: 33, /* ! */\n CHAR_FORM_FEED: 12, /* \\f */\n CHAR_FORWARD_SLASH: 47, /* / */\n CHAR_GRAVE_ACCENT: 96, /* ` */\n CHAR_HASH: 35, /* # */\n CHAR_HYPHEN_MINUS: 45, /* - */\n CHAR_LEFT_ANGLE_BRACKET: 60, /* < */\n CHAR_LEFT_CURLY_BRACE: 123, /* { */\n CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */\n CHAR_LINE_FEED: 10, /* \\n */\n CHAR_NO_BREAK_SPACE: 160, /* \\u00A0 */\n CHAR_PERCENT: 37, /* % */\n CHAR_PLUS: 43, /* + */\n CHAR_QUESTION_MARK: 63, /* ? */\n CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */\n CHAR_RIGHT_CURLY_BRACE: 125, /* } */\n CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */\n CHAR_SEMICOLON: 59, /* ; */\n CHAR_SINGLE_QUOTE: 39, /* ' */\n CHAR_SPACE: 32, /* */\n CHAR_TAB: 9, /* \\t */\n CHAR_UNDERSCORE: 95, /* _ */\n CHAR_VERTICAL_LINE: 124, /* | */\n CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \\uFEFF */\n\n SEP: path.sep,\n\n /**\n * Create EXTGLOB_CHARS\n */\n\n extglobChars(chars) {\n return {\n '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },\n '?': { type: 'qmark', open: '(?:', close: ')?' },\n '+': { type: 'plus', open: '(?:', close: ')+' },\n '*': { type: 'star', open: '(?:', close: ')*' },\n '@': { type: 'at', open: '(?:', close: ')' }\n };\n },\n\n /**\n * Create GLOB_CHARS\n */\n\n globChars(win32) {\n return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;\n }\n};\n", "'use strict';\n\nconst path = require('path');\nconst win32 = process.platform === 'win32';\nconst {\n REGEX_BACKSLASH,\n REGEX_REMOVE_BACKSLASH,\n REGEX_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_GLOBAL\n} = require('./constants');\n\nexports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\nexports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);\nexports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);\nexports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\\\$1');\nexports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');\n\nexports.removeBackslashes = str => {\n return str.replace(REGEX_REMOVE_BACKSLASH, match => {\n return match === '\\\\' ? '' : match;\n });\n};\n\nexports.supportsLookbehinds = () => {\n const segs = process.version.slice(1).split('.').map(Number);\n if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {\n return true;\n }\n return false;\n};\n\nexports.isWindows = options => {\n if (options && typeof options.windows === 'boolean') {\n return options.windows;\n }\n return win32 === true || path.sep === '\\\\';\n};\n\nexports.escapeLast = (input, char, lastIdx) => {\n const idx = input.lastIndexOf(char, lastIdx);\n if (idx === -1) return input;\n if (input[idx - 1] === '\\\\') return exports.escapeLast(input, char, idx - 1);\n return `${input.slice(0, idx)}\\\\${input.slice(idx)}`;\n};\n\nexports.removePrefix = (input, state = {}) => {\n let output = input;\n if (output.startsWith('./')) {\n output = output.slice(2);\n state.prefix = './';\n }\n return output;\n};\n\nexports.wrapOutput = (input, state = {}, options = {}) => {\n const prepend = options.contains ? '' : '^';\n const append = options.contains ? '' : '$';\n\n let output = `${prepend}(?:${input})${append}`;\n if (state.negated === true) {\n output = `(?:^(?!${output}).*$)`;\n }\n return output;\n};\n", "'use strict';\n\nconst utils = require('./utils');\nconst {\n CHAR_ASTERISK, /* * */\n CHAR_AT, /* @ */\n CHAR_BACKWARD_SLASH, /* \\ */\n CHAR_COMMA, /* , */\n CHAR_DOT, /* . */\n CHAR_EXCLAMATION_MARK, /* ! */\n CHAR_FORWARD_SLASH, /* / */\n CHAR_LEFT_CURLY_BRACE, /* { */\n CHAR_LEFT_PARENTHESES, /* ( */\n CHAR_LEFT_SQUARE_BRACKET, /* [ */\n CHAR_PLUS, /* + */\n CHAR_QUESTION_MARK, /* ? */\n CHAR_RIGHT_CURLY_BRACE, /* } */\n CHAR_RIGHT_PARENTHESES, /* ) */\n CHAR_RIGHT_SQUARE_BRACKET /* ] */\n} = require('./constants');\n\nconst isPathSeparator = code => {\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\n};\n\nconst depth = token => {\n if (token.isPrefix !== true) {\n token.depth = token.isGlobstar ? Infinity : 1;\n }\n};\n\n/**\n * Quickly scans a glob pattern and returns an object with a handful of\n * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),\n * `glob` (the actual pattern), and `negated` (true if the path starts with `!`).\n *\n * ```js\n * const pm = require('picomatch');\n * console.log(pm.scan('foo/bar/*.js'));\n * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {Object} Returns an object with tokens and regex source string.\n * @api public\n */\n\nconst scan = (input, options) => {\n const opts = options || {};\n\n const length = input.length - 1;\n const scanToEnd = opts.parts === true || opts.scanToEnd === true;\n const slashes = [];\n const tokens = [];\n const parts = [];\n\n let str = input;\n let index = -1;\n let start = 0;\n let lastIndex = 0;\n let isBrace = false;\n let isBracket = false;\n let isGlob = false;\n let isExtglob = false;\n let isGlobstar = false;\n let braceEscaped = false;\n let backslashes = false;\n let negated = false;\n let finished = false;\n let braces = 0;\n let prev;\n let code;\n let token = { value: '', depth: 0, isGlob: false };\n\n const eos = () => index >= length;\n const peek = () => str.charCodeAt(index + 1);\n const advance = () => {\n prev = code;\n return str.charCodeAt(++index);\n };\n\n while (index < length) {\n code = advance();\n let next;\n\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braceEscaped = true;\n }\n continue;\n }\n\n if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n continue;\n }\n\n if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (braceEscaped !== true && code === CHAR_COMMA) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_RIGHT_CURLY_BRACE) {\n braces--;\n\n if (braces === 0) {\n braceEscaped = false;\n isBrace = token.isBrace = true;\n finished = true;\n break;\n }\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_FORWARD_SLASH) {\n slashes.push(index);\n tokens.push(token);\n token = { value: '', depth: 0, isGlob: false };\n\n if (finished === true) continue;\n if (prev === CHAR_DOT && index === (start + 1)) {\n start += 2;\n continue;\n }\n\n lastIndex = index + 1;\n continue;\n }\n\n if (opts.noext !== true) {\n const isExtglobChar = code === CHAR_PLUS\n || code === CHAR_AT\n || code === CHAR_ASTERISK\n || code === CHAR_QUESTION_MARK\n || code === CHAR_EXCLAMATION_MARK;\n\n if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n isExtglob = token.isExtglob = true;\n finished = true;\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n }\n\n if (code === CHAR_ASTERISK) {\n if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_QUESTION_MARK) {\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_LEFT_SQUARE_BRACKET) {\n while (eos() !== true && (next = advance())) {\n if (next === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (next === CHAR_RIGHT_SQUARE_BRACKET) {\n isBracket = token.isBracket = true;\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {\n negated = token.negated = true;\n start++;\n continue;\n }\n\n if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_LEFT_PARENTHESES) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n\n if (isGlob === true) {\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n }\n\n if (opts.noext === true) {\n isExtglob = false;\n isGlob = false;\n }\n\n let base = str;\n let prefix = '';\n let glob = '';\n\n if (start > 0) {\n prefix = str.slice(0, start);\n str = str.slice(start);\n lastIndex -= start;\n }\n\n if (base && isGlob === true && lastIndex > 0) {\n base = str.slice(0, lastIndex);\n glob = str.slice(lastIndex);\n } else if (isGlob === true) {\n base = '';\n glob = str;\n } else {\n base = str;\n }\n\n if (base && base !== '' && base !== '/' && base !== str) {\n if (isPathSeparator(base.charCodeAt(base.length - 1))) {\n base = base.slice(0, -1);\n }\n }\n\n if (opts.unescape === true) {\n if (glob) glob = utils.removeBackslashes(glob);\n\n if (base && backslashes === true) {\n base = utils.removeBackslashes(base);\n }\n }\n\n const state = {\n prefix,\n input,\n start,\n base,\n glob,\n isBrace,\n isBracket,\n isGlob,\n isExtglob,\n isGlobstar,\n negated\n };\n\n if (opts.tokens === true) {\n state.maxDepth = 0;\n if (!isPathSeparator(code)) {\n tokens.push(token);\n }\n state.tokens = tokens;\n }\n\n if (opts.parts === true || opts.tokens === true) {\n let prevIndex;\n\n for (let idx = 0; idx < slashes.length; idx++) {\n const n = prevIndex ? prevIndex + 1 : start;\n const i = slashes[idx];\n const value = input.slice(n, i);\n if (opts.tokens) {\n if (idx === 0 && start !== 0) {\n tokens[idx].isPrefix = true;\n tokens[idx].value = prefix;\n } else {\n tokens[idx].value = value;\n }\n depth(tokens[idx]);\n state.maxDepth += tokens[idx].depth;\n }\n if (idx !== 0 || value !== '') {\n parts.push(value);\n }\n prevIndex = i;\n }\n\n if (prevIndex && prevIndex + 1 < input.length) {\n const value = input.slice(prevIndex + 1);\n parts.push(value);\n\n if (opts.tokens) {\n tokens[tokens.length - 1].value = value;\n depth(tokens[tokens.length - 1]);\n state.maxDepth += tokens[tokens.length - 1].depth;\n }\n }\n\n state.slashes = slashes;\n state.parts = parts;\n }\n\n return state;\n};\n\nmodule.exports = scan;\n", "'use strict';\n\nconst constants = require('./constants');\nconst utils = require('./utils');\n\n/**\n * Constants\n */\n\nconst {\n MAX_LENGTH,\n POSIX_REGEX_SOURCE,\n REGEX_NON_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_BACKREF,\n REPLACEMENTS\n} = constants;\n\n/**\n * Helpers\n */\n\nconst expandRange = (args, options) => {\n if (typeof options.expandRange === 'function') {\n return options.expandRange(...args, options);\n }\n\n args.sort();\n const value = `[${args.join('-')}]`;\n\n try {\n /* eslint-disable-next-line no-new */\n new RegExp(value);\n } catch (ex) {\n return args.map(v => utils.escapeRegex(v)).join('..');\n }\n\n return value;\n};\n\n/**\n * Create the message for a syntax error\n */\n\nconst syntaxError = (type, char) => {\n return `Missing ${type}: \"${char}\" - use \"\\\\\\\\${char}\" to match literal characters`;\n};\n\n/**\n * Parse the given input string.\n * @param {String} input\n * @param {Object} options\n * @return {Object}\n */\n\nconst parse = (input, options) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n input = REPLACEMENTS[input] || input;\n\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n\n let len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n const bos = { type: 'bos', value: '', output: opts.prepend || '' };\n const tokens = [bos];\n\n const capture = opts.capture ? '' : '?:';\n const win32 = utils.isWindows(options);\n\n // create constants based on platform, for windows or posix\n const PLATFORM_CHARS = constants.globChars(win32);\n const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);\n\n const {\n DOT_LITERAL,\n PLUS_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n } = PLATFORM_CHARS;\n\n const globstar = (opts) => {\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const nodot = opts.dot ? '' : NO_DOT;\n const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;\n let star = opts.bash === true ? globstar(opts) : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n // minimatch options support\n if (typeof opts.noext === 'boolean') {\n opts.noextglob = opts.noext;\n }\n\n const state = {\n input,\n index: -1,\n start: 0,\n dot: opts.dot === true,\n consumed: '',\n output: '',\n prefix: '',\n backtrack: false,\n negated: false,\n brackets: 0,\n braces: 0,\n parens: 0,\n quotes: 0,\n globstar: false,\n tokens\n };\n\n input = utils.removePrefix(input, state);\n len = input.length;\n\n const extglobs = [];\n const braces = [];\n const stack = [];\n let prev = bos;\n let value;\n\n /**\n * Tokenizing helpers\n */\n\n const eos = () => state.index === len - 1;\n const peek = state.peek = (n = 1) => input[state.index + n];\n const advance = state.advance = () => input[++state.index];\n const remaining = () => input.slice(state.index + 1);\n const consume = (value = '', num = 0) => {\n state.consumed += value;\n state.index += num;\n };\n const append = token => {\n state.output += token.output != null ? token.output : token.value;\n consume(token.value);\n };\n\n const negate = () => {\n let count = 1;\n\n while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {\n advance();\n state.start++;\n count++;\n }\n\n if (count % 2 === 0) {\n return false;\n }\n\n state.negated = true;\n state.start++;\n return true;\n };\n\n const increment = type => {\n state[type]++;\n stack.push(type);\n };\n\n const decrement = type => {\n state[type]--;\n stack.pop();\n };\n\n /**\n * Push tokens onto the tokens array. This helper speeds up\n * tokenizing by 1) helping us avoid backtracking as much as possible,\n * and 2) helping us avoid creating extra tokens when consecutive\n * characters are plain text. This improves performance and simplifies\n * lookbehinds.\n */\n\n const push = tok => {\n if (prev.type === 'globstar') {\n const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');\n const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));\n\n if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {\n state.output = state.output.slice(0, -prev.output.length);\n prev.type = 'star';\n prev.value = '*';\n prev.output = star;\n state.output += prev.output;\n }\n }\n\n if (extglobs.length && tok.type !== 'paren' && !EXTGLOB_CHARS[tok.value]) {\n extglobs[extglobs.length - 1].inner += tok.value;\n }\n\n if (tok.value || tok.output) append(tok);\n if (prev && prev.type === 'text' && tok.type === 'text') {\n prev.value += tok.value;\n prev.output = (prev.output || '') + tok.value;\n return;\n }\n\n tok.prev = prev;\n tokens.push(tok);\n prev = tok;\n };\n\n const extglobOpen = (type, value) => {\n const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };\n\n token.prev = prev;\n token.parens = state.parens;\n token.output = state.output;\n const output = (opts.capture ? '(' : '') + token.open;\n\n increment('parens');\n push({ type, value, output: state.output ? '' : ONE_CHAR });\n push({ type: 'paren', extglob: true, value: advance(), output });\n extglobs.push(token);\n };\n\n const extglobClose = token => {\n let output = token.close + (opts.capture ? ')' : '');\n\n if (token.type === 'negate') {\n let extglobStar = star;\n\n if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {\n extglobStar = globstar(opts);\n }\n\n if (extglobStar !== star || eos() || /^\\)+$/.test(remaining())) {\n output = token.close = `)$))${extglobStar}`;\n }\n\n if (token.prev.type === 'bos') {\n state.negatedExtglob = true;\n }\n }\n\n push({ type: 'paren', extglob: true, value, output });\n decrement('parens');\n };\n\n /**\n * Fast paths\n */\n\n if (opts.fastpaths !== false && !/(^[*!]|[/()[\\]{}\"])/.test(input)) {\n let backslashes = false;\n\n let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {\n if (first === '\\\\') {\n backslashes = true;\n return m;\n }\n\n if (first === '?') {\n if (esc) {\n return esc + first + (rest ? QMARK.repeat(rest.length) : '');\n }\n if (index === 0) {\n return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');\n }\n return QMARK.repeat(chars.length);\n }\n\n if (first === '.') {\n return DOT_LITERAL.repeat(chars.length);\n }\n\n if (first === '*') {\n if (esc) {\n return esc + first + (rest ? star : '');\n }\n return star;\n }\n return esc ? m : `\\\\${m}`;\n });\n\n if (backslashes === true) {\n if (opts.unescape === true) {\n output = output.replace(/\\\\/g, '');\n } else {\n output = output.replace(/\\\\+/g, m => {\n return m.length % 2 === 0 ? '\\\\\\\\' : (m ? '\\\\' : '');\n });\n }\n }\n\n if (output === input && opts.contains === true) {\n state.output = input;\n return state;\n }\n\n state.output = utils.wrapOutput(output, state, options);\n return state;\n }\n\n /**\n * Tokenize input until we reach end-of-string\n */\n\n while (!eos()) {\n value = advance();\n\n if (value === '\\u0000') {\n continue;\n }\n\n /**\n * Escaped characters\n */\n\n if (value === '\\\\') {\n const next = peek();\n\n if (next === '/' && opts.bash !== true) {\n continue;\n }\n\n if (next === '.' || next === ';') {\n continue;\n }\n\n if (!next) {\n value += '\\\\';\n push({ type: 'text', value });\n continue;\n }\n\n // collapse slashes to reduce potential for exploits\n const match = /^\\\\+/.exec(remaining());\n let slashes = 0;\n\n if (match && match[0].length > 2) {\n slashes = match[0].length;\n state.index += slashes;\n if (slashes % 2 !== 0) {\n value += '\\\\';\n }\n }\n\n if (opts.unescape === true) {\n value = advance() || '';\n } else {\n value += advance() || '';\n }\n\n if (state.brackets === 0) {\n push({ type: 'text', value });\n continue;\n }\n }\n\n /**\n * If we're inside a regex character class, continue\n * until we reach the closing bracket.\n */\n\n if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {\n if (opts.posix !== false && value === ':') {\n const inner = prev.value.slice(1);\n if (inner.includes('[')) {\n prev.posix = true;\n\n if (inner.includes(':')) {\n const idx = prev.value.lastIndexOf('[');\n const pre = prev.value.slice(0, idx);\n const rest = prev.value.slice(idx + 2);\n const posix = POSIX_REGEX_SOURCE[rest];\n if (posix) {\n prev.value = pre + posix;\n state.backtrack = true;\n advance();\n\n if (!bos.output && tokens.indexOf(prev) === 1) {\n bos.output = ONE_CHAR;\n }\n continue;\n }\n }\n }\n }\n\n if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {\n value = `\\\\${value}`;\n }\n\n if (value === ']' && (prev.value === '[' || prev.value === '[^')) {\n value = `\\\\${value}`;\n }\n\n if (opts.posix === true && value === '!' && prev.value === '[') {\n value = '^';\n }\n\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * If we're inside a quoted string, continue\n * until we reach the closing double quote.\n */\n\n if (state.quotes === 1 && value !== '\"') {\n value = utils.escapeRegex(value);\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * Double quotes\n */\n\n if (value === '\"') {\n state.quotes = state.quotes === 1 ? 0 : 1;\n if (opts.keepQuotes === true) {\n push({ type: 'text', value });\n }\n continue;\n }\n\n /**\n * Parentheses\n */\n\n if (value === '(') {\n increment('parens');\n push({ type: 'paren', value });\n continue;\n }\n\n if (value === ')') {\n if (state.parens === 0 && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '('));\n }\n\n const extglob = extglobs[extglobs.length - 1];\n if (extglob && state.parens === extglob.parens + 1) {\n extglobClose(extglobs.pop());\n continue;\n }\n\n push({ type: 'paren', value, output: state.parens ? ')' : '\\\\)' });\n decrement('parens');\n continue;\n }\n\n /**\n * Square brackets\n */\n\n if (value === '[') {\n if (opts.nobracket === true || !remaining().includes(']')) {\n if (opts.nobracket !== true && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('closing', ']'));\n }\n\n value = `\\\\${value}`;\n } else {\n increment('brackets');\n }\n\n push({ type: 'bracket', value });\n continue;\n }\n\n if (value === ']') {\n if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n if (state.brackets === 0) {\n if (opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '['));\n }\n\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n decrement('brackets');\n\n const prevValue = prev.value.slice(1);\n if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {\n value = `/${value}`;\n }\n\n prev.value += value;\n append({ value });\n\n // when literal brackets are explicitly disabled\n // assume we should match with a regex character class\n if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {\n continue;\n }\n\n const escaped = utils.escapeRegex(prev.value);\n state.output = state.output.slice(0, -prev.value.length);\n\n // when literal brackets are explicitly enabled\n // assume we should escape the brackets to match literal characters\n if (opts.literalBrackets === true) {\n state.output += escaped;\n prev.value = escaped;\n continue;\n }\n\n // when the user specifies nothing, try to match both\n prev.value = `(${capture}${escaped}|${prev.value})`;\n state.output += prev.value;\n continue;\n }\n\n /**\n * Braces\n */\n\n if (value === '{' && opts.nobrace !== true) {\n increment('braces');\n\n const open = {\n type: 'brace',\n value,\n output: '(',\n outputIndex: state.output.length,\n tokensIndex: state.tokens.length\n };\n\n braces.push(open);\n push(open);\n continue;\n }\n\n if (value === '}') {\n const brace = braces[braces.length - 1];\n\n if (opts.nobrace === true || !brace) {\n push({ type: 'text', value, output: value });\n continue;\n }\n\n let output = ')';\n\n if (brace.dots === true) {\n const arr = tokens.slice();\n const range = [];\n\n for (let i = arr.length - 1; i >= 0; i--) {\n tokens.pop();\n if (arr[i].type === 'brace') {\n break;\n }\n if (arr[i].type !== 'dots') {\n range.unshift(arr[i].value);\n }\n }\n\n output = expandRange(range, opts);\n state.backtrack = true;\n }\n\n if (brace.comma !== true && brace.dots !== true) {\n const out = state.output.slice(0, brace.outputIndex);\n const toks = state.tokens.slice(brace.tokensIndex);\n brace.value = brace.output = '\\\\{';\n value = output = '\\\\}';\n state.output = out;\n for (const t of toks) {\n state.output += (t.output || t.value);\n }\n }\n\n push({ type: 'brace', value, output });\n decrement('braces');\n braces.pop();\n continue;\n }\n\n /**\n * Pipes\n */\n\n if (value === '|') {\n if (extglobs.length > 0) {\n extglobs[extglobs.length - 1].conditions++;\n }\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Commas\n */\n\n if (value === ',') {\n let output = value;\n\n const brace = braces[braces.length - 1];\n if (brace && stack[stack.length - 1] === 'braces') {\n brace.comma = true;\n output = '|';\n }\n\n push({ type: 'comma', value, output });\n continue;\n }\n\n /**\n * Slashes\n */\n\n if (value === '/') {\n // if the beginning of the glob is \"./\", advance the start\n // to the current index, and don't add the \"./\" characters\n // to the state. This greatly simplifies lookbehinds when\n // checking for BOS characters like \"!\" and \".\" (not \"./\")\n if (prev.type === 'dot' && state.index === state.start + 1) {\n state.start = state.index + 1;\n state.consumed = '';\n state.output = '';\n tokens.pop();\n prev = bos; // reset \"prev\" to the first token\n continue;\n }\n\n push({ type: 'slash', value, output: SLASH_LITERAL });\n continue;\n }\n\n /**\n * Dots\n */\n\n if (value === '.') {\n if (state.braces > 0 && prev.type === 'dot') {\n if (prev.value === '.') prev.output = DOT_LITERAL;\n const brace = braces[braces.length - 1];\n prev.type = 'dots';\n prev.output += value;\n prev.value += value;\n brace.dots = true;\n continue;\n }\n\n if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {\n push({ type: 'text', value, output: DOT_LITERAL });\n continue;\n }\n\n push({ type: 'dot', value, output: DOT_LITERAL });\n continue;\n }\n\n /**\n * Question marks\n */\n\n if (value === '?') {\n const isGroup = prev && prev.value === '(';\n if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('qmark', value);\n continue;\n }\n\n if (prev && prev.type === 'paren') {\n const next = peek();\n let output = value;\n\n if (next === '<' && !utils.supportsLookbehinds()) {\n throw new Error('Node.js v10 or higher is required for regex lookbehinds');\n }\n\n if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\\w+>)/.test(remaining()))) {\n output = `\\\\${value}`;\n }\n\n push({ type: 'text', value, output });\n continue;\n }\n\n if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {\n push({ type: 'qmark', value, output: QMARK_NO_DOT });\n continue;\n }\n\n push({ type: 'qmark', value, output: QMARK });\n continue;\n }\n\n /**\n * Exclamation\n */\n\n if (value === '!') {\n if (opts.noextglob !== true && peek() === '(') {\n if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {\n extglobOpen('negate', value);\n continue;\n }\n }\n\n if (opts.nonegate !== true && state.index === 0) {\n negate();\n continue;\n }\n }\n\n /**\n * Plus\n */\n\n if (value === '+') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('plus', value);\n continue;\n }\n\n if ((prev && prev.value === '(') || opts.regex === false) {\n push({ type: 'plus', value, output: PLUS_LITERAL });\n continue;\n }\n\n if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {\n push({ type: 'plus', value });\n continue;\n }\n\n push({ type: 'plus', value: PLUS_LITERAL });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value === '@') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n push({ type: 'at', extglob: true, value, output: '' });\n continue;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value !== '*') {\n if (value === '$' || value === '^') {\n value = `\\\\${value}`;\n }\n\n const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());\n if (match) {\n value += match[0];\n state.index += match[0].length;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Stars\n */\n\n if (prev && (prev.type === 'globstar' || prev.star === true)) {\n prev.type = 'star';\n prev.star = true;\n prev.value += value;\n prev.output = star;\n state.backtrack = true;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n let rest = remaining();\n if (opts.noextglob !== true && /^\\([^?]/.test(rest)) {\n extglobOpen('star', value);\n continue;\n }\n\n if (prev.type === 'star') {\n if (opts.noglobstar === true) {\n consume(value);\n continue;\n }\n\n const prior = prev.prev;\n const before = prior.prev;\n const isStart = prior.type === 'slash' || prior.type === 'bos';\n const afterStar = before && (before.type === 'star' || before.type === 'globstar');\n\n if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');\n const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');\n if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n // strip consecutive `/**/`\n while (rest.slice(0, 3) === '/**') {\n const after = input[state.index + 4];\n if (after && after !== '/') {\n break;\n }\n rest = rest.slice(3);\n consume('/**', 3);\n }\n\n if (prior.type === 'bos' && eos()) {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = globstar(opts);\n state.output = prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');\n prev.value += value;\n state.globstar = true;\n state.output += prior.output + prev.output;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {\n const end = rest[1] !== void 0 ? '|$' : '';\n\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;\n prev.value += value;\n\n state.output += prior.output + prev.output;\n state.globstar = true;\n\n consume(value + advance());\n\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n if (prior.type === 'bos' && rest[0] === '/') {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;\n state.output = prev.output;\n state.globstar = true;\n consume(value + advance());\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n // remove single star from output\n state.output = state.output.slice(0, -prev.output.length);\n\n // reset previous token to globstar\n prev.type = 'globstar';\n prev.output = globstar(opts);\n prev.value += value;\n\n // reset output with globstar\n state.output += prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n const token = { type: 'star', value, output: star };\n\n if (opts.bash === true) {\n token.output = '.*?';\n if (prev.type === 'bos' || prev.type === 'slash') {\n token.output = nodot + token.output;\n }\n push(token);\n continue;\n }\n\n if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {\n token.output = value;\n push(token);\n continue;\n }\n\n if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {\n if (prev.type === 'dot') {\n state.output += NO_DOT_SLASH;\n prev.output += NO_DOT_SLASH;\n\n } else if (opts.dot === true) {\n state.output += NO_DOTS_SLASH;\n prev.output += NO_DOTS_SLASH;\n\n } else {\n state.output += nodot;\n prev.output += nodot;\n }\n\n if (peek() !== '*') {\n state.output += ONE_CHAR;\n prev.output += ONE_CHAR;\n }\n }\n\n push(token);\n }\n\n while (state.brackets > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));\n state.output = utils.escapeLast(state.output, '[');\n decrement('brackets');\n }\n\n while (state.parens > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));\n state.output = utils.escapeLast(state.output, '(');\n decrement('parens');\n }\n\n while (state.braces > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));\n state.output = utils.escapeLast(state.output, '{');\n decrement('braces');\n }\n\n if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {\n push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });\n }\n\n // rebuild the output if we had to backtrack at any point\n if (state.backtrack === true) {\n state.output = '';\n\n for (const token of state.tokens) {\n state.output += token.output != null ? token.output : token.value;\n\n if (token.suffix) {\n state.output += token.suffix;\n }\n }\n }\n\n return state;\n};\n\n/**\n * Fast paths for creating regular expressions for common glob patterns.\n * This can significantly speed up processing and has very little downside\n * impact when none of the fast paths match.\n */\n\nparse.fastpaths = (input, options) => {\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n const len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n input = REPLACEMENTS[input] || input;\n const win32 = utils.isWindows(options);\n\n // create constants based on platform, for windows or posix\n const {\n DOT_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOTS_SLASH,\n STAR,\n START_ANCHOR\n } = constants.globChars(win32);\n\n const nodot = opts.dot ? NO_DOTS : NO_DOT;\n const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;\n const capture = opts.capture ? '' : '?:';\n const state = { negated: false, prefix: '' };\n let star = opts.bash === true ? '.*?' : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n const globstar = (opts) => {\n if (opts.noglobstar === true) return star;\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const create = str => {\n switch (str) {\n case '*':\n return `${nodot}${ONE_CHAR}${star}`;\n\n case '.*':\n return `${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*.*':\n return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*/*':\n return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;\n\n case '**':\n return nodot + globstar(opts);\n\n case '**/*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;\n\n case '**/*.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '**/.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n default: {\n const match = /^(.*?)\\.(\\w+)$/.exec(str);\n if (!match) return;\n\n const source = create(match[1]);\n if (!source) return;\n\n return source + DOT_LITERAL + match[2];\n }\n }\n };\n\n const output = utils.removePrefix(input, state);\n let source = create(output);\n\n if (source && opts.strictSlashes !== true) {\n source += `${SLASH_LITERAL}?`;\n }\n\n return source;\n};\n\nmodule.exports = parse;\n", "'use strict';\n\nconst path = require('path');\nconst scan = require('./scan');\nconst parse = require('./parse');\nconst utils = require('./utils');\nconst constants = require('./constants');\nconst isObject = val => val && typeof val === 'object' && !Array.isArray(val);\n\n/**\n * Creates a matcher function from one or more glob patterns. The\n * returned function takes a string to match as its first argument,\n * and returns true if the string is a match. The returned matcher\n * function also takes a boolean as the second argument that, when true,\n * returns an object with additional information.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch(glob[, options]);\n *\n * const isMatch = picomatch('*.!(*a)');\n * console.log(isMatch('a.a')); //=> false\n * console.log(isMatch('a.b')); //=> true\n * ```\n * @name picomatch\n * @param {String|Array} `globs` One or more glob patterns.\n * @param {Object=} `options`\n * @return {Function=} Returns a matcher function.\n * @api public\n */\n\nconst picomatch = (glob, options, returnState = false) => {\n if (Array.isArray(glob)) {\n const fns = glob.map(input => picomatch(input, options, returnState));\n const arrayMatcher = str => {\n for (const isMatch of fns) {\n const state = isMatch(str);\n if (state) return state;\n }\n return false;\n };\n return arrayMatcher;\n }\n\n const isState = isObject(glob) && glob.tokens && glob.input;\n\n if (glob === '' || (typeof glob !== 'string' && !isState)) {\n throw new TypeError('Expected pattern to be a non-empty string');\n }\n\n const opts = options || {};\n const posix = utils.isWindows(options);\n const regex = isState\n ? picomatch.compileRe(glob, options)\n : picomatch.makeRe(glob, options, false, true);\n\n const state = regex.state;\n delete regex.state;\n\n let isIgnored = () => false;\n if (opts.ignore) {\n const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };\n isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);\n }\n\n const matcher = (input, returnObject = false) => {\n const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });\n const result = { glob, state, regex, posix, input, output, match, isMatch };\n\n if (typeof opts.onResult === 'function') {\n opts.onResult(result);\n }\n\n if (isMatch === false) {\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (isIgnored(input)) {\n if (typeof opts.onIgnore === 'function') {\n opts.onIgnore(result);\n }\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (typeof opts.onMatch === 'function') {\n opts.onMatch(result);\n }\n return returnObject ? result : true;\n };\n\n if (returnState) {\n matcher.state = state;\n }\n\n return matcher;\n};\n\n/**\n * Test `input` with the given `regex`. This is used by the main\n * `picomatch()` function to test the input string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.test(input, regex[, options]);\n *\n * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\\/([^/]*?))$/));\n * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp} `regex`\n * @return {Object} Returns an object with matching info.\n * @api public\n */\n\npicomatch.test = (input, regex, options, { glob, posix } = {}) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected input to be a string');\n }\n\n if (input === '') {\n return { isMatch: false, output: '' };\n }\n\n const opts = options || {};\n const format = opts.format || (posix ? utils.toPosixSlashes : null);\n let match = input === glob;\n let output = (match && format) ? format(input) : input;\n\n if (match === false) {\n output = format ? format(input) : input;\n match = output === glob;\n }\n\n if (match === false || opts.capture === true) {\n if (opts.matchBase === true || opts.basename === true) {\n match = picomatch.matchBase(input, regex, options, posix);\n } else {\n match = regex.exec(output);\n }\n }\n\n return { isMatch: Boolean(match), match, output };\n};\n\n/**\n * Match the basename of a filepath.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.matchBase(input, glob[, options]);\n * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).\n * @return {Boolean}\n * @api public\n */\n\npicomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {\n const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);\n return regex.test(path.basename(input));\n};\n\n/**\n * Returns true if **any** of the given glob `patterns` match the specified `string`.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.isMatch(string, patterns[, options]);\n *\n * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true\n * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false\n * ```\n * @param {String|Array} str The string to test.\n * @param {String|Array} patterns One or more glob patterns to use for matching.\n * @param {Object} [options] See available [options](#options).\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\npicomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);\n\n/**\n * Parse a glob pattern to create the source string for a regular\n * expression.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const result = picomatch.parse(pattern[, options]);\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {Object} Returns an object with useful properties and output to be used as a regex source string.\n * @api public\n */\n\npicomatch.parse = (pattern, options) => {\n if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));\n return parse(pattern, { ...options, fastpaths: false });\n};\n\n/**\n * Scan a glob pattern to separate the pattern into segments.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.scan(input[, options]);\n *\n * const result = picomatch.scan('!./foo/*.js');\n * console.log(result);\n * { prefix: '!./',\n * input: '!./foo/*.js',\n * start: 3,\n * base: 'foo',\n * glob: '*.js',\n * isBrace: false,\n * isBracket: false,\n * isGlob: true,\n * isExtglob: false,\n * isGlobstar: false,\n * negated: true }\n * ```\n * @param {String} `input` Glob pattern to scan.\n * @param {Object} `options`\n * @return {Object} Returns an object with\n * @api public\n */\n\npicomatch.scan = (input, options) => scan(input, options);\n\n/**\n * Create a regular expression from a parsed glob pattern.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const state = picomatch.parse('*.js');\n * // picomatch.compileRe(state[, options]);\n *\n * console.log(picomatch.compileRe(state));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `state` The object returned from the `.parse` method.\n * @param {Object} `options`\n * @return {RegExp} Returns a regex created from the given pattern.\n * @api public\n */\n\npicomatch.compileRe = (parsed, options, returnOutput = false, returnState = false) => {\n if (returnOutput === true) {\n return parsed.output;\n }\n\n const opts = options || {};\n const prepend = opts.contains ? '' : '^';\n const append = opts.contains ? '' : '$';\n\n let source = `${prepend}(?:${parsed.output})${append}`;\n if (parsed && parsed.negated === true) {\n source = `^(?!${source}).*$`;\n }\n\n const regex = picomatch.toRegex(source, options);\n if (returnState === true) {\n regex.state = parsed;\n }\n\n return regex;\n};\n\npicomatch.makeRe = (input, options, returnOutput = false, returnState = false) => {\n if (!input || typeof input !== 'string') {\n throw new TypeError('Expected a non-empty string');\n }\n\n const opts = options || {};\n let parsed = { negated: false, fastpaths: true };\n let prefix = '';\n let output;\n\n if (input.startsWith('./')) {\n input = input.slice(2);\n prefix = parsed.prefix = './';\n }\n\n if (opts.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {\n output = parse.fastpaths(input, options);\n }\n\n if (output === undefined) {\n parsed = parse(input, options);\n parsed.prefix = prefix + (parsed.prefix || '');\n } else {\n parsed.output = output;\n }\n\n return picomatch.compileRe(parsed, options, returnOutput, returnState);\n};\n\n/**\n * Create a regular expression from the given regex source string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.toRegex(source[, options]);\n *\n * const { output } = picomatch.parse('*.js');\n * console.log(picomatch.toRegex(output));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `source` Regular expression source string.\n * @param {Object} `options`\n * @return {RegExp}\n * @api public\n */\n\npicomatch.toRegex = (source, options) => {\n try {\n const opts = options || {};\n return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));\n } catch (err) {\n if (options && options.debug === true) throw err;\n return /$^/;\n }\n};\n\n/**\n * Picomatch constants.\n * @return {Object}\n */\n\npicomatch.constants = constants;\n\n/**\n * Expose \"picomatch\"\n */\n\nmodule.exports = picomatch;\n", "'use strict';\n\nmodule.exports = require('./lib/picomatch');\n", "'use strict';\n\nconst fs = require('fs');\nconst { Readable } = require('stream');\nconst sysPath = require('path');\nconst { promisify } = require('util');\nconst picomatch = require('picomatch');\n\nconst readdir = promisify(fs.readdir);\nconst stat = promisify(fs.stat);\nconst lstat = promisify(fs.lstat);\nconst realpath = promisify(fs.realpath);\n\n/**\n * @typedef {Object} EntryInfo\n * @property {String} path\n * @property {String} fullPath\n * @property {fs.Stats=} stats\n * @property {fs.Dirent=} dirent\n * @property {String} basename\n */\n\nconst BANG = '!';\nconst NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP']);\nconst FILE_TYPE = 'files';\nconst DIR_TYPE = 'directories';\nconst FILE_DIR_TYPE = 'files_directories';\nconst EVERYTHING_TYPE = 'all';\nconst ALL_TYPES = [FILE_TYPE, DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE];\n\nconst isNormalFlowError = error => NORMAL_FLOW_ERRORS.has(error.code);\n\nconst normalizeFilter = filter => {\n if (filter === undefined) return;\n if (typeof filter === 'function') return filter;\n\n if (typeof filter === 'string') {\n const glob = picomatch(filter.trim());\n return entry => glob(entry.basename);\n }\n\n if (Array.isArray(filter)) {\n const positive = [];\n const negative = [];\n for (const item of filter) {\n const trimmed = item.trim();\n if (trimmed.charAt(0) === BANG) {\n negative.push(picomatch(trimmed.slice(1)));\n } else {\n positive.push(picomatch(trimmed));\n }\n }\n\n if (negative.length > 0) {\n if (positive.length > 0) {\n return entry =>\n positive.some(f => f(entry.basename)) && !negative.some(f => f(entry.basename));\n }\n return entry => !negative.some(f => f(entry.basename));\n }\n return entry => positive.some(f => f(entry.basename));\n }\n};\n\nclass ReaddirpStream extends Readable {\n static get defaultOptions() {\n return {\n root: '.',\n /* eslint-disable no-unused-vars */\n fileFilter: (path) => true,\n directoryFilter: (path) => true,\n /* eslint-enable no-unused-vars */\n type: FILE_TYPE,\n lstat: false,\n depth: 2147483648,\n alwaysStat: false\n };\n }\n\n constructor(options = {}) {\n super({\n objectMode: true,\n autoDestroy: true,\n highWaterMark: options.highWaterMark || 4096\n });\n const opts = { ...ReaddirpStream.defaultOptions, ...options };\n const { root, type } = opts;\n\n this._fileFilter = normalizeFilter(opts.fileFilter);\n this._directoryFilter = normalizeFilter(opts.directoryFilter);\n\n const statMethod = opts.lstat ? lstat : stat;\n // Use bigint stats if it's windows and stat() supports options (node 10+).\n if (process.platform === 'win32' && stat.length === 3) {\n this._stat = path => statMethod(path, { bigint: true });\n } else {\n this._stat = statMethod;\n }\n\n this._maxDepth = opts.depth;\n this._wantsDir = [DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type);\n this._wantsFile = [FILE_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type);\n this._wantsEverything = type === EVERYTHING_TYPE;\n this._root = sysPath.resolve(root);\n this._isDirent = ('Dirent' in fs) && !opts.alwaysStat;\n this._statsProp = this._isDirent ? 'dirent' : 'stats';\n this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent };\n\n // Launch stream with one parent, the root dir.\n this.parents = [this._exploreDir(root, 1)];\n this.reading = false;\n this.parent = undefined;\n }\n\n async _read(batch) {\n if (this.reading) return;\n this.reading = true;\n\n try {\n while (!this.destroyed && batch > 0) {\n const { path, depth, files = [] } = this.parent || {};\n\n if (files.length > 0) {\n const slice = files.splice(0, batch).map(dirent => this._formatEntry(dirent, path));\n for (const entry of await Promise.all(slice)) {\n if (this.destroyed) return;\n\n const entryType = await this._getEntryType(entry);\n if (entryType === 'directory' && this._directoryFilter(entry)) {\n if (depth <= this._maxDepth) {\n this.parents.push(this._exploreDir(entry.fullPath, depth + 1));\n }\n\n if (this._wantsDir) {\n this.push(entry);\n batch--;\n }\n } else if ((entryType === 'file' || this._includeAsFile(entry)) && this._fileFilter(entry)) {\n if (this._wantsFile) {\n this.push(entry);\n batch--;\n }\n }\n }\n } else {\n const parent = this.parents.pop();\n if (!parent) {\n this.push(null);\n break;\n }\n this.parent = await parent;\n if (this.destroyed) return;\n }\n }\n } catch (error) {\n this.destroy(error);\n } finally {\n this.reading = false;\n }\n }\n\n async _exploreDir(path, depth) {\n let files;\n try {\n files = await readdir(path, this._rdOptions);\n } catch (error) {\n this._onError(error);\n }\n return {files, depth, path};\n }\n\n async _formatEntry(dirent, path) {\n let entry;\n try {\n const basename = this._isDirent ? dirent.name : dirent;\n const fullPath = sysPath.resolve(sysPath.join(path, basename));\n entry = {path: sysPath.relative(this._root, fullPath), fullPath, basename};\n entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);\n } catch (err) {\n this._onError(err);\n }\n return entry;\n }\n\n _onError(err) {\n if (isNormalFlowError(err) && !this.destroyed) {\n this.emit('warn', err);\n } else {\n this.destroy(err);\n }\n }\n\n async _getEntryType(entry) {\n // entry may be undefined, because a warning or an error were emitted\n // and the statsProp is undefined\n const stats = entry && entry[this._statsProp];\n if (!stats) {\n return;\n }\n if (stats.isFile()) {\n return 'file';\n }\n if (stats.isDirectory()) {\n return 'directory';\n }\n if (stats && stats.isSymbolicLink()) {\n const full = entry.fullPath;\n try {\n const entryRealPath = await realpath(full);\n const entryRealPathStats = await lstat(entryRealPath);\n if (entryRealPathStats.isFile()) {\n return 'file';\n }\n if (entryRealPathStats.isDirectory()) {\n const len = entryRealPath.length;\n if (full.startsWith(entryRealPath) && full.substr(len, 1) === sysPath.sep) {\n return this._onError(new Error(\n `Circular symlink detected: \"${full}\" points to \"${entryRealPath}\"`\n ));\n }\n return 'directory';\n }\n } catch (error) {\n this._onError(error);\n }\n }\n }\n\n _includeAsFile(entry) {\n const stats = entry && entry[this._statsProp];\n\n return stats && this._wantsEverything && !stats.isDirectory();\n }\n}\n\n/**\n * @typedef {Object} ReaddirpArguments\n * @property {Function=} fileFilter\n * @property {Function=} directoryFilter\n * @property {String=} type\n * @property {Number=} depth\n * @property {String=} root\n * @property {Boolean=} lstat\n * @property {Boolean=} bigint\n */\n\n/**\n * Main function which ends up calling readdirRec and reads all files and directories in given root recursively.\n * @param {String} root Root directory\n * @param {ReaddirpArguments=} options Options to specify root (start directory), filters and recursion depth\n */\nconst readdirp = (root, options = {}) => {\n let type = options.entryType || options.type;\n if (type === 'both') type = FILE_DIR_TYPE; // backwards-compatibility\n if (type) options.type = type;\n if (!root) {\n throw new Error('readdirp: root argument is required. Usage: readdirp(root, options)');\n } else if (typeof root !== 'string') {\n throw new TypeError('readdirp: root argument must be a string. Usage: readdirp(root, options)');\n } else if (type && !ALL_TYPES.includes(type)) {\n throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(', ')}`);\n }\n\n options.root = root;\n return new ReaddirpStream(options);\n};\n\nconst readdirpPromise = (root, options = {}) => {\n return new Promise((resolve, reject) => {\n const files = [];\n readdirp(root, options)\n .on('data', entry => files.push(entry))\n .on('end', () => resolve(files))\n .on('error', error => reject(error));\n });\n};\n\nreaddirp.promise = readdirpPromise;\nreaddirp.ReaddirpStream = ReaddirpStream;\nreaddirp.default = readdirp;\n\nmodule.exports = readdirp;\n", "/*!\n * normalize-path <https://github.com/jonschlinkert/normalize-path>\n *\n * Copyright (c) 2014-2018, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nmodule.exports = function(path, stripTrailing) {\n if (typeof path !== 'string') {\n throw new TypeError('expected path to be a string');\n }\n\n if (path === '\\\\' || path === '/') return '/';\n\n var len = path.length;\n if (len <= 1) return path;\n\n // ensure that win32 namespaces has two leading slashes, so that the path is\n // handled properly by the win32 version of path.parse() after being normalized\n // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces\n var prefix = '';\n if (len > 4 && path[3] === '\\\\') {\n var ch = path[2];\n if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\\\\\') {\n path = path.slice(2);\n prefix = '//';\n }\n }\n\n var segs = path.split(/[/\\\\]+/);\n if (stripTrailing !== false && segs[segs.length - 1] === '') {\n segs.pop();\n }\n return prefix + segs.join('/');\n};\n", "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n\nconst picomatch = require('picomatch');\nconst normalizePath = require('normalize-path');\n\n/**\n * @typedef {(testString: string) => boolean} AnymatchFn\n * @typedef {string|RegExp|AnymatchFn} AnymatchPattern\n * @typedef {AnymatchPattern|AnymatchPattern[]} AnymatchMatcher\n */\nconst BANG = '!';\nconst DEFAULT_OPTIONS = {returnIndex: false};\nconst arrify = (item) => Array.isArray(item) ? item : [item];\n\n/**\n * @param {AnymatchPattern} matcher\n * @param {object} options\n * @returns {AnymatchFn}\n */\nconst createPattern = (matcher, options) => {\n if (typeof matcher === 'function') {\n return matcher;\n }\n if (typeof matcher === 'string') {\n const glob = picomatch(matcher, options);\n return (string) => matcher === string || glob(string);\n }\n if (matcher instanceof RegExp) {\n return (string) => matcher.test(string);\n }\n return (string) => false;\n};\n\n/**\n * @param {Array<Function>} patterns\n * @param {Array<Function>} negPatterns\n * @param {String|Array} args\n * @param {Boolean} returnIndex\n * @returns {boolean|number}\n */\nconst matchPatterns = (patterns, negPatterns, args, returnIndex) => {\n const isList = Array.isArray(args);\n const _path = isList ? args[0] : args;\n if (!isList && typeof _path !== 'string') {\n throw new TypeError('anymatch: second argument must be a string: got ' +\n Object.prototype.toString.call(_path))\n }\n const path = normalizePath(_path);\n\n for (let index = 0; index < negPatterns.length; index++) {\n const nglob = negPatterns[index];\n if (nglob(path)) {\n return returnIndex ? -1 : false;\n }\n }\n\n const applied = isList && [path].concat(args.slice(1));\n for (let index = 0; index < patterns.length; index++) {\n const pattern = patterns[index];\n if (isList ? pattern(...applied) : pattern(path)) {\n return returnIndex ? index : true;\n }\n }\n\n return returnIndex ? -1 : false;\n};\n\n/**\n * @param {AnymatchMatcher} matchers\n * @param {Array|string} testString\n * @param {object} options\n * @returns {boolean|number|Function}\n */\nconst anymatch = (matchers, testString, options = DEFAULT_OPTIONS) => {\n if (matchers == null) {\n throw new TypeError('anymatch: specify first argument');\n }\n const opts = typeof options === 'boolean' ? {returnIndex: options} : options;\n const returnIndex = opts.returnIndex || false;\n\n // Early cache for matchers.\n const mtchers = arrify(matchers);\n const negatedGlobs = mtchers\n .filter(item => typeof item === 'string' && item.charAt(0) === BANG)\n .map(item => item.slice(1))\n .map(item => picomatch(item, opts));\n const patterns = mtchers\n .filter(item => typeof item !== 'string' || (typeof item === 'string' && item.charAt(0) !== BANG))\n .map(matcher => createPattern(matcher, opts));\n\n if (testString == null) {\n return (testString, ri = false) => {\n const returnIndex = typeof ri === 'boolean' ? ri : false;\n return matchPatterns(patterns, negatedGlobs, testString, returnIndex);\n }\n }\n\n return matchPatterns(patterns, negatedGlobs, testString, returnIndex);\n};\n\nanymatch.default = anymatch;\nmodule.exports = anymatch;\n", "/*!\n * is-extglob <https://github.com/jonschlinkert/is-extglob>\n *\n * Copyright (c) 2014-2016, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\nmodule.exports = function isExtglob(str) {\n if (typeof str !== 'string' || str === '') {\n return false;\n }\n\n var match;\n while ((match = /(\\\\).|([@?!+*]\\(.*\\))/g.exec(str))) {\n if (match[2]) return true;\n str = str.slice(match.index + match[0].length);\n }\n\n return false;\n};\n", "/*!\n * is-glob <https://github.com/jonschlinkert/is-glob>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nvar isExtglob = require('is-extglob');\nvar chars = { '{': '}', '(': ')', '[': ']'};\nvar strictRegex = /\\\\(.)|(^!|\\*|[\\].+)]\\?|\\[[^\\\\\\]]+\\]|\\{[^\\\\}]+\\}|\\(\\?[:!=][^\\\\)]+\\)|\\([^|]+\\|[^\\\\)]+\\))/;\nvar relaxedRegex = /\\\\(.)|(^!|[*?{}()[\\]]|\\(\\?)/;\n\nmodule.exports = function isGlob(str, options) {\n if (typeof str !== 'string' || str === '') {\n return false;\n }\n\n if (isExtglob(str)) {\n return true;\n }\n\n var regex = strictRegex;\n var match;\n\n // optionally relax regex\n if (options && options.strict === false) {\n regex = relaxedRegex;\n }\n\n while ((match = regex.exec(str))) {\n if (match[2]) return true;\n var idx = match.index + match[0].length;\n\n // if an open bracket/brace/paren is escaped,\n // set the index to the next closing character\n var open = match[1];\n var close = open ? chars[open] : null;\n if (open && close) {\n var n = str.indexOf(close, idx);\n if (n !== -1) {\n idx = n + 1;\n }\n }\n\n str = str.slice(idx);\n }\n return false;\n};\n", "'use strict';\n\nvar isGlob = require('is-glob');\nvar pathPosixDirname = require('path').posix.dirname;\nvar isWin32 = require('os').platform() === 'win32';\n\nvar slash = '/';\nvar backslash = /\\\\/g;\nvar enclosure = /[\\{\\[].*[\\}\\]]$/;\nvar globby = /(^|[^\\\\])([\\{\\[]|\\([^\\)]+$)/;\nvar escaped = /\\\\([\\!\\*\\?\\|\\[\\]\\(\\)\\{\\}])/g;\n\n/**\n * @param {string} str\n * @param {Object} opts\n * @param {boolean} [opts.flipBackslashes=true]\n * @returns {string}\n */\nmodule.exports = function globParent(str, opts) {\n var options = Object.assign({ flipBackslashes: true }, opts);\n\n // flip windows path separators\n if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) {\n str = str.replace(backslash, slash);\n }\n\n // special case for strings ending in enclosure containing path separator\n if (enclosure.test(str)) {\n str += slash;\n }\n\n // preserves full path in case of trailing path separator\n str += 'a';\n\n // remove path parts that are globby\n do {\n str = pathPosixDirname(str);\n } while (isGlob(str) || globby.test(str));\n\n // remove escape chars and return result\n return str.replace(escaped, '$1');\n};\n", "'use strict';\n\nexports.isInteger = num => {\n if (typeof num === 'number') {\n return Number.isInteger(num);\n }\n if (typeof num === 'string' && num.trim() !== '') {\n return Number.isInteger(Number(num));\n }\n return false;\n};\n\n/**\n * Find a node of the given type\n */\n\nexports.find = (node, type) => node.nodes.find(node => node.type === type);\n\n/**\n * Find a node of the given type\n */\n\nexports.exceedsLimit = (min, max, step = 1, limit) => {\n if (limit === false) return false;\n if (!exports.isInteger(min) || !exports.isInteger(max)) return false;\n return ((Number(max) - Number(min)) / Number(step)) >= limit;\n};\n\n/**\n * Escape the given node with '\\\\' before node.value\n */\n\nexports.escapeNode = (block, n = 0, type) => {\n let node = block.nodes[n];\n if (!node) return;\n\n if ((type && node.type === type) || node.type === 'open' || node.type === 'close') {\n if (node.escaped !== true) {\n node.value = '\\\\' + node.value;\n node.escaped = true;\n }\n }\n};\n\n/**\n * Returns true if the given brace node should be enclosed in literal braces\n */\n\nexports.encloseBrace = node => {\n if (node.type !== 'brace') return false;\n if ((node.commas >> 0 + node.ranges >> 0) === 0) {\n node.invalid = true;\n return true;\n }\n return false;\n};\n\n/**\n * Returns true if a brace node is invalid.\n */\n\nexports.isInvalidBrace = block => {\n if (block.type !== 'brace') return false;\n if (block.invalid === true || block.dollar) return true;\n if ((block.commas >> 0 + block.ranges >> 0) === 0) {\n block.invalid = true;\n return true;\n }\n if (block.open !== true || block.close !== true) {\n block.invalid = true;\n return true;\n }\n return false;\n};\n\n/**\n * Returns true if a node is an open or close node\n */\n\nexports.isOpenOrClose = node => {\n if (node.type === 'open' || node.type === 'close') {\n return true;\n }\n return node.open === true || node.close === true;\n};\n\n/**\n * Reduce an array of text nodes.\n */\n\nexports.reduce = nodes => nodes.reduce((acc, node) => {\n if (node.type === 'text') acc.push(node.value);\n if (node.type === 'range') node.type = 'text';\n return acc;\n}, []);\n\n/**\n * Flatten an array\n */\n\nexports.flatten = (...args) => {\n const result = [];\n const flat = arr => {\n for (let i = 0; i < arr.length; i++) {\n let ele = arr[i];\n Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele);\n }\n return result;\n };\n flat(args);\n return result;\n};\n", "'use strict';\n\nconst utils = require('./utils');\n\nmodule.exports = (ast, options = {}) => {\n let stringify = (node, parent = {}) => {\n let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);\n let invalidNode = node.invalid === true && options.escapeInvalid === true;\n let output = '';\n\n if (node.value) {\n if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {\n return '\\\\' + node.value;\n }\n return node.value;\n }\n\n if (node.value) {\n return node.value;\n }\n\n if (node.nodes) {\n for (let child of node.nodes) {\n output += stringify(child);\n }\n }\n return output;\n };\n\n return stringify(ast);\n};\n\n", "/*!\n * is-number <https://github.com/jonschlinkert/is-number>\n *\n * Copyright (c) 2014-present, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nmodule.exports = function(num) {\n if (typeof num === 'number') {\n return num - num === 0;\n }\n if (typeof num === 'string' && num.trim() !== '') {\n return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);\n }\n return false;\n};\n", "/*!\n * to-regex-range <https://github.com/micromatch/to-regex-range>\n *\n * Copyright (c) 2015-present, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nconst isNumber = require('is-number');\n\nconst toRegexRange = (min, max, options) => {\n if (isNumber(min) === false) {\n throw new TypeError('toRegexRange: expected the first argument to be a number');\n }\n\n if (max === void 0 || min === max) {\n return String(min);\n }\n\n if (isNumber(max) === false) {\n throw new TypeError('toRegexRange: expected the second argument to be a number.');\n }\n\n let opts = { relaxZeros: true, ...options };\n if (typeof opts.strictZeros === 'boolean') {\n opts.relaxZeros = opts.strictZeros === false;\n }\n\n let relax = String(opts.relaxZeros);\n let shorthand = String(opts.shorthand);\n let capture = String(opts.capture);\n let wrap = String(opts.wrap);\n let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap;\n\n if (toRegexRange.cache.hasOwnProperty(cacheKey)) {\n return toRegexRange.cache[cacheKey].result;\n }\n\n let a = Math.min(min, max);\n let b = Math.max(min, max);\n\n if (Math.abs(a - b) === 1) {\n let result = min + '|' + max;\n if (opts.capture) {\n return `(${result})`;\n }\n if (opts.wrap === false) {\n return result;\n }\n return `(?:${result})`;\n }\n\n let isPadded = hasPadding(min) || hasPadding(max);\n let state = { min, max, a, b };\n let positives = [];\n let negatives = [];\n\n if (isPadded) {\n state.isPadded = isPadded;\n state.maxLen = String(state.max).length;\n }\n\n if (a < 0) {\n let newMin = b < 0 ? Math.abs(b) : 1;\n negatives = splitToPatterns(newMin, Math.abs(a), state, opts);\n a = state.a = 0;\n }\n\n if (b >= 0) {\n positives = splitToPatterns(a, b, state, opts);\n }\n\n state.negatives = negatives;\n state.positives = positives;\n state.result = collatePatterns(negatives, positives, opts);\n\n if (opts.capture === true) {\n state.result = `(${state.result})`;\n } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) {\n state.result = `(?:${state.result})`;\n }\n\n toRegexRange.cache[cacheKey] = state;\n return state.result;\n};\n\nfunction collatePatterns(neg, pos, options) {\n let onlyNegative = filterPatterns(neg, pos, '-', false, options) || [];\n let onlyPositive = filterPatterns(pos, neg, '', false, options) || [];\n let intersected = filterPatterns(neg, pos, '-?', true, options) || [];\n let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);\n return subpatterns.join('|');\n}\n\nfunction splitToRanges(min, max) {\n let nines = 1;\n let zeros = 1;\n\n let stop = countNines(min, nines);\n let stops = new Set([max]);\n\n while (min <= stop && stop <= max) {\n stops.add(stop);\n nines += 1;\n stop = countNines(min, nines);\n }\n\n stop = countZeros(max + 1, zeros) - 1;\n\n while (min < stop && stop <= max) {\n stops.add(stop);\n zeros += 1;\n stop = countZeros(max + 1, zeros) - 1;\n }\n\n stops = [...stops];\n stops.sort(compare);\n return stops;\n}\n\n/**\n * Convert a range to a regex pattern\n * @param {Number} `start`\n * @param {Number} `stop`\n * @return {String}\n */\n\nfunction rangeToPattern(start, stop, options) {\n if (start === stop) {\n return { pattern: start, count: [], digits: 0 };\n }\n\n let zipped = zip(start, stop);\n let digits = zipped.length;\n let pattern = '';\n let count = 0;\n\n for (let i = 0; i < digits; i++) {\n let [startDigit, stopDigit] = zipped[i];\n\n if (startDigit === stopDigit) {\n pattern += startDigit;\n\n } else if (startDigit !== '0' || stopDigit !== '9') {\n pattern += toCharacterClass(startDigit, stopDigit, options);\n\n } else {\n count++;\n }\n }\n\n if (count) {\n pattern += options.shorthand === true ? '\\\\d' : '[0-9]';\n }\n\n return { pattern, count: [count], digits };\n}\n\nfunction splitToPatterns(min, max, tok, options) {\n let ranges = splitToRanges(min, max);\n let tokens = [];\n let start = min;\n let prev;\n\n for (let i = 0; i < ranges.length; i++) {\n let max = ranges[i];\n let obj = rangeToPattern(String(start), String(max), options);\n let zeros = '';\n\n if (!tok.isPadded && prev && prev.pattern === obj.pattern) {\n if (prev.count.length > 1) {\n prev.count.pop();\n }\n\n prev.count.push(obj.count[0]);\n prev.string = prev.pattern + toQuantifier(prev.count);\n start = max + 1;\n continue;\n }\n\n if (tok.isPadded) {\n zeros = padZeros(max, tok, options);\n }\n\n obj.string = zeros + obj.pattern + toQuantifier(obj.count);\n tokens.push(obj);\n start = max + 1;\n prev = obj;\n }\n\n return tokens;\n}\n\nfunction filterPatterns(arr, comparison, prefix, intersection, options) {\n let result = [];\n\n for (let ele of arr) {\n let { string } = ele;\n\n // only push if _both_ are negative...\n if (!intersection && !contains(comparison, 'string', string)) {\n result.push(prefix + string);\n }\n\n // or _both_ are positive\n if (intersection && contains(comparison, 'string', string)) {\n result.push(prefix + string);\n }\n }\n return result;\n}\n\n/**\n * Zip strings\n */\n\nfunction zip(a, b) {\n let arr = [];\n for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);\n return arr;\n}\n\nfunction compare(a, b) {\n return a > b ? 1 : b > a ? -1 : 0;\n}\n\nfunction contains(arr, key, val) {\n return arr.some(ele => ele[key] === val);\n}\n\nfunction countNines(min, len) {\n return Number(String(min).slice(0, -len) + '9'.repeat(len));\n}\n\nfunction countZeros(integer, zeros) {\n return integer - (integer % Math.pow(10, zeros));\n}\n\nfunction toQuantifier(digits) {\n let [start = 0, stop = ''] = digits;\n if (stop || start > 1) {\n return `{${start + (stop ? ',' + stop : '')}}`;\n }\n return '';\n}\n\nfunction toCharacterClass(a, b, options) {\n return `[${a}${(b - a === 1) ? '' : '-'}${b}]`;\n}\n\nfunction hasPadding(str) {\n return /^-?(0+)\\d/.test(str);\n}\n\nfunction padZeros(value, tok, options) {\n if (!tok.isPadded) {\n return value;\n }\n\n let diff = Math.abs(tok.maxLen - String(value).length);\n let relax = options.relaxZeros !== false;\n\n switch (diff) {\n case 0:\n return '';\n case 1:\n return relax ? '0?' : '0';\n case 2:\n return relax ? '0{0,2}' : '00';\n default: {\n return relax ? `0{0,${diff}}` : `0{${diff}}`;\n }\n }\n}\n\n/**\n * Cache\n */\n\ntoRegexRange.cache = {};\ntoRegexRange.clearCache = () => (toRegexRange.cache = {});\n\n/**\n * Expose `toRegexRange`\n */\n\nmodule.exports = toRegexRange;\n", "/*!\n * fill-range <https://github.com/jonschlinkert/fill-range>\n *\n * Copyright (c) 2014-present, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\nconst util = require('util');\nconst toRegexRange = require('to-regex-range');\n\nconst isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\n\nconst transform = toNumber => {\n return value => toNumber === true ? Number(value) : String(value);\n};\n\nconst isValidValue = value => {\n return typeof value === 'number' || (typeof value === 'string' && value !== '');\n};\n\nconst isNumber = num => Number.isInteger(+num);\n\nconst zeros = input => {\n let value = `${input}`;\n let index = -1;\n if (value[0] === '-') value = value.slice(1);\n if (value === '0') return false;\n while (value[++index] === '0');\n return index > 0;\n};\n\nconst stringify = (start, end, options) => {\n if (typeof start === 'string' || typeof end === 'string') {\n return true;\n }\n return options.stringify === true;\n};\n\nconst pad = (input, maxLength, toNumber) => {\n if (maxLength > 0) {\n let dash = input[0] === '-' ? '-' : '';\n if (dash) input = input.slice(1);\n input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0'));\n }\n if (toNumber === false) {\n return String(input);\n }\n return input;\n};\n\nconst toMaxLen = (input, maxLength) => {\n let negative = input[0] === '-' ? '-' : '';\n if (negative) {\n input = input.slice(1);\n maxLength--;\n }\n while (input.length < maxLength) input = '0' + input;\n return negative ? ('-' + input) : input;\n};\n\nconst toSequence = (parts, options) => {\n parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);\n parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);\n\n let prefix = options.capture ? '' : '?:';\n let positives = '';\n let negatives = '';\n let result;\n\n if (parts.positives.length) {\n positives = parts.positives.join('|');\n }\n\n if (parts.negatives.length) {\n negatives = `-(${prefix}${parts.negatives.join('|')})`;\n }\n\n if (positives && negatives) {\n result = `${positives}|${negatives}`;\n } else {\n result = positives || negatives;\n }\n\n if (options.wrap) {\n return `(${prefix}${result})`;\n }\n\n return result;\n};\n\nconst toRange = (a, b, isNumbers, options) => {\n if (isNumbers) {\n return toRegexRange(a, b, { wrap: false, ...options });\n }\n\n let start = String.fromCharCode(a);\n if (a === b) return start;\n\n let stop = String.fromCharCode(b);\n return `[${start}-${stop}]`;\n};\n\nconst toRegex = (start, end, options) => {\n if (Array.isArray(start)) {\n let wrap = options.wrap === true;\n let prefix = options.capture ? '' : '?:';\n return wrap ? `(${prefix}${start.join('|')})` : start.join('|');\n }\n return toRegexRange(start, end, options);\n};\n\nconst rangeError = (...args) => {\n return new RangeError('Invalid range arguments: ' + util.inspect(...args));\n};\n\nconst invalidRange = (start, end, options) => {\n if (options.strictRanges === true) throw rangeError([start, end]);\n return [];\n};\n\nconst invalidStep = (step, options) => {\n if (options.strictRanges === true) {\n throw new TypeError(`Expected step \"${step}\" to be a number`);\n }\n return [];\n};\n\nconst fillNumbers = (start, end, step = 1, options = {}) => {\n let a = Number(start);\n let b = Number(end);\n\n if (!Number.isInteger(a) || !Number.isInteger(b)) {\n if (options.strictRanges === true) throw rangeError([start, end]);\n return [];\n }\n\n // fix negative zero\n if (a === 0) a = 0;\n if (b === 0) b = 0;\n\n let descending = a > b;\n let startString = String(start);\n let endString = String(end);\n let stepString = String(step);\n step = Math.max(Math.abs(step), 1);\n\n let padded = zeros(startString) || zeros(endString) || zeros(stepString);\n let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;\n let toNumber = padded === false && stringify(start, end, options) === false;\n let format = options.transform || transform(toNumber);\n\n if (options.toRegex && step === 1) {\n return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);\n }\n\n let parts = { negatives: [], positives: [] };\n let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num));\n let range = [];\n let index = 0;\n\n while (descending ? a >= b : a <= b) {\n if (options.toRegex === true && step > 1) {\n push(a);\n } else {\n range.push(pad(format(a, index), maxLen, toNumber));\n }\n a = descending ? a - step : a + step;\n index++;\n }\n\n if (options.toRegex === true) {\n return step > 1\n ? toSequence(parts, options)\n : toRegex(range, null, { wrap: false, ...options });\n }\n\n return range;\n};\n\nconst fillLetters = (start, end, step = 1, options = {}) => {\n if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) {\n return invalidRange(start, end, options);\n }\n\n\n let format = options.transform || (val => String.fromCharCode(val));\n let a = `${start}`.charCodeAt(0);\n let b = `${end}`.charCodeAt(0);\n\n let descending = a > b;\n let min = Math.min(a, b);\n let max = Math.max(a, b);\n\n if (options.toRegex && step === 1) {\n return toRange(min, max, false, options);\n }\n\n let range = [];\n let index = 0;\n\n while (descending ? a >= b : a <= b) {\n range.push(format(a, index));\n a = descending ? a - step : a + step;\n index++;\n }\n\n if (options.toRegex === true) {\n return toRegex(range, null, { wrap: false, options });\n }\n\n return range;\n};\n\nconst fill = (start, end, step, options = {}) => {\n if (end == null && isValidValue(start)) {\n return [start];\n }\n\n if (!isValidValue(start) || !isValidValue(end)) {\n return invalidRange(start, end, options);\n }\n\n if (typeof step === 'function') {\n return fill(start, end, 1, { transform: step });\n }\n\n if (isObject(step)) {\n return fill(start, end, 0, step);\n }\n\n let opts = { ...options };\n if (opts.capture === true) opts.wrap = true;\n step = step || opts.step || 1;\n\n if (!isNumber(step)) {\n if (step != null && !isObject(step)) return invalidStep(step, opts);\n return fill(start, end, 1, step);\n }\n\n if (isNumber(start) && isNumber(end)) {\n return fillNumbers(start, end, step, opts);\n }\n\n return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);\n};\n\nmodule.exports = fill;\n", "'use strict';\n\nconst fill = require('fill-range');\nconst utils = require('./utils');\n\nconst compile = (ast, options = {}) => {\n let walk = (node, parent = {}) => {\n let invalidBlock = utils.isInvalidBrace(parent);\n let invalidNode = node.invalid === true && options.escapeInvalid === true;\n let invalid = invalidBlock === true || invalidNode === true;\n let prefix = options.escapeInvalid === true ? '\\\\' : '';\n let output = '';\n\n if (node.isOpen === true) {\n return prefix + node.value;\n }\n if (node.isClose === true) {\n return prefix + node.value;\n }\n\n if (node.type === 'open') {\n return invalid ? (prefix + node.value) : '(';\n }\n\n if (node.type === 'close') {\n return invalid ? (prefix + node.value) : ')';\n }\n\n if (node.type === 'comma') {\n return node.prev.type === 'comma' ? '' : (invalid ? node.value : '|');\n }\n\n if (node.value) {\n return node.value;\n }\n\n if (node.nodes && node.ranges > 0) {\n let args = utils.reduce(node.nodes);\n let range = fill(...args, { ...options, wrap: false, toRegex: true });\n\n if (range.length !== 0) {\n return args.length > 1 && range.length > 1 ? `(${range})` : range;\n }\n }\n\n if (node.nodes) {\n for (let child of node.nodes) {\n output += walk(child, node);\n }\n }\n return output;\n };\n\n return walk(ast);\n};\n\nmodule.exports = compile;\n", "'use strict';\n\nconst fill = require('fill-range');\nconst stringify = require('./stringify');\nconst utils = require('./utils');\n\nconst append = (queue = '', stash = '', enclose = false) => {\n let result = [];\n\n queue = [].concat(queue);\n stash = [].concat(stash);\n\n if (!stash.length) return queue;\n if (!queue.length) {\n return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash;\n }\n\n for (let item of queue) {\n if (Array.isArray(item)) {\n for (let value of item) {\n result.push(append(value, stash, enclose));\n }\n } else {\n for (let ele of stash) {\n if (enclose === true && typeof ele === 'string') ele = `{${ele}}`;\n result.push(Array.isArray(ele) ? append(item, ele, enclose) : (item + ele));\n }\n }\n }\n return utils.flatten(result);\n};\n\nconst expand = (ast, options = {}) => {\n let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit;\n\n let walk = (node, parent = {}) => {\n node.queue = [];\n\n let p = parent;\n let q = parent.queue;\n\n while (p.type !== 'brace' && p.type !== 'root' && p.parent) {\n p = p.parent;\n q = p.queue;\n }\n\n if (node.invalid || node.dollar) {\n q.push(append(q.pop(), stringify(node, options)));\n return;\n }\n\n if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) {\n q.push(append(q.pop(), ['{}']));\n return;\n }\n\n if (node.nodes && node.ranges > 0) {\n let args = utils.reduce(node.nodes);\n\n if (utils.exceedsLimit(...args, options.step, rangeLimit)) {\n throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');\n }\n\n let range = fill(...args, options);\n if (range.length === 0) {\n range = stringify(node, options);\n }\n\n q.push(append(q.pop(), range));\n node.nodes = [];\n return;\n }\n\n let enclose = utils.encloseBrace(node);\n let queue = node.queue;\n let block = node;\n\n while (block.type !== 'brace' && block.type !== 'root' && block.parent) {\n block = block.parent;\n queue = block.queue;\n }\n\n for (let i = 0; i < node.nodes.length; i++) {\n let child = node.nodes[i];\n\n if (child.type === 'comma' && node.type === 'brace') {\n if (i === 1) queue.push('');\n queue.push('');\n continue;\n }\n\n if (child.type === 'close') {\n q.push(append(q.pop(), queue, enclose));\n continue;\n }\n\n if (child.value && child.type !== 'open') {\n queue.push(append(queue.pop(), child.value));\n continue;\n }\n\n if (child.nodes) {\n walk(child, node);\n }\n }\n\n return queue;\n };\n\n return utils.flatten(walk(ast));\n};\n\nmodule.exports = expand;\n", "'use strict';\n\nmodule.exports = {\n MAX_LENGTH: 1024 * 64,\n\n // Digits\n CHAR_0: '0', /* 0 */\n CHAR_9: '9', /* 9 */\n\n // Alphabet chars.\n CHAR_UPPERCASE_A: 'A', /* A */\n CHAR_LOWERCASE_A: 'a', /* a */\n CHAR_UPPERCASE_Z: 'Z', /* Z */\n CHAR_LOWERCASE_Z: 'z', /* z */\n\n CHAR_LEFT_PARENTHESES: '(', /* ( */\n CHAR_RIGHT_PARENTHESES: ')', /* ) */\n\n CHAR_ASTERISK: '*', /* * */\n\n // Non-alphabetic chars.\n CHAR_AMPERSAND: '&', /* & */\n CHAR_AT: '@', /* @ */\n CHAR_BACKSLASH: '\\\\', /* \\ */\n CHAR_BACKTICK: '`', /* ` */\n CHAR_CARRIAGE_RETURN: '\\r', /* \\r */\n CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */\n CHAR_COLON: ':', /* : */\n CHAR_COMMA: ',', /* , */\n CHAR_DOLLAR: '$', /* . */\n CHAR_DOT: '.', /* . */\n CHAR_DOUBLE_QUOTE: '\"', /* \" */\n CHAR_EQUAL: '=', /* = */\n CHAR_EXCLAMATION_MARK: '!', /* ! */\n CHAR_FORM_FEED: '\\f', /* \\f */\n CHAR_FORWARD_SLASH: '/', /* / */\n CHAR_HASH: '#', /* # */\n CHAR_HYPHEN_MINUS: '-', /* - */\n CHAR_LEFT_ANGLE_BRACKET: '<', /* < */\n CHAR_LEFT_CURLY_BRACE: '{', /* { */\n CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */\n CHAR_LINE_FEED: '\\n', /* \\n */\n CHAR_NO_BREAK_SPACE: '\\u00A0', /* \\u00A0 */\n CHAR_PERCENT: '%', /* % */\n CHAR_PLUS: '+', /* + */\n CHAR_QUESTION_MARK: '?', /* ? */\n CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */\n CHAR_RIGHT_CURLY_BRACE: '}', /* } */\n CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */\n CHAR_SEMICOLON: ';', /* ; */\n CHAR_SINGLE_QUOTE: '\\'', /* ' */\n CHAR_SPACE: ' ', /* */\n CHAR_TAB: '\\t', /* \\t */\n CHAR_UNDERSCORE: '_', /* _ */\n CHAR_VERTICAL_LINE: '|', /* | */\n CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\\uFEFF' /* \\uFEFF */\n};\n", "'use strict';\n\nconst stringify = require('./stringify');\n\n/**\n * Constants\n */\n\nconst {\n MAX_LENGTH,\n CHAR_BACKSLASH, /* \\ */\n CHAR_BACKTICK, /* ` */\n CHAR_COMMA, /* , */\n CHAR_DOT, /* . */\n CHAR_LEFT_PARENTHESES, /* ( */\n CHAR_RIGHT_PARENTHESES, /* ) */\n CHAR_LEFT_CURLY_BRACE, /* { */\n CHAR_RIGHT_CURLY_BRACE, /* } */\n CHAR_LEFT_SQUARE_BRACKET, /* [ */\n CHAR_RIGHT_SQUARE_BRACKET, /* ] */\n CHAR_DOUBLE_QUOTE, /* \" */\n CHAR_SINGLE_QUOTE, /* ' */\n CHAR_NO_BREAK_SPACE,\n CHAR_ZERO_WIDTH_NOBREAK_SPACE\n} = require('./constants');\n\n/**\n * parse\n */\n\nconst parse = (input, options = {}) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n let opts = options || {};\n let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n if (input.length > max) {\n throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);\n }\n\n let ast = { type: 'root', input, nodes: [] };\n let stack = [ast];\n let block = ast;\n let prev = ast;\n let brackets = 0;\n let length = input.length;\n let index = 0;\n let depth = 0;\n let value;\n let memo = {};\n\n /**\n * Helpers\n */\n\n const advance = () => input[index++];\n const push = node => {\n if (node.type === 'text' && prev.type === 'dot') {\n prev.type = 'text';\n }\n\n if (prev && prev.type === 'text' && node.type === 'text') {\n prev.value += node.value;\n return;\n }\n\n block.nodes.push(node);\n node.parent = block;\n node.prev = prev;\n prev = node;\n return node;\n };\n\n push({ type: 'bos' });\n\n while (index < length) {\n block = stack[stack.length - 1];\n value = advance();\n\n /**\n * Invalid chars\n */\n\n if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {\n continue;\n }\n\n /**\n * Escaped chars\n */\n\n if (value === CHAR_BACKSLASH) {\n push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() });\n continue;\n }\n\n /**\n * Right square bracket (literal): ']'\n */\n\n if (value === CHAR_RIGHT_SQUARE_BRACKET) {\n push({ type: 'text', value: '\\\\' + value });\n continue;\n }\n\n /**\n * Left square bracket: '['\n */\n\n if (value === CHAR_LEFT_SQUARE_BRACKET) {\n brackets++;\n\n let closed = true;\n let next;\n\n while (index < length && (next = advance())) {\n value += next;\n\n if (next === CHAR_LEFT_SQUARE_BRACKET) {\n brackets++;\n continue;\n }\n\n if (next === CHAR_BACKSLASH) {\n value += advance();\n continue;\n }\n\n if (next === CHAR_RIGHT_SQUARE_BRACKET) {\n brackets--;\n\n if (brackets === 0) {\n break;\n }\n }\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Parentheses\n */\n\n if (value === CHAR_LEFT_PARENTHESES) {\n block = push({ type: 'paren', nodes: [] });\n stack.push(block);\n push({ type: 'text', value });\n continue;\n }\n\n if (value === CHAR_RIGHT_PARENTHESES) {\n if (block.type !== 'paren') {\n push({ type: 'text', value });\n continue;\n }\n block = stack.pop();\n push({ type: 'text', value });\n block = stack[stack.length - 1];\n continue;\n }\n\n /**\n * Quotes: '|\"|`\n */\n\n if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {\n let open = value;\n let next;\n\n if (options.keepQuotes !== true) {\n value = '';\n }\n\n while (index < length && (next = advance())) {\n if (next === CHAR_BACKSLASH) {\n value += next + advance();\n continue;\n }\n\n if (next === open) {\n if (options.keepQuotes === true) value += next;\n break;\n }\n\n value += next;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Left curly brace: '{'\n */\n\n if (value === CHAR_LEFT_CURLY_BRACE) {\n depth++;\n\n let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true;\n let brace = {\n type: 'brace',\n open: true,\n close: false,\n dollar,\n depth,\n commas: 0,\n ranges: 0,\n nodes: []\n };\n\n block = push(brace);\n stack.push(block);\n push({ type: 'open', value });\n continue;\n }\n\n /**\n * Right curly brace: '}'\n */\n\n if (value === CHAR_RIGHT_CURLY_BRACE) {\n if (block.type !== 'brace') {\n push({ type: 'text', value });\n continue;\n }\n\n let type = 'close';\n block = stack.pop();\n block.close = true;\n\n push({ type, value });\n depth--;\n\n block = stack[stack.length - 1];\n continue;\n }\n\n /**\n * Comma: ','\n */\n\n if (value === CHAR_COMMA && depth > 0) {\n if (block.ranges > 0) {\n block.ranges = 0;\n let open = block.nodes.shift();\n block.nodes = [open, { type: 'text', value: stringify(block) }];\n }\n\n push({ type: 'comma', value });\n block.commas++;\n continue;\n }\n\n /**\n * Dot: '.'\n */\n\n if (value === CHAR_DOT && depth > 0 && block.commas === 0) {\n let siblings = block.nodes;\n\n if (depth === 0 || siblings.length === 0) {\n push({ type: 'text', value });\n continue;\n }\n\n if (prev.type === 'dot') {\n block.range = [];\n prev.value += value;\n prev.type = 'range';\n\n if (block.nodes.length !== 3 && block.nodes.length !== 5) {\n block.invalid = true;\n block.ranges = 0;\n prev.type = 'text';\n continue;\n }\n\n block.ranges++;\n block.args = [];\n continue;\n }\n\n if (prev.type === 'range') {\n siblings.pop();\n\n let before = siblings[siblings.length - 1];\n before.value += prev.value + value;\n prev = before;\n block.ranges--;\n continue;\n }\n\n push({ type: 'dot', value });\n continue;\n }\n\n /**\n * Text\n */\n\n push({ type: 'text', value });\n }\n\n // Mark imbalanced braces and brackets as invalid\n do {\n block = stack.pop();\n\n if (block.type !== 'root') {\n block.nodes.forEach(node => {\n if (!node.nodes) {\n if (node.type === 'open') node.isOpen = true;\n if (node.type === 'close') node.isClose = true;\n if (!node.nodes) node.type = 'text';\n node.invalid = true;\n }\n });\n\n // get the location of the block on parent.nodes (block's siblings)\n let parent = stack[stack.length - 1];\n let index = parent.nodes.indexOf(block);\n // replace the (invalid) block with it's nodes\n parent.nodes.splice(index, 1, ...block.nodes);\n }\n } while (stack.length > 0);\n\n push({ type: 'eos' });\n return ast;\n};\n\nmodule.exports = parse;\n", "'use strict';\n\nconst stringify = require('./lib/stringify');\nconst compile = require('./lib/compile');\nconst expand = require('./lib/expand');\nconst parse = require('./lib/parse');\n\n/**\n * Expand the given pattern or create a regex-compatible string.\n *\n * ```js\n * const braces = require('braces');\n * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)']\n * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c']\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {String}\n * @api public\n */\n\nconst braces = (input, options = {}) => {\n let output = [];\n\n if (Array.isArray(input)) {\n for (let pattern of input) {\n let result = braces.create(pattern, options);\n if (Array.isArray(result)) {\n output.push(...result);\n } else {\n output.push(result);\n }\n }\n } else {\n output = [].concat(braces.create(input, options));\n }\n\n if (options && options.expand === true && options.nodupes === true) {\n output = [...new Set(output)];\n }\n return output;\n};\n\n/**\n * Parse the given `str` with the given `options`.\n *\n * ```js\n * // braces.parse(pattern, [, options]);\n * const ast = braces.parse('a/{b,c}/d');\n * console.log(ast);\n * ```\n * @param {String} pattern Brace pattern to parse\n * @param {Object} options\n * @return {Object} Returns an AST\n * @api public\n */\n\nbraces.parse = (input, options = {}) => parse(input, options);\n\n/**\n * Creates a braces string from an AST, or an AST node.\n *\n * ```js\n * const braces = require('braces');\n * let ast = braces.parse('foo/{a,b}/bar');\n * console.log(stringify(ast.nodes[2])); //=> '{a,b}'\n * ```\n * @param {String} `input` Brace pattern or AST.\n * @param {Object} `options`\n * @return {Array} Returns an array of expanded values.\n * @api public\n */\n\nbraces.stringify = (input, options = {}) => {\n if (typeof input === 'string') {\n return stringify(braces.parse(input, options), options);\n }\n return stringify(input, options);\n};\n\n/**\n * Compiles a brace pattern into a regex-compatible, optimized string.\n * This method is called by the main [braces](#braces) function by default.\n *\n * ```js\n * const braces = require('braces');\n * console.log(braces.compile('a/{b,c}/d'));\n * //=> ['a/(b|c)/d']\n * ```\n * @param {String} `input` Brace pattern or AST.\n * @param {Object} `options`\n * @return {Array} Returns an array of expanded values.\n * @api public\n */\n\nbraces.compile = (input, options = {}) => {\n if (typeof input === 'string') {\n input = braces.parse(input, options);\n }\n return compile(input, options);\n};\n\n/**\n * Expands a brace pattern into an array. This method is called by the\n * main [braces](#braces) function when `options.expand` is true. Before\n * using this method it's recommended that you read the [performance notes](#performance))\n * and advantages of using [.compile](#compile) instead.\n *\n * ```js\n * const braces = require('braces');\n * console.log(braces.expand('a/{b,c}/d'));\n * //=> ['a/b/d', 'a/c/d'];\n * ```\n * @param {String} `pattern` Brace pattern\n * @param {Object} `options`\n * @return {Array} Returns an array of expanded values.\n * @api public\n */\n\nbraces.expand = (input, options = {}) => {\n if (typeof input === 'string') {\n input = braces.parse(input, options);\n }\n\n let result = expand(input, options);\n\n // filter out empty strings if specified\n if (options.noempty === true) {\n result = result.filter(Boolean);\n }\n\n // filter out duplicates if specified\n if (options.nodupes === true) {\n result = [...new Set(result)];\n }\n\n return result;\n};\n\n/**\n * Processes a brace pattern and returns either an expanded array\n * (if `options.expand` is true), a highly optimized regex-compatible string.\n * This method is called by the main [braces](#braces) function.\n *\n * ```js\n * const braces = require('braces');\n * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}'))\n * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)'\n * ```\n * @param {String} `pattern` Brace pattern\n * @param {Object} `options`\n * @return {Array} Returns an array of expanded values.\n * @api public\n */\n\nbraces.create = (input, options = {}) => {\n if (input === '' || input.length < 3) {\n return [input];\n }\n\n return options.expand !== true\n ? braces.compile(input, options)\n : braces.expand(input, options);\n};\n\n/**\n * Expose \"braces\"\n */\n\nmodule.exports = braces;\n", "[\n\t\"3dm\",\n\t\"3ds\",\n\t\"3g2\",\n\t\"3gp\",\n\t\"7z\",\n\t\"a\",\n\t\"aac\",\n\t\"adp\",\n\t\"ai\",\n\t\"aif\",\n\t\"aiff\",\n\t\"alz\",\n\t\"ape\",\n\t\"apk\",\n\t\"appimage\",\n\t\"ar\",\n\t\"arj\",\n\t\"asf\",\n\t\"au\",\n\t\"avi\",\n\t\"bak\",\n\t\"baml\",\n\t\"bh\",\n\t\"bin\",\n\t\"bk\",\n\t\"bmp\",\n\t\"btif\",\n\t\"bz2\",\n\t\"bzip2\",\n\t\"cab\",\n\t\"caf\",\n\t\"cgm\",\n\t\"class\",\n\t\"cmx\",\n\t\"cpio\",\n\t\"cr2\",\n\t\"cur\",\n\t\"dat\",\n\t\"dcm\",\n\t\"deb\",\n\t\"dex\",\n\t\"djvu\",\n\t\"dll\",\n\t\"dmg\",\n\t\"dng\",\n\t\"doc\",\n\t\"docm\",\n\t\"docx\",\n\t\"dot\",\n\t\"dotm\",\n\t\"dra\",\n\t\"DS_Store\",\n\t\"dsk\",\n\t\"dts\",\n\t\"dtshd\",\n\t\"dvb\",\n\t\"dwg\",\n\t\"dxf\",\n\t\"ecelp4800\",\n\t\"ecelp7470\",\n\t\"ecelp9600\",\n\t\"egg\",\n\t\"eol\",\n\t\"eot\",\n\t\"epub\",\n\t\"exe\",\n\t\"f4v\",\n\t\"fbs\",\n\t\"fh\",\n\t\"fla\",\n\t\"flac\",\n\t\"flatpak\",\n\t\"fli\",\n\t\"flv\",\n\t\"fpx\",\n\t\"fst\",\n\t\"fvt\",\n\t\"g3\",\n\t\"gh\",\n\t\"gif\",\n\t\"graffle\",\n\t\"gz\",\n\t\"gzip\",\n\t\"h261\",\n\t\"h263\",\n\t\"h264\",\n\t\"icns\",\n\t\"ico\",\n\t\"ief\",\n\t\"img\",\n\t\"ipa\",\n\t\"iso\",\n\t\"jar\",\n\t\"jpeg\",\n\t\"jpg\",\n\t\"jpgv\",\n\t\"jpm\",\n\t\"jxr\",\n\t\"key\",\n\t\"ktx\",\n\t\"lha\",\n\t\"lib\",\n\t\"lvp\",\n\t\"lz\",\n\t\"lzh\",\n\t\"lzma\",\n\t\"lzo\",\n\t\"m3u\",\n\t\"m4a\",\n\t\"m4v\",\n\t\"mar\",\n\t\"mdi\",\n\t\"mht\",\n\t\"mid\",\n\t\"midi\",\n\t\"mj2\",\n\t\"mka\",\n\t\"mkv\",\n\t\"mmr\",\n\t\"mng\",\n\t\"mobi\",\n\t\"mov\",\n\t\"movie\",\n\t\"mp3\",\n\t\"mp4\",\n\t\"mp4a\",\n\t\"mpeg\",\n\t\"mpg\",\n\t\"mpga\",\n\t\"mxu\",\n\t\"nef\",\n\t\"npx\",\n\t\"numbers\",\n\t\"nupkg\",\n\t\"o\",\n\t\"odp\",\n\t\"ods\",\n\t\"odt\",\n\t\"oga\",\n\t\"ogg\",\n\t\"ogv\",\n\t\"otf\",\n\t\"ott\",\n\t\"pages\",\n\t\"pbm\",\n\t\"pcx\",\n\t\"pdb\",\n\t\"pdf\",\n\t\"pea\",\n\t\"pgm\",\n\t\"pic\",\n\t\"png\",\n\t\"pnm\",\n\t\"pot\",\n\t\"potm\",\n\t\"potx\",\n\t\"ppa\",\n\t\"ppam\",\n\t\"ppm\",\n\t\"pps\",\n\t\"ppsm\",\n\t\"ppsx\",\n\t\"ppt\",\n\t\"pptm\",\n\t\"pptx\",\n\t\"psd\",\n\t\"pya\",\n\t\"pyc\",\n\t\"pyo\",\n\t\"pyv\",\n\t\"qt\",\n\t\"rar\",\n\t\"ras\",\n\t\"raw\",\n\t\"resources\",\n\t\"rgb\",\n\t\"rip\",\n\t\"rlc\",\n\t\"rmf\",\n\t\"rmvb\",\n\t\"rpm\",\n\t\"rtf\",\n\t\"rz\",\n\t\"s3m\",\n\t\"s7z\",\n\t\"scpt\",\n\t\"sgi\",\n\t\"shar\",\n\t\"snap\",\n\t\"sil\",\n\t\"sketch\",\n\t\"slk\",\n\t\"smv\",\n\t\"snk\",\n\t\"so\",\n\t\"stl\",\n\t\"suo\",\n\t\"sub\",\n\t\"swf\",\n\t\"tar\",\n\t\"tbz\",\n\t\"tbz2\",\n\t\"tga\",\n\t\"tgz\",\n\t\"thmx\",\n\t\"tif\",\n\t\"tiff\",\n\t\"tlz\",\n\t\"ttc\",\n\t\"ttf\",\n\t\"txz\",\n\t\"udf\",\n\t\"uvh\",\n\t\"uvi\",\n\t\"uvm\",\n\t\"uvp\",\n\t\"uvs\",\n\t\"uvu\",\n\t\"viv\",\n\t\"vob\",\n\t\"war\",\n\t\"wav\",\n\t\"wax\",\n\t\"wbmp\",\n\t\"wdp\",\n\t\"weba\",\n\t\"webm\",\n\t\"webp\",\n\t\"whl\",\n\t\"wim\",\n\t\"wm\",\n\t\"wma\",\n\t\"wmv\",\n\t\"wmx\",\n\t\"woff\",\n\t\"woff2\",\n\t\"wrm\",\n\t\"wvx\",\n\t\"xbm\",\n\t\"xif\",\n\t\"xla\",\n\t\"xlam\",\n\t\"xls\",\n\t\"xlsb\",\n\t\"xlsm\",\n\t\"xlsx\",\n\t\"xlt\",\n\t\"xltm\",\n\t\"xltx\",\n\t\"xm\",\n\t\"xmind\",\n\t\"xpi\",\n\t\"xpm\",\n\t\"xwd\",\n\t\"xz\",\n\t\"z\",\n\t\"zip\",\n\t\"zipx\"\n]\n", "module.exports = require('./binary-extensions.json');\n", "'use strict';\nconst path = require('path');\nconst binaryExtensions = require('binary-extensions');\n\nconst extensions = new Set(binaryExtensions);\n\nmodule.exports = filePath => extensions.has(path.extname(filePath).slice(1).toLowerCase());\n", "'use strict';\n\nconst {sep} = require('path');\nconst {platform} = process;\n\nexports.EV_ALL = 'all';\nexports.EV_READY = 'ready';\nexports.EV_ADD = 'add';\nexports.EV_CHANGE = 'change';\nexports.EV_ADD_DIR = 'addDir';\nexports.EV_UNLINK = 'unlink';\nexports.EV_UNLINK_DIR = 'unlinkDir';\nexports.EV_RAW = 'raw';\nexports.EV_ERROR = 'error';\n\nexports.STR_DATA = 'data';\nexports.STR_END = 'end';\nexports.STR_CLOSE = 'close';\n\nexports.FSEVENT_CREATED = 'created';\nexports.FSEVENT_MODIFIED = 'modified';\nexports.FSEVENT_DELETED = 'deleted';\nexports.FSEVENT_MOVED = 'moved';\nexports.FSEVENT_CLONED = 'cloned';\nexports.FSEVENT_UNKNOWN = 'unknown';\nexports.FSEVENT_TYPE_FILE = 'file';\nexports.FSEVENT_TYPE_DIRECTORY = 'directory';\nexports.FSEVENT_TYPE_SYMLINK = 'symlink';\n\nexports.KEY_LISTENERS = 'listeners';\nexports.KEY_ERR = 'errHandlers';\nexports.KEY_RAW = 'rawEmitters';\nexports.HANDLER_KEYS = [exports.KEY_LISTENERS, exports.KEY_ERR, exports.KEY_RAW];\n\nexports.DOT_SLASH = `.${sep}`;\n\nexports.BACK_SLASH_RE = /\\\\/g;\nexports.DOUBLE_SLASH_RE = /\\/\\//;\nexports.SLASH_OR_BACK_SLASH_RE = /[/\\\\]/;\nexports.DOT_RE = /\\..*\\.(sw[px])$|~$|\\.subl.*\\.tmp/;\nexports.REPLACER_RE = /^\\.[/\\\\]/;\n\nexports.SLASH = '/';\nexports.SLASH_SLASH = '//';\nexports.BRACE_START = '{';\nexports.BANG = '!';\nexports.ONE_DOT = '.';\nexports.TWO_DOTS = '..';\nexports.STAR = '*';\nexports.GLOBSTAR = '**';\nexports.ROOT_GLOBSTAR = '/**/*';\nexports.SLASH_GLOBSTAR = '/**';\nexports.DIR_SUFFIX = 'Dir';\nexports.ANYMATCH_OPTS = {dot: true};\nexports.STRING_TYPE = 'string';\nexports.FUNCTION_TYPE = 'function';\nexports.EMPTY_STR = '';\nexports.EMPTY_FN = () => {};\nexports.IDENTITY_FN = val => val;\n\nexports.isWindows = platform === 'win32';\nexports.isMacos = platform === 'darwin';\nexports.isLinux = platform === 'linux';\n", "'use strict';\n\nconst fs = require('fs');\nconst sysPath = require('path');\nconst { promisify } = require('util');\nconst isBinaryPath = require('is-binary-path');\nconst {\n isWindows,\n isLinux,\n EMPTY_FN,\n EMPTY_STR,\n KEY_LISTENERS,\n KEY_ERR,\n KEY_RAW,\n HANDLER_KEYS,\n EV_CHANGE,\n EV_ADD,\n EV_ADD_DIR,\n EV_ERROR,\n STR_DATA,\n STR_END,\n BRACE_START,\n STAR\n} = require('./constants');\n\nconst THROTTLE_MODE_WATCH = 'watch';\n\nconst open = promisify(fs.open);\nconst stat = promisify(fs.stat);\nconst lstat = promisify(fs.lstat);\nconst close = promisify(fs.close);\nconst fsrealpath = promisify(fs.realpath);\n\nconst statMethods = { lstat, stat };\n\n// TODO: emit errors properly. Example: EMFILE on Macos.\nconst foreach = (val, fn) => {\n if (val instanceof Set) {\n val.forEach(fn);\n } else {\n fn(val);\n }\n};\n\nconst addAndConvert = (main, prop, item) => {\n let container = main[prop];\n if (!(container instanceof Set)) {\n main[prop] = container = new Set([container]);\n }\n container.add(item);\n};\n\nconst clearItem = cont => key => {\n const set = cont[key];\n if (set instanceof Set) {\n set.clear();\n } else {\n delete cont[key];\n }\n};\n\nconst delFromSet = (main, prop, item) => {\n const container = main[prop];\n if (container instanceof Set) {\n container.delete(item);\n } else if (container === item) {\n delete main[prop];\n }\n};\n\nconst isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val;\n\n/**\n * @typedef {String} Path\n */\n\n// fs_watch helpers\n\n// object to hold per-process fs_watch instances\n// (may be shared across chokidar FSWatcher instances)\n\n/**\n * @typedef {Object} FsWatchContainer\n * @property {Set} listeners\n * @property {Set} errHandlers\n * @property {Set} rawEmitters\n * @property {fs.FSWatcher=} watcher\n * @property {Boolean=} watcherUnusable\n */\n\n/**\n * @type {Map<String,FsWatchContainer>}\n */\nconst FsWatchInstances = new Map();\n\n/**\n * Instantiates the fs_watch interface\n * @param {String} path to be watched\n * @param {Object} options to be passed to fs_watch\n * @param {Function} listener main event handler\n * @param {Function} errHandler emits info about errors\n * @param {Function} emitRaw emits raw event data\n * @returns {fs.FSWatcher} new fsevents instance\n */\nfunction createFsWatchInstance(path, options, listener, errHandler, emitRaw) {\n const handleEvent = (rawEvent, evPath) => {\n listener(path);\n emitRaw(rawEvent, evPath, {watchedPath: path});\n\n // emit based on events occurring for files from a directory's watcher in\n // case the file's watcher misses it (and rely on throttling to de-dupe)\n if (evPath && path !== evPath) {\n fsWatchBroadcast(\n sysPath.resolve(path, evPath), KEY_LISTENERS, sysPath.join(path, evPath)\n );\n }\n };\n try {\n return fs.watch(path, options, handleEvent);\n } catch (error) {\n errHandler(error);\n }\n}\n\n/**\n * Helper for passing fs_watch event data to a collection of listeners\n * @param {Path} fullPath absolute path bound to fs_watch instance\n * @param {String} type listener type\n * @param {*=} val1 arguments to be passed to listeners\n * @param {*=} val2\n * @param {*=} val3\n */\nconst fsWatchBroadcast = (fullPath, type, val1, val2, val3) => {\n const cont = FsWatchInstances.get(fullPath);\n if (!cont) return;\n foreach(cont[type], (listener) => {\n listener(val1, val2, val3);\n });\n};\n\n/**\n * Instantiates the fs_watch interface or binds listeners\n * to an existing one covering the same file system entry\n * @param {String} path\n * @param {String} fullPath absolute path\n * @param {Object} options to be passed to fs_watch\n * @param {Object} handlers container for event listener functions\n */\nconst setFsWatchListener = (path, fullPath, options, handlers) => {\n const {listener, errHandler, rawEmitter} = handlers;\n let cont = FsWatchInstances.get(fullPath);\n\n /** @type {fs.FSWatcher=} */\n let watcher;\n if (!options.persistent) {\n watcher = createFsWatchInstance(\n path, options, listener, errHandler, rawEmitter\n );\n return watcher.close.bind(watcher);\n }\n if (cont) {\n addAndConvert(cont, KEY_LISTENERS, listener);\n addAndConvert(cont, KEY_ERR, errHandler);\n addAndConvert(cont, KEY_RAW, rawEmitter);\n } else {\n watcher = createFsWatchInstance(\n path,\n options,\n fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS),\n errHandler, // no need to use broadcast here\n fsWatchBroadcast.bind(null, fullPath, KEY_RAW)\n );\n if (!watcher) return;\n watcher.on(EV_ERROR, async (error) => {\n const broadcastErr = fsWatchBroadcast.bind(null, fullPath, KEY_ERR);\n cont.watcherUnusable = true; // documented since Node 10.4.1\n // Workaround for https://github.com/joyent/node/issues/4337\n if (isWindows && error.code === 'EPERM') {\n try {\n const fd = await open(path, 'r');\n await close(fd);\n broadcastErr(error);\n } catch (err) {}\n } else {\n broadcastErr(error);\n }\n });\n cont = {\n listeners: listener,\n errHandlers: errHandler,\n rawEmitters: rawEmitter,\n watcher\n };\n FsWatchInstances.set(fullPath, cont);\n }\n // const index = cont.listeners.indexOf(listener);\n\n // removes this instance's listeners and closes the underlying fs_watch\n // instance if there are no more listeners left\n return () => {\n delFromSet(cont, KEY_LISTENERS, listener);\n delFromSet(cont, KEY_ERR, errHandler);\n delFromSet(cont, KEY_RAW, rawEmitter);\n if (isEmptySet(cont.listeners)) {\n // Check to protect against issue gh-730.\n // if (cont.watcherUnusable) {\n cont.watcher.close();\n // }\n FsWatchInstances.delete(fullPath);\n HANDLER_KEYS.forEach(clearItem(cont));\n cont.watcher = undefined;\n Object.freeze(cont);\n }\n };\n};\n\n// fs_watchFile helpers\n\n// object to hold per-process fs_watchFile instances\n// (may be shared across chokidar FSWatcher instances)\nconst FsWatchFileInstances = new Map();\n\n/**\n * Instantiates the fs_watchFile interface or binds listeners\n * to an existing one covering the same file system entry\n * @param {String} path to be watched\n * @param {String} fullPath absolute path\n * @param {Object} options options to be passed to fs_watchFile\n * @param {Object} handlers container for event listener functions\n * @returns {Function} closer\n */\nconst setFsWatchFileListener = (path, fullPath, options, handlers) => {\n const {listener, rawEmitter} = handlers;\n let cont = FsWatchFileInstances.get(fullPath);\n\n /* eslint-disable no-unused-vars, prefer-destructuring */\n let listeners = new Set();\n let rawEmitters = new Set();\n\n const copts = cont && cont.options;\n if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) {\n // \"Upgrade\" the watcher to persistence or a quicker interval.\n // This creates some unlikely edge case issues if the user mixes\n // settings in a very weird way, but solving for those cases\n // doesn't seem worthwhile for the added complexity.\n listeners = cont.listeners;\n rawEmitters = cont.rawEmitters;\n fs.unwatchFile(fullPath);\n cont = undefined;\n }\n\n /* eslint-enable no-unused-vars, prefer-destructuring */\n\n if (cont) {\n addAndConvert(cont, KEY_LISTENERS, listener);\n addAndConvert(cont, KEY_RAW, rawEmitter);\n } else {\n // TODO\n // listeners.add(listener);\n // rawEmitters.add(rawEmitter);\n cont = {\n listeners: listener,\n rawEmitters: rawEmitter,\n options,\n watcher: fs.watchFile(fullPath, options, (curr, prev) => {\n foreach(cont.rawEmitters, (rawEmitter) => {\n rawEmitter(EV_CHANGE, fullPath, {curr, prev});\n });\n const currmtime = curr.mtimeMs;\n if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) {\n foreach(cont.listeners, (listener) => listener(path, curr));\n }\n })\n };\n FsWatchFileInstances.set(fullPath, cont);\n }\n // const index = cont.listeners.indexOf(listener);\n\n // Removes this instance's listeners and closes the underlying fs_watchFile\n // instance if there are no more listeners left.\n return () => {\n delFromSet(cont, KEY_LISTENERS, listener);\n delFromSet(cont, KEY_RAW, rawEmitter);\n if (isEmptySet(cont.listeners)) {\n FsWatchFileInstances.delete(fullPath);\n fs.unwatchFile(fullPath);\n cont.options = cont.watcher = undefined;\n Object.freeze(cont);\n }\n };\n};\n\n/**\n * @mixin\n */\nclass NodeFsHandler {\n\n/**\n * @param {import(\"../index\").FSWatcher} fsW\n */\nconstructor(fsW) {\n this.fsw = fsW;\n this._boundHandleError = (error) => fsW._handleError(error);\n}\n\n/**\n * Watch file for changes with fs_watchFile or fs_watch.\n * @param {String} path to file or dir\n * @param {Function} listener on fs change\n * @returns {Function} closer for the watcher instance\n */\n_watchWithNodeFs(path, listener) {\n const opts = this.fsw.options;\n const directory = sysPath.dirname(path);\n const basename = sysPath.basename(path);\n const parent = this.fsw._getWatchedDir(directory);\n parent.add(basename);\n const absolutePath = sysPath.resolve(path);\n const options = {persistent: opts.persistent};\n if (!listener) listener = EMPTY_FN;\n\n let closer;\n if (opts.usePolling) {\n options.interval = opts.enableBinaryInterval && isBinaryPath(basename) ?\n opts.binaryInterval : opts.interval;\n closer = setFsWatchFileListener(path, absolutePath, options, {\n listener,\n rawEmitter: this.fsw._emitRaw\n });\n } else {\n closer = setFsWatchListener(path, absolutePath, options, {\n listener,\n errHandler: this._boundHandleError,\n rawEmitter: this.fsw._emitRaw\n });\n }\n return closer;\n}\n\n/**\n * Watch a file and emit add event if warranted.\n * @param {Path} file Path\n * @param {fs.Stats} stats result of fs_stat\n * @param {Boolean} initialAdd was the file added at watch instantiation?\n * @returns {Function} closer for the watcher instance\n */\n_handleFile(file, stats, initialAdd) {\n if (this.fsw.closed) {\n return;\n }\n const dirname = sysPath.dirname(file);\n const basename = sysPath.basename(file);\n const parent = this.fsw._getWatchedDir(dirname);\n // stats is always present\n let prevStats = stats;\n\n // if the file is already being watched, do nothing\n if (parent.has(basename)) return;\n\n const listener = async (path, newStats) => {\n if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5)) return;\n if (!newStats || newStats.mtimeMs === 0) {\n try {\n const newStats = await stat(file);\n if (this.fsw.closed) return;\n // Check that change event was not fired because of changed only accessTime.\n const at = newStats.atimeMs;\n const mt = newStats.mtimeMs;\n if (!at || at <= mt || mt !== prevStats.mtimeMs) {\n this.fsw._emit(EV_CHANGE, file, newStats);\n }\n if (isLinux && prevStats.ino !== newStats.ino) {\n this.fsw._closeFile(path)\n prevStats = newStats;\n this.fsw._addPathCloser(path, this._watchWithNodeFs(file, listener));\n } else {\n prevStats = newStats;\n }\n } catch (error) {\n // Fix issues where mtime is null but file is still present\n this.fsw._remove(dirname, basename);\n }\n // add is about to be emitted if file not already tracked in parent\n } else if (parent.has(basename)) {\n // Check that change event was not fired because of changed only accessTime.\n const at = newStats.atimeMs;\n const mt = newStats.mtimeMs;\n if (!at || at <= mt || mt !== prevStats.mtimeMs) {\n this.fsw._emit(EV_CHANGE, file, newStats);\n }\n prevStats = newStats;\n }\n }\n // kick off the watcher\n const closer = this._watchWithNodeFs(file, listener);\n\n // emit an add event if we're supposed to\n if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file)) {\n if (!this.fsw._throttle(EV_ADD, file, 0)) return;\n this.fsw._emit(EV_ADD, file, stats);\n }\n\n return closer;\n}\n\n/**\n * Handle symlinks encountered while reading a dir.\n * @param {Object} entry returned by readdirp\n * @param {String} directory path of dir being read\n * @param {String} path of this item\n * @param {String} item basename of this item\n * @returns {Promise<Boolean>} true if no more processing is needed for this entry.\n */\nasync _handleSymlink(entry, directory, path, item) {\n if (this.fsw.closed) {\n return;\n }\n const full = entry.fullPath;\n const dir = this.fsw._getWatchedDir(directory);\n\n if (!this.fsw.options.followSymlinks) {\n // watch symlink directly (don't follow) and detect changes\n this.fsw._incrReadyCount();\n const linkPath = await fsrealpath(path);\n if (this.fsw.closed) return;\n if (dir.has(item)) {\n if (this.fsw._symlinkPaths.get(full) !== linkPath) {\n this.fsw._symlinkPaths.set(full, linkPath);\n this.fsw._emit(EV_CHANGE, path, entry.stats);\n }\n } else {\n dir.add(item);\n this.fsw._symlinkPaths.set(full, linkPath);\n this.fsw._emit(EV_ADD, path, entry.stats);\n }\n this.fsw._emitReady();\n return true;\n }\n\n // don't follow the same symlink more than once\n if (this.fsw._symlinkPaths.has(full)) {\n return true;\n }\n\n this.fsw._symlinkPaths.set(full, true);\n}\n\n_handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {\n // Normalize the directory name on Windows\n directory = sysPath.join(directory, EMPTY_STR);\n\n if (!wh.hasGlob) {\n throttler = this.fsw._throttle('readdir', directory, 1000);\n if (!throttler) return;\n }\n\n const previous = this.fsw._getWatchedDir(wh.path);\n const current = new Set();\n\n let stream = this.fsw._readdirp(directory, {\n fileFilter: entry => wh.filterPath(entry),\n directoryFilter: entry => wh.filterDir(entry),\n depth: 0\n }).on(STR_DATA, async (entry) => {\n if (this.fsw.closed) {\n stream = undefined;\n return;\n }\n const item = entry.path;\n let path = sysPath.join(directory, item);\n current.add(item);\n\n if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path, item)) {\n return;\n }\n\n if (this.fsw.closed) {\n stream = undefined;\n return;\n }\n // Files that present in current directory snapshot\n // but absent in previous are added to watch list and\n // emit `add` event.\n if (item === target || !target && !previous.has(item)) {\n this.fsw._incrReadyCount();\n\n // ensure relativeness of path is preserved in case of watcher reuse\n path = sysPath.join(dir, sysPath.relative(dir, path));\n\n this._addToNodeFs(path, initialAdd, wh, depth + 1);\n }\n }).on(EV_ERROR, this._boundHandleError);\n\n return new Promise(resolve =>\n stream.once(STR_END, () => {\n if (this.fsw.closed) {\n stream = undefined;\n return;\n }\n const wasThrottled = throttler ? throttler.clear() : false;\n\n resolve();\n\n // Files that absent in current directory snapshot\n // but present in previous emit `remove` event\n // and are removed from @watched[directory].\n previous.getChildren().filter((item) => {\n return item !== directory &&\n !current.has(item) &&\n // in case of intersecting globs;\n // a path may have been filtered out of this readdir, but\n // shouldn't be removed because it matches a different glob\n (!wh.hasGlob || wh.filterPath({\n fullPath: sysPath.resolve(directory, item)\n }));\n }).forEach((item) => {\n this.fsw._remove(directory, item);\n });\n\n stream = undefined;\n\n // one more time for any missed in case changes came in extremely quickly\n if (wasThrottled) this._handleRead(directory, false, wh, target, dir, depth, throttler);\n })\n );\n}\n\n/**\n * Read directory to add / remove files from `@watched` list and re-read it on change.\n * @param {String} dir fs path\n * @param {fs.Stats} stats\n * @param {Boolean} initialAdd\n * @param {Number} depth relative to user-supplied path\n * @param {String} target child path targeted for watch\n * @param {Object} wh Common watch helpers for this path\n * @param {String} realpath\n * @returns {Promise<Function>} closer for the watcher instance.\n */\nasync _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) {\n const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir));\n const tracked = parentDir.has(sysPath.basename(dir));\n if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) {\n if (!wh.hasGlob || wh.globFilter(dir)) this.fsw._emit(EV_ADD_DIR, dir, stats);\n }\n\n // ensure dir is tracked (harmless if redundant)\n parentDir.add(sysPath.basename(dir));\n this.fsw._getWatchedDir(dir);\n let throttler;\n let closer;\n\n const oDepth = this.fsw.options.depth;\n if ((oDepth == null || depth <= oDepth) && !this.fsw._symlinkPaths.has(realpath)) {\n if (!target) {\n await this._handleRead(dir, initialAdd, wh, target, dir, depth, throttler);\n if (this.fsw.closed) return;\n }\n\n closer = this._watchWithNodeFs(dir, (dirPath, stats) => {\n // if current directory is removed, do nothing\n if (stats && stats.mtimeMs === 0) return;\n\n this._handleRead(dirPath, false, wh, target, dir, depth, throttler);\n });\n }\n return closer;\n}\n\n/**\n * Handle added file, directory, or glob pattern.\n * Delegates call to _handleFile / _handleDir after checks.\n * @param {String} path to file or ir\n * @param {Boolean} initialAdd was the file added at watch instantiation?\n * @param {Object} priorWh depth relative to user-supplied path\n * @param {Number} depth Child path actually targeted for watch\n * @param {String=} target Child path actually targeted for watch\n * @returns {Promise}\n */\nasync _addToNodeFs(path, initialAdd, priorWh, depth, target) {\n const ready = this.fsw._emitReady;\n if (this.fsw._isIgnored(path) || this.fsw.closed) {\n ready();\n return false;\n }\n\n const wh = this.fsw._getWatchHelpers(path, depth);\n if (!wh.hasGlob && priorWh) {\n wh.hasGlob = priorWh.hasGlob;\n wh.globFilter = priorWh.globFilter;\n wh.filterPath = entry => priorWh.filterPath(entry);\n wh.filterDir = entry => priorWh.filterDir(entry);\n }\n\n // evaluate what is at the path we're being asked to watch\n try {\n const stats = await statMethods[wh.statMethod](wh.watchPath);\n if (this.fsw.closed) return;\n if (this.fsw._isIgnored(wh.watchPath, stats)) {\n ready();\n return false;\n }\n\n const follow = this.fsw.options.followSymlinks && !path.includes(STAR) && !path.includes(BRACE_START);\n let closer;\n if (stats.isDirectory()) {\n const absPath = sysPath.resolve(path);\n const targetPath = follow ? await fsrealpath(path) : path;\n if (this.fsw.closed) return;\n closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);\n if (this.fsw.closed) return;\n // preserve this symlink's target path\n if (absPath !== targetPath && targetPath !== undefined) {\n this.fsw._symlinkPaths.set(absPath, targetPath);\n }\n } else if (stats.isSymbolicLink()) {\n const targetPath = follow ? await fsrealpath(path) : path;\n if (this.fsw.closed) return;\n const parent = sysPath.dirname(wh.watchPath);\n this.fsw._getWatchedDir(parent).add(wh.watchPath);\n this.fsw._emit(EV_ADD, wh.watchPath, stats);\n closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath);\n if (this.fsw.closed) return;\n\n // preserve this symlink's target path\n if (targetPath !== undefined) {\n this.fsw._symlinkPaths.set(sysPath.resolve(path), targetPath);\n }\n } else {\n closer = this._handleFile(wh.watchPath, stats, initialAdd);\n }\n ready();\n\n this.fsw._addPathCloser(path, closer);\n return false;\n\n } catch (error) {\n if (this.fsw._handleError(error)) {\n ready();\n return path;\n }\n }\n}\n\n}\n\nmodule.exports = NodeFsHandler;\n", "'use strict';\n\nconst fs = require('fs');\nconst sysPath = require('path');\nconst { promisify } = require('util');\n\nlet fsevents;\ntry {\n fsevents = require('fsevents');\n} catch (error) {\n if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error);\n}\n\nif (fsevents) {\n // TODO: real check\n const mtch = process.version.match(/v(\\d+)\\.(\\d+)/);\n if (mtch && mtch[1] && mtch[2]) {\n const maj = Number.parseInt(mtch[1], 10);\n const min = Number.parseInt(mtch[2], 10);\n if (maj === 8 && min < 16) {\n fsevents = undefined;\n }\n }\n}\n\nconst {\n EV_ADD,\n EV_CHANGE,\n EV_ADD_DIR,\n EV_UNLINK,\n EV_ERROR,\n STR_DATA,\n STR_END,\n FSEVENT_CREATED,\n FSEVENT_MODIFIED,\n FSEVENT_DELETED,\n FSEVENT_MOVED,\n // FSEVENT_CLONED,\n FSEVENT_UNKNOWN,\n FSEVENT_TYPE_FILE,\n FSEVENT_TYPE_DIRECTORY,\n FSEVENT_TYPE_SYMLINK,\n\n ROOT_GLOBSTAR,\n DIR_SUFFIX,\n DOT_SLASH,\n FUNCTION_TYPE,\n EMPTY_FN,\n IDENTITY_FN\n} = require('./constants');\n\nconst Depth = (value) => isNaN(value) ? {} : {depth: value};\n\nconst stat = promisify(fs.stat);\nconst lstat = promisify(fs.lstat);\nconst realpath = promisify(fs.realpath);\n\nconst statMethods = { stat, lstat };\n\n/**\n * @typedef {String} Path\n */\n\n/**\n * @typedef {Object} FsEventsWatchContainer\n * @property {Set<Function>} listeners\n * @property {Function} rawEmitter\n * @property {{stop: Function}} watcher\n */\n\n// fsevents instance helper functions\n/**\n * Object to hold per-process fsevents instances (may be shared across chokidar FSWatcher instances)\n * @type {Map<Path,FsEventsWatchContainer>}\n */\nconst FSEventsWatchers = new Map();\n\n// Threshold of duplicate path prefixes at which to start\n// consolidating going forward\nconst consolidateThreshhold = 10;\n\nconst wrongEventFlags = new Set([\n 69888, 70400, 71424, 72704, 73472, 131328, 131840, 262912\n]);\n\n/**\n * Instantiates the fsevents interface\n * @param {Path} path path to be watched\n * @param {Function} callback called when fsevents is bound and ready\n * @returns {{stop: Function}} new fsevents instance\n */\nconst createFSEventsInstance = (path, callback) => {\n const stop = fsevents.watch(path, callback);\n return {stop};\n};\n\n/**\n * Instantiates the fsevents interface or binds listeners to an existing one covering\n * the same file tree.\n * @param {Path} path - to be watched\n * @param {Path} realPath - real path for symlinks\n * @param {Function} listener - called when fsevents emits events\n * @param {Function} rawEmitter - passes data to listeners of the 'raw' event\n * @returns {Function} closer\n */\nfunction setFSEventsListener(path, realPath, listener, rawEmitter) {\n let watchPath = sysPath.extname(path) ? sysPath.dirname(path) : path;\n const parentPath = sysPath.dirname(watchPath);\n let cont = FSEventsWatchers.get(watchPath);\n\n // If we've accumulated a substantial number of paths that\n // could have been consolidated by watching one directory\n // above the current one, create a watcher on the parent\n // path instead, so that we do consolidate going forward.\n if (couldConsolidate(parentPath)) {\n watchPath = parentPath;\n }\n\n const resolvedPath = sysPath.resolve(path);\n const hasSymlink = resolvedPath !== realPath;\n\n const filteredListener = (fullPath, flags, info) => {\n if (hasSymlink) fullPath = fullPath.replace(realPath, resolvedPath);\n if (\n fullPath === resolvedPath ||\n !fullPath.indexOf(resolvedPath + sysPath.sep)\n ) listener(fullPath, flags, info);\n };\n\n // check if there is already a watcher on a parent path\n // modifies `watchPath` to the parent path when it finds a match\n let watchedParent = false;\n for (const watchedPath of FSEventsWatchers.keys()) {\n if (realPath.indexOf(sysPath.resolve(watchedPath) + sysPath.sep) === 0) {\n watchPath = watchedPath;\n cont = FSEventsWatchers.get(watchPath);\n watchedParent = true;\n break;\n }\n }\n\n if (cont || watchedParent) {\n cont.listeners.add(filteredListener);\n } else {\n cont = {\n listeners: new Set([filteredListener]),\n rawEmitter,\n watcher: createFSEventsInstance(watchPath, (fullPath, flags) => {\n if (!cont.listeners.size) return;\n const info = fsevents.getInfo(fullPath, flags);\n cont.listeners.forEach(list => {\n list(fullPath, flags, info);\n });\n\n cont.rawEmitter(info.event, fullPath, info);\n })\n };\n FSEventsWatchers.set(watchPath, cont);\n }\n\n // removes this instance's listeners and closes the underlying fsevents\n // instance if there are no more listeners left\n return () => {\n const lst = cont.listeners;\n\n lst.delete(filteredListener);\n if (!lst.size) {\n FSEventsWatchers.delete(watchPath);\n if (cont.watcher) return cont.watcher.stop().then(() => {\n cont.rawEmitter = cont.watcher = undefined;\n Object.freeze(cont);\n });\n }\n };\n}\n\n// Decide whether or not we should start a new higher-level\n// parent watcher\nconst couldConsolidate = (path) => {\n let count = 0;\n for (const watchPath of FSEventsWatchers.keys()) {\n if (watchPath.indexOf(path) === 0) {\n count++;\n if (count >= consolidateThreshhold) {\n return true;\n }\n }\n }\n\n return false;\n};\n\n// returns boolean indicating whether fsevents can be used\nconst canUse = () => fsevents && FSEventsWatchers.size < 128;\n\n// determines subdirectory traversal levels from root to path\nconst calcDepth = (path, root) => {\n let i = 0;\n while (!path.indexOf(root) && (path = sysPath.dirname(path)) !== root) i++;\n return i;\n};\n\n// returns boolean indicating whether the fsevents' event info has the same type\n// as the one returned by fs.stat\nconst sameTypes = (info, stats) => (\n info.type === FSEVENT_TYPE_DIRECTORY && stats.isDirectory() ||\n info.type === FSEVENT_TYPE_SYMLINK && stats.isSymbolicLink() ||\n info.type === FSEVENT_TYPE_FILE && stats.isFile()\n)\n\n/**\n * @mixin\n */\nclass FsEventsHandler {\n\n/**\n * @param {import('../index').FSWatcher} fsw\n */\nconstructor(fsw) {\n this.fsw = fsw;\n}\ncheckIgnored(path, stats) {\n const ipaths = this.fsw._ignoredPaths;\n if (this.fsw._isIgnored(path, stats)) {\n ipaths.add(path);\n if (stats && stats.isDirectory()) {\n ipaths.add(path + ROOT_GLOBSTAR);\n }\n return true;\n }\n\n ipaths.delete(path);\n ipaths.delete(path + ROOT_GLOBSTAR);\n}\n\naddOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts) {\n const event = watchedDir.has(item) ? EV_CHANGE : EV_ADD;\n this.handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts);\n}\n\nasync checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts) {\n try {\n const stats = await stat(path)\n if (this.fsw.closed) return;\n if (sameTypes(info, stats)) {\n this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);\n } else {\n this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);\n }\n } catch (error) {\n if (error.code === 'EACCES') {\n this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);\n } else {\n this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);\n }\n }\n}\n\nhandleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts) {\n if (this.fsw.closed || this.checkIgnored(path)) return;\n\n if (event === EV_UNLINK) {\n const isDirectory = info.type === FSEVENT_TYPE_DIRECTORY\n // suppress unlink events on never before seen files\n if (isDirectory || watchedDir.has(item)) {\n this.fsw._remove(parent, item, isDirectory);\n }\n } else {\n if (event === EV_ADD) {\n // track new directories\n if (info.type === FSEVENT_TYPE_DIRECTORY) this.fsw._getWatchedDir(path);\n\n if (info.type === FSEVENT_TYPE_SYMLINK && opts.followSymlinks) {\n // push symlinks back to the top of the stack to get handled\n const curDepth = opts.depth === undefined ?\n undefined : calcDepth(fullPath, realPath) + 1;\n return this._addToFsEvents(path, false, true, curDepth);\n }\n\n // track new paths\n // (other than symlinks being followed, which will be tracked soon)\n this.fsw._getWatchedDir(parent).add(item);\n }\n /**\n * @type {'add'|'addDir'|'unlink'|'unlinkDir'}\n */\n const eventName = info.type === FSEVENT_TYPE_DIRECTORY ? event + DIR_SUFFIX : event;\n this.fsw._emit(eventName, path);\n if (eventName === EV_ADD_DIR) this._addToFsEvents(path, false, true);\n }\n}\n\n/**\n * Handle symlinks encountered during directory scan\n * @param {String} watchPath - file/dir path to be watched with fsevents\n * @param {String} realPath - real path (in case of symlinks)\n * @param {Function} transform - path transformer\n * @param {Function} globFilter - path filter in case a glob pattern was provided\n * @returns {Function} closer for the watcher instance\n*/\n_watchWithFsEvents(watchPath, realPath, transform, globFilter) {\n if (this.fsw.closed || this.fsw._isIgnored(watchPath)) return;\n const opts = this.fsw.options;\n const watchCallback = async (fullPath, flags, info) => {\n if (this.fsw.closed) return;\n if (\n opts.depth !== undefined &&\n calcDepth(fullPath, realPath) > opts.depth\n ) return;\n const path = transform(sysPath.join(\n watchPath, sysPath.relative(watchPath, fullPath)\n ));\n if (globFilter && !globFilter(path)) return;\n // ensure directories are tracked\n const parent = sysPath.dirname(path);\n const item = sysPath.basename(path);\n const watchedDir = this.fsw._getWatchedDir(\n info.type === FSEVENT_TYPE_DIRECTORY ? path : parent\n );\n\n // correct for wrong events emitted\n if (wrongEventFlags.has(flags) || info.event === FSEVENT_UNKNOWN) {\n if (typeof opts.ignored === FUNCTION_TYPE) {\n let stats;\n try {\n stats = await stat(path);\n } catch (error) {}\n if (this.fsw.closed) return;\n if (this.checkIgnored(path, stats)) return;\n if (sameTypes(info, stats)) {\n this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);\n } else {\n this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);\n }\n } else {\n this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts);\n }\n } else {\n switch (info.event) {\n case FSEVENT_CREATED:\n case FSEVENT_MODIFIED:\n return this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);\n case FSEVENT_DELETED:\n case FSEVENT_MOVED:\n return this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts);\n }\n }\n };\n\n const closer = setFSEventsListener(\n watchPath,\n realPath,\n watchCallback,\n this.fsw._emitRaw\n );\n\n this.fsw._emitReady();\n return closer;\n}\n\n/**\n * Handle symlinks encountered during directory scan\n * @param {String} linkPath path to symlink\n * @param {String} fullPath absolute path to the symlink\n * @param {Function} transform pre-existing path transformer\n * @param {Number} curDepth level of subdirectories traversed to where symlink is\n * @returns {Promise<void>}\n */\nasync _handleFsEventsSymlink(linkPath, fullPath, transform, curDepth) {\n // don't follow the same symlink more than once\n if (this.fsw.closed || this.fsw._symlinkPaths.has(fullPath)) return;\n\n this.fsw._symlinkPaths.set(fullPath, true);\n this.fsw._incrReadyCount();\n\n try {\n const linkTarget = await realpath(linkPath);\n if (this.fsw.closed) return;\n if (this.fsw._isIgnored(linkTarget)) {\n return this.fsw._emitReady();\n }\n\n this.fsw._incrReadyCount();\n\n // add the linkTarget for watching with a wrapper for transform\n // that causes emitted paths to incorporate the link's path\n this._addToFsEvents(linkTarget || linkPath, (path) => {\n let aliasedPath = linkPath;\n if (linkTarget && linkTarget !== DOT_SLASH) {\n aliasedPath = path.replace(linkTarget, linkPath);\n } else if (path !== DOT_SLASH) {\n aliasedPath = sysPath.join(linkPath, path);\n }\n return transform(aliasedPath);\n }, false, curDepth);\n } catch(error) {\n if (this.fsw._handleError(error)) {\n return this.fsw._emitReady();\n }\n }\n}\n\n/**\n *\n * @param {Path} newPath\n * @param {fs.Stats} stats\n */\nemitAdd(newPath, stats, processPath, opts, forceAdd) {\n const pp = processPath(newPath);\n const isDir = stats.isDirectory();\n const dirObj = this.fsw._getWatchedDir(sysPath.dirname(pp));\n const base = sysPath.basename(pp);\n\n // ensure empty dirs get tracked\n if (isDir) this.fsw._getWatchedDir(pp);\n if (dirObj.has(base)) return;\n dirObj.add(base);\n\n if (!opts.ignoreInitial || forceAdd === true) {\n this.fsw._emit(isDir ? EV_ADD_DIR : EV_ADD, pp, stats);\n }\n}\n\ninitWatch(realPath, path, wh, processPath) {\n if (this.fsw.closed) return;\n const closer = this._watchWithFsEvents(\n wh.watchPath,\n sysPath.resolve(realPath || wh.watchPath),\n processPath,\n wh.globFilter\n );\n this.fsw._addPathCloser(path, closer);\n}\n\n/**\n * Handle added path with fsevents\n * @param {String} path file/dir path or glob pattern\n * @param {Function|Boolean=} transform converts working path to what the user expects\n * @param {Boolean=} forceAdd ensure add is emitted\n * @param {Number=} priorDepth Level of subdirectories already traversed.\n * @returns {Promise<void>}\n */\nasync _addToFsEvents(path, transform, forceAdd, priorDepth) {\n if (this.fsw.closed) {\n return;\n }\n const opts = this.fsw.options;\n const processPath = typeof transform === FUNCTION_TYPE ? transform : IDENTITY_FN;\n\n const wh = this.fsw._getWatchHelpers(path);\n\n // evaluate what is at the path we're being asked to watch\n try {\n const stats = await statMethods[wh.statMethod](wh.watchPath);\n if (this.fsw.closed) return;\n if (this.fsw._isIgnored(wh.watchPath, stats)) {\n throw null;\n }\n if (stats.isDirectory()) {\n // emit addDir unless this is a glob parent\n if (!wh.globFilter) this.emitAdd(processPath(path), stats, processPath, opts, forceAdd);\n\n // don't recurse further if it would exceed depth setting\n if (priorDepth && priorDepth > opts.depth) return;\n\n // scan the contents of the dir\n this.fsw._readdirp(wh.watchPath, {\n fileFilter: entry => wh.filterPath(entry),\n directoryFilter: entry => wh.filterDir(entry),\n ...Depth(opts.depth - (priorDepth || 0))\n }).on(STR_DATA, (entry) => {\n // need to check filterPath on dirs b/c filterDir is less restrictive\n if (this.fsw.closed) {\n return;\n }\n if (entry.stats.isDirectory() && !wh.filterPath(entry)) return;\n\n const joinedPath = sysPath.join(wh.watchPath, entry.path);\n const {fullPath} = entry;\n\n if (wh.followSymlinks && entry.stats.isSymbolicLink()) {\n // preserve the current depth here since it can't be derived from\n // real paths past the symlink\n const curDepth = opts.depth === undefined ?\n undefined : calcDepth(joinedPath, sysPath.resolve(wh.watchPath)) + 1;\n\n this._handleFsEventsSymlink(joinedPath, fullPath, processPath, curDepth);\n } else {\n this.emitAdd(joinedPath, entry.stats, processPath, opts, forceAdd);\n }\n }).on(EV_ERROR, EMPTY_FN).on(STR_END, () => {\n this.fsw._emitReady();\n });\n } else {\n this.emitAdd(wh.watchPath, stats, processPath, opts, forceAdd);\n this.fsw._emitReady();\n }\n } catch (error) {\n if (!error || this.fsw._handleError(error)) {\n // TODO: Strange thing: \"should not choke on an ignored watch path\" will be failed without 2 ready calls -__-\n this.fsw._emitReady();\n this.fsw._emitReady();\n }\n }\n\n if (opts.persistent && forceAdd !== true) {\n if (typeof transform === FUNCTION_TYPE) {\n // realpath has already been resolved\n this.initWatch(undefined, path, wh, processPath);\n } else {\n let realPath;\n try {\n realPath = await realpath(wh.watchPath);\n } catch (e) {}\n this.initWatch(realPath, path, wh, processPath);\n }\n }\n}\n\n}\n\nmodule.exports = FsEventsHandler;\nmodule.exports.canUse = canUse;\n", "'use strict';\n\nconst { EventEmitter } = require('events');\nconst fs = require('fs');\nconst sysPath = require('path');\nconst { promisify } = require('util');\nconst readdirp = require('readdirp');\nconst anymatch = require('anymatch').default;\nconst globParent = require('glob-parent');\nconst isGlob = require('is-glob');\nconst braces = require('braces');\nconst normalizePath = require('normalize-path');\n\nconst NodeFsHandler = require('./lib/nodefs-handler');\nconst FsEventsHandler = require('./lib/fsevents-handler');\nconst {\n EV_ALL,\n EV_READY,\n EV_ADD,\n EV_CHANGE,\n EV_UNLINK,\n EV_ADD_DIR,\n EV_UNLINK_DIR,\n EV_RAW,\n EV_ERROR,\n\n STR_CLOSE,\n STR_END,\n\n BACK_SLASH_RE,\n DOUBLE_SLASH_RE,\n SLASH_OR_BACK_SLASH_RE,\n DOT_RE,\n REPLACER_RE,\n\n SLASH,\n SLASH_SLASH,\n BRACE_START,\n BANG,\n ONE_DOT,\n TWO_DOTS,\n GLOBSTAR,\n SLASH_GLOBSTAR,\n ANYMATCH_OPTS,\n STRING_TYPE,\n FUNCTION_TYPE,\n EMPTY_STR,\n EMPTY_FN,\n\n isWindows,\n isMacos\n} = require('./lib/constants');\n\nconst stat = promisify(fs.stat);\nconst readdir = promisify(fs.readdir);\n\n/**\n * @typedef {String} Path\n * @typedef {'all'|'add'|'addDir'|'change'|'unlink'|'unlinkDir'|'raw'|'error'|'ready'} EventName\n * @typedef {'readdir'|'watch'|'add'|'remove'|'change'} ThrottleType\n */\n\n/**\n *\n * @typedef {Object} WatchHelpers\n * @property {Boolean} followSymlinks\n * @property {'stat'|'lstat'} statMethod\n * @property {Path} path\n * @property {Path} watchPath\n * @property {Function} entryPath\n * @property {Boolean} hasGlob\n * @property {Object} globFilter\n * @property {Function} filterPath\n * @property {Function} filterDir\n */\n\nconst arrify = (value = []) => Array.isArray(value) ? value : [value];\nconst flatten = (list, result = []) => {\n list.forEach(item => {\n if (Array.isArray(item)) {\n flatten(item, result);\n } else {\n result.push(item);\n }\n });\n return result;\n};\n\nconst unifyPaths = (paths_) => {\n /**\n * @type {Array<String>}\n */\n const paths = flatten(arrify(paths_));\n if (!paths.every(p => typeof p === STRING_TYPE)) {\n throw new TypeError(`Non-string provided as watch path: ${paths}`);\n }\n return paths.map(normalizePathToUnix);\n};\n\n// If SLASH_SLASH occurs at the beginning of path, it is not replaced\n// because \"//StoragePC/DrivePool/Movies\" is a valid network path\nconst toUnix = (string) => {\n let str = string.replace(BACK_SLASH_RE, SLASH);\n let prepend = false;\n if (str.startsWith(SLASH_SLASH)) {\n prepend = true;\n }\n while (str.match(DOUBLE_SLASH_RE)) {\n str = str.replace(DOUBLE_SLASH_RE, SLASH);\n }\n if (prepend) {\n str = SLASH + str;\n }\n return str;\n};\n\n// Our version of upath.normalize\n// TODO: this is not equal to path-normalize module - investigate why\nconst normalizePathToUnix = (path) => toUnix(sysPath.normalize(toUnix(path)));\n\nconst normalizeIgnored = (cwd = EMPTY_STR) => (path) => {\n if (typeof path !== STRING_TYPE) return path;\n return normalizePathToUnix(sysPath.isAbsolute(path) ? path : sysPath.join(cwd, path));\n};\n\nconst getAbsolutePath = (path, cwd) => {\n if (sysPath.isAbsolute(path)) {\n return path;\n }\n if (path.startsWith(BANG)) {\n return BANG + sysPath.join(cwd, path.slice(1));\n }\n return sysPath.join(cwd, path);\n};\n\nconst undef = (opts, key) => opts[key] === undefined;\n\n/**\n * Directory entry.\n * @property {Path} path\n * @property {Set<Path>} items\n */\nclass DirEntry {\n /**\n * @param {Path} dir\n * @param {Function} removeWatcher\n */\n constructor(dir, removeWatcher) {\n this.path = dir;\n this._removeWatcher = removeWatcher;\n /** @type {Set<Path>} */\n this.items = new Set();\n }\n\n add(item) {\n const {items} = this;\n if (!items) return;\n if (item !== ONE_DOT && item !== TWO_DOTS) items.add(item);\n }\n\n async remove(item) {\n const {items} = this;\n if (!items) return;\n items.delete(item);\n if (items.size > 0) return;\n\n const dir = this.path;\n try {\n await readdir(dir);\n } catch (err) {\n if (this._removeWatcher) {\n this._removeWatcher(sysPath.dirname(dir), sysPath.basename(dir));\n }\n }\n }\n\n has(item) {\n const {items} = this;\n if (!items) return;\n return items.has(item);\n }\n\n /**\n * @returns {Array<String>}\n */\n getChildren() {\n const {items} = this;\n if (!items) return;\n return [...items.values()];\n }\n\n dispose() {\n this.items.clear();\n delete this.path;\n delete this._removeWatcher;\n delete this.items;\n Object.freeze(this);\n }\n}\n\nconst STAT_METHOD_F = 'stat';\nconst STAT_METHOD_L = 'lstat';\nclass WatchHelper {\n constructor(path, watchPath, follow, fsw) {\n this.fsw = fsw;\n this.path = path = path.replace(REPLACER_RE, EMPTY_STR);\n this.watchPath = watchPath;\n this.fullWatchPath = sysPath.resolve(watchPath);\n this.hasGlob = watchPath !== path;\n /** @type {object|boolean} */\n if (path === EMPTY_STR) this.hasGlob = false;\n this.globSymlink = this.hasGlob && follow ? undefined : false;\n this.globFilter = this.hasGlob ? anymatch(path, undefined, ANYMATCH_OPTS) : false;\n this.dirParts = this.getDirParts(path);\n this.dirParts.forEach((parts) => {\n if (parts.length > 1) parts.pop();\n });\n this.followSymlinks = follow;\n this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L;\n }\n\n checkGlobSymlink(entry) {\n // only need to resolve once\n // first entry should always have entry.parentDir === EMPTY_STR\n if (this.globSymlink === undefined) {\n this.globSymlink = entry.fullParentDir === this.fullWatchPath ?\n false : {realPath: entry.fullParentDir, linkPath: this.fullWatchPath};\n }\n\n if (this.globSymlink) {\n return entry.fullPath.replace(this.globSymlink.realPath, this.globSymlink.linkPath);\n }\n\n return entry.fullPath;\n }\n\n entryPath(entry) {\n return sysPath.join(this.watchPath,\n sysPath.relative(this.watchPath, this.checkGlobSymlink(entry))\n );\n }\n\n filterPath(entry) {\n const {stats} = entry;\n if (stats && stats.isSymbolicLink()) return this.filterDir(entry);\n const resolvedPath = this.entryPath(entry);\n const matchesGlob = this.hasGlob && typeof this.globFilter === FUNCTION_TYPE ?\n this.globFilter(resolvedPath) : true;\n return matchesGlob &&\n this.fsw._isntIgnored(resolvedPath, stats) &&\n this.fsw._hasReadPermissions(stats);\n }\n\n getDirParts(path) {\n if (!this.hasGlob) return [];\n const parts = [];\n const expandedPath = path.includes(BRACE_START) ? braces.expand(path) : [path];\n expandedPath.forEach((path) => {\n parts.push(sysPath.relative(this.watchPath, path).split(SLASH_OR_BACK_SLASH_RE));\n });\n return parts;\n }\n\n filterDir(entry) {\n if (this.hasGlob) {\n const entryParts = this.getDirParts(this.checkGlobSymlink(entry));\n let globstar = false;\n this.unmatchedGlob = !this.dirParts.some((parts) => {\n return parts.every((part, i) => {\n if (part === GLOBSTAR) globstar = true;\n return globstar || !entryParts[0][i] || anymatch(part, entryParts[0][i], ANYMATCH_OPTS);\n });\n });\n }\n return !this.unmatchedGlob && this.fsw._isntIgnored(this.entryPath(entry), entry.stats);\n }\n}\n\n/**\n * Watches files & directories for changes. Emitted events:\n * `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `all`, `error`\n *\n * new FSWatcher()\n * .add(directories)\n * .on('add', path => log('File', path, 'was added'))\n */\nclass FSWatcher extends EventEmitter {\n// Not indenting methods for history sake; for now.\nconstructor(_opts) {\n super();\n\n const opts = {};\n if (_opts) Object.assign(opts, _opts); // for frozen objects\n\n /** @type {Map<String, DirEntry>} */\n this._watched = new Map();\n /** @type {Map<String, Array>} */\n this._closers = new Map();\n /** @type {Set<String>} */\n this._ignoredPaths = new Set();\n\n /** @type {Map<ThrottleType, Map>} */\n this._throttled = new Map();\n\n /** @type {Map<Path, String|Boolean>} */\n this._symlinkPaths = new Map();\n\n this._streams = new Set();\n this.closed = false;\n\n // Set up default options.\n if (undef(opts, 'persistent')) opts.persistent = true;\n if (undef(opts, 'ignoreInitial')) opts.ignoreInitial = false;\n if (undef(opts, 'ignorePermissionErrors')) opts.ignorePermissionErrors = false;\n if (undef(opts, 'interval')) opts.interval = 100;\n if (undef(opts, 'binaryInterval')) opts.binaryInterval = 300;\n if (undef(opts, 'disableGlobbing')) opts.disableGlobbing = false;\n opts.enableBinaryInterval = opts.binaryInterval !== opts.interval;\n\n // Enable fsevents on OS X when polling isn't explicitly enabled.\n if (undef(opts, 'useFsEvents')) opts.useFsEvents = !opts.usePolling;\n\n // If we can't use fsevents, ensure the options reflect it's disabled.\n const canUseFsEvents = FsEventsHandler.canUse();\n if (!canUseFsEvents) opts.useFsEvents = false;\n\n // Use polling on Mac if not using fsevents.\n // Other platforms use non-polling fs_watch.\n if (undef(opts, 'usePolling') && !opts.useFsEvents) {\n opts.usePolling = isMacos;\n }\n\n // Global override (useful for end-developers that need to force polling for all\n // instances of chokidar, regardless of usage/dependency depth)\n const envPoll = process.env.CHOKIDAR_USEPOLLING;\n if (envPoll !== undefined) {\n const envLower = envPoll.toLowerCase();\n\n if (envLower === 'false' || envLower === '0') {\n opts.usePolling = false;\n } else if (envLower === 'true' || envLower === '1') {\n opts.usePolling = true;\n } else {\n opts.usePolling = !!envLower;\n }\n }\n const envInterval = process.env.CHOKIDAR_INTERVAL;\n if (envInterval) {\n opts.interval = Number.parseInt(envInterval, 10);\n }\n\n // Editor atomic write normalization enabled by default with fs.watch\n if (undef(opts, 'atomic')) opts.atomic = !opts.usePolling && !opts.useFsEvents;\n if (opts.atomic) this._pendingUnlinks = new Map();\n\n if (undef(opts, 'followSymlinks')) opts.followSymlinks = true;\n\n if (undef(opts, 'awaitWriteFinish')) opts.awaitWriteFinish = false;\n if (opts.awaitWriteFinish === true) opts.awaitWriteFinish = {};\n const awf = opts.awaitWriteFinish;\n if (awf) {\n if (!awf.stabilityThreshold) awf.stabilityThreshold = 2000;\n if (!awf.pollInterval) awf.pollInterval = 100;\n this._pendingWrites = new Map();\n }\n if (opts.ignored) opts.ignored = arrify(opts.ignored);\n\n let readyCalls = 0;\n this._emitReady = () => {\n readyCalls++;\n if (readyCalls >= this._readyCount) {\n this._emitReady = EMPTY_FN;\n this._readyEmitted = true;\n // use process.nextTick to allow time for listener to be bound\n process.nextTick(() => this.emit(EV_READY));\n }\n };\n this._emitRaw = (...args) => this.emit(EV_RAW, ...args);\n this._readyEmitted = false;\n this.options = opts;\n\n // Initialize with proper watcher.\n if (opts.useFsEvents) {\n this._fsEventsHandler = new FsEventsHandler(this);\n } else {\n this._nodeFsHandler = new NodeFsHandler(this);\n }\n\n // You\u2019re frozen when your heart\u2019s not open.\n Object.freeze(opts);\n}\n\n// Public methods\n\n/**\n * Adds paths to be watched on an existing FSWatcher instance\n * @param {Path|Array<Path>} paths_\n * @param {String=} _origAdd private; for handling non-existent paths to be watched\n * @param {Boolean=} _internal private; indicates a non-user add\n * @returns {FSWatcher} for chaining\n */\nadd(paths_, _origAdd, _internal) {\n const {cwd, disableGlobbing} = this.options;\n this.closed = false;\n let paths = unifyPaths(paths_);\n if (cwd) {\n paths = paths.map((path) => {\n const absPath = getAbsolutePath(path, cwd);\n\n // Check `path` instead of `absPath` because the cwd portion can't be a glob\n if (disableGlobbing || !isGlob(path)) {\n return absPath;\n }\n return normalizePath(absPath);\n });\n }\n\n // set aside negated glob strings\n paths = paths.filter((path) => {\n if (path.startsWith(BANG)) {\n this._ignoredPaths.add(path.slice(1));\n return false;\n }\n\n // if a path is being added that was previously ignored, stop ignoring it\n this._ignoredPaths.delete(path);\n this._ignoredPaths.delete(path + SLASH_GLOBSTAR);\n\n // reset the cached userIgnored anymatch fn\n // to make ignoredPaths changes effective\n this._userIgnored = undefined;\n\n return true;\n });\n\n if (this.options.useFsEvents && this._fsEventsHandler) {\n if (!this._readyCount) this._readyCount = paths.length;\n if (this.options.persistent) this._readyCount *= 2;\n paths.forEach((path) => this._fsEventsHandler._addToFsEvents(path));\n } else {\n if (!this._readyCount) this._readyCount = 0;\n this._readyCount += paths.length;\n Promise.all(\n paths.map(async path => {\n const res = await this._nodeFsHandler._addToNodeFs(path, !_internal, 0, 0, _origAdd);\n if (res) this._emitReady();\n return res;\n })\n ).then(results => {\n if (this.closed) return;\n results.filter(item => item).forEach(item => {\n this.add(sysPath.dirname(item), sysPath.basename(_origAdd || item));\n });\n });\n }\n\n return this;\n}\n\n/**\n * Close watchers or start ignoring events from specified paths.\n * @param {Path|Array<Path>} paths_ - string or array of strings, file/directory paths and/or globs\n * @returns {FSWatcher} for chaining\n*/\nunwatch(paths_) {\n if (this.closed) return this;\n const paths = unifyPaths(paths_);\n const {cwd} = this.options;\n\n paths.forEach((path) => {\n // convert to absolute path unless relative path already matches\n if (!sysPath.isAbsolute(path) && !this._closers.has(path)) {\n if (cwd) path = sysPath.join(cwd, path);\n path = sysPath.resolve(path);\n }\n\n this._closePath(path);\n\n this._ignoredPaths.add(path);\n if (this._watched.has(path)) {\n this._ignoredPaths.add(path + SLASH_GLOBSTAR);\n }\n\n // reset the cached userIgnored anymatch fn\n // to make ignoredPaths changes effective\n this._userIgnored = undefined;\n });\n\n return this;\n}\n\n/**\n * Close watchers and remove all listeners from watched paths.\n * @returns {Promise<void>}.\n*/\nclose() {\n if (this.closed) return this._closePromise;\n this.closed = true;\n\n // Memory management.\n this.removeAllListeners();\n const closers = [];\n this._closers.forEach(closerList => closerList.forEach(closer => {\n const promise = closer();\n if (promise instanceof Promise) closers.push(promise);\n }));\n this._streams.forEach(stream => stream.destroy());\n this._userIgnored = undefined;\n this._readyCount = 0;\n this._readyEmitted = false;\n this._watched.forEach(dirent => dirent.dispose());\n ['closers', 'watched', 'streams', 'symlinkPaths', 'throttled'].forEach(key => {\n this[`_${key}`].clear();\n });\n\n this._closePromise = closers.length ? Promise.all(closers).then(() => undefined) : Promise.resolve();\n return this._closePromise;\n}\n\n/**\n * Expose list of watched paths\n * @returns {Object} for chaining\n*/\ngetWatched() {\n const watchList = {};\n this._watched.forEach((entry, dir) => {\n const key = this.options.cwd ? sysPath.relative(this.options.cwd, dir) : dir;\n watchList[key || ONE_DOT] = entry.getChildren().sort();\n });\n return watchList;\n}\n\nemitWithAll(event, args) {\n this.emit(...args);\n if (event !== EV_ERROR) this.emit(EV_ALL, ...args);\n}\n\n// Common helpers\n// --------------\n\n/**\n * Normalize and emit events.\n * Calling _emit DOES NOT MEAN emit() would be called!\n * @param {EventName} event Type of event\n * @param {Path} path File or directory path\n * @param {*=} val1 arguments to be passed with event\n * @param {*=} val2\n * @param {*=} val3\n * @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag\n */\nasync _emit(event, path, val1, val2, val3) {\n if (this.closed) return;\n\n const opts = this.options;\n if (isWindows) path = sysPath.normalize(path);\n if (opts.cwd) path = sysPath.relative(opts.cwd, path);\n /** @type Array<any> */\n const args = [event, path];\n if (val3 !== undefined) args.push(val1, val2, val3);\n else if (val2 !== undefined) args.push(val1, val2);\n else if (val1 !== undefined) args.push(val1);\n\n const awf = opts.awaitWriteFinish;\n let pw;\n if (awf && (pw = this._pendingWrites.get(path))) {\n pw.lastChange = new Date();\n return this;\n }\n\n if (opts.atomic) {\n if (event === EV_UNLINK) {\n this._pendingUnlinks.set(path, args);\n setTimeout(() => {\n this._pendingUnlinks.forEach((entry, path) => {\n this.emit(...entry);\n this.emit(EV_ALL, ...entry);\n this._pendingUnlinks.delete(path);\n });\n }, typeof opts.atomic === 'number' ? opts.atomic : 100);\n return this;\n }\n if (event === EV_ADD && this._pendingUnlinks.has(path)) {\n event = args[0] = EV_CHANGE;\n this._pendingUnlinks.delete(path);\n }\n }\n\n if (awf && (event === EV_ADD || event === EV_CHANGE) && this._readyEmitted) {\n const awfEmit = (err, stats) => {\n if (err) {\n event = args[0] = EV_ERROR;\n args[1] = err;\n this.emitWithAll(event, args);\n } else if (stats) {\n // if stats doesn't exist the file must have been deleted\n if (args.length > 2) {\n args[2] = stats;\n } else {\n args.push(stats);\n }\n this.emitWithAll(event, args);\n }\n };\n\n this._awaitWriteFinish(path, awf.stabilityThreshold, event, awfEmit);\n return this;\n }\n\n if (event === EV_CHANGE) {\n const isThrottled = !this._throttle(EV_CHANGE, path, 50);\n if (isThrottled) return this;\n }\n\n if (opts.alwaysStat && val1 === undefined &&\n (event === EV_ADD || event === EV_ADD_DIR || event === EV_CHANGE)\n ) {\n const fullPath = opts.cwd ? sysPath.join(opts.cwd, path) : path;\n let stats;\n try {\n stats = await stat(fullPath);\n } catch (err) {}\n // Suppress event when fs_stat fails, to avoid sending undefined 'stat'\n if (!stats || this.closed) return;\n args.push(stats);\n }\n this.emitWithAll(event, args);\n\n return this;\n}\n\n/**\n * Common handler for errors\n * @param {Error} error\n * @returns {Error|Boolean} The error if defined, otherwise the value of the FSWatcher instance's `closed` flag\n */\n_handleError(error) {\n const code = error && error.code;\n if (error && code !== 'ENOENT' && code !== 'ENOTDIR' &&\n (!this.options.ignorePermissionErrors || (code !== 'EPERM' && code !== 'EACCES'))\n ) {\n this.emit(EV_ERROR, error);\n }\n return error || this.closed;\n}\n\n/**\n * Helper utility for throttling\n * @param {ThrottleType} actionType type being throttled\n * @param {Path} path being acted upon\n * @param {Number} timeout duration of time to suppress duplicate actions\n * @returns {Object|false} tracking object or false if action should be suppressed\n */\n_throttle(actionType, path, timeout) {\n if (!this._throttled.has(actionType)) {\n this._throttled.set(actionType, new Map());\n }\n\n /** @type {Map<Path, Object>} */\n const action = this._throttled.get(actionType);\n /** @type {Object} */\n const actionPath = action.get(path);\n\n if (actionPath) {\n actionPath.count++;\n return false;\n }\n\n let timeoutObject;\n const clear = () => {\n const item = action.get(path);\n const count = item ? item.count : 0;\n action.delete(path);\n clearTimeout(timeoutObject);\n if (item) clearTimeout(item.timeoutObject);\n return count;\n };\n timeoutObject = setTimeout(clear, timeout);\n const thr = {timeoutObject, clear, count: 0};\n action.set(path, thr);\n return thr;\n}\n\n_incrReadyCount() {\n return this._readyCount++;\n}\n\n/**\n * Awaits write operation to finish.\n * Polls a newly created file for size variations. When files size does not change for 'threshold' milliseconds calls callback.\n * @param {Path} path being acted upon\n * @param {Number} threshold Time in milliseconds a file size must be fixed before acknowledging write OP is finished\n * @param {EventName} event\n * @param {Function} awfEmit Callback to be called when ready for event to be emitted.\n */\n_awaitWriteFinish(path, threshold, event, awfEmit) {\n let timeoutHandler;\n\n let fullPath = path;\n if (this.options.cwd && !sysPath.isAbsolute(path)) {\n fullPath = sysPath.join(this.options.cwd, path);\n }\n\n const now = new Date();\n\n const awaitWriteFinish = (prevStat) => {\n fs.stat(fullPath, (err, curStat) => {\n if (err || !this._pendingWrites.has(path)) {\n if (err && err.code !== 'ENOENT') awfEmit(err);\n return;\n }\n\n const now = Number(new Date());\n\n if (prevStat && curStat.size !== prevStat.size) {\n this._pendingWrites.get(path).lastChange = now;\n }\n const pw = this._pendingWrites.get(path);\n const df = now - pw.lastChange;\n\n if (df >= threshold) {\n this._pendingWrites.delete(path);\n awfEmit(undefined, curStat);\n } else {\n timeoutHandler = setTimeout(\n awaitWriteFinish,\n this.options.awaitWriteFinish.pollInterval,\n curStat\n );\n }\n });\n };\n\n if (!this._pendingWrites.has(path)) {\n this._pendingWrites.set(path, {\n lastChange: now,\n cancelWait: () => {\n this._pendingWrites.delete(path);\n clearTimeout(timeoutHandler);\n return event;\n }\n });\n timeoutHandler = setTimeout(\n awaitWriteFinish,\n this.options.awaitWriteFinish.pollInterval\n );\n }\n}\n\n_getGlobIgnored() {\n return [...this._ignoredPaths.values()];\n}\n\n/**\n * Determines whether user has asked to ignore this path.\n * @param {Path} path filepath or dir\n * @param {fs.Stats=} stats result of fs.stat\n * @returns {Boolean}\n */\n_isIgnored(path, stats) {\n if (this.options.atomic && DOT_RE.test(path)) return true;\n if (!this._userIgnored) {\n const {cwd} = this.options;\n const ign = this.options.ignored;\n\n const ignored = ign && ign.map(normalizeIgnored(cwd));\n const paths = arrify(ignored)\n .filter((path) => typeof path === STRING_TYPE && !isGlob(path))\n .map((path) => path + SLASH_GLOBSTAR);\n const list = this._getGlobIgnored().map(normalizeIgnored(cwd)).concat(ignored, paths);\n this._userIgnored = anymatch(list, undefined, ANYMATCH_OPTS);\n }\n\n return this._userIgnored([path, stats]);\n}\n\n_isntIgnored(path, stat) {\n return !this._isIgnored(path, stat);\n}\n\n/**\n * Provides a set of common helpers and properties relating to symlink and glob handling.\n * @param {Path} path file, directory, or glob pattern being watched\n * @param {Number=} depth at any depth > 0, this isn't a glob\n * @returns {WatchHelper} object containing helpers for this path\n */\n_getWatchHelpers(path, depth) {\n const watchPath = depth || this.options.disableGlobbing || !isGlob(path) ? path : globParent(path);\n const follow = this.options.followSymlinks;\n\n return new WatchHelper(path, watchPath, follow, this);\n}\n\n// Directory helpers\n// -----------------\n\n/**\n * Provides directory tracking objects\n * @param {String} directory path of the directory\n * @returns {DirEntry} the directory's tracking object\n */\n_getWatchedDir(directory) {\n if (!this._boundRemove) this._boundRemove = this._remove.bind(this);\n const dir = sysPath.resolve(directory);\n if (!this._watched.has(dir)) this._watched.set(dir, new DirEntry(dir, this._boundRemove));\n return this._watched.get(dir);\n}\n\n// File helpers\n// ------------\n\n/**\n * Check for read permissions.\n * Based on this answer on SO: https://stackoverflow.com/a/11781404/1358405\n * @param {fs.Stats} stats - object, result of fs_stat\n * @returns {Boolean} indicates whether the file can be read\n*/\n_hasReadPermissions(stats) {\n if (this.options.ignorePermissionErrors) return true;\n\n // stats.mode may be bigint\n const md = stats && Number.parseInt(stats.mode, 10);\n const st = md & 0o777;\n const it = Number.parseInt(st.toString(8)[0], 10);\n return Boolean(4 & it);\n}\n\n/**\n * Handles emitting unlink events for\n * files and directories, and via recursion, for\n * files and directories within directories that are unlinked\n * @param {String} directory within which the following item is located\n * @param {String} item base path of item/directory\n * @returns {void}\n*/\n_remove(directory, item, isDirectory) {\n // if what is being deleted is a directory, get that directory's paths\n // for recursive deleting and cleaning of watched object\n // if it is not a directory, nestedDirectoryChildren will be empty array\n const path = sysPath.join(directory, item);\n const fullPath = sysPath.resolve(path);\n isDirectory = isDirectory != null\n ? isDirectory\n : this._watched.has(path) || this._watched.has(fullPath);\n\n // prevent duplicate handling in case of arriving here nearly simultaneously\n // via multiple paths (such as _handleFile and _handleDir)\n if (!this._throttle('remove', path, 100)) return;\n\n // if the only watched file is removed, watch for its return\n if (!isDirectory && !this.options.useFsEvents && this._watched.size === 1) {\n this.add(directory, item, true);\n }\n\n // This will create a new entry in the watched object in either case\n // so we got to do the directory check beforehand\n const wp = this._getWatchedDir(path);\n const nestedDirectoryChildren = wp.getChildren();\n\n // Recursively remove children directories / files.\n nestedDirectoryChildren.forEach(nested => this._remove(path, nested));\n\n // Check if item was on the watched list and remove it\n const parent = this._getWatchedDir(directory);\n const wasTracked = parent.has(item);\n parent.remove(item);\n\n // Fixes issue #1042 -> Relative paths were detected and added as symlinks\n // (https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L612),\n // but never removed from the map in case the path was deleted.\n // This leads to an incorrect state if the path was recreated:\n // https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L553\n if (this._symlinkPaths.has(fullPath)) {\n this._symlinkPaths.delete(fullPath);\n }\n\n // If we wait for this file to be fully written, cancel the wait.\n let relPath = path;\n if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path);\n if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {\n const event = this._pendingWrites.get(relPath).cancelWait();\n if (event === EV_ADD) return;\n }\n\n // The Entry will either be a directory that just got removed\n // or a bogus entry to a file, in either case we have to remove it\n this._watched.delete(path);\n this._watched.delete(fullPath);\n const eventName = isDirectory ? EV_UNLINK_DIR : EV_UNLINK;\n if (wasTracked && !this._isIgnored(path)) this._emit(eventName, path);\n\n // Avoid conflicts if we later create another file with the same name\n if (!this.options.useFsEvents) {\n this._closePath(path);\n }\n}\n\n/**\n * Closes all watchers for a path\n * @param {Path} path\n */\n_closePath(path) {\n this._closeFile(path)\n const dir = sysPath.dirname(path);\n this._getWatchedDir(dir).remove(sysPath.basename(path));\n}\n\n/**\n * Closes only file-specific watchers\n * @param {Path} path\n */\n_closeFile(path) {\n const closers = this._closers.get(path);\n if (!closers) return;\n closers.forEach(closer => closer());\n this._closers.delete(path);\n}\n\n/**\n *\n * @param {Path} path\n * @param {Function} closer\n */\n_addPathCloser(path, closer) {\n if (!closer) return;\n let list = this._closers.get(path);\n if (!list) {\n list = [];\n this._closers.set(path, list);\n }\n list.push(closer);\n}\n\n_readdirp(root, opts) {\n if (this.closed) return;\n const options = {type: EV_ALL, alwaysStat: true, lstat: true, ...opts};\n let stream = readdirp(root, options);\n this._streams.add(stream);\n stream.once(STR_CLOSE, () => {\n stream = undefined;\n });\n stream.once(STR_END, () => {\n if (stream) {\n this._streams.delete(stream);\n stream = undefined;\n }\n });\n return stream;\n}\n\n}\n\n// Export FSWatcher class\nexports.FSWatcher = FSWatcher;\n\n/**\n * Instantiates watcher with paths to be tracked.\n * @param {String|Array<String>} paths file/directory paths and/or globs\n * @param {Object=} options chokidar opts\n * @returns an instance of FSWatcher for chaining.\n */\nconst watch = (paths, options) => {\n const watcher = new FSWatcher(options);\n watcher.add(paths);\n return watcher;\n};\n\nexports.watch = watch;\n", "#!/usr/bin/env node\nimport fs from \"fs\";\nimport path from \"path\";\nimport server from \"./server\";\n\nconst args = process.argv.slice(2)\n\nconst help = `ReScript Language Server\n\nUsage: rescript-language-server [options]\n\nOptions:\n\n--stdio Use stdio\n--node-ipc Use node-ipc\n-v, --version Print version\n-h, --help Print help`;\n\n(() => {\n switch (args[0]) {\n case '--stdio':\n return server(true);\n case '--node-ipc':\n return server(false);\n case '--version':\n case '-v':\n const { version } = JSON.parse(fs.readFileSync(path.join(__dirname, \"..\", \"package.json\")).toString())\n console.log(version);\n process.exit(0);\n case '--help':\n case '-h':\n console.log(help);\n process.exit(0);\n default:\n console.log(help);\n process.exit(1)\n }\n})();\n", "import process from \"process\";\nimport * as p from \"vscode-languageserver-protocol\";\nimport * as v from \"vscode-languageserver\";\nimport * as rpc from \"vscode-jsonrpc/node\";\nimport * as path from \"path\";\nimport fs from \"fs\";\n// TODO: check DidChangeWatchedFilesNotification.\nimport {\n DidOpenTextDocumentNotification,\n DidChangeTextDocumentNotification,\n DidCloseTextDocumentNotification,\n DidChangeConfigurationNotification,\n InitializeParams,\n InlayHintParams,\n CodeLensParams,\n SignatureHelpParams,\n} from \"vscode-languageserver-protocol\";\nimport * as lookup from \"./lookup\";\nimport * as utils from \"./utils\";\nimport * as codeActions from \"./codeActions\";\nimport * as c from \"./constants\";\nimport * as chokidar from \"chokidar\";\nimport { assert } from \"console\";\nimport { fileURLToPath } from \"url\";\nimport * as cp from \"node:child_process\";\nimport { WorkspaceEdit } from \"vscode-languageserver\";\nimport { filesDiagnostics } from \"./utils\";\nimport { onErrorReported } from \"./errorReporter\";\nimport * as ic from \"./incrementalCompilation\";\nimport config, { extensionConfiguration } from \"./config\";\n\n// This holds client capabilities specific to our extension, and not necessarily\n// related to the LS protocol. It's for enabling/disabling features that might\n// work in one client, like VSCode, but perhaps not in others, like vim.\nexport interface extensionClientCapabilities {\n supportsMarkdownLinks?: boolean | null;\n supportsSnippetSyntax?: boolean | null;\n}\nlet extensionClientCapabilities: extensionClientCapabilities = {};\n\n// Below here is some state that's not important exactly how long it lives.\nlet hasPromptedAboutBuiltInFormatter = false;\nlet pullConfigurationPeriodically: NodeJS.Timeout | null = null;\n\n// https://microsoft.github.io/language-server-protocol/specification#initialize\n// According to the spec, there could be requests before the 'initialize' request. Link in comment tells how to handle them.\nlet initialized = false;\nlet serverSentRequestIdCounter = 0;\n// https://microsoft.github.io/language-server-protocol/specification#exit\nlet shutdownRequestAlreadyReceived = false;\nlet stupidFileContentCache: Map<string, string> = new Map();\nlet projectsFiles: Map<\n string, // project root path\n {\n openFiles: Set<string>;\n filesWithDiagnostics: Set<string>;\n filesDiagnostics: filesDiagnostics;\n\n bsbWatcherByEditor: null | cp.ChildProcess;\n\n // This keeps track of whether we've prompted the user to start a build\n // automatically, if there's no build currently running for the project. We\n // only want to prompt the user about this once, or it becomes\n // annoying.\n // The type `never` means that we won't show the prompt if the project is inside node_modules\n hasPromptedToStartBuild: boolean | \"never\";\n }\n> = new Map();\n// ^ caching AND states AND distributed system. Why does LSP has to be stupid like this\n\n// This keeps track of code actions extracted from diagnostics.\nlet codeActionsFromDiagnostics: codeActions.filesCodeActions = {};\n\n// will be properly defined later depending on the mode (stdio/node-rpc)\nlet send: (msg: p.Message) => void = (_) => {};\n\nlet findRescriptBinary = (projectRootPath: p.DocumentUri | null) =>\n config.extensionConfiguration.binaryPath == null\n ? lookup.findFilePathFromProjectRoot(\n projectRootPath,\n path.join(c.nodeModulesBinDir, c.rescriptBinName)\n )\n : utils.findBinary(\n config.extensionConfiguration.binaryPath,\n c.rescriptBinName\n );\n\nlet createInterfaceRequest = new v.RequestType<\n p.TextDocumentIdentifier,\n p.TextDocumentIdentifier,\n void\n>(\"textDocument/createInterface\");\n\nlet openCompiledFileRequest = new v.RequestType<\n p.TextDocumentIdentifier,\n p.TextDocumentIdentifier,\n void\n>(\"textDocument/openCompiled\");\n\nlet getCurrentCompilerDiagnosticsForFile = (\n fileUri: string\n): p.Diagnostic[] => {\n let diagnostics: p.Diagnostic[] | null = null;\n\n projectsFiles.forEach((projectFile, _projectRootPath) => {\n if (diagnostics == null && projectFile.filesDiagnostics[fileUri] != null) {\n diagnostics = projectFile.filesDiagnostics[fileUri].slice();\n }\n });\n\n return diagnostics ?? [];\n};\nlet sendUpdatedDiagnostics = () => {\n projectsFiles.forEach((projectFile, projectRootPath) => {\n let { filesWithDiagnostics } = projectFile;\n let compilerLogPath = path.join(projectRootPath, c.compilerLogPartialPath);\n let content = fs.readFileSync(compilerLogPath, { encoding: \"utf-8\" });\n let {\n done,\n result: filesAndErrors,\n codeActions,\n linesWithParseErrors,\n } = utils.parseCompilerLogOutput(content);\n\n if (linesWithParseErrors.length > 0) {\n let params: p.ShowMessageParams = {\n type: p.MessageType.Warning,\n message: `There are more compiler warning/errors that we could not parse. You can help us fix this by opening an [issue on the repository](https://github.com/rescript-lang/rescript-vscode/issues/new?title=Compiler%20log%20parse%20error), pasting the contents of the file [lib/bs/.compiler.log](file://${compilerLogPath}).`,\n };\n let message: p.NotificationMessage = {\n jsonrpc: c.jsonrpcVersion,\n method: \"window/showMessage\",\n params: params,\n };\n send(message);\n }\n\n projectFile.filesDiagnostics = filesAndErrors;\n codeActionsFromDiagnostics = codeActions;\n\n // diff\n Object.keys(filesAndErrors).forEach((file) => {\n let params: p.PublishDiagnosticsParams = {\n uri: file,\n diagnostics: filesAndErrors[file],\n };\n let notification: p.NotificationMessage = {\n jsonrpc: c.jsonrpcVersion,\n method: \"textDocument/publishDiagnostics\",\n params: params,\n };\n send(notification);\n\n filesWithDiagnostics.add(file);\n });\n if (done) {\n // clear old files\n filesWithDiagnostics.forEach((file) => {\n if (filesAndErrors[file] == null) {\n // Doesn't exist in the new diagnostics. Clear this diagnostic\n let params: p.PublishDiagnosticsParams = {\n uri: file,\n diagnostics: [],\n };\n let notification: p.NotificationMessage = {\n jsonrpc: c.jsonrpcVersion,\n method: \"textDocument/publishDiagnostics\",\n params: params,\n };\n send(notification);\n filesWithDiagnostics.delete(file);\n }\n });\n }\n });\n};\nlet deleteProjectDiagnostics = (projectRootPath: string) => {\n let root = projectsFiles.get(projectRootPath);\n if (root != null) {\n root.filesWithDiagnostics.forEach((file) => {\n let params: p.PublishDiagnosticsParams = {\n uri: file,\n diagnostics: [],\n };\n let notification: p.NotificationMessage = {\n jsonrpc: c.jsonrpcVersion,\n method: \"textDocument/publishDiagnostics\",\n params: params,\n };\n send(notification);\n });\n\n projectsFiles.delete(projectRootPath);\n if (config.extensionConfiguration.incrementalTypechecking.enabled) {\n ic.removeIncrementalFileFolder(projectRootPath);\n }\n }\n};\nlet sendCompilationFinishedMessage = () => {\n let notification: p.NotificationMessage = {\n jsonrpc: c.jsonrpcVersion,\n method: \"rescript/compilationFinished\",\n };\n\n send(notification);\n};\n\nlet compilerLogsWatcher = chokidar\n .watch([], {\n awaitWriteFinish: {\n stabilityThreshold: 1,\n },\n })\n .on(\"all\", (_e, _changedPath) => {\n sendUpdatedDiagnostics();\n sendCompilationFinishedMessage();\n if (config.extensionConfiguration.inlayHints?.enable === true) {\n sendInlayHintsRefresh();\n }\n if (config.extensionConfiguration.codeLens === true) {\n sendCodeLensRefresh();\n }\n });\nlet stopWatchingCompilerLog = () => {\n // TODO: cleanup of compilerLogs?\n compilerLogsWatcher.close();\n};\n\ntype clientSentBuildAction = {\n title: string;\n projectRootPath: string;\n};\nlet openedFile = (fileUri: string, fileContent: string) => {\n let filePath = fileURLToPath(fileUri);\n\n stupidFileContentCache.set(filePath, fileContent);\n\n let projectRootPath = utils.findProjectRootOfFile(filePath);\n if (projectRootPath != null) {\n let projectRootState = projectsFiles.get(projectRootPath);\n if (projectRootState == null) {\n if (config.extensionConfiguration.incrementalTypechecking.enabled) {\n ic.recreateIncrementalFileFolder(projectRootPath);\n }\n projectRootState = {\n openFiles: new Set(),\n filesWithDiagnostics: new Set(),\n filesDiagnostics: {},\n bsbWatcherByEditor: null,\n hasPromptedToStartBuild: /(\\/|\\\\)node_modules(\\/|\\\\)/.test(\n projectRootPath\n )\n ? \"never\"\n : false,\n };\n projectsFiles.set(projectRootPath, projectRootState);\n compilerLogsWatcher.add(\n path.join(projectRootPath, c.compilerLogPartialPath)\n );\n }\n let root = projectsFiles.get(projectRootPath)!;\n root.openFiles.add(filePath);\n // check if .bsb.lock is still there. If not, start a bsb -w ourselves\n // because otherwise the diagnostics info we'll display might be stale\n let bsbLockPath = path.join(projectRootPath, c.bsbLock);\n if (\n projectRootState.hasPromptedToStartBuild === false &&\n config.extensionConfiguration.askToStartBuild === true &&\n !fs.existsSync(bsbLockPath)\n ) {\n // TODO: sometime stale .bsb.lock dangling. bsb -w knows .bsb.lock is\n // stale. Use that logic\n // TODO: close watcher when lang-server shuts down\n if (findRescriptBinary(projectRootPath) != null) {\n let payload: clientSentBuildAction = {\n title: c.startBuildAction,\n projectRootPath: projectRootPath,\n };\n let params = {\n type: p.MessageType.Info,\n message: `Start a build for this project to get the freshest data?`,\n actions: [payload],\n };\n let request: p.RequestMessage = {\n jsonrpc: c.jsonrpcVersion,\n id: serverSentRequestIdCounter++,\n method: \"window/showMessageRequest\",\n params: params,\n };\n send(request);\n projectRootState.hasPromptedToStartBuild = true;\n // the client might send us back the \"start build\" action, which we'll\n // handle in the isResponseMessage check in the message handling way\n // below\n } else {\n let request: p.NotificationMessage = {\n jsonrpc: c.jsonrpcVersion,\n method: \"window/showMessage\",\n params: {\n type: p.MessageType.Error,\n message:\n config.extensionConfiguration.binaryPath == null\n ? `Can't find ReScript binary in ${path.join(\n projectRootPath,\n c.nodeModulesBinDir\n )} or parent directories. Did you install it? It's required to use \"rescript\" > 9.1`\n : `Can't find ReScript binary in the directory ${config.extensionConfiguration.binaryPath}`,\n },\n };\n send(request);\n }\n }\n\n // no need to call sendUpdatedDiagnostics() here; the watcher add will\n // call the listener which calls it\n }\n};\n\nlet closedFile = (fileUri: string) => {\n let filePath = fileURLToPath(fileUri);\n\n if (config.extensionConfiguration.incrementalTypechecking.enabled) {\n ic.handleClosedFile(filePath);\n }\n\n stupidFileContentCache.delete(filePath);\n\n let projectRootPath = utils.findProjectRootOfFile(filePath);\n if (projectRootPath != null) {\n let root = projectsFiles.get(projectRootPath);\n if (root != null) {\n root.openFiles.delete(filePath);\n // clear diagnostics too if no open files open in said project\n if (root.openFiles.size === 0) {\n compilerLogsWatcher.unwatch(\n path.join(projectRootPath, c.compilerLogPartialPath)\n );\n deleteProjectDiagnostics(projectRootPath);\n if (root.bsbWatcherByEditor !== null) {\n root.bsbWatcherByEditor.kill();\n root.bsbWatcherByEditor = null;\n }\n }\n }\n }\n};\n\nlet updateOpenedFile = (fileUri: string, fileContent: string) => {\n let filePath = fileURLToPath(fileUri);\n assert(stupidFileContentCache.has(filePath));\n stupidFileContentCache.set(filePath, fileContent);\n if (config.extensionConfiguration.incrementalTypechecking.enabled) {\n ic.handleUpdateOpenedFile(filePath, fileContent, send, () => {\n if (config.extensionConfiguration.codeLens) {\n sendCodeLensRefresh();\n }\n if (config.extensionConfiguration.inlayHints) {\n sendInlayHintsRefresh();\n }\n });\n }\n};\nlet getOpenedFileContent = (fileUri: string) => {\n let filePath = fileURLToPath(fileUri);\n let content = stupidFileContentCache.get(filePath)!;\n assert(content != null);\n return content;\n};\n\nexport default function listen(useStdio = false) {\n // Start listening now!\n // We support two modes: the regular node RPC mode for VSCode, and the --stdio\n // mode for other editors The latter is _technically unsupported_. It's an\n // implementation detail that might change at any time\n if (useStdio) {\n let writer = new rpc.StreamMessageWriter(process.stdout);\n let reader = new rpc.StreamMessageReader(process.stdin);\n // proper `this` scope for writer\n send = (msg: p.Message) => writer.write(msg);\n reader.listen(onMessage);\n } else {\n // proper `this` scope for process\n send = (msg: p.Message) => process.send!(msg);\n process.on(\"message\", onMessage);\n }\n}\n\nfunction hover(msg: p.RequestMessage) {\n let params = msg.params as p.HoverParams;\n let filePath = fileURLToPath(params.textDocument.uri);\n let code = getOpenedFileContent(params.textDocument.uri);\n let tmpname = utils.createFileInTempDir();\n fs.writeFileSync(tmpname, code, { encoding: \"utf-8\" });\n let response = utils.runAnalysisCommand(\n filePath,\n [\n \"hover\",\n filePath,\n params.position.line,\n params.position.character,\n tmpname,\n Boolean(extensionClientCapabilities.supportsMarkdownLinks),\n ],\n msg\n );\n fs.unlink(tmpname, () => null);\n return response;\n}\n\nfunction inlayHint(msg: p.RequestMessage) {\n const params = msg.params as p.InlayHintParams;\n const filePath = fileURLToPath(params.textDocument.uri);\n\n const response = utils.runAnalysisCommand(\n filePath,\n [\n \"inlayHint\",\n filePath,\n params.range.start.line,\n params.range.end.line,\n config.extensionConfiguration.inlayHints.maxLength,\n ],\n msg\n );\n return response;\n}\n\nfunction sendInlayHintsRefresh() {\n let request: p.RequestMessage = {\n jsonrpc: c.jsonrpcVersion,\n method: p.InlayHintRefreshRequest.method,\n id: serverSentRequestIdCounter++,\n };\n send(request);\n}\n\nfunction codeLens(msg: p.RequestMessage) {\n const params = msg.params as p.CodeLensParams;\n const filePath = fileURLToPath(params.textDocument.uri);\n\n const response = utils.runAnalysisCommand(\n filePath,\n [\"codeLens\", filePath],\n msg\n );\n return response;\n}\n\nfunction sendCodeLensRefresh() {\n let request: p.RequestMessage = {\n jsonrpc: c.jsonrpcVersion,\n method: p.CodeLensRefreshRequest.method,\n id: serverSentRequestIdCounter++,\n };\n send(request);\n}\n\nfunction signatureHelp(msg: p.RequestMessage) {\n let params = msg.params as p.SignatureHelpParams;\n let filePath = fileURLToPath(params.textDocument.uri);\n let code = getOpenedFileContent(params.textDocument.uri);\n let tmpname = utils.createFileInTempDir();\n fs.writeFileSync(tmpname, code, { encoding: \"utf-8\" });\n let response = utils.runAnalysisCommand(\n filePath,\n [\n \"signatureHelp\",\n filePath,\n params.position.line,\n params.position.character,\n tmpname,\n ],\n msg\n );\n fs.unlink(tmpname, () => null);\n return response;\n}\n\nfunction definition(msg: p.RequestMessage) {\n // https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_definition\n let params = msg.params as p.DefinitionParams;\n let filePath = fileURLToPath(params.textDocument.uri);\n let response = utils.runAnalysisCommand(\n filePath,\n [\"definition\", filePath, params.position.line, params.position.character],\n msg\n );\n return response;\n}\n\nfunction typeDefinition(msg: p.RequestMessage) {\n // https://microsoft.github.io/language-server-protocol/specification/specification-current/#textDocument_typeDefinition\n let params = msg.params as p.TypeDefinitionParams;\n let filePath = fileURLToPath(params.textDocument.uri);\n let response = utils.runAnalysisCommand(\n filePath,\n [\n \"typeDefinition\",\n filePath,\n params.position.line,\n params.position.character,\n ],\n msg\n );\n return response;\n}\n\nfunction references(msg: p.RequestMessage) {\n // https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_references\n let params = msg.params as p.ReferenceParams;\n let filePath = fileURLToPath(params.textDocument.uri);\n let result: typeof p.ReferencesRequest.type = utils.getReferencesForPosition(\n filePath,\n params.position\n );\n let response: p.ResponseMessage = {\n jsonrpc: c.jsonrpcVersion,\n id: msg.id,\n result,\n // error: code and message set in case an exception happens during the definition request.\n };\n return response;\n}\n\nfunction prepareRename(msg: p.RequestMessage): p.ResponseMessage {\n // https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_prepareRename\n let params = msg.params as p.PrepareRenameParams;\n let filePath = fileURLToPath(params.textDocument.uri);\n let locations: null | p.Location[] = utils.getReferencesForPosition(\n filePath,\n params.position\n );\n let result: p.Range | null = null;\n if (locations !== null) {\n locations.forEach((loc) => {\n if (\n path.normalize(fileURLToPath(loc.uri)) ===\n path.normalize(fileURLToPath(params.textDocument.uri))\n ) {\n let { start, end } = loc.range;\n let pos = params.position;\n if (\n start.character <= pos.character &&\n start.line <= pos.line &&\n end.character >= pos.character &&\n end.line >= pos.line\n ) {\n result = loc.range;\n }\n }\n });\n }\n return {\n jsonrpc: c.jsonrpcVersion,\n id: msg.id,\n result,\n };\n}\n\nfunction rename(msg: p.RequestMessage) {\n // https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_rename\n let params = msg.params as p.RenameParams;\n let filePath = fileURLToPath(params.textDocument.uri);\n let documentChanges: (p.RenameFile | p.TextDocumentEdit)[] | null =\n utils.runAnalysisAfterSanityCheck(filePath, [\n \"rename\",\n filePath,\n params.position.line,\n params.position.character,\n params.newName,\n ]);\n let result: WorkspaceEdit | null = null;\n if (documentChanges !== null) {\n result = { documentChanges };\n }\n let response: p.ResponseMessage = {\n jsonrpc: c.jsonrpcVersion,\n id: msg.id,\n result,\n };\n return response;\n}\n\nfunction documentSymbol(msg: p.RequestMessage) {\n // https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentSymbol\n let params = msg.params as p.DocumentSymbolParams;\n let filePath = fileURLToPath(params.textDocument.uri);\n let extension = path.extname(params.textDocument.uri);\n let code = getOpenedFileContent(params.textDocument.uri);\n let tmpname = utils.createFileInTempDir(extension);\n fs.writeFileSync(tmpname, code, { encoding: \"utf-8\" });\n let response = utils.runAnalysisCommand(\n filePath,\n [\"documentSymbol\", tmpname],\n msg,\n /* projectRequired */ false\n );\n fs.unlink(tmpname, () => null);\n return response;\n}\n\nfunction askForAllCurrentConfiguration() {\n // https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_configuration\n let params: p.ConfigurationParams = {\n items: [\n {\n section: \"rescript.settings\",\n },\n ],\n };\n let req: p.RequestMessage = {\n jsonrpc: c.jsonrpcVersion,\n id: c.configurationRequestId,\n method: p.ConfigurationRequest.type.method,\n params,\n };\n send(req);\n}\n\nfunction semanticTokens(msg: p.RequestMessage) {\n // https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_semanticTokens\n let params = msg.params as p.SemanticTokensParams;\n let filePath = fileURLToPath(params.textDocument.uri);\n let extension = path.extname(params.textDocument.uri);\n let code = getOpenedFileContent(params.textDocument.uri);\n let tmpname = utils.createFileInTempDir(extension);\n fs.writeFileSync(tmpname, code, { encoding: \"utf-8\" });\n let response = utils.runAnalysisCommand(\n filePath,\n [\"semanticTokens\", tmpname],\n msg,\n /* projectRequired */ false\n );\n fs.unlink(tmpname, () => null);\n return response;\n}\n\nfunction completion(msg: p.RequestMessage) {\n // https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_completion\n let params = msg.params as p.ReferenceParams;\n let filePath = fileURLToPath(params.textDocument.uri);\n let code = getOpenedFileContent(params.textDocument.uri);\n let tmpname = utils.createFileInTempDir();\n fs.writeFileSync(tmpname, code, { encoding: \"utf-8\" });\n let response = utils.runAnalysisCommand(\n filePath,\n [\n \"completion\",\n filePath,\n params.position.line,\n params.position.character,\n tmpname,\n Boolean(extensionClientCapabilities.supportsSnippetSyntax),\n ],\n msg\n );\n fs.unlink(tmpname, () => null);\n return response;\n}\n\nfunction codeAction(msg: p.RequestMessage): p.ResponseMessage {\n let params = msg.params as p.CodeActionParams;\n let filePath = fileURLToPath(params.textDocument.uri);\n let code = getOpenedFileContent(params.textDocument.uri);\n let extension = path.extname(params.textDocument.uri);\n let tmpname = utils.createFileInTempDir(extension);\n\n // Check local code actions coming from the diagnostics.\n let localResults: v.CodeAction[] = [];\n codeActionsFromDiagnostics[params.textDocument.uri]?.forEach(\n ({ range, codeAction }) => {\n if (utils.rangeContainsRange(range, params.range)) {\n localResults.push(codeAction);\n }\n }\n );\n\n fs.writeFileSync(tmpname, code, { encoding: \"utf-8\" });\n let response = utils.runAnalysisCommand(\n filePath,\n [\n \"codeAction\",\n filePath,\n params.range.start.line,\n params.range.start.character,\n params.range.end.line,\n params.range.end.character,\n tmpname,\n ],\n msg\n );\n fs.unlink(tmpname, () => null);\n\n let { result } = response;\n\n // We must send `null` when there are no results, empty array isn't enough.\n let codeActions =\n result != null && Array.isArray(result)\n ? [...localResults, ...result]\n : localResults;\n\n let res: v.ResponseMessage = {\n jsonrpc: c.jsonrpcVersion,\n id: msg.id,\n result: codeActions.length > 0 ? codeActions : null,\n };\n return res;\n}\n\nfunction format(msg: p.RequestMessage): Array<p.Message> {\n // technically, a formatting failure should reply with the error. Sadly\n // the LSP alert box for these error replies sucks (e.g. doesn't actually\n // display the message). In order to signal the client to display a proper\n // alert box (sometime with actionable buttons), we need to first send\n // back a fake success message (because each request mandates a\n // response), then right away send a server notification to display a\n // nicer alert. Ugh.\n let fakeSuccessResponse: p.ResponseMessage = {\n jsonrpc: c.jsonrpcVersion,\n id: msg.id,\n result: [],\n };\n let params = msg.params as p.DocumentFormattingParams;\n let filePath = fileURLToPath(params.textDocument.uri);\n let extension = path.extname(params.textDocument.uri);\n if (extension !== c.resExt && extension !== c.resiExt) {\n let params: p.ShowMessageParams = {\n type: p.MessageType.Error,\n message: `Not a ${c.resExt} or ${c.resiExt} file. Cannot format it.`,\n };\n let response: p.NotificationMessage = {\n jsonrpc: c.jsonrpcVersion,\n method: \"window/showMessage\",\n params: params,\n };\n return [fakeSuccessResponse, response];\n } else {\n // code will always be defined here, even though technically it can be undefined\n let code = getOpenedFileContent(params.textDocument.uri);\n\n let projectRootPath = utils.findProjectRootOfFile(filePath);\n let bscExeBinaryPath = utils.findBscExeBinary(projectRootPath);\n\n let formattedResult = utils.formatCode(\n bscExeBinaryPath,\n filePath,\n code,\n config.extensionConfiguration.allowBuiltInFormatter\n );\n if (formattedResult.kind === \"success\") {\n let max = code.length;\n let result: p.TextEdit[] = [\n {\n range: {\n start: { line: 0, character: 0 },\n end: { line: max, character: max },\n },\n newText: formattedResult.result,\n },\n ];\n let response: p.ResponseMessage = {\n jsonrpc: c.jsonrpcVersion,\n id: msg.id,\n result: result,\n };\n return [response];\n } else if (formattedResult.kind === \"blocked-using-built-in-formatter\") {\n // Let's only prompt the user once about this, or things might become annoying.\n if (hasPromptedAboutBuiltInFormatter) {\n return [fakeSuccessResponse];\n }\n hasPromptedAboutBuiltInFormatter = true;\n\n let params: p.ShowMessageParams = {\n type: p.MessageType.Warning,\n message: `Formatting not applied! Could not find the ReScript compiler in the current project, and you haven't configured the extension to allow formatting using the built in formatter. To allow formatting files not strictly part of a ReScript project using the built in formatter, [please configure the extension to allow that.](command:workbench.action.openSettings?${encodeURIComponent(\n JSON.stringify([\"rescript.settings.allowBuiltInFormatter\"])\n )})`,\n };\n let response: p.NotificationMessage = {\n jsonrpc: c.jsonrpcVersion,\n method: \"window/showMessage\",\n params: params,\n };\n return [fakeSuccessResponse, response];\n } else {\n // let the diagnostics logic display the updated syntax errors,\n // from the build.\n // Again, not sending the actual errors. See fakeSuccessResponse\n // above for explanation\n return [fakeSuccessResponse];\n }\n }\n}\n\nlet updateDiagnosticSyntax = (fileUri: string, fileContent: string) => {\n if (config.extensionConfiguration.incrementalTypechecking.enabled) {\n // The incremental typechecking already sends syntax diagnostics.\n return;\n }\n let filePath = fileURLToPath(fileUri);\n let extension = path.extname(filePath);\n let tmpname = utils.createFileInTempDir(extension);\n fs.writeFileSync(tmpname, fileContent, { encoding: \"utf-8\" });\n\n // We need to account for any existing diagnostics from the compiler for this\n // file. If we don't we might accidentally clear the current file's compiler\n // diagnostics if there's no syntax diagostics to send. This is because\n // publishing an empty diagnostics array is equivalent to saying \"clear all\n // errors\".\n let compilerDiagnosticsForFile =\n getCurrentCompilerDiagnosticsForFile(fileUri);\n let syntaxDiagnosticsForFile: p.Diagnostic[] =\n utils.runAnalysisAfterSanityCheck(filePath, [\"diagnosticSyntax\", tmpname]);\n\n let notification: p.NotificationMessage = {\n jsonrpc: c.jsonrpcVersion,\n method: \"textDocument/publishDiagnostics\",\n params: {\n uri: fileUri,\n diagnostics: [...syntaxDiagnosticsForFile, ...compilerDiagnosticsForFile],\n },\n };\n\n fs.unlink(tmpname, () => null);\n\n send(notification);\n};\n\nfunction createInterface(msg: p.RequestMessage): p.Message {\n let params = msg.params as p.TextDocumentIdentifier;\n let extension = path.extname(params.uri);\n let filePath = fileURLToPath(params.uri);\n let projDir = utils.findProjectRootOfFile(filePath);\n\n if (projDir === null) {\n let params: p.ShowMessageParams = {\n type: p.MessageType.Error,\n message: `Cannot locate project directory to generate the interface file.`,\n };\n\n let response: p.NotificationMessage = {\n jsonrpc: c.jsonrpcVersion,\n method: \"window/showMessage\",\n params: params,\n };\n\n return response;\n }\n\n if (extension !== c.resExt) {\n let params: p.ShowMessageParams = {\n type: p.MessageType.Error,\n message: `Not a ${c.resExt} file. Cannot create an interface for it.`,\n };\n\n let response: p.NotificationMessage = {\n jsonrpc: c.jsonrpcVersion,\n method: \"window/showMessage\",\n params: params,\n };\n\n return response;\n }\n\n let resPartialPath = filePath.split(projDir)[1];\n\n // The .cmi filename may have a namespace suffix appended.\n let namespaceResult = utils.getNamespaceNameFromConfigFile(projDir);\n\n if (namespaceResult.kind === \"error\") {\n let params: p.ShowMessageParams = {\n type: p.MessageType.Error,\n message: `Error reading ReScript config file.`,\n };\n\n let response: p.NotificationMessage = {\n jsonrpc: c.jsonrpcVersion,\n method: \"window/showMessage\",\n params,\n };\n\n return response;\n }\n\n let namespace = namespaceResult.result;\n let suffixToAppend = namespace.length > 0 ? \"-\" + namespace : \"\";\n\n let cmiPartialPath = path.join(\n path.dirname(resPartialPath),\n path.basename(resPartialPath, c.resExt) + suffixToAppend + c.cmiExt\n );\n\n let cmiPath = path.join(projDir, c.compilerDirPartialPath, cmiPartialPath);\n let cmiAvailable = fs.existsSync(cmiPath);\n\n if (!cmiAvailable) {\n let params: p.ShowMessageParams = {\n type: p.MessageType.Error,\n message: `No compiled interface file found. Please compile your project first.`,\n };\n\n let response: p.NotificationMessage = {\n jsonrpc: c.jsonrpcVersion,\n method: \"window/showMessage\",\n params,\n };\n\n return response;\n }\n\n let response = utils.runAnalysisCommand(\n filePath,\n [\"createInterface\", filePath, cmiPath],\n msg\n );\n let result = typeof response.result === \"string\" ? response.result : \"\";\n\n try {\n let resiPath = lookup.replaceFileExtension(filePath, c.resiExt);\n fs.writeFileSync(resiPath, result, { encoding: \"utf-8\" });\n let response: p.ResponseMessage = {\n jsonrpc: c.jsonrpcVersion,\n id: msg.id,\n result: {\n uri: utils.pathToURI(resiPath),\n },\n };\n return response;\n } catch (e) {\n let response: p.ResponseMessage = {\n jsonrpc: c.jsonrpcVersion,\n id: msg.id,\n error: {\n code: p.ErrorCodes.InternalError,\n message: \"Unable to create interface file.\",\n },\n };\n return response;\n }\n}\n\nfunction openCompiledFile(msg: p.RequestMessage): p.Message {\n let params = msg.params as p.TextDocumentIdentifier;\n let filePath = fileURLToPath(params.uri);\n let projDir = utils.findProjectRootOfFile(filePath);\n\n if (projDir === null) {\n let params: p.ShowMessageParams = {\n type: p.MessageType.Error,\n message: `Cannot locate project directory.`,\n };\n\n let response: p.NotificationMessage = {\n jsonrpc: c.jsonrpcVersion,\n method: \"window/showMessage\",\n params: params,\n };\n\n return response;\n }\n\n let compiledFilePath = utils.getCompiledFilePath(filePath, projDir);\n\n if (\n compiledFilePath.kind === \"error\" ||\n !fs.existsSync(compiledFilePath.result)\n ) {\n let message =\n compiledFilePath.kind === \"success\"\n ? `No compiled file found. Expected it at: ${compiledFilePath.result}`\n : `No compiled file found. Please compile your project first.`;\n\n let params: p.ShowMessageParams = {\n type: p.MessageType.Error,\n message,\n };\n\n let response: p.NotificationMessage = {\n jsonrpc: c.jsonrpcVersion,\n method: \"window/showMessage\",\n params,\n };\n\n return response;\n }\n\n let response: p.ResponseMessage = {\n jsonrpc: c.jsonrpcVersion,\n id: msg.id,\n result: {\n uri: utils.pathToURI(compiledFilePath.result),\n },\n };\n\n return response;\n}\n\nfunction onMessage(msg: p.Message) {\n if (p.Message.isNotification(msg)) {\n // notification message, aka the client ends it and doesn't want a reply\n if (!initialized && msg.method !== \"exit\") {\n // From spec: \"Notifications should be dropped, except for the exit notification. This will allow the exit of a server without an initialize request\"\n // For us: do nothing. We don't have anything we need to clean up right now\n // TODO: we might have things we need to clean up now... like some watcher stuff\n } else if (msg.method === \"exit\") {\n // The server should exit with success code 0 if the shutdown request has been received before; otherwise with error code 1\n if (shutdownRequestAlreadyReceived) {\n process.exit(0);\n } else {\n process.exit(1);\n }\n } else if (msg.method === DidOpenTextDocumentNotification.method) {\n let params = msg.params as p.DidOpenTextDocumentParams;\n openedFile(params.textDocument.uri, params.textDocument.text);\n updateDiagnosticSyntax(params.textDocument.uri, params.textDocument.text);\n } else if (msg.method === DidChangeTextDocumentNotification.method) {\n let params = msg.params as p.DidChangeTextDocumentParams;\n let extName = path.extname(params.textDocument.uri);\n if (extName === c.resExt || extName === c.resiExt) {\n let changes = params.contentChanges;\n if (changes.length === 0) {\n // no change?\n } else {\n // we currently only support full changes\n updateOpenedFile(\n params.textDocument.uri,\n changes[changes.length - 1].text\n );\n updateDiagnosticSyntax(\n params.textDocument.uri,\n changes[changes.length - 1].text\n );\n }\n }\n } else if (msg.method === DidCloseTextDocumentNotification.method) {\n let params = msg.params as p.DidCloseTextDocumentParams;\n closedFile(params.textDocument.uri);\n } else if (msg.method === DidChangeConfigurationNotification.type.method) {\n // Can't seem to get this notification to trigger, but if it does this will be here and ensure we're synced up at the server.\n askForAllCurrentConfiguration();\n }\n } else if (p.Message.isRequest(msg)) {\n // request message, aka client sent request and waits for our mandatory reply\n if (!initialized && msg.method !== \"initialize\") {\n let response: p.ResponseMessage = {\n jsonrpc: c.jsonrpcVersion,\n id: msg.id,\n error: {\n code: p.ErrorCodes.ServerNotInitialized,\n message: \"Server not initialized.\",\n },\n };\n send(response);\n } else if (msg.method === \"initialize\") {\n // Save initial configuration, if present\n let initParams = msg.params as InitializeParams;\n let initialConfiguration = initParams.initializationOptions\n ?.extensionConfiguration as extensionConfiguration | undefined;\n\n if (initialConfiguration != null) {\n config.extensionConfiguration = initialConfiguration;\n }\n\n // These are static configuration options the client can set to enable certain\n let extensionClientCapabilitiesFromClient = initParams\n .initializationOptions?.extensionClientCapabilities as\n | extensionClientCapabilities\n | undefined;\n\n if (extensionClientCapabilitiesFromClient != null) {\n extensionClientCapabilities = extensionClientCapabilitiesFromClient;\n }\n\n extensionClientCapabilities.supportsSnippetSyntax = Boolean(\n initParams.capabilities.textDocument?.completion?.completionItem\n ?.snippetSupport\n );\n\n // send the list of features we support\n let result: p.InitializeResult = {\n // This tells the client: \"hey, we support the following operations\".\n // Example: we want to expose \"jump-to-definition\".\n // By adding `definitionProvider: true`, the client will now send \"jump-to-definition\" requests.\n capabilities: {\n // TODO: incremental sync?\n textDocumentSync: v.TextDocumentSyncKind.Full,\n documentFormattingProvider: true,\n hoverProvider: true,\n definitionProvider: true,\n typeDefinitionProvider: true,\n referencesProvider: true,\n codeActionProvider: true,\n renameProvider: { prepareProvider: true },\n documentSymbolProvider: true,\n completionProvider: {\n triggerCharacters: [\".\", \">\", \"@\", \"~\", '\"', \"=\", \"(\"],\n },\n semanticTokensProvider: {\n legend: {\n tokenTypes: [\n \"operator\",\n \"variable\",\n \"type\",\n \"modifier\", // emit jsx-tag < and > in <div> as modifier\n \"namespace\",\n \"enumMember\",\n \"property\",\n \"interface\", // emit jsxlowercase, div in <div> as interface\n ],\n tokenModifiers: [],\n },\n documentSelector: [{ scheme: \"file\", language: \"rescript\" }],\n // TODO: Support range for full, and add delta support\n full: true,\n },\n inlayHintProvider: config.extensionConfiguration.inlayHints?.enable,\n codeLensProvider: config.extensionConfiguration.codeLens\n ? {\n workDoneProgress: false,\n }\n : undefined,\n signatureHelpProvider: config.extensionConfiguration.signatureHelp\n ?.enabled\n ? {\n triggerCharacters: [\"(\"],\n retriggerCharacters: [\"=\", \",\"],\n }\n : undefined,\n },\n };\n let response: p.ResponseMessage = {\n jsonrpc: c.jsonrpcVersion,\n id: msg.id,\n result: result,\n };\n initialized = true;\n\n // Periodically pull configuration from the client.\n pullConfigurationPeriodically = setInterval(() => {\n askForAllCurrentConfiguration();\n }, c.pullConfigurationInterval);\n\n send(response);\n } else if (msg.method === \"initialized\") {\n // sent from client after initialize. Nothing to do for now\n let response: p.ResponseMessage = {\n jsonrpc: c.jsonrpcVersion,\n id: msg.id,\n result: null,\n };\n send(response);\n } else if (msg.method === \"shutdown\") {\n // https://microsoft.github.io/language-server-protocol/specification#shutdown\n if (shutdownRequestAlreadyReceived) {\n let response: p.ResponseMessage = {\n jsonrpc: c.jsonrpcVersion,\n id: msg.id,\n error: {\n code: p.ErrorCodes.InvalidRequest,\n message: `Language server already received the shutdown request`,\n },\n };\n send(response);\n } else {\n shutdownRequestAlreadyReceived = true;\n // TODO: recheck logic around init/shutdown...\n stopWatchingCompilerLog();\n // TODO: delete bsb watchers\n\n if (pullConfigurationPeriodically != null) {\n clearInterval(pullConfigurationPeriodically);\n }\n\n let response: p.ResponseMessage = {\n jsonrpc: c.jsonrpcVersion,\n id: msg.id,\n result: null,\n };\n send(response);\n }\n } else if (msg.method === p.HoverRequest.method) {\n send(hover(msg));\n } else if (msg.method === p.DefinitionRequest.method) {\n send(definition(msg));\n } else if (msg.method === p.TypeDefinitionRequest.method) {\n send(typeDefinition(msg));\n } else if (msg.method === p.ReferencesRequest.method) {\n send(references(msg));\n } else if (msg.method === p.PrepareRenameRequest.method) {\n send(prepareRename(msg));\n } else if (msg.method === p.RenameRequest.method) {\n send(rename(msg));\n } else if (msg.method === p.DocumentSymbolRequest.method) {\n send(documentSymbol(msg));\n } else if (msg.method === p.CompletionRequest.method) {\n send(completion(msg));\n } else if (msg.method === p.SemanticTokensRequest.method) {\n send(semanticTokens(msg));\n } else if (msg.method === p.CodeActionRequest.method) {\n send(codeAction(msg));\n } else if (msg.method === p.DocumentFormattingRequest.method) {\n let responses = format(msg);\n responses.forEach((response) => send(response));\n } else if (msg.method === createInterfaceRequest.method) {\n send(createInterface(msg));\n } else if (msg.method === openCompiledFileRequest.method) {\n send(openCompiledFile(msg));\n } else if (msg.method === p.InlayHintRequest.method) {\n let params = msg.params as InlayHintParams;\n let extName = path.extname(params.textDocument.uri);\n if (extName === c.resExt) {\n send(inlayHint(msg));\n }\n } else if (msg.method === p.CodeLensRequest.method) {\n let params = msg.params as CodeLensParams;\n let extName = path.extname(params.textDocument.uri);\n if (extName === c.resExt) {\n send(codeLens(msg));\n }\n } else if (msg.method === p.SignatureHelpRequest.method) {\n let params = msg.params as SignatureHelpParams;\n let extName = path.extname(params.textDocument.uri);\n if (extName === c.resExt) {\n send(signatureHelp(msg));\n }\n } else {\n let response: p.ResponseMessage = {\n jsonrpc: c.jsonrpcVersion,\n id: msg.id,\n error: {\n code: p.ErrorCodes.InvalidRequest,\n message: \"Unrecognized editor request.\",\n },\n };\n send(response);\n }\n } else if (p.Message.isResponse(msg)) {\n if (msg.id === c.configurationRequestId) {\n if (msg.result != null) {\n // This is a response from a request to get updated configuration. Note\n // that it seems to return the configuration in a way that lets the\n // current workspace settings override the user settings. This is good\n // as we get started, but _might_ be problematic further down the line\n // if we want to support having several projects open at the same time\n // without their settings overriding eachother. Not a problem now though\n // as we'll likely only have \"global\" settings starting out.\n let [configuration] = msg.result as [\n extensionConfiguration | null | undefined\n ];\n if (configuration != null) {\n config.extensionConfiguration = configuration;\n }\n }\n } else if (\n msg.result != null &&\n // @ts-ignore\n msg.result.title != null &&\n // @ts-ignore\n msg.result.title === c.startBuildAction\n ) {\n let msg_ = msg.result as clientSentBuildAction;\n let projectRootPath = msg_.projectRootPath;\n // TODO: sometime stale .bsb.lock dangling\n // TODO: close watcher when lang-server shuts down. However, by Node's\n // default, these subprocesses are automatically killed when this\n // language-server process exits\n let rescriptBinaryPath = findRescriptBinary(projectRootPath);\n if (rescriptBinaryPath != null) {\n let bsbProcess = utils.runBuildWatcherUsingValidBuildPath(\n rescriptBinaryPath,\n projectRootPath\n );\n let root = projectsFiles.get(projectRootPath)!;\n root.bsbWatcherByEditor = bsbProcess;\n // bsbProcess.on(\"message\", (a) => console.log(a));\n }\n }\n }\n}\n\n// Gate behind a debug setting potentially?\nonErrorReported((msg) => {\n let params: p.ShowMessageParams = {\n type: p.MessageType.Warning,\n message: `ReScript tooling: Internal error. Something broke. Here's the error message that you can report if you want:\n \n${msg}\n\n(this message will only be reported once every 15 minutes)`,\n };\n let message: p.NotificationMessage = {\n jsonrpc: c.jsonrpcVersion,\n method: \"window/showMessage\",\n params: params,\n };\n send(message);\n});\n", "import * as fs from \"fs\";\nimport * as path from \"path\";\nimport * as p from \"vscode-languageserver-protocol\";\n\nimport { BuildSchema, ModuleFormat, ModuleFormatObject } from \"./buildSchema\";\nimport * as c from \"./constants\";\n\nconst getCompiledFolderName = (moduleFormat: ModuleFormat): string => {\n switch (moduleFormat) {\n case \"es6\":\n return \"es6\";\n case \"es6-global\":\n return \"es6_global\";\n case \"commonjs\":\n default:\n return \"js\";\n }\n};\n\nexport const replaceFileExtension = (filePath: string, ext: string): string => {\n let name = path.basename(filePath, path.extname(filePath));\n return path.format({ dir: path.dirname(filePath), name, ext });\n};\n\n// Check if filePartialPath exists at directory and return the joined path,\n// otherwise recursively check parent directories for it.\nexport const findFilePathFromProjectRoot = (\n directory: p.DocumentUri | null, // This must be a directory and not a file!\n filePartialPath: string\n): null | p.DocumentUri => {\n if (directory == null) {\n return null;\n }\n\n let filePath: p.DocumentUri = path.join(directory, filePartialPath);\n if (fs.existsSync(filePath)) {\n return filePath;\n }\n\n let parentDir: p.DocumentUri = path.dirname(directory);\n if (parentDir === directory) {\n // reached the top\n return null;\n }\n\n return findFilePathFromProjectRoot(parentDir, filePartialPath);\n};\n\nexport const readConfig = (projDir: p.DocumentUri): BuildSchema | null => {\n try {\n let rescriptJson = path.join(projDir, c.rescriptJsonPartialPath);\n let bsconfigJson = path.join(projDir, c.bsconfigPartialPath);\n\n let configFile = fs.readFileSync(\n fs.existsSync(rescriptJson) ? rescriptJson : bsconfigJson,\n { encoding: \"utf-8\" }\n );\n\n let result: BuildSchema = JSON.parse(configFile);\n return result;\n } catch (e) {\n return null;\n }\n};\n\n// Collect data from bsconfig to be able to find out the correct path of\n// the compiled JS artifacts.\nexport const getSuffixAndPathFragmentFromBsconfig = (bsconfig: BuildSchema) => {\n let pkgSpecs = bsconfig[\"package-specs\"];\n let pathFragment = \"\";\n let module = c.bsconfigModuleDefault;\n let moduleFormatObj: ModuleFormatObject = { module: module };\n let suffix = c.bsconfigSuffixDefault;\n\n if (pkgSpecs) {\n if (\n !Array.isArray(pkgSpecs) &&\n typeof pkgSpecs !== \"string\" &&\n pkgSpecs.module\n ) {\n moduleFormatObj = pkgSpecs;\n } else if (typeof pkgSpecs === \"string\") {\n module = pkgSpecs;\n } else if (Array.isArray(pkgSpecs) && pkgSpecs[0]) {\n if (typeof pkgSpecs[0] === \"string\") {\n module = pkgSpecs[0];\n } else {\n moduleFormatObj = pkgSpecs[0];\n }\n }\n }\n\n if (moduleFormatObj[\"module\"]) {\n module = moduleFormatObj[\"module\"];\n }\n\n if (!moduleFormatObj[\"in-source\"]) {\n pathFragment = \"lib/\" + getCompiledFolderName(module);\n }\n\n if (moduleFormatObj.suffix) {\n suffix = moduleFormatObj.suffix;\n } else if (bsconfig.suffix) {\n suffix = bsconfig.suffix;\n }\n\n return [suffix, pathFragment];\n};\n\nexport const getFilenameFromBsconfig = (\n projDir: string,\n partialFilePath: string\n): string | null => {\n let bsconfig = readConfig(projDir);\n\n if (!bsconfig) {\n return null;\n }\n\n let [suffix, pathFragment] = getSuffixAndPathFragmentFromBsconfig(bsconfig);\n\n let compiledPartialPath = replaceFileExtension(partialFilePath, suffix);\n\n return path.join(projDir, pathFragment, compiledPartialPath);\n};\n\n// Monorepo helpers\nexport const getFilenameFromRootBsconfig = (\n projDir: string,\n partialFilePath: string\n): string | null => {\n let rootConfigPath = findFilePathFromProjectRoot(\n path.join(\"..\", projDir),\n c.rescriptJsonPartialPath\n );\n\n if (!rootConfigPath) {\n rootConfigPath = findFilePathFromProjectRoot(\n path.join(\"..\", projDir),\n c.bsconfigPartialPath\n );\n }\n\n if (!rootConfigPath) {\n return null;\n }\n\n let rootConfig = readConfig(path.dirname(rootConfigPath));\n\n if (!rootConfig) {\n return null;\n }\n\n let [suffix, pathFragment] = getSuffixAndPathFragmentFromBsconfig(rootConfig);\n\n let compiledPartialPath = replaceFileExtension(partialFilePath, suffix);\n\n return path.join(projDir, pathFragment, compiledPartialPath);\n};\n", "import * as path from \"path\";\nimport { ModuleFormat } from \"./buildSchema\";\n\nexport let platformDir =\n process.arch == \"arm64\" ? process.platform + process.arch : process.platform;\n\n// See https://microsoft.github.io/language-server-protocol/specification Abstract Message\n// version is fixed to 2.0\nexport let jsonrpcVersion = \"2.0\";\nexport let platformPath = path.join(\"rescript\", platformDir);\nexport let nodeModulesPlatformPath = path.join(\"node_modules\", platformPath);\nexport let bscExeName = \"bsc.exe\";\nexport let bscNativeReScriptPartialPath = path.join(\n nodeModulesPlatformPath,\n bscExeName\n);\n\nexport let analysisDevPath = path.join(\n path.dirname(__dirname),\n \"..\",\n \"rescript-editor-analysis.exe\"\n);\nexport let analysisProdPath = path.join(\n path.dirname(__dirname),\n \"analysis_binaries\",\n platformDir,\n \"rescript-editor-analysis.exe\"\n);\n\nexport let rescriptBinName = \"rescript\";\n\nexport let bscBinName = \"bsc\";\n\nexport let nodeModulesBinDir = path.join(\"node_modules\", \".bin\");\n\n// can't use the native bsb/rescript since we might need the watcher -w flag, which is only in the JS wrapper\nexport let rescriptNodePartialPath = path.join(\n nodeModulesBinDir,\n rescriptBinName\n);\n\nexport let bsbLock = \".bsb.lock\";\nexport let bsconfigPartialPath = \"bsconfig.json\";\nexport let rescriptJsonPartialPath = \"rescript.json\";\nexport let compilerDirPartialPath = path.join(\"lib\", \"bs\");\nexport let compilerLogPartialPath = path.join(\"lib\", \"bs\", \".compiler.log\");\nexport let resExt = \".res\";\nexport let resiExt = \".resi\";\nexport let cmiExt = \".cmi\";\nexport let startBuildAction = \"Start Build\";\n\n// bsconfig defaults according configuration schema (https://rescript-lang.org/docs/manual/latest/build-configuration-schema)\nexport let bsconfigModuleDefault = ModuleFormat.Commonjs;\nexport let bsconfigSuffixDefault = \".js\";\n\nexport let configurationRequestId = \"rescript_configuration_request\";\nexport let pullConfigurationInterval = 10_000;\n", "import * as childProcess from \"child_process\";\nimport * as p from \"vscode-languageserver-protocol\";\nimport * as path from \"path\";\nimport * as t from \"vscode-languageserver-types\";\nimport {\n RequestMessage,\n ResponseMessage,\n} from \"vscode-languageserver-protocol\";\nimport fs from \"fs\";\nimport * as os from \"os\";\n\nimport * as codeActions from \"./codeActions\";\nimport * as c from \"./constants\";\nimport * as lookup from \"./lookup\";\nimport { reportError } from \"./errorReporter\";\nimport config from \"./config\";\n\nlet tempFilePrefix = \"rescript_format_file_\" + process.pid + \"_\";\nlet tempFileId = 0;\n\nexport let createFileInTempDir = (extension = \"\") => {\n let tempFileName = tempFilePrefix + tempFileId + extension;\n tempFileId = tempFileId + 1;\n return path.join(os.tmpdir(), tempFileName);\n};\n\n// TODO: races here?\n// TODO: this doesn't handle file:/// scheme\nexport let findProjectRootOfFile = (\n source: p.DocumentUri\n): null | p.DocumentUri => {\n let dir = path.dirname(source);\n if (\n fs.existsSync(path.join(dir, c.rescriptJsonPartialPath)) ||\n fs.existsSync(path.join(dir, c.bsconfigPartialPath))\n ) {\n return dir;\n } else {\n if (dir === source) {\n // reached top\n return null;\n } else {\n return findProjectRootOfFile(dir);\n }\n }\n};\n\n// Check if binaryName exists inside binaryDirPath and return the joined path.\nexport let findBinary = (\n binaryDirPath: p.DocumentUri | null,\n binaryName: string\n): p.DocumentUri | null => {\n if (binaryDirPath == null) {\n return null;\n }\n let binaryPath: p.DocumentUri = path.join(binaryDirPath, binaryName);\n if (fs.existsSync(binaryPath)) {\n return binaryPath;\n } else {\n return null;\n }\n};\n\ntype execResult =\n | {\n kind: \"success\";\n result: string;\n }\n | {\n kind: \"error\";\n error: string;\n };\n\ntype formatCodeResult =\n | execResult\n | {\n kind: \"blocked-using-built-in-formatter\";\n };\n\nexport let formatCode = (\n bscPath: p.DocumentUri | null,\n filePath: string,\n code: string,\n allowBuiltInFormatter: boolean\n): formatCodeResult => {\n let extension = path.extname(filePath);\n let formatTempFileFullPath = createFileInTempDir(extension);\n fs.writeFileSync(formatTempFileFullPath, code, {\n encoding: \"utf-8\",\n });\n try {\n // It will try to use the user formatting binary.\n // If not, use the one we ship with the analysis binary in the extension itself.\n if (bscPath != null) {\n let result = childProcess.execFileSync(bscPath, [\n \"-color\",\n \"never\",\n \"-format\",\n formatTempFileFullPath,\n ]);\n return {\n kind: \"success\",\n result: result.toString(),\n };\n } else {\n if (!allowBuiltInFormatter) {\n return {\n kind: \"blocked-using-built-in-formatter\",\n };\n }\n\n let result = runAnalysisAfterSanityCheck(\n formatTempFileFullPath,\n [\"format\", formatTempFileFullPath],\n false\n );\n\n // The formatter returning an empty string means it couldn't format the\n // sources, probably because of errors. In that case, we bail from\n // formatting by returning the unformatted content.\n if (result === \"\") {\n result = code;\n }\n\n return {\n kind: \"success\",\n result,\n };\n }\n } catch (e) {\n return {\n kind: \"error\",\n error: e instanceof Error ? e.message : String(e),\n };\n } finally {\n // async close is fine. We don't use this file name again\n fs.unlink(formatTempFileFullPath, () => null);\n }\n};\n\nlet findReScriptVersion = (filePath: p.DocumentUri): string | undefined => {\n let projectRoot = findProjectRootOfFile(filePath);\n if (projectRoot == null) {\n return undefined;\n }\n\n let rescriptBinary = lookup.findFilePathFromProjectRoot(\n projectRoot,\n path.join(c.nodeModulesBinDir, c.rescriptBinName)\n );\n\n if (rescriptBinary == null) {\n return undefined;\n }\n\n try {\n let version = childProcess.execSync(`${rescriptBinary} -v`);\n return version.toString().trim();\n } catch (e) {\n return undefined;\n }\n};\n\nexport let runAnalysisAfterSanityCheck = (\n filePath: p.DocumentUri,\n args: Array<any>,\n projectRequired = false\n) => {\n let binaryPath;\n if (fs.existsSync(c.analysisDevPath)) {\n binaryPath = c.analysisDevPath;\n } else if (fs.existsSync(c.analysisProdPath)) {\n binaryPath = c.analysisProdPath;\n } else {\n return null;\n }\n\n let projectRootPath = findProjectRootOfFile(filePath);\n if (projectRootPath == null && projectRequired) {\n return null;\n }\n let rescriptVersion = findReScriptVersion(filePath);\n let options: childProcess.ExecFileSyncOptions = {\n cwd: projectRootPath || undefined,\n maxBuffer: Infinity,\n env: {\n ...process.env,\n RESCRIPT_VERSION: rescriptVersion,\n },\n };\n try {\n let stdout = childProcess.execFileSync(binaryPath, args, options);\n return JSON.parse(stdout.toString());\n } catch (e) {\n console.error(e);\n // Element 0 is the action we're performing\n reportError(String(args[0]), String(e));\n return null;\n }\n};\n\nexport let runAnalysisCommand = (\n filePath: p.DocumentUri,\n args: Array<any>,\n msg: RequestMessage,\n projectRequired = true\n) => {\n let result = runAnalysisAfterSanityCheck(filePath, args, projectRequired);\n let response: ResponseMessage = {\n jsonrpc: c.jsonrpcVersion,\n id: msg.id,\n result,\n };\n return response;\n};\n\nexport let getReferencesForPosition = (\n filePath: p.DocumentUri,\n position: p.Position\n) =>\n runAnalysisAfterSanityCheck(filePath, [\n \"references\",\n filePath,\n position.line,\n position.character,\n ]);\n\nexport const toCamelCase = (text: string): string => {\n return text\n .replace(/(?:^\\w|[A-Z]|\\b\\w)/g, (s: string) => s.toUpperCase())\n .replace(/(\\s|-)+/g, \"\");\n};\n\nexport const getNamespaceNameFromConfigFile = (\n projDir: p.DocumentUri\n): execResult => {\n let config = lookup.readConfig(projDir);\n let result = \"\";\n\n if (!config) {\n return {\n kind: \"error\",\n error: \"Could not read ReScript config file\",\n };\n }\n\n if (config.namespace === true) {\n result = toCamelCase(config.name);\n } else if (typeof config.namespace === \"string\") {\n result = toCamelCase(config.namespace);\n }\n\n return {\n kind: \"success\",\n result,\n };\n};\n\nexport let getCompiledFilePath = (\n filePath: string,\n projDir: string\n): execResult => {\n let error: execResult = {\n kind: \"error\",\n error: \"Could not read ReScript config file\",\n };\n let partialFilePath = filePath.split(projDir)[1];\n let compiledPath = lookup.getFilenameFromBsconfig(projDir, partialFilePath);\n\n if (!compiledPath) {\n return error;\n }\n\n let result = compiledPath;\n\n // If the file is not found, lookup a possible root bsconfig that may contain\n // info about the possible location of the file.\n if (!fs.existsSync(result)) {\n let compiledPath = lookup.getFilenameFromRootBsconfig(\n projDir,\n partialFilePath\n );\n\n if (!compiledPath) {\n return error;\n }\n\n result = compiledPath;\n }\n\n return {\n kind: \"success\",\n result,\n };\n};\n\nexport let runBuildWatcherUsingValidBuildPath = (\n buildPath: p.DocumentUri,\n projectRootPath: p.DocumentUri\n) => {\n let cwdEnv = {\n cwd: projectRootPath,\n };\n if (process.platform === \"win32\") {\n /*\n - a node.js script in node_modules/.bin on windows is wrapped in a\n batch script wrapper (there's also a regular binary of the same name on\n windows, but that one's a shell script wrapper for cygwin). More info:\n https://github.com/npm/cmd-shim/blob/c5118da34126e6639361fe9706a5ff07e726ed45/index.js#L1\n - a batch script adds the suffix .cmd to the script\n - you can't call batch scripts through the regular `execFile`:\n https://nodejs.org/api/child_process.html#child_process_spawning_bat_and_cmd_files_on_windows\n - So you have to use `exec` instead, and make sure you quote the path\n (since the path might have spaces), which `execFile` would have done\n for you under the hood\n */\n return childProcess.exec(`\"${buildPath}\".cmd build -w`, cwdEnv);\n } else {\n return childProcess.execFile(buildPath, [\"build\", \"-w\"], cwdEnv);\n }\n};\n\n// Logic for parsing .compiler.log\n/* example .compiler.log content:\n\n#Start(1600519680823)\n\n Syntax error!\n /Users/chenglou/github/reason-react/src/test.res:1:8-2:3\n\n 1 \u2502 let a =\n 2 \u2502 let b =\n 3 \u2502\n\n This let-binding misses an expression\n\n\n Warning number 8\n /Users/chenglou/github/reason-react/src/test.res:3:5-8\n\n 1 \u2502 let a = j`\uD83D\uDE00`\n 2 \u2502 let b = `\uD83D\uDE00`\n 3 \u2502 let None = None\n 4 \u2502 let bla: int = \"\n 5 \u2502 hi\n\n You forgot to handle a possible case here, for example:\n Some _\n\n\n We've found a bug for you!\n /Users/chenglou/github/reason-react/src/test.res:3:9\n\n 1 \u2502 let a = 1\n 2 \u2502 let b = \"hi\"\n 3 \u2502 let a = b + 1\n\n This has type: string\n Somewhere wanted: int\n\n#Done(1600519680836)\n*/\n\n// parser helpers\nexport let pathToURI = (file: string) => {\n return process.platform === \"win32\" ? `file:\\\\\\\\\\\\${file}` : `file://${file}`;\n};\nlet parseFileAndRange = (fileAndRange: string) => {\n // https://github.com/rescript-lang/rescript-compiler/blob/0a3f4bb32ca81e89cefd5a912b8795878836f883/jscomp/super_errors/super_location.ml#L15-L25\n /* The file + location format can be:\n a/b.res <- fallback, no location available (usually due to bad ppx...)\n a/b.res:10:20\n a/b.res:10:20-21 <- last number here is the end char of line 10\n a/b.res:10:20-30:11\n */\n let regex = /(.+)\\:(\\d+)\\:(\\d+)(-(\\d+)(\\:(\\d+))?)?$/;\n /* ^^ file\n ^^^ start line\n ^^^ start character\n ^ optional range\n ^^^ end line or chararacter\n ^^^ end character\n */\n // for the trimming, see https://github.com/rescript-lang/rescript-vscode/pull/71#issuecomment-769160576\n let trimmedFileAndRange = fileAndRange.trim();\n let match = trimmedFileAndRange.match(regex);\n if (match === null) {\n // no location! Though LSP insist that we provide at least a dummy location\n return {\n file: pathToURI(trimmedFileAndRange),\n range: {\n start: { line: 0, character: 0 },\n end: { line: 0, character: 0 },\n },\n };\n }\n\n let [\n _source,\n file,\n startLine,\n startChar,\n optionalEndGroup,\n endLineOrChar,\n _colonPlusEndCharOrNothing,\n endCharOrNothing,\n ] = match;\n\n // language-server position is 0-based. Ours is 1-based. Convert\n // also, our end character is inclusive. Language-server's is exclusive\n let range;\n if (optionalEndGroup == null) {\n let start = {\n line: parseInt(startLine) - 1,\n character: parseInt(startChar),\n };\n range = {\n start: start,\n end: start,\n };\n } else {\n let isSingleLine = endCharOrNothing == null;\n let [endLine, endChar] = isSingleLine\n ? [startLine, endLineOrChar]\n : [endLineOrChar, endCharOrNothing];\n range = {\n start: {\n line: parseInt(startLine) - 1,\n character: parseInt(startChar) - 1,\n },\n end: { line: parseInt(endLine) - 1, character: parseInt(endChar) },\n };\n }\n return {\n file: pathToURI(file),\n range,\n };\n};\n\n// main parsing logic\nexport type filesDiagnostics = {\n [key: string]: p.Diagnostic[];\n};\ntype parsedCompilerLogResult = {\n done: boolean;\n result: filesDiagnostics;\n codeActions: codeActions.filesCodeActions;\n linesWithParseErrors: string[];\n};\nexport let parseCompilerLogOutput = (\n content: string\n): parsedCompilerLogResult => {\n type parsedDiagnostic = {\n code: number | undefined;\n severity: t.DiagnosticSeverity;\n tag: t.DiagnosticTag | undefined;\n content: string[];\n };\n let parsedDiagnostics: parsedDiagnostic[] = [];\n let linesWithParseErrors: string[] = [];\n let lines = content.split(os.EOL);\n let done = false;\n\n for (let i = 0; i < lines.length; i++) {\n let line = lines[i];\n if (line.startsWith(\" We've found a bug for you!\")) {\n parsedDiagnostics.push({\n code: undefined,\n severity: t.DiagnosticSeverity.Error,\n tag: undefined,\n content: [],\n });\n } else if (line.startsWith(\"FAILED:\")) {\n // File with a self cycle\n parsedDiagnostics.push({\n code: undefined,\n severity: t.DiagnosticSeverity.Error,\n tag: undefined,\n content: [line],\n });\n } else if (line.startsWith(\"Fatal error:\")) {\n parsedDiagnostics.push({\n code: undefined,\n severity: t.DiagnosticSeverity.Error,\n tag: undefined,\n content: [line],\n });\n } else if (line.startsWith(\" Warning number \")) {\n let warningNumber = parseInt(line.slice(\" Warning number \".length));\n let tag: t.DiagnosticTag | undefined = undefined;\n switch (warningNumber) {\n case 11:\n case 20:\n case 26:\n case 27:\n case 32:\n case 33:\n case 34:\n case 35:\n case 36:\n case 37:\n case 38:\n case 39:\n case 60:\n case 66:\n case 67:\n case 101:\n tag = t.DiagnosticTag.Unnecessary;\n break;\n case 3:\n tag = t.DiagnosticTag.Deprecated;\n break;\n }\n let severity = line.includes(\"(configured as error)\")\n ? t.DiagnosticSeverity.Error\n : t.DiagnosticSeverity.Warning;\n parsedDiagnostics.push({\n code: Number.isNaN(warningNumber) ? undefined : warningNumber,\n severity,\n tag: tag,\n content: [],\n });\n } else if (line.startsWith(\" Syntax error!\")) {\n parsedDiagnostics.push({\n code: undefined,\n severity: t.DiagnosticSeverity.Error,\n tag: undefined,\n content: [],\n });\n } else if (line.startsWith(\" Warning genType\")) {\n parsedDiagnostics.push({\n code: undefined,\n severity: t.DiagnosticSeverity.Error,\n tag: undefined,\n content: [],\n });\n } else if (line.startsWith(\"#Start(\")) {\n // do nothing for now\n } else if (line.startsWith(\"#Done(\")) {\n done = true;\n } else if (\n line.startsWith(\"File \") &&\n i + 1 < lines.length &&\n lines[i + 1].startsWith(\"Warning \")\n ) {\n // OCaml warning: skip\n i++;\n } else if (\n line.startsWith(\"File \") &&\n i + 1 < lines.length &&\n lines[i + 1].startsWith(\"Error: Syntax error\")\n ) {\n // OCaml Syntax Error\n parsedDiagnostics.push({\n code: undefined,\n severity: t.DiagnosticSeverity.Error,\n tag: undefined,\n content: [lines[i], lines[i + 1]],\n });\n i++;\n } else if (/^ +([0-9]+| +|\\.) (\u2502|\u2506)/.test(line)) {\n // ^^ indent\n // ^^^^^^^^^^^^^^^ gutter\n // ^^^^^ separator\n // swallow code display. Examples:\n // 10 \u2502\n // . \u2502\n // \u2502\n // 10 \u2506\n } else if (line.startsWith(\" \")) {\n // part of the actual diagnostics message\n if (parsedDiagnostics[parsedDiagnostics.length - 1] == null) {\n linesWithParseErrors.push(line);\n } else {\n parsedDiagnostics[parsedDiagnostics.length - 1].content.push(\n line.slice(2)\n );\n }\n } else if (line.trim() != \"\") {\n // We'll assume that everything else is also part of the diagnostics too.\n // Most of these should have been indented 2 spaces; sadly, some of them\n // aren't (e.g. outcome printer printing badly, and certain old ocaml type\n // messages not printing with indent). We used to get bug reports and fix\n // the messages, but that strategy turned out too slow. One day we should\n // revert to not having this branch...\n if (parsedDiagnostics[parsedDiagnostics.length - 1] == null) {\n linesWithParseErrors.push(line);\n } else {\n parsedDiagnostics[parsedDiagnostics.length - 1].content.push(line);\n }\n }\n }\n\n let result: filesDiagnostics = {};\n let foundCodeActions: codeActions.filesCodeActions = {};\n\n parsedDiagnostics.forEach((parsedDiagnostic) => {\n let [fileAndRangeLine, ...diagnosticMessage] = parsedDiagnostic.content;\n let { file, range } = parseFileAndRange(fileAndRangeLine);\n\n if (result[file] == null) {\n result[file] = [];\n }\n\n let diagnostic: p.Diagnostic = {\n severity: parsedDiagnostic.severity,\n tags: parsedDiagnostic.tag === undefined ? [] : [parsedDiagnostic.tag],\n code: parsedDiagnostic.code,\n range,\n source: \"ReScript\",\n // remove start and end whitespaces/newlines\n message: diagnosticMessage.join(\"\\n\").trim(),\n };\n\n // Check for potential code actions\n codeActions.findCodeActionsInDiagnosticsMessage({\n addFoundActionsHere: foundCodeActions,\n diagnostic,\n diagnosticMessage,\n file,\n range,\n });\n\n result[file].push(diagnostic);\n });\n\n return {\n done,\n result,\n codeActions: foundCodeActions,\n linesWithParseErrors,\n };\n};\n\nexport let rangeContainsRange = (\n range: p.Range,\n otherRange: p.Range\n): boolean => {\n if (\n otherRange.start.line < range.start.line ||\n otherRange.end.line < range.start.line\n ) {\n return false;\n }\n if (\n otherRange.start.line > range.end.line ||\n otherRange.end.line > range.end.line\n ) {\n return false;\n }\n if (\n otherRange.start.line === range.start.line &&\n otherRange.start.character < range.start.character\n ) {\n return false;\n }\n if (\n otherRange.end.line === range.end.line &&\n otherRange.end.character > range.end.character\n ) {\n return false;\n }\n return true;\n};\n\nlet findPlatformPath = (projectRootPath: p.DocumentUri | null) => {\n if (config.extensionConfiguration.platformPath != null) {\n return config.extensionConfiguration.platformPath;\n }\n\n let rescriptDir = lookup.findFilePathFromProjectRoot(\n projectRootPath,\n path.join(\"node_modules\", \"rescript\")\n );\n if (rescriptDir == null) {\n return null;\n }\n\n let platformPath = path.join(rescriptDir, c.platformDir);\n\n // Workaround for darwinarm64 which has no folder yet in ReScript <= 9.1.4\n if (\n process.platform == \"darwin\" &&\n process.arch == \"arm64\" &&\n !fs.existsSync(platformPath)\n ) {\n platformPath = path.join(rescriptDir, process.platform);\n }\n\n return platformPath;\n};\n\nexport let findBscExeBinary = (projectRootPath: p.DocumentUri | null) =>\n findBinary(findPlatformPath(projectRootPath), c.bscExeName);\n", "// This file holds code actions derived from diagnostics. There are more code\n// actions available in the extension, but they are derived via the analysis\n// OCaml binary.\nimport * as p from \"vscode-languageserver-protocol\";\nimport * as utils from \"./utils\";\nimport { fileURLToPath } from \"url\";\n\nexport type filesCodeActions = {\n [key: string]: { range: p.Range; codeAction: p.CodeAction }[];\n};\n\ninterface findCodeActionsConfig {\n diagnostic: p.Diagnostic;\n diagnosticMessage: string[];\n file: string;\n range: p.Range;\n addFoundActionsHere: filesCodeActions;\n}\n\nlet wrapRangeInText = (\n range: p.Range,\n wrapStart: string,\n wrapEnd: string\n): p.TextEdit[] => {\n // We need to adjust the start of where we replace if this is a single\n // character on a single line.\n let offset =\n range.start.line === range.end.line &&\n range.start.character === range.end.character\n ? 1\n : 0;\n\n let startRange = {\n start: {\n line: range.start.line,\n character: range.start.character - offset,\n },\n end: {\n line: range.start.line,\n character: range.start.character - offset,\n },\n };\n\n let endRange = {\n start: {\n line: range.end.line,\n character: range.end.character,\n },\n end: {\n line: range.end.line,\n character: range.end.character,\n },\n };\n\n return [\n {\n range: startRange,\n newText: wrapStart,\n },\n {\n range: endRange,\n newText: wrapEnd,\n },\n ];\n};\n\nlet insertBeforeEndingChar = (\n range: p.Range,\n newText: string\n): p.TextEdit[] => {\n let beforeEndingChar = {\n line: range.end.line,\n character: range.end.character - 1,\n };\n\n return [\n {\n range: {\n start: beforeEndingChar,\n end: beforeEndingChar,\n },\n newText,\n },\n ];\n};\n\nlet replaceText = (range: p.Range, newText: string): p.TextEdit[] => {\n return [\n {\n range,\n newText,\n },\n ];\n};\n\nlet removeTrailingComma = (text: string): string => {\n let str = text.trim();\n if (str.endsWith(\",\")) {\n return str.slice(0, str.length - 1);\n }\n\n return str;\n};\n\nlet extractTypename = (lines: string[]): string => {\n let arrFiltered: string[] = [];\n\n for (let i = 0; i <= lines.length - 1; i += 1) {\n let line = lines[i];\n if (line.includes(\"(defined as\")) {\n let [typeStr, _] = line.split(\"(defined as\");\n arrFiltered.push(removeTrailingComma(typeStr));\n break;\n } else {\n arrFiltered.push(removeTrailingComma(line));\n }\n }\n\n return arrFiltered.join(\"\").trim();\n};\n\nlet takeUntil = (array: string[], startsWith: string): string[] => {\n let res: string[] = [];\n let arr = array.slice();\n\n let matched = false;\n arr.forEach((line) => {\n if (matched) {\n return;\n }\n\n if (line.startsWith(startsWith)) {\n matched = true;\n } else {\n res.push(line);\n }\n });\n\n return res;\n};\n\nexport let findCodeActionsInDiagnosticsMessage = ({\n diagnostic,\n diagnosticMessage,\n file,\n range,\n addFoundActionsHere: codeActions,\n}: findCodeActionsConfig) => {\n diagnosticMessage.forEach((line, index, array) => {\n // Because of how actions work, there can only be one per diagnostic. So,\n // halt whenever a code action has been found.\n let codeActionEtractors = [\n simpleTypeMismatches,\n didYouMeanAction,\n addUndefinedRecordFieldsV10,\n addUndefinedRecordFieldsV11,\n simpleConversion,\n applyUncurried,\n simpleAddMissingCases,\n wrapInSome,\n ];\n\n for (let extractCodeAction of codeActionEtractors) {\n let didFindAction = false;\n\n try {\n didFindAction = extractCodeAction({\n array,\n codeActions,\n diagnostic,\n file,\n index,\n line,\n range,\n });\n } catch (e) {\n console.error(e);\n }\n\n if (didFindAction) {\n break;\n }\n }\n });\n};\n\ninterface codeActionExtractorConfig {\n line: string;\n index: number;\n array: string[];\n file: string;\n range: p.Range;\n diagnostic: p.Diagnostic;\n codeActions: filesCodeActions;\n}\n\ntype codeActionExtractor = (config: codeActionExtractorConfig) => boolean;\n\n// This action extracts hints the compiler emits for misspelled identifiers, and\n// offers to replace the misspelled name with the correct name suggested by the\n// compiler.\nlet didYouMeanAction: codeActionExtractor = ({\n codeActions,\n diagnostic,\n file,\n line,\n range,\n}) => {\n if (line.startsWith(\"Hint: Did you mean\")) {\n let regex = /Did you mean ([A-Za-z0-9_]*)?/;\n let match = line.match(regex);\n\n if (match === null) {\n return false;\n }\n\n let [_, suggestion] = match;\n\n if (suggestion != null) {\n codeActions[file] = codeActions[file] || [];\n let codeAction: p.CodeAction = {\n title: `Replace with '${suggestion}'`,\n edit: {\n changes: {\n [file]: [{ range, newText: suggestion }],\n },\n },\n diagnostics: [diagnostic],\n kind: p.CodeActionKind.QuickFix,\n isPreferred: true,\n };\n\n codeActions[file].push({\n range,\n codeAction,\n });\n\n return true;\n }\n }\n\n return false;\n};\n\n// This action offers to wrap patterns that aren't option in Some.\nlet wrapInSome: codeActionExtractor = ({\n codeActions,\n diagnostic,\n file,\n line,\n range,\n array,\n index,\n}) => {\n if (line.startsWith(\"This pattern matches values of type\")) {\n let regex = /This pattern matches values of type (.*)$/;\n\n let match = line.match(regex);\n\n if (match === null) {\n return false;\n }\n\n let [_, type] = match;\n\n if (!type.startsWith(\"option<\")) {\n // Look for the expected type\n let restOfMessage = array.slice(index + 1);\n let lineIndexWithType = restOfMessage.findIndex((l) =>\n l\n .trim()\n .startsWith(\"but a pattern was expected which matches values of type\")\n );\n\n if (lineIndexWithType === -1) return false;\n // The type is either on this line or the next\n let [_, typ = \"\"] = restOfMessage[lineIndexWithType].split(\n \"but a pattern was expected which matches values of type\"\n );\n\n if (typ.trim() === \"\") {\n // Type is on the next line\n typ = (restOfMessage[lineIndexWithType + 1] ?? \"\").trim();\n }\n\n if (typ.trim().startsWith(\"option<\")) {\n codeActions[file] = codeActions[file] || [];\n\n let codeAction: p.CodeAction = {\n title: `Wrap in option Some`,\n edit: {\n changes: {\n [file]: wrapRangeInText(range, `Some(`, `)`),\n },\n },\n diagnostics: [diagnostic],\n kind: p.CodeActionKind.QuickFix,\n isPreferred: true,\n };\n\n codeActions[file].push({\n range,\n codeAction,\n });\n\n return true;\n }\n }\n }\n\n return false;\n};\n\nlet handleUndefinedRecordFieldsAction = ({\n recordFieldNames,\n codeActions,\n file,\n range,\n diagnostic,\n}: {\n recordFieldNames: string[];\n codeActions: filesCodeActions;\n file: string;\n range: p.Range;\n diagnostic: p.Diagnostic;\n}) => {\n if (recordFieldNames != null) {\n codeActions[file] = codeActions[file] || [];\n\n // The formatter outputs trailing commas automatically if the record\n // definition is on multiple lines, and no trailing comma if it's on a\n // single line. We need to adapt to this so we don't accidentally\n // insert an invalid comma.\n let multilineRecordDefinitionBody = range.start.line !== range.end.line;\n\n // Let's build up the text we're going to insert.\n let newText = \"\";\n\n if (multilineRecordDefinitionBody) {\n // If it's a multiline body, we know it looks like this:\n // ```\n // let someRecord = {\n // atLeastOneExistingField: string,\n // }\n // ```\n // We can figure out the formatting from the range the code action\n // gives us. We'll insert to the direct left of the ending brace.\n\n // The end char is the closing brace, and it's always going to be 2\n // characters back from the record fields.\n let paddingCharacters = multilineRecordDefinitionBody\n ? range.end.character + 2\n : 0;\n let paddingContentRecordField = Array.from({\n length: paddingCharacters,\n }).join(\" \");\n let paddingContentEndBrace = Array.from({\n length: range.end.character,\n }).join(\" \");\n\n recordFieldNames.forEach((fieldName, index) => {\n if (index === 0) {\n // This adds spacing from the ending brace up to the equivalent\n // of the last record field name, needed for the first inserted\n // record field name.\n newText += \" \";\n } else {\n // The rest of the new record field names will start from a new\n // line, so they need left padding all the way to the same level\n // as the rest of the record fields.\n newText += paddingContentRecordField;\n }\n\n newText += `${fieldName}: failwith(\"TODO\"),\\n`;\n });\n\n // Let's put the end brace back where it was (we still have it to the direct right of us).\n newText += `${paddingContentEndBrace}`;\n } else {\n // A single line record definition body is a bit easier - we'll just add the new fields on the same line.\n newText += \", \";\n newText += recordFieldNames\n .map((fieldName) => `${fieldName}: failwith(\"TODO\")`)\n .join(\", \");\n }\n\n let codeAction: p.CodeAction = {\n title: `Add missing record fields`,\n edit: {\n changes: {\n [file]: insertBeforeEndingChar(range, newText),\n },\n },\n diagnostics: [diagnostic],\n kind: p.CodeActionKind.QuickFix,\n isPreferred: true,\n };\n\n codeActions[file].push({\n range,\n codeAction,\n });\n\n return true;\n }\n\n return false;\n};\n\n// This action handles when the compiler errors on certain fields of a record\n// being undefined. We then offers an action that inserts all of the record\n// fields, with an `assert false` dummy value. `assert false` is so applying the\n// code action actually compiles.\nlet addUndefinedRecordFieldsV10: codeActionExtractor = ({\n array,\n codeActions,\n diagnostic,\n file,\n index,\n line,\n range,\n}) => {\n if (line.startsWith(\"Some record fields are undefined:\")) {\n let recordFieldNames = line\n .trim()\n .split(\"Some record fields are undefined: \")[1]\n ?.split(\" \");\n\n // This collects the rest of the fields if fields are printed on\n // multiple lines.\n array.slice(index + 1).forEach((line) => {\n recordFieldNames.push(...line.trim().split(\" \"));\n });\n\n return handleUndefinedRecordFieldsAction({\n recordFieldNames,\n codeActions,\n diagnostic,\n file,\n range,\n });\n }\n\n return false;\n};\n\nlet addUndefinedRecordFieldsV11: codeActionExtractor = ({\n array,\n codeActions,\n diagnostic,\n file,\n index,\n line,\n range,\n}) => {\n if (line.startsWith(\"Some required record fields are missing:\")) {\n let recordFieldNames = line\n .trim()\n .split(\"Some required record fields are missing: \")[1]\n ?.split(\" \");\n\n // This collects the rest of the fields if fields are printed on\n // multiple lines.\n let stop = false;\n array.slice(index + 1).forEach((line) => {\n if (stop) return;\n\n recordFieldNames.push(...line.trim().split(\".\")[0].split(\" \"));\n\n if (line.includes(\".\")) {\n stop = true;\n }\n });\n\n return handleUndefinedRecordFieldsAction({\n recordFieldNames,\n codeActions,\n diagnostic,\n file,\n range,\n });\n }\n\n return false;\n};\n\n// This action detects suggestions of converting between mismatches in types\n// that the compiler tells us about.\nlet simpleConversion: codeActionExtractor = ({\n line,\n codeActions,\n file,\n range,\n diagnostic,\n}) => {\n if (line.startsWith(\"You can convert \")) {\n let regex = /You can convert (\\w*) to (\\w*) with ([\\w.]*).$/;\n let match = line.match(regex);\n\n if (match === null) {\n return false;\n }\n\n let [_, from, to, fn] = match;\n\n if (from != null && to != null && fn != null) {\n codeActions[file] = codeActions[file] || [];\n\n let codeAction: p.CodeAction = {\n title: `Convert ${from} to ${to} with ${fn}`,\n edit: {\n changes: {\n [file]: wrapRangeInText(range, `${fn}(`, `)`),\n },\n },\n diagnostics: [diagnostic],\n kind: p.CodeActionKind.QuickFix,\n isPreferred: true,\n };\n\n codeActions[file].push({\n range,\n codeAction,\n });\n\n return true;\n }\n }\n\n return false;\n};\n\n// This action will apply a curried function (essentially inserting a dot in the\n// correct place).\nlet applyUncurried: codeActionExtractor = ({\n line,\n codeActions,\n file,\n range,\n diagnostic,\n}) => {\n if (\n line.startsWith(\n \"This is an uncurried ReScript function. It must be applied with a dot.\"\n )\n ) {\n const locOfOpenFnParens = {\n line: range.end.line,\n character: range.end.character + 1,\n };\n\n codeActions[file] = codeActions[file] || [];\n let codeAction: p.CodeAction = {\n title: `Apply uncurried function call with dot`,\n edit: {\n changes: {\n [file]: [\n {\n range: {\n start: locOfOpenFnParens,\n end: locOfOpenFnParens,\n },\n /*\n * Turns `fn(123)` into `fn(. 123)`.\n */\n newText: `. `,\n },\n ],\n },\n },\n diagnostics: [diagnostic],\n kind: p.CodeActionKind.QuickFix,\n isPreferred: true,\n };\n\n codeActions[file].push({\n range,\n codeAction,\n });\n\n return true;\n }\n\n return false;\n};\n\n// This action detects missing cases for exhaustive pattern matches, and offers\n// to insert dummy branches (using `failwith(\"TODO\")`) for those branches.\nlet simpleAddMissingCases: codeActionExtractor = ({\n line,\n codeActions,\n file,\n range,\n diagnostic,\n array,\n index,\n}) => {\n if (\n line.startsWith(\"You forgot to handle a possible case here, for example:\")\n ) {\n // This collects the rest of the fields if fields are printed on\n // multiple lines.\n let allCasesAsOneLine = array\n .slice(index + 1)\n .join(\"\")\n .trim();\n\n let filePath = fileURLToPath(file);\n\n let newSwitchCode = utils.runAnalysisAfterSanityCheck(filePath, [\n \"codemod\",\n filePath,\n range.start.line,\n range.start.character,\n \"add-missing-cases\",\n allCasesAsOneLine,\n ]);\n\n codeActions[file] = codeActions[file] || [];\n let codeAction: p.CodeAction = {\n title: `Insert missing cases`,\n edit: {\n changes: {\n [file]: replaceText(range, newSwitchCode),\n },\n },\n diagnostics: [diagnostic],\n kind: p.CodeActionKind.QuickFix,\n isPreferred: true,\n };\n\n codeActions[file].push({\n range,\n codeAction,\n });\n\n return true;\n }\n\n return false;\n};\n\n// This detects concrete variables or values put in a position which expects an\n// optional of that same type, and offers to wrap the value/variable in\n// `Some()`.\nlet simpleTypeMismatches: codeActionExtractor = ({\n line,\n codeActions,\n file,\n range,\n diagnostic,\n array,\n index,\n}) => {\n // Examples:\n //\n // 46 \u2502 let as_ = {\n // 47 \u2502 someProp: \"123\",\n // 48 \u2502 another: \"123\",\n // 49 \u2502 }\n // 50 \u2502\n // This has type: string\n // Somewhere wanted: option<string>\n //\n // ...but types etc can also be on multilines, so we need a good\n // amount of cleanup.\n\n let lookFor = \"This has type:\";\n\n if (line.startsWith(lookFor)) {\n let thisHasTypeArr = takeUntil(\n [line.slice(lookFor.length), ...array.slice(index + 1)],\n \"Somewhere wanted:\"\n );\n let somewhereWantedArr = array\n .slice(index + thisHasTypeArr.length)\n .map((line) => line.replace(\"Somewhere wanted:\", \"\"));\n\n let thisHasType = extractTypename(thisHasTypeArr);\n let somewhereWanted = extractTypename(somewhereWantedArr);\n\n // Switching over an option\n if (thisHasType === `option<${somewhereWanted}>`) {\n codeActions[file] = codeActions[file] || [];\n\n // We can figure out default values for primitives etc.\n let defaultValue = \"assert false\";\n\n switch (somewhereWanted) {\n case \"string\": {\n defaultValue = `\"-\"`;\n break;\n }\n case \"bool\": {\n defaultValue = `false`;\n break;\n }\n case \"int\": {\n defaultValue = `-1`;\n break;\n }\n case \"float\": {\n defaultValue = `-1.`;\n break;\n }\n }\n\n let codeAction: p.CodeAction = {\n title: `Unwrap optional value`,\n edit: {\n changes: {\n [file]: wrapRangeInText(\n range,\n \"switch \",\n ` { | None => ${defaultValue} | Some(v) => v }`\n ),\n },\n },\n diagnostics: [diagnostic],\n kind: p.CodeActionKind.QuickFix,\n isPreferred: true,\n };\n\n codeActions[file].push({\n range,\n codeAction,\n });\n\n return true;\n }\n\n // Wrapping a non-optional in Some\n if (`option<${thisHasType}>` === somewhereWanted) {\n codeActions[file] = codeActions[file] || [];\n\n let codeAction: p.CodeAction = {\n title: `Wrap value in Some`,\n edit: {\n changes: {\n [file]: wrapRangeInText(range, \"Some(\", \")\"),\n },\n },\n diagnostics: [diagnostic],\n kind: p.CodeActionKind.QuickFix,\n isPreferred: true,\n };\n\n codeActions[file].push({\n range,\n codeAction,\n });\n\n return true;\n }\n }\n\n return false;\n};\n", "type cb = (msg: string) => void;\n\nlet subscribers: Array<cb> = [];\nconst errorLastNotified: Record<string, number> = {};\n\nexport const onErrorReported = (cb: (msg: string) => void) => {\n subscribers.push(cb);\n return () => {\n subscribers = subscribers.filter((s) => s !== cb);\n };\n};\n\nexport const reportError = (identifier: string, msg: string) => {\n // Warn once per 15 min per error\n if (\n errorLastNotified[identifier] == null ||\n errorLastNotified[identifier] < Date.now() - 15 * 1000 * 60\n ) {\n errorLastNotified[identifier] = Date.now();\n subscribers.forEach((cb) => cb(msg));\n }\n};\n", "import { Message } from \"vscode-languageserver-protocol\";\n\nexport type send = (msg: Message) => void;\n\nexport interface extensionConfiguration {\n allowBuiltInFormatter: boolean;\n askToStartBuild: boolean;\n inlayHints: {\n enable: boolean;\n maxLength: number | null;\n };\n codeLens: boolean;\n binaryPath: string | null;\n platformPath: string | null;\n signatureHelp: {\n enabled: boolean;\n };\n incrementalTypechecking: {\n enabled: boolean;\n acrossFiles: boolean;\n debugLogging: boolean;\n };\n}\n\n// All values here are temporary, and will be overridden as the server is\n// initialized, and the current config is received from the client.\nlet config: { extensionConfiguration: extensionConfiguration } = {\n extensionConfiguration: {\n allowBuiltInFormatter: false,\n askToStartBuild: true,\n inlayHints: {\n enable: false,\n maxLength: 25,\n },\n codeLens: false,\n binaryPath: null,\n platformPath: null,\n signatureHelp: {\n enabled: true,\n },\n incrementalTypechecking: {\n enabled: false,\n acrossFiles: true,\n debugLogging: true,\n },\n },\n};\n\nexport default config;\n", "import * as path from \"path\";\nimport fs from \"fs\";\nimport * as utils from \"./utils\";\nimport { pathToFileURL } from \"url\";\nimport readline from \"readline\";\nimport { performance } from \"perf_hooks\";\nimport * as p from \"vscode-languageserver-protocol\";\nimport * as cp from \"node:child_process\";\nimport config, { send } from \"./config\";\nimport * as c from \"./constants\";\nimport * as chokidar from \"chokidar\";\n\nfunction debug() {\n return config.extensionConfiguration.incrementalTypechecking.debugLogging;\n}\n\nconst INCREMENTAL_FOLDER_NAME = \"___incremental\";\nconst INCREMENTAL_FILE_FOLDER_LOCATION = `lib/bs/${INCREMENTAL_FOLDER_NAME}`;\n\ntype IncrementallyCompiledFileInfo = {\n file: {\n /** File type. */\n extension: \".res\" | \".resi\";\n /** Path to the source file. */\n sourceFilePath: string;\n /** Name of the source file. */\n sourceFileName: string;\n /** Module name of the source file. */\n moduleName: string;\n /** Namespaced module name of the source file. */\n moduleNameNamespaced: string;\n /** Path to where the incremental file is saved. */\n incrementalFilePath: string;\n /** Location of the original type file. */\n originalTypeFileLocation: string;\n };\n /** Cache for build.ninja assets. */\n buildNinja: {\n /** When build.ninja was last modified. Used as a cache key. */\n fileMtime: number;\n /** The raw, extracted needed info from build.ninja. Needs processing. */\n rawExtracted: Array<string>;\n } | null;\n /** Info of the currently active incremental compilation. `null` if no incremental compilation is active. */\n compilation: {\n /** The timeout of the currently active compilation for this incremental file. */\n timeout: NodeJS.Timeout;\n /** The trigger token for the currently active compilation. */\n triggerToken: number;\n } | null;\n /** Listeners for when compilation of this file is killed. List always cleared after each invocation. */\n killCompilationListeners: Array<() => void>;\n /** Project specific information. */\n project: {\n /** The root path of the project. */\n rootPath: string;\n /** Computed location of bsc. */\n bscBinaryLocation: string;\n /** The arguments needed for bsc, derived from the project configuration/build.ninja. */\n callArgs: Promise<Array<string> | null>;\n /** The location of the incremental folder for this project. */\n incrementalFolderPath: string;\n /** The ReScript version. */\n rescriptVersion: string;\n };\n};\n\nconst incrementallyCompiledFileInfo: Map<\n string,\n IncrementallyCompiledFileInfo\n> = new Map();\nconst hasReportedFeatureFailedError: Set<string> = new Set();\nconst originalTypeFileToFilePath: Map<string, string> = new Map();\n\nlet incrementalFilesWatcher = chokidar\n .watch([], {\n awaitWriteFinish: {\n stabilityThreshold: 1,\n },\n })\n .on(\"all\", (e, changedPath) => {\n if (e !== \"change\" && e !== \"unlink\") return;\n const filePath = originalTypeFileToFilePath.get(changedPath);\n if (filePath != null) {\n const entry = incrementallyCompiledFileInfo.get(filePath);\n if (entry != null) {\n if (debug()) {\n console.log(\n \"[watcher] Cleaning up incremental files for \" + filePath\n );\n }\n if (entry.compilation != null) {\n if (debug()) {\n console.log(\"[watcher] Was compiling, killing\");\n }\n clearTimeout(entry.compilation.timeout);\n entry.killCompilationListeners.forEach((cb) => cb());\n entry.compilation = null;\n }\n cleanUpIncrementalFiles(\n entry.file.sourceFilePath,\n entry.project.rootPath\n );\n }\n }\n });\n\nexport function removeIncrementalFileFolder(\n projectRootPath: string,\n onAfterRemove?: () => void\n) {\n fs.rm(\n path.resolve(projectRootPath, INCREMENTAL_FILE_FOLDER_LOCATION),\n { force: true, recursive: true },\n (_) => {\n onAfterRemove?.();\n }\n );\n}\n\nexport function recreateIncrementalFileFolder(projectRootPath: string) {\n if (debug()) {\n console.log(\"Recreating incremental file folder\");\n }\n removeIncrementalFileFolder(projectRootPath, () => {\n fs.mkdir(\n path.resolve(projectRootPath, INCREMENTAL_FILE_FOLDER_LOCATION),\n (_) => {}\n );\n });\n}\n\nexport function cleanUpIncrementalFiles(\n filePath: string,\n projectRootPath: string\n) {\n const ext = filePath.endsWith(\".resi\") ? \".resi\" : \".res\";\n const namespace = utils.getNamespaceNameFromConfigFile(projectRootPath);\n const fileNameNoExt = path.basename(filePath, ext);\n const moduleNameNamespaced =\n namespace.kind === \"success\" && namespace.result !== \"\"\n ? `${fileNameNoExt}-${namespace.result}`\n : fileNameNoExt;\n\n if (debug()) {\n console.log(\"Cleaning up incremental file assets for: \" + fileNameNoExt);\n }\n\n fs.unlink(\n path.resolve(\n projectRootPath,\n INCREMENTAL_FILE_FOLDER_LOCATION,\n path.basename(filePath)\n ),\n (_) => {}\n );\n\n [\n moduleNameNamespaced + \".ast\",\n moduleNameNamespaced + \".cmt\",\n moduleNameNamespaced + \".cmti\",\n moduleNameNamespaced + \".cmi\",\n moduleNameNamespaced + \".cmj\",\n ].forEach((file) => {\n fs.unlink(\n path.resolve(projectRootPath, INCREMENTAL_FILE_FOLDER_LOCATION, file),\n (_) => {}\n );\n });\n}\nfunction getBscArgs(\n entry: IncrementallyCompiledFileInfo\n): Promise<Array<string> | null> {\n const buildNinjaPath = path.resolve(\n entry.project.rootPath,\n \"lib/bs/build.ninja\"\n );\n const cacheEntry = entry.buildNinja;\n let stat: fs.Stats | null = null;\n if (cacheEntry != null) {\n try {\n stat = fs.statSync(buildNinjaPath);\n } catch {\n if (debug()) {\n console.log(\"Did not find build.ninja, cannot proceed..\");\n }\n }\n if (stat != null) {\n if (cacheEntry.fileMtime >= stat.mtimeMs) {\n return Promise.resolve(cacheEntry.rawExtracted);\n }\n } else {\n return Promise.resolve(null);\n }\n }\n return new Promise((resolve, _reject) => {\n function resolveResult(result: Array<string>) {\n if (stat != null) {\n entry.buildNinja = {\n fileMtime: stat.mtimeMs,\n rawExtracted: result,\n };\n }\n resolve(result);\n }\n const fileStream = fs.createReadStream(buildNinjaPath);\n const rl = readline.createInterface({\n input: fileStream,\n crlfDelay: Infinity,\n });\n let captureNextLine = false;\n let done = false;\n let stopped = false;\n const captured: Array<string> = [];\n rl.on(\"line\", (line) => {\n if (stopped) {\n return;\n }\n if (captureNextLine) {\n captured.push(line);\n captureNextLine = false;\n }\n if (done) {\n fileStream.destroy();\n rl.close();\n resolveResult(captured);\n stopped = true;\n return;\n }\n if (line.startsWith(\"rule astj\")) {\n captureNextLine = true;\n }\n if (line.startsWith(\"rule mij\")) {\n captureNextLine = true;\n done = true;\n }\n });\n rl.on(\"close\", () => {\n resolveResult(captured);\n });\n });\n}\nfunction argsFromCommandString(cmdString: string): Array<Array<string>> {\n const s = cmdString\n .trim()\n .split(\"command = \")[1]\n .split(\" \")\n .map((v) => v.trim())\n .filter((v) => v !== \"\");\n const args: Array<Array<string>> = [];\n\n for (let i = 0; i <= s.length - 1; i++) {\n const item = s[i];\n const nextIndex = i + 1;\n const nextItem = s[nextIndex] ?? \"\";\n if (item.startsWith(\"-\") && nextItem.startsWith(\"-\")) {\n // Single entry arg\n args.push([item]);\n } else if (item.startsWith(\"-\") && nextItem.startsWith(\"'\")) {\n // Quoted arg, take until ending '\n const arg = [nextItem.slice(1)];\n for (let x = nextIndex + 1; x <= s.length - 1; x++) {\n let subItem = s[x];\n let break_ = false;\n if (subItem.endsWith(\"'\")) {\n subItem = subItem.slice(0, subItem.length - 1);\n i = x;\n break_ = true;\n }\n arg.push(subItem);\n if (break_) {\n break;\n }\n }\n args.push([item, arg.join(\" \")]);\n } else if (item.startsWith(\"-\")) {\n args.push([item, nextItem]);\n }\n }\n return args;\n}\nfunction removeAnsiCodes(s: string): string {\n const ansiEscape = /\\x1B[@-_][0-?]*[ -/]*[@-~]/g;\n return s.replace(ansiEscape, \"\");\n}\nfunction triggerIncrementalCompilationOfFile(\n filePath: string,\n fileContent: string,\n send: send,\n onCompilationFinished?: () => void\n) {\n let incrementalFileCacheEntry = incrementallyCompiledFileInfo.get(filePath);\n if (incrementalFileCacheEntry == null) {\n // New file\n const projectRootPath = utils.findProjectRootOfFile(filePath);\n if (projectRootPath == null) {\n if (debug())\n console.log(\"Did not find project root path for \" + filePath);\n return;\n }\n const namespaceName = utils.getNamespaceNameFromConfigFile(projectRootPath);\n if (namespaceName.kind === \"error\") {\n if (debug())\n console.log(\"Getting namespace config errored for \" + filePath);\n return;\n }\n const bscBinaryLocation = utils.findBscExeBinary(projectRootPath);\n if (bscBinaryLocation == null) {\n if (debug())\n console.log(\"Could not find bsc binary location for \" + filePath);\n return;\n }\n const ext = filePath.endsWith(\".resi\") ? \".resi\" : \".res\";\n const moduleName = path.basename(filePath, ext);\n const moduleNameNamespaced =\n namespaceName.result !== \"\"\n ? `${moduleName}-${namespaceName.result}`\n : moduleName;\n\n const incrementalFolderPath = path.join(\n projectRootPath,\n INCREMENTAL_FILE_FOLDER_LOCATION\n );\n\n let rescriptVersion = \"\";\n try {\n rescriptVersion = cp\n .execFileSync(bscBinaryLocation, [\"-version\"])\n .toString()\n .trim();\n } catch (e) {\n console.error(e);\n }\n if (rescriptVersion.startsWith(\"ReScript \")) {\n rescriptVersion = rescriptVersion.replace(\"ReScript \", \"\");\n }\n\n let originalTypeFileLocation = path.resolve(\n projectRootPath,\n \"lib/bs\",\n path.relative(projectRootPath, filePath)\n );\n\n const parsed = path.parse(originalTypeFileLocation);\n parsed.ext = ext === \".res\" ? \".cmt\" : \".cmti\";\n parsed.base = \"\";\n originalTypeFileLocation = path.format(parsed);\n\n incrementalFileCacheEntry = {\n file: {\n originalTypeFileLocation,\n extension: ext,\n moduleName,\n moduleNameNamespaced,\n sourceFileName: moduleName + ext,\n sourceFilePath: filePath,\n incrementalFilePath: path.join(incrementalFolderPath, moduleName + ext),\n },\n project: {\n rootPath: projectRootPath,\n callArgs: Promise.resolve([]),\n bscBinaryLocation,\n incrementalFolderPath,\n rescriptVersion,\n },\n buildNinja: null,\n compilation: null,\n killCompilationListeners: [],\n };\n\n incrementalFileCacheEntry.project.callArgs = figureOutBscArgs(\n incrementalFileCacheEntry\n );\n // Set up watcher for relevant cmt/cmti\n incrementalFilesWatcher.add([\n incrementalFileCacheEntry.file.originalTypeFileLocation,\n ]);\n originalTypeFileToFilePath.set(\n incrementalFileCacheEntry.file.originalTypeFileLocation,\n incrementalFileCacheEntry.file.sourceFilePath\n );\n incrementallyCompiledFileInfo.set(filePath, incrementalFileCacheEntry);\n }\n\n if (incrementalFileCacheEntry == null) return;\n const entry = incrementalFileCacheEntry;\n if (entry.compilation != null) {\n clearTimeout(entry.compilation.timeout);\n entry.killCompilationListeners.forEach((cb) => cb());\n entry.killCompilationListeners = [];\n }\n const triggerToken = performance.now();\n const timeout = setTimeout(() => {\n compileContents(entry, fileContent, send, onCompilationFinished);\n }, 20);\n\n if (entry.compilation != null) {\n entry.compilation.timeout = timeout;\n entry.compilation.triggerToken = triggerToken;\n } else {\n entry.compilation = {\n timeout,\n triggerToken,\n };\n }\n}\nfunction verifyTriggerToken(filePath: string, triggerToken: number): boolean {\n return (\n incrementallyCompiledFileInfo.get(filePath)?.compilation?.triggerToken ===\n triggerToken\n );\n}\nasync function figureOutBscArgs(entry: IncrementallyCompiledFileInfo) {\n const res = await getBscArgs(entry);\n if (res == null) return null;\n const [astBuildCommand, fullBuildCommand] = res;\n\n const astArgs = argsFromCommandString(astBuildCommand);\n const buildArgs = argsFromCommandString(fullBuildCommand);\n\n let callArgs: Array<string> = [];\n\n if (config.extensionConfiguration.incrementalTypechecking.acrossFiles) {\n callArgs.push(\n \"-I\",\n path.resolve(entry.project.rootPath, INCREMENTAL_FILE_FOLDER_LOCATION)\n );\n }\n\n buildArgs.forEach(([key, value]: Array<string>) => {\n if (key === \"-I\") {\n callArgs.push(\n \"-I\",\n path.resolve(entry.project.rootPath, \"lib/bs\", value)\n );\n } else if (key === \"-bs-v\") {\n callArgs.push(\"-bs-v\", Date.now().toString());\n } else if (key === \"-bs-package-output\") {\n return;\n } else if (value == null || value === \"\") {\n callArgs.push(key);\n } else {\n callArgs.push(key, value);\n }\n });\n\n astArgs.forEach(([key, value]: Array<string>) => {\n if (key.startsWith(\"-bs-jsx\")) {\n callArgs.push(key, value);\n } else if (key.startsWith(\"-ppx\")) {\n callArgs.push(key, value);\n }\n });\n\n callArgs.push(\"-color\", \"never\");\n if (parseInt(entry.project.rescriptVersion.split(\".\")[0] ?? \"10\") >= 11) {\n // Only available in v11+\n callArgs.push(\"-ignore-parse-errors\");\n }\n\n callArgs = callArgs.filter((v) => v != null && v !== \"\");\n callArgs.push(entry.file.incrementalFilePath);\n return callArgs;\n}\nasync function compileContents(\n entry: IncrementallyCompiledFileInfo,\n fileContent: string,\n send: (msg: p.Message) => void,\n onCompilationFinished?: () => void\n) {\n const triggerToken = entry.compilation?.triggerToken;\n const callArgs = await entry.project.callArgs;\n if (callArgs == null) {\n if (debug()) {\n console.log(\n \"Could not figure out call args. Maybe build.ninja does not exist yet?\"\n );\n }\n return;\n }\n\n const startTime = performance.now();\n if (!fs.existsSync(entry.project.incrementalFolderPath)) {\n try {\n fs.mkdirSync(entry.project.incrementalFolderPath);\n } catch {}\n }\n\n try {\n fs.writeFileSync(entry.file.incrementalFilePath, fileContent);\n\n const process = cp.execFile(\n entry.project.bscBinaryLocation,\n callArgs,\n { cwd: entry.project.rootPath },\n (error, _stdout, stderr) => {\n if (!error?.killed) {\n if (debug())\n console.log(\n `Recompiled ${entry.file.sourceFileName} in ${\n (performance.now() - startTime) / 1000\n }s`\n );\n } else {\n if (debug())\n console.log(\n `Compilation of ${entry.file.sourceFileName} was killed.`\n );\n }\n let hasIgnoredErrorMessages = false;\n if (\n !error?.killed &&\n triggerToken != null &&\n verifyTriggerToken(entry.file.sourceFilePath, triggerToken)\n ) {\n if (debug()) {\n console.log(\"Resetting compilation status.\");\n }\n // Reset compilation status as this compilation finished\n entry.compilation = null;\n const { result } = utils.parseCompilerLogOutput(`${stderr}\\n#Done()`);\n const res = (Object.values(result)[0] ?? [])\n .map((d) => ({\n ...d,\n message: removeAnsiCodes(d.message),\n }))\n // Filter out a few unwanted parser errors since we run the parser in ignore mode\n .filter((d) => {\n if (\n !d.message.startsWith(\"Uninterpreted extension 'rescript.\") &&\n !d.message.includes(\n `/${INCREMENTAL_FOLDER_NAME}/${entry.file.sourceFileName}`\n )\n ) {\n hasIgnoredErrorMessages = true;\n return true;\n }\n return false;\n });\n\n if (\n res.length === 0 &&\n stderr !== \"\" &&\n !hasIgnoredErrorMessages &&\n !hasReportedFeatureFailedError.has(entry.project.rootPath)\n ) {\n try {\n hasReportedFeatureFailedError.add(entry.project.rootPath);\n const logfile = path.resolve(\n entry.project.incrementalFolderPath,\n \"error.log\"\n );\n fs.writeFileSync(logfile, stderr);\n let params: p.ShowMessageParams = {\n type: p.MessageType.Warning,\n message: `[Incremental typechecking] Something might have gone wrong with incremental type checking. Check out the [error log](file://${logfile}) and report this issue please.`,\n };\n let message: p.NotificationMessage = {\n jsonrpc: c.jsonrpcVersion,\n method: \"window/showMessage\",\n params: params,\n };\n send(message);\n } catch (e) {\n console.error(e);\n }\n }\n\n const notification: p.NotificationMessage = {\n jsonrpc: c.jsonrpcVersion,\n method: \"textDocument/publishDiagnostics\",\n params: {\n uri: pathToFileURL(entry.file.sourceFilePath),\n diagnostics: res,\n },\n };\n send(notification);\n }\n onCompilationFinished?.();\n }\n );\n entry.killCompilationListeners.push(() => {\n process.kill(\"SIGKILL\");\n });\n } catch (e) {\n console.error(e);\n }\n}\n\nexport function handleUpdateOpenedFile(\n filePath: string,\n fileContent: string,\n send: send,\n onCompilationFinished?: () => void\n) {\n if (debug()) {\n console.log(\"Updated: \" + filePath);\n }\n triggerIncrementalCompilationOfFile(\n filePath,\n fileContent,\n send,\n onCompilationFinished\n );\n}\n\nexport function handleClosedFile(filePath: string) {\n if (debug()) {\n console.log(\"Closed: \" + filePath);\n }\n const entry = incrementallyCompiledFileInfo.get(filePath);\n if (entry == null) return;\n cleanUpIncrementalFiles(filePath, entry.project.rootPath);\n incrementallyCompiledFileInfo.delete(filePath);\n originalTypeFileToFilePath.delete(entry.file.originalTypeFileLocation);\n incrementalFilesWatcher.unwatch([entry.file.originalTypeFileLocation]);\n}\n"],
|
|
5
|
+
"mappings": ";siBAAA,IAAAA,GAAAC,EAAAC,IAAA,cAKA,OAAO,eAAeA,GAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EAC5D,IAAIC,GACJ,SAASC,IAAM,CACX,GAAID,KAAS,OACT,MAAM,IAAI,MAAM,wCAAwC,EAE5D,OAAOA,EACX,EACC,SAAUC,EAAK,CACZ,SAASC,EAAQC,EAAK,CAClB,GAAIA,IAAQ,OACR,MAAM,IAAI,MAAM,uCAAuC,EAE3DH,GAAOG,CACX,CACAF,EAAI,QAAUC,CAClB,GAAGD,KAAQA,GAAM,CAAC,EAAE,EACpBF,GAAQ,QAAUE,KCtBlB,IAAAG,GAAAC,EAAAC,IAAA,cAKA,OAAO,eAAeA,GAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EAC5DA,GAAQ,WAAa,OACrB,IAAIC,IACH,SAAUA,EAAY,CACnB,SAASC,EAAOC,EAAM,CAClB,MAAO,CACH,QAASA,CACb,CACJ,CACAF,EAAW,OAASC,CACxB,GAAGD,GAAaD,GAAQ,aAAeA,GAAQ,WAAa,CAAC,EAAE,ICf/D,IAAAI,GAAAC,EAAAC,IAAA,cAKA,OAAO,eAAeA,GAAS,aAAc,CAAE,MAAO,EAAK,CAAC,EAC5DA,GAAQ,sBAAwB,OAChC,IAAMC,GAAK,GACLC,GAAK,GACLC,GAAO;AAAA,EACPC,GAAN,KAA4B,CACxB,YAAYC,EAAW,QAAS,CAC5B,KAAK,UAAYA,EACjB,KAAK,QAAU,CAAC,EAChB,KAAK,aAAe,CACxB,CACA,IAAI,UAAW,CACX,OAAO,KAAK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A,CAAM,CAAC,GAGvBA,CACT,EAkBAL,GAAO,OAAS,CAACC,EAAOC,EAAU,CAAC,IAC7BD,IAAU,IAAMA,EAAM,OAAS,EAC1B,CAACA,CAAK,EAGTC,EAAQ,SAAW,GACrBF,GAAO,QAAQC,EAAOC,CAAO,EAC7BF,GAAO,OAAOC,EAAOC,CAAO,EAOlCP,GAAO,QAAUK,KCzKjB,IAAAM,GAAAC,EAAA,CAAAC,GAAAC,KAAA,CAAAA,GAAA,SACC,MACA,MACA,MACA,MACA,KACA,IACA,MACA,MACA,KACA,MACA,OACA,MACA,MACA,MACA,WACA,KACA,MACA,MACA,KACA,MACA,MACA,OACA,KACA,MACA,KACA,MACA,OACA,MACA,QACA,MACA,MACA,MACA,QACA,MACA,OACA,MACA,MACA,MACA,MACA,MACA,MACA,OACA,MACA,MACA,MACA,MACA,OACA,OACA,MACA,OACA,MACA,WACA,MACA,MACA,QACA,MACA,MACA,MACA,YACA,YACA,YACA,MACA,MACA,MACA,OACA,MACA,MACA,MACA,KACA,MACA,OACA,UACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,MACA,UACA,KACA,OACA,OACA,OACA,OACA,OACA,MACA,MACA,MACA,MACA,MACA,MACA,OACA,MACA,OACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,MACA,OACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,OACA,MACA,MACA,MACA,MACA,MACA,OACA,MACA,QACA,MACA,MACA,OACA,OACA,MACA,OACA,MACA,MACA,MACA,UACA,QACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,QACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,OACA,OACA,MACA,OACA,MACA,MACA,OACA,OACA,MACA,OACA,OACA,MACA,MACA,MACA,MACA,MACA,KACA,MACA,MACA,MACA,YACA,MACA,MACA,MACA,MACA,OACA,MACA,MACA,KACA,MACA,MACA,OACA,MACA,OACA,OACA,MACA,SACA,MACA,MACA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;AAAA;AAAA,mCAWZ,IAAM,CACL,OAAQD,GAAK,CAAC,EAAG,CACf,IAAK,UACH,OAAOE,GAAO,EAAI,EACpB,IAAK,aACH,OAAOA,GAAO,EAAK,EACrB,IAAK,YACL,IAAK,KACH,GAAM,CAAE,QAAAC,CAAQ,EAAI,KAAK,MAAM,GAAAC,QAAG,aAAa,GAAAC,QAAK,KAAK,UAAW,KAAM,cAAc,CAAC,EAAE,SAAS,CAAC,EACrG,QAAQ,IAAIF,CAAO,EACnB,QAAQ,KAAK,CAAC,EAChB,IAAK,SACL,IAAK,KACH,QAAQ,IAAIF,EAAI,EAChB,QAAQ,KAAK,CAAC,EAChB,QACE,QAAQ,IAAIA,EAAI,EAChB,QAAQ,KAAK,CAAC,CAClB,CACF,GAAG",
|
|
6
|
+
"names": ["require_ral", "__commonJSMin", "exports", "_ral", "RAL", "install", "ral", "require_disposable", "__commonJSMin", "exports", "Disposable", "create", "func", "require_messageBuffer", "__commonJSMin", "exports", "CR", "LF", "CRLF", "AbstractMessageBuffer", "encoding", "chunk", "toAppend", "state", "chunkIndex", "offset", "chunkBytesRead", "row", "buffer", "result", "headers", "i", "header", "index", "key", "value", "length", "byteCount", "resultOffset", "chunkPart", "require_ril", "__commonJSMin", "exports", "ral_1", "util_1", "disposable_1", "messageBuffer_1", "MessageBuffer", "_MessageBuffer", "encoding", "value", "buffer", "length", "ReadableStreamWrapper", "stream", "listener", "WritableStreamWrapper", "data", "resolve", "reject", "callback", "error", "_ril", "msg", "options", "err", "ms", "args", "handle", "RIL", "install", "require_is", "__commonJSMin", "exports", "boolean", "value", "string", "number", "error", "func", "array", "stringArray", "elem", "require_messages", "__commonJSMin", "exports", "is", "ErrorCodes", "ResponseError", "_ResponseError", "code", "message", "data", "result", "ParameterStructures", "_ParameterStructures", "kind", "value", "AbstractMessageSignature", "method", "numberOfParams", "RequestType0", "RequestType", "_parameterStructures", "RequestType1", "RequestType2", "RequestType3", "RequestType4", "RequestType5", "RequestType6", "RequestType7", "RequestType8", "RequestType9", "NotificationType", "NotificationType0", "NotificationType1", "NotificationType2", "NotificationType3", "NotificationType4", "NotificationType5", "NotificationType6", "NotificationType7", "NotificationType8", "NotificationType9", "Message", "isRequest", "candidate", "isNotification", "isResponse", "require_linkedMap", "__commonJSMin", "exports", "_a", "Touch", "LinkedMap", "key", "touch", "item", "value", "callbackfn", "thisArg", "state", "current", "iterator", "result", "newSize", "currentSize", "next", "previous", "data", "LRUCache", "limit", "ratio", "require_events", "__commonJSMin", "exports", "ral_1", "Event", "_disposable", "CallbackList", "callback", "context", "bucket", "foundCallbackWithDifferentContext", "len", "args", "ret", "callbacks", "contexts", "i", "e", "Emitter", "_Emitter", "_options", "listener", "thisArgs", "disposables", "result", "event", "require_cancellation", "__commonJSMin", "exports", "ral_1", "Is", "events_1", "CancellationToken", "is", "value", "candidate", "shortcutEvent", "callback", "context", "handle", "MutableToken", "CancellationTokenSource", "require_messageReader", "__commonJSMin", "exports", "ral_1", "Is", "events_1", "MessageReader", "is", "value", "candidate", "AbstractMessageReader", "error", "info", "ResolvedMessageReaderOptions", "fromOptions", "options", "charset", "result", "contentDecoder", "contentDecoders", "contentTypeDecoder", "contentTypeDecoders", "decoder", "ReadableStreamMessageReader", "readable", "timeout", "callback", "data", "headers", "contentLength", "length", "body", "p", "msg", "token", "require_semaphore", "__commonJSMin", "exports", "ral_1", "Semaphore", "capacity", "thunk", "resolve", "reject", "next", "result", "value", "err", "require_messageWriter", "__commonJSMin", "exports", "ral_1", "Is", "semaphore_1", "events_1", "ContentLength", "CRLF", "MessageWriter", "is", "value", "candidate", "AbstractMessageWriter", "error", "message", "count", "ResolvedMessageWriterOptions", "fromOptions", "options", "WriteableStreamMessageWriter", "writable", "msg", "buffer", "headers", "data", "require_connection", "__commonJSMin", "exports", "ral_1", "Is", "messages_1", "linkedMap_1", "events_1", "cancellation_1", "CancelNotification", "ProgressToken", "is", "value", "ProgressNotification", "ProgressType", "StarRequestHandler", "Trace", "fromString", "toString", "TraceFormat", "SetTraceNotification", "LogTraceNotification", "ConnectionErrors", "ConnectionError", "_ConnectionError", "code", "message", "ConnectionStrategy", "candidate", "CancellationReceiverStrategy", "_", "CancellationSenderStrategy", "conn", "id", "CancellationStrategy", "ConnectionOptions", "ConnectionState", "createMessageConnection", "messageReader", "messageWriter", "_logger", "options", "logger", "sequenceNumber", "notificationSequenceNumber", "unknownResponseSequenceNumber", "version", "starRequestHandler", "requestHandlers", "starNotificationHandler", "notificationHandlers", "progressHandlers", "timer", "messageQueue", "responsePromises", "knownCanceledRequests", "requestTokens", "trace", "traceFormat", "tracer", "state", "errorEmitter", "closeEmitter", "unhandledNotificationEmitter", "unhandledProgressEmitter", "disposeEmitter", "cancellationStrategy", "createRequestQueueKey", "createResponseQueueKey", "createNotificationQueueKey", "addMessageToQueue", "queue", "cancelUndispatched", "_message", "isListening", "isClosed", "isDisposed", "closeHandler", "readErrorHandler", "error", "writeErrorHandler", "data", "triggerMessageQueue", "processMessageQueue", "handleRequest", "handleNotification", "handleResponse", "handleInvalidMessage", "callback", "cancelId", "key", "toCancel", "strategy", "response", "traceSendingResponse", "cancellationToken", "traceReceivedNotification", "requestMessage", "reply", "resultOrError", "method", "startTime", "replyError", "replySuccess", "result", "traceReceivedRequest", "element", "type", "requestHandler", "tokenKey", "cancellationSource", "handlerResult", "promise", "responseMessage", "responsePromise", "traceReceivedResponse", "notificationHandler", "params", "responseHandler", "stringifyTrace", "traceSendingRequest", "logLSPMessage", "traceSendingNotification", "lspMessage", "throwIfClosedOrDisposed", "throwIfListening", "throwIfNotListening", "undefinedToNull", "param", "nullToUndefined", "isNamedParam", "computeSingleParam", "parameterStructures", "computeMessageParams", "numberOfParams", "i", "connection", "args", "messageParams", "first", "paramStart", "paramEnd", "notificationMessage", "handler", "_type", "token", "last", "disposable", "p", "resolve", "reject", "resolveWithCleanup", "r", "rejectWithCleanup", "e", "_value", "_tracer", "sendNotificationOrTraceOptions", "_sendNotification", "_traceFormat", "verbose", "require_api", "__commonJSMin", "exports", "messages_1", "linkedMap_1", "disposable_1", "events_1", "cancellation_1", "messageReader_1", "messageWriter_1", "connection_1", "ral_1", "require_main", "__commonJSMin", "exports", "__createBinding", "o", "m", "k", "k2", "desc", "__exportStar", "p", "ril_1", "api_1", "path", "os", "crypto_1", "net_1", "IPCMessageReader", "process", "eventEmitter", "error", "callback", "IPCMessageWriter", "msg", "SocketMessageReader", "socket", "encoding", "SocketMessageWriter", "options", "StreamMessageReader", "readble", "StreamMessageWriter", "writable", "XDG_RUNTIME_DIR", "safeIpcPathLengths", "generateRandomPipeName", "randomSuffix", "result", "limit", "createClientPipeTransport", "pipeName", "connectResolve", "connected", "resolve", "_reject", "reject", "server", "createServerPipeTransport", "createClientSocketTransport", "port", "createServerSocketTransport", "isReadableStream", "value", "candidate", "isWritableStream", "createMessageConnection", "input", "output", "logger", "reader", "writer", "require_node", "__commonJSMin", "exports", "module", "require_main", "__commonJSMin", "exports", "module", "factory", "v", "require", "DocumentUri", "is", "value", "URI", "integer", "uinteger", "Position", "create", "line", "character", "candidate", "Is", "Range", "one", "two", "three", "four", "Location", "uri", "range", "LocationLink", "targetUri", "targetRange", "targetSelectionRange", "originSelectionRange", "Color", "red", "green", "blue", "alpha", "ColorInformation", "color", "ColorPresentation", "label", "textEdit", "additionalTextEdits", "TextEdit", "FoldingRangeKind", "FoldingRange", "startLine", "endLine", "startCharacter", "endCharacter", "kind", "collapsedText", "result", "DiagnosticRelatedInformation", "location", "message", "DiagnosticSeverity", "DiagnosticTag", "CodeDescription", "Diagnostic", "severity", "code", "source", "relatedInformation", "_a", "Command", "title", "command", "args", "_i", "replace", "newText", "insert", "position", "del", "ChangeAnnotation", "needsConfirmation", "description", "ChangeAnnotationIdentifier", "AnnotatedTextEdit", "annotation", "TextDocumentEdit", "textDocument", "edits", "OptionalVersionedTextDocumentIdentifier", "CreateFile", "options", "RenameFile", "oldUri", "newUri", "DeleteFile", "WorkspaceEdit", "change", "TextEditChangeImpl", "changeAnnotations", "edit", "id", "ChangeAnnotations", "annotations", "idOrAnnotation", "WorkspaceChange", "workspaceEdit", "_this", "textEditChange", "key", "textDocumentEdit", "optionsOrAnnotation", "operation", "TextDocumentIdentifier", "VersionedTextDocumentIdentifier", "version", "TextDocumentItem", "languageId", "text", "MarkupKind", "MarkupContent", "CompletionItemKind", "InsertTextFormat", "CompletionItemTag", "InsertReplaceEdit", "InsertTextMode", "CompletionItemLabelDetails", "CompletionItem", "CompletionList", "items", "isIncomplete", "MarkedString", "fromPlainText", "plainText", "Hover", "ParameterInformation", "documentation", "SignatureInformation", "parameters", "DocumentHighlightKind", "DocumentHighlight", "SymbolKind", "SymbolTag", "SymbolInformation", "name", "containerName", "WorkspaceSymbol", "DocumentSymbol", "detail", "selectionRange", "children", "CodeActionKind", "CodeActionTriggerKind", "CodeActionContext", "diagnostics", "only", "triggerKind", "CodeAction", "kindOrCommandOrEdit", "checkKind", "CodeLens", "data", "FormattingOptions", "tabSize", "insertSpaces", "DocumentLink", "target", "SelectionRange", "parent", "SemanticTokenTypes", "SemanticTokenModifiers", "SemanticTokens", "InlineValueText", "InlineValueVariableLookup", "variableName", "caseSensitiveLookup", "InlineValueEvaluatableExpression", "expression", "InlineValueContext", "frameId", "stoppedLocation", "InlayHintKind", "InlayHintLabelPart", "InlayHint", "WorkspaceFolder", "TextDocument", "content", "FullTextDocument", "applyEdits", "document", "sortedEdits", "mergeSort", "a", "b", "diff", "lastModifiedOffset", "i", "e", "startOffset", "endOffset", "compare", "p", "left", "right", "leftIdx", "rightIdx", "ret", "start", "end", "event", "lineOffsets", "isLineStart", "ch", "offset", "low", "high", "mid", "lineOffset", "nextLineOffset", "toString", "defined", "undefined", "boolean", "string", "number", "numberRange", "min", "max", "func", "objectLiteral", "typedArray", "check", "require_messages", "__commonJSMin", "exports", "vscode_jsonrpc_1", "RegistrationType", "method", "ProtocolRequestType0", "ProtocolRequestType", "ProtocolNotificationType0", "ProtocolNotificationType", "require_is", "__commonJSMin", "exports", "boolean", "value", "string", "number", "error", "func", "array", "stringArray", "elem", "typedArray", "check", "objectLiteral", "require_protocol_implementation", "__commonJSMin", "exports", "messages_1", "ImplementationRequest", "require_protocol_typeDefinition", "__commonJSMin", "exports", "messages_1", "TypeDefinitionRequest", "require_protocol_workspaceFolder", "__commonJSMin", "exports", "messages_1", "WorkspaceFoldersRequest", "DidChangeWorkspaceFoldersNotification", "require_protocol_configuration", "__commonJSMin", "exports", "messages_1", "ConfigurationRequest", "require_protocol_colorProvider", "__commonJSMin", "exports", "messages_1", "DocumentColorRequest", "ColorPresentationRequest", "require_protocol_foldingRange", "__commonJSMin", "exports", "messages_1", "FoldingRangeRequest", "require_protocol_declaration", "__commonJSMin", "exports", "messages_1", "DeclarationRequest", "require_protocol_selectionRange", "__commonJSMin", "exports", "messages_1", "SelectionRangeRequest", "require_protocol_progress", "__commonJSMin", "exports", "vscode_jsonrpc_1", "messages_1", "WorkDoneProgress", "is", "value", "WorkDoneProgressCreateRequest", "WorkDoneProgressCancelNotification", "require_protocol_callHierarchy", "__commonJSMin", "exports", "messages_1", "CallHierarchyPrepareRequest", "CallHierarchyIncomingCallsRequest", "CallHierarchyOutgoingCallsRequest", "require_protocol_semanticTokens", "__commonJSMin", "exports", "messages_1", "TokenFormat", "SemanticTokensRegistrationType", "SemanticTokensRequest", "SemanticTokensDeltaRequest", "SemanticTokensRangeRequest", "SemanticTokensRefreshRequest", "require_protocol_showDocument", "__commonJSMin", "exports", "messages_1", "ShowDocumentRequest", "require_protocol_linkedEditingRange", "__commonJSMin", "exports", "messages_1", "LinkedEditingRangeRequest", "require_protocol_fileOperations", "__commonJSMin", "exports", "messages_1", "FileOperationPatternKind", "WillCreateFilesRequest", "DidCreateFilesNotification", "WillRenameFilesRequest", "DidRenameFilesNotification", "DidDeleteFilesNotification", "WillDeleteFilesRequest", "require_protocol_moniker", "__commonJSMin", "exports", "messages_1", "UniquenessLevel", "MonikerKind", "MonikerRequest", "require_protocol_typeHierarchy", "__commonJSMin", "exports", "messages_1", "TypeHierarchyPrepareRequest", "TypeHierarchySupertypesRequest", "TypeHierarchySubtypesRequest", "require_protocol_inlineValue", "__commonJSMin", "exports", "messages_1", "InlineValueRequest", "InlineValueRefreshRequest", "require_protocol_inlayHint", "__commonJSMin", "exports", "messages_1", "InlayHintRequest", "InlayHintResolveRequest", "InlayHintRefreshRequest", "require_protocol_diagnostic", "__commonJSMin", "exports", "vscode_jsonrpc_1", "Is", "messages_1", "DiagnosticServerCancellationData", "is", "value", "candidate", "DocumentDiagnosticReportKind", "DocumentDiagnosticRequest", "WorkspaceDiagnosticRequest", "DiagnosticRefreshRequest", "require_protocol_notebook", "__commonJSMin", "exports", "vscode_languageserver_types_1", "Is", "messages_1", "NotebookCellKind", "is", "value", "ExecutionSummary", "create", "executionOrder", "success", "result", "candidate", "equals", "one", "other", "NotebookCell", "kind", "document", "diff", "two", "equalsMetadata", "oneArray", "otherArray", "i", "oneKeys", "otherKeys", "prop", "NotebookDocument", "uri", "notebookType", "version", "cells", "NotebookDocumentSyncRegistrationType", "DidOpenNotebookDocumentNotification", "NotebookCellArrayChange", "start", "deleteCount", "DidChangeNotebookDocumentNotification", "DidSaveNotebookDocumentNotification", "DidCloseNotebookDocumentNotification", "require_protocol", "__commonJSMin", "exports", "messages_1", "vscode_languageserver_types_1", "Is", "protocol_implementation_1", "protocol_typeDefinition_1", "protocol_workspaceFolder_1", "protocol_configuration_1", "protocol_colorProvider_1", "protocol_foldingRange_1", "protocol_declaration_1", "protocol_selectionRange_1", "protocol_progress_1", "protocol_callHierarchy_1", "protocol_semanticTokens_1", "protocol_showDocument_1", "protocol_linkedEditingRange_1", "protocol_fileOperations_1", "protocol_moniker_1", "protocol_typeHierarchy_1", "protocol_inlineValue_1", "protocol_inlayHint_1", "protocol_diagnostic_1", "protocol_notebook_1", "TextDocumentFilter", "is", "value", "candidate", "NotebookDocumentFilter", "NotebookCellTextDocumentFilter", "DocumentSelector", "elem", "RegistrationRequest", "UnregistrationRequest", "ResourceOperationKind", "FailureHandlingKind", "PositionEncodingKind", "StaticRegistrationOptions", "hasId", "TextDocumentRegistrationOptions", "WorkDoneProgressOptions", "hasWorkDoneProgress", "InitializeRequest", "InitializeErrorCodes", "InitializedNotification", "ShutdownRequest", "ExitNotification", "DidChangeConfigurationNotification", "MessageType", "ShowMessageNotification", "ShowMessageRequest", "LogMessageNotification", "TelemetryEventNotification", "TextDocumentSyncKind", "DidOpenTextDocumentNotification", "TextDocumentContentChangeEvent", "isIncremental", "event", "isFull", "DidChangeTextDocumentNotification", "DidCloseTextDocumentNotification", "DidSaveTextDocumentNotification", "TextDocumentSaveReason", "WillSaveTextDocumentNotification", "WillSaveTextDocumentWaitUntilRequest", "DidChangeWatchedFilesNotification", "FileChangeType", "RelativePattern", "WatchKind", "PublishDiagnosticsNotification", "CompletionTriggerKind", "CompletionRequest", "CompletionResolveRequest", "HoverRequest", "SignatureHelpTriggerKind", "SignatureHelpRequest", "DefinitionRequest", "ReferencesRequest", "DocumentHighlightRequest", "DocumentSymbolRequest", "CodeActionRequest", "CodeActionResolveRequest", "WorkspaceSymbolRequest", "WorkspaceSymbolResolveRequest", "CodeLensRequest", "CodeLensResolveRequest", "CodeLensRefreshRequest", "DocumentLinkRequest", "DocumentLinkResolveRequest", "DocumentFormattingRequest", "DocumentRangeFormattingRequest", "DocumentOnTypeFormattingRequest", "PrepareSupportDefaultBehavior", "RenameRequest", "PrepareRenameRequest", "ExecuteCommandRequest", "ApplyWorkspaceEditRequest", "require_connection", "__commonJSMin", "exports", "vscode_jsonrpc_1", "createProtocolConnection", "input", "output", "logger", "options", "require_api", "__commonJSMin", "exports", "__createBinding", "o", "m", "k", "k2", "desc", "__exportStar", "p", "connection_1", "LSPErrorCodes", "require_main", "__commonJSMin", "exports", "__createBinding", "o", "m", "k", "k2", "desc", "__exportStar", "p", "node_1", "createProtocolConnection", "input", "output", "logger", "options", "require_is", "__commonJSMin", "exports", "boolean", "value", "string", "number", "error", "func", "array", "stringArray", "elem", "typedArray", "check", "thenable", "require_uuid", "__commonJSMin", "exports", "ValueUUID", "_value", "other", "V4UUID", "_V4UUID", "array", "v4", "_UUIDPattern", "isUUID", "value", "parse", "generateUuid", "require_progress", "__commonJSMin", "exports", "vscode_languageserver_protocol_1", "uuid_1", "WorkDoneProgressReporterImpl", "_WorkDoneProgressReporterImpl", "_connection", "_token", "title", "percentage", "message", "cancellable", "param", "arg0", "arg1", "WorkDoneProgressServerReporterImpl", "connection", "token", "NullProgressReporter", "NullProgressServerReporter", "attachWorkDone", "params", "ProgressFeature", "Base", "capabilities", "progress", "ResultProgress", "ResultProgressReporterImpl", "data", "attachPartialResult", "require_configuration", "__commonJSMin", "exports", "vscode_languageserver_protocol_1", "Is", "ConfigurationFeature", "Base", "arg", "params", "result", "require_workspaceFolder", "__commonJSMin", "exports", "vscode_languageserver_protocol_1", "WorkspaceFoldersFeature", "Base", "capabilities", "workspaceCapabilities", "params", "changeNotifications", "require_callHierarchy", "__commonJSMin", "exports", "vscode_languageserver_protocol_1", "CallHierarchyFeature", "Base", "handler", "params", "cancel", "type", "require_semanticTokens", "__commonJSMin", "exports", "vscode_languageserver_protocol_1", "SemanticTokensFeature", "Base", "handler", "type", "params", "cancel", "SemanticTokensDiff", "originalSequence", "modifiedSequence", "originalLength", "modifiedLength", "startIndex", "originalEndIndex", "modifiedEndIndex", "deleteCount", "newData", "SemanticTokensBuilder", "line", "char", "length", "tokenType", "tokenModifiers", "pushLine", "pushChar", "id", "require_showDocument", "__commonJSMin", "exports", "vscode_languageserver_protocol_1", "ShowDocumentFeature", "Base", "params", "require_fileOperations", "__commonJSMin", "exports", "vscode_languageserver_protocol_1", "FileOperationsFeature", "Base", "handler", "params", "cancel", "require_linkedEditingRange", "__commonJSMin", "exports", "vscode_languageserver_protocol_1", "LinkedEditingRangeFeature", "Base", "handler", "params", "cancel", "require_typeHierarchy", "__commonJSMin", "exports", "vscode_languageserver_protocol_1", "TypeHierarchyFeature", "Base", "handler", "params", "cancel", "type", "require_inlineValue", "__commonJSMin", "exports", "vscode_languageserver_protocol_1", "InlineValueFeature", "Base", "handler", "params", "cancel", "require_inlayHint", "__commonJSMin", "exports", "vscode_languageserver_protocol_1", "InlayHintFeature", "Base", "handler", "params", "cancel", "require_diagnostic", "__commonJSMin", "exports", "vscode_languageserver_protocol_1", "DiagnosticFeature", "Base", "handler", "params", "cancel", "require_textDocuments", "__commonJSMin", "exports", "vscode_languageserver_protocol_1", "TextDocuments", "configuration", "handler", "uri", "connection", "disposables", "event", "td", "document", "toFire", "changes", "version", "syncedDocument", "token", "disposable", "require_notebook", "__commonJSMin", "exports", "vscode_languageserver_protocol_1", "textDocuments_1", "NotebookSyncFeature", "Base", "handler", "params", "CellTextDocumentConnection", "_CellTextDocumentConnection", "NotebookDocuments", "configurationOrTextDocuments", "cell", "uri", "value", "key", "connection", "cellTextDocumentConnection", "disposables", "cellTextDocument", "notebookDocument", "oldMetadata", "metadataChanged", "change", "opened", "closed", "data", "text", "changedCells", "array", "open", "close", "cellUpdates", "i", "old", "changeEvent", "added", "removed", "textContent", "disposable", "require_moniker", "__commonJSMin", "exports", "vscode_languageserver_protocol_1", "MonikerFeature", "Base", "handler", "type", "params", "cancel", "require_server", "__commonJSMin", "exports", "vscode_languageserver_protocol_1", "Is", "UUID", "progress_1", "configuration_1", "workspaceFolder_1", "callHierarchy_1", "semanticTokens_1", "showDocument_1", "fileOperations_1", "linkedEditingRange_1", "typeHierarchy_1", "inlineValue_1", "inlayHint_1", "diagnostic_1", "notebook_1", "moniker_1", "null2Undefined", "value", "ErrorMessageTracker", "message", "count", "connection", "RemoteConsoleImpl", "_capabilities", "type", "_RemoteWindowImpl", "actions", "params", "RemoteWindowImpl", "BulkRegistration", "create", "BulkRegistrationImpl", "registerOptions", "method", "id", "BulkUnregistration", "BulkUnregistrationImpl", "_connection", "unregistrations", "unregistration", "arg", "_error", "RemoteClientImpl", "typeOrRegistrations", "registerOptionsOrType", "_result", "registrations", "registration", "_RemoteWorkspaceImpl", "paramOrEdit", "isApplyWorkspaceEditParams", "RemoteWorkspaceImpl", "TracerImpl", "verbose", "TelemetryImpl", "data", "_LanguagesImpl", "_type", "LanguagesImpl", "_NotebooksImpl", "NotebooksImpl", "combineConsoleFeatures", "one", "two", "Base", "combineTelemetryFeatures", "combineTracerFeatures", "combineClientFeatures", "combineWindowFeatures", "combineWorkspaceFeatures", "combineLanguagesFeatures", "combineNotebooksFeatures", "combineFeatures", "combine", "func", "createConnection", "connectionFactory", "watchDog", "factories", "logger", "tracer", "telemetry", "client", "remoteWindow", "workspace", "languages", "notebooks", "allRemotes", "asPromise", "resolve", "reject", "resolved", "error", "shutdownHandler", "initializeHandler", "exitHandler", "protocolConnection", "handler", "param", "cancel", "remote", "result", "capabilities", "require_files", "__commonJSMin", "exports", "url", "path", "fs", "child_process_1", "uriToFilePath", "uri", "parsed", "segments", "i", "len", "first", "second", "isWindows", "resolve", "moduleName", "nodePath", "cwd", "tracer", "nodePathKey", "app", "reject", "env", "newEnv", "key", "cp", "error", "message", "resolveGlobalNodePath", "npmCommand", "options", "handler", "stdout", "prefix", "resolveGlobalYarnPath", "yarnCommand", "results", "lines", "line", "yarn", "FileSystem", "_isCaseSensitive", "isCaseSensitive", "isParent", "parent", "child", "resolveModulePath", "workspaceRoot", "value", "_error", "require_node", "__commonJSMin", "exports", "module", "require_api", "__commonJSMin", "exports", "__createBinding", "o", "m", "k", "k2", "desc", "__exportStar", "p", "semanticTokens_1", "textDocuments_1", "notebook_1", "ProposedFeatures", "require_main", "__commonJSMin", "exports", "__createBinding", "o", "m", "k", "k2", "desc", "__exportStar", "p", "Is", "server_1", "fm", "node_1", "Files", "_protocolConnection", "endProtocolConnection", "_shutdownReceived", "exitTimer", "setupExitTimer", "argName", "runTimer", "value", "processId", "i", "arg", "args", "watchDog", "params", "code", "createConnection", "arg1", "arg2", "arg3", "arg4", "factories", "input", "output", "options", "_createConnection", "port", "pipeName", "argv", "transport", "commandLineMessage", "inputStream", "connectionFactory", "logger", "require_constants", "__commonJSMin", "exports", "module", "path", "WIN_SLASH", "WIN_NO_SLASH", "DOT_LITERAL", "PLUS_LITERAL", "QMARK_LITERAL", "SLASH_LITERAL", "ONE_CHAR", "QMARK", "END_ANCHOR", "START_ANCHOR", "DOTS_SLASH", "NO_DOT", "NO_DOTS", "NO_DOT_SLASH", "NO_DOTS_SLASH", "QMARK_NO_DOT", "STAR", "POSIX_CHARS", "WINDOWS_CHARS", "POSIX_REGEX_SOURCE", "chars", "win32", "require_utils", "__commonJSMin", "exports", "path", "win32", "REGEX_BACKSLASH", "REGEX_REMOVE_BACKSLASH", "REGEX_SPECIAL_CHARS", "REGEX_SPECIAL_CHARS_GLOBAL", "val", "str", "match", "segs", "options", "input", "char", "lastIdx", "idx", "state", "output", "prepend", "append", "require_scan", "__commonJSMin", "exports", "module", "utils", "CHAR_ASTERISK", "CHAR_AT", "CHAR_BACKWARD_SLASH", "CHAR_COMMA", "CHAR_DOT", "CHAR_EXCLAMATION_MARK", "CHAR_FORWARD_SLASH", "CHAR_LEFT_CURLY_BRACE", "CHAR_LEFT_PARENTHESES", "CHAR_LEFT_SQUARE_BRACKET", "CHAR_PLUS", "CHAR_QUESTION_MARK", "CHAR_RIGHT_CURLY_BRACE", "CHAR_RIGHT_PARENTHESES", "CHAR_RIGHT_SQUARE_BRACKET", "isPathSeparator", "code", "depth", "token", "scan", "input", "options", "opts", "length", "scanToEnd", "slashes", "tokens", "parts", "str", "index", "start", "lastIndex", "isBrace", "isBracket", "isGlob", "isExtglob", "isGlobstar", "braceEscaped", "backslashes", "negated", "finished", "braces", "prev", "eos", "peek", "advance", "next", "base", "prefix", "glob", "state", "prevIndex", "idx", "n", "i", "value", "require_parse", "__commonJSMin", "exports", "module", "constants", "utils", "MAX_LENGTH", "POSIX_REGEX_SOURCE", "REGEX_NON_SPECIAL_CHARS", "REGEX_SPECIAL_CHARS_BACKREF", "REPLACEMENTS", "expandRange", "args", "options", "value", "v", "syntaxError", "type", "char", "parse", "input", "opts", "max", "len", "bos", "tokens", "capture", "win32", "PLATFORM_CHARS", "EXTGLOB_CHARS", "DOT_LITERAL", "PLUS_LITERAL", "SLASH_LITERAL", "ONE_CHAR", "DOTS_SLASH", "NO_DOT", "NO_DOT_SLASH", "NO_DOTS_SLASH", "QMARK", "QMARK_NO_DOT", "STAR", "START_ANCHOR", "globstar", "nodot", "qmarkNoDot", "star", "state", "extglobs", "braces", "stack", "prev", "eos", "peek", "n", "advance", "remaining", "consume", "num", "append", "token", "negate", "count", "increment", "decrement", "push", "tok", "isBrace", "isExtglob", "extglobOpen", "output", "extglobClose", "extglobStar", "backslashes", "m", "esc", "chars", "first", "rest", "index", "next", "match", "slashes", "inner", "idx", "pre", "posix", "extglob", "prevValue", "escaped", "open", "brace", "arr", "range", "i", "out", "toks", "t", "prior", "before", "isStart", "afterStar", "after", "end", "NO_DOTS", "slashDot", "create", "str", "source", "require_picomatch", "__commonJSMin", "exports", "module", "path", "scan", "parse", "utils", "constants", "isObject", "val", "picomatch", "glob", "options", "returnState", "fns", "input", "str", "isMatch", "state", "isState", "opts", "posix", "regex", "isIgnored", "ignoreOpts", "matcher", "returnObject", "match", "output", "result", "format", "patterns", "pattern", "p", "parsed", "returnOutput", "prepend", "append", "source", "prefix", "err", "require_picomatch", "__commonJSMin", "exports", "module", "require_readdirp", "__commonJSMin", "exports", "module", "fs", "Readable", "sysPath", "promisify", "picomatch", "readdir", "stat", "lstat", "realpath", "BANG", "NORMAL_FLOW_ERRORS", "FILE_TYPE", "DIR_TYPE", "FILE_DIR_TYPE", "EVERYTHING_TYPE", "ALL_TYPES", "isNormalFlowError", "error", "normalizeFilter", "filter", "glob", "entry", "positive", "negative", "item", "trimmed", "f", "ReaddirpStream", "_ReaddirpStream", "path", "options", "opts", "root", "type", "statMethod", "batch", "depth", "files", "slice", "dirent", "entryType", "parent", "basename", "fullPath", "err", "stats", "full", "entryRealPath", "entryRealPathStats", "len", "readdirp", "readdirpPromise", "resolve", "reject", "require_normalize_path", "__commonJSMin", "exports", "module", "path", "stripTrailing", "len", "prefix", "ch", "segs", "require_anymatch", "__commonJSMin", "exports", "module", "picomatch", "normalizePath", "BANG", "DEFAULT_OPTIONS", "arrify", "item", "createPattern", "matcher", "options", "glob", "string", "matchPatterns", "patterns", "negPatterns", "args", "returnIndex", "isList", "_path", "path", "index", "nglob", "applied", "pattern", "anymatch", "matchers", "testString", "opts", "mtchers", "negatedGlobs", "ri", "require_is_extglob", "__commonJSMin", "exports", "module", "str", "match", "require_is_glob", "__commonJSMin", "exports", "module", "isExtglob", "chars", "strictRegex", "relaxedRegex", "str", "options", "regex", "match", "idx", "open", "close", "n", "require_glob_parent", "__commonJSMin", "exports", "module", "isGlob", "pathPosixDirname", "isWin32", "slash", "backslash", "enclosure", "globby", "escaped", "str", "opts", "options", "require_utils", "__commonJSMin", "exports", "num", "node", "type", "min", "max", "step", "limit", "block", "n", "nodes", "acc", "args", "result", "flat", "arr", "ele", "require_stringify", "__commonJSMin", "exports", "module", "utils", "ast", "options", "stringify", "node", "parent", "invalidBlock", "invalidNode", "output", "child", "require_is_number", "__commonJSMin", "exports", "module", "num", "require_to_regex_range", "__commonJSMin", "exports", "module", "isNumber", "toRegexRange", "min", "max", "options", "opts", "relax", "shorthand", "capture", "wrap", "cacheKey", "a", "b", "result", "isPadded", "hasPadding", "state", "positives", "negatives", "newMin", "splitToPatterns", "collatePatterns", "neg", "pos", "onlyNegative", "filterPatterns", "onlyPositive", "intersected", "splitToRanges", "nines", "zeros", "stop", "countNines", "stops", "countZeros", "compare", "rangeToPattern", "start", "zipped", "zip", "digits", "pattern", "count", "i", "startDigit", "stopDigit", "toCharacterClass", "tok", "ranges", "tokens", "prev", "obj", "toQuantifier", "padZeros", "arr", "comparison", "prefix", "intersection", "ele", "string", "contains", "key", "val", "len", "integer", "str", "value", "diff", "require_fill_range", "__commonJSMin", "exports", "module", "util", "toRegexRange", "isObject", "val", "transform", "toNumber", "value", "isValidValue", "isNumber", "num", "zeros", "input", "index", "stringify", "start", "end", "options", "pad", "maxLength", "dash", "toMaxLen", "negative", "toSequence", "parts", "a", "b", "prefix", "positives", "negatives", "result", "toRange", "isNumbers", "stop", "toRegex", "wrap", "rangeError", "args", "invalidRange", "invalidStep", "step", "fillNumbers", "descending", "startString", "endString", "stepString", "padded", "maxLen", "format", "push", "range", "fillLetters", "min", "max", "fill", "opts", "require_compile", "__commonJSMin", "exports", "module", "fill", "utils", "compile", "ast", "options", "walk", "node", "parent", "invalidBlock", "invalidNode", "invalid", "prefix", "output", "args", "range", "child", "require_expand", "__commonJSMin", "exports", "module", "fill", "stringify", "utils", "append", "queue", "stash", "enclose", "result", "ele", "item", "value", "expand", "ast", "options", "rangeLimit", "walk", "node", "parent", "p", "q", "args", "range", "block", "i", "child", "require_constants", "__commonJSMin", "exports", "module", "require_parse", "__commonJSMin", "exports", "module", "stringify", "MAX_LENGTH", "CHAR_BACKSLASH", "CHAR_BACKTICK", "CHAR_COMMA", "CHAR_DOT", "CHAR_LEFT_PARENTHESES", "CHAR_RIGHT_PARENTHESES", "CHAR_LEFT_CURLY_BRACE", "CHAR_RIGHT_CURLY_BRACE", "CHAR_LEFT_SQUARE_BRACKET", "CHAR_RIGHT_SQUARE_BRACKET", "CHAR_DOUBLE_QUOTE", "CHAR_SINGLE_QUOTE", "CHAR_NO_BREAK_SPACE", "CHAR_ZERO_WIDTH_NOBREAK_SPACE", "parse", "input", "options", "opts", "max", "ast", "stack", "block", "prev", "brackets", "length", "index", "depth", "value", "memo", "advance", "push", "node", "closed", "next", "open", "brace", "type", "siblings", "before", "parent", "require_braces", "__commonJSMin", "exports", "module", "stringify", "compile", "expand", "parse", "braces", "input", "options", "output", "pattern", "result", "require_binary_extensions", "__commonJSMin", "exports", "module", "require_binary_extensions", "__commonJSMin", "exports", "module", "require_is_binary_path", "__commonJSMin", "exports", "module", "path", "binaryExtensions", "extensions", "filePath", "require_constants", "__commonJSMin", "exports", "sep", "platform", "val", "require_nodefs_handler", "__commonJSMin", "exports", "module", "fs", "sysPath", "promisify", "isBinaryPath", "isWindows", "isLinux", "EMPTY_FN", "EMPTY_STR", "KEY_LISTENERS", "KEY_ERR", "KEY_RAW", "HANDLER_KEYS", "EV_CHANGE", "EV_ADD", "EV_ADD_DIR", "EV_ERROR", "STR_DATA", "STR_END", "BRACE_START", "STAR", "THROTTLE_MODE_WATCH", "open", "stat", "lstat", "close", "fsrealpath", "statMethods", "foreach", "val", "fn", "addAndConvert", "main", "prop", "item", "container", "clearItem", "cont", "key", "set", "delFromSet", "isEmptySet", "FsWatchInstances", "createFsWatchInstance", "path", "options", "listener", "errHandler", "emitRaw", "handleEvent", "rawEvent", "evPath", "fsWatchBroadcast", "error", "fullPath", "type", "val1", "val2", "val3", "setFsWatchListener", "handlers", "rawEmitter", "watcher", "broadcastErr", "fd", "FsWatchFileInstances", "setFsWatchFileListener", "listeners", "rawEmitters", "copts", "curr", "prev", "currmtime", "NodeFsHandler", "fsW", "opts", "directory", "basename", "absolutePath", "closer", "file", "stats", "initialAdd", "dirname", "parent", "prevStats", "newStats", "at", "mt", "entry", "full", "dir", "linkPath", "wh", "target", "depth", "throttler", "previous", "current", "stream", "resolve", "wasThrottled", "realpath", "parentDir", "tracked", "oDepth", "dirPath", "priorWh", "ready", "follow", "absPath", "targetPath", "require_fsevents_handler", "__commonJSMin", "exports", "module", "fs", "sysPath", "promisify", "fsevents", "error", "mtch", "maj", "min", "EV_ADD", "EV_CHANGE", "EV_ADD_DIR", "EV_UNLINK", "EV_ERROR", "STR_DATA", "STR_END", "FSEVENT_CREATED", "FSEVENT_MODIFIED", "FSEVENT_DELETED", "FSEVENT_MOVED", "FSEVENT_UNKNOWN", "FSEVENT_TYPE_FILE", "FSEVENT_TYPE_DIRECTORY", "FSEVENT_TYPE_SYMLINK", "ROOT_GLOBSTAR", "DIR_SUFFIX", "DOT_SLASH", "FUNCTION_TYPE", "EMPTY_FN", "IDENTITY_FN", "Depth", "value", "stat", "lstat", "realpath", "statMethods", "FSEventsWatchers", "consolidateThreshhold", "wrongEventFlags", "createFSEventsInstance", "path", "callback", "setFSEventsListener", "realPath", "listener", "rawEmitter", "watchPath", "parentPath", "cont", "couldConsolidate", "resolvedPath", "hasSymlink", "filteredListener", "fullPath", "flags", "info", "watchedParent", "watchedPath", "list", "lst", "count", "canUse", "calcDepth", "root", "i", "sameTypes", "stats", "FsEventsHandler", "fsw", "ipaths", "parent", "watchedDir", "item", "opts", "event", "isDirectory", "curDepth", "eventName", "transform", "globFilter", "closer", "linkPath", "linkTarget", "aliasedPath", "newPath", "processPath", "forceAdd", "pp", "isDir", "dirObj", "base", "wh", "priorDepth", "entry", "joinedPath", "require_chokidar", "__commonJSMin", "exports", "EventEmitter", "fs", "sysPath", "promisify", "readdirp", "anymatch", "globParent", "isGlob", "braces", "normalizePath", "NodeFsHandler", "FsEventsHandler", "EV_ALL", "EV_READY", "EV_ADD", "EV_CHANGE", "EV_UNLINK", "EV_ADD_DIR", "EV_UNLINK_DIR", "EV_RAW", "EV_ERROR", "STR_CLOSE", "STR_END", "BACK_SLASH_RE", "DOUBLE_SLASH_RE", "SLASH_OR_BACK_SLASH_RE", "DOT_RE", "REPLACER_RE", "SLASH", "SLASH_SLASH", "BRACE_START", "BANG", "ONE_DOT", "TWO_DOTS", "GLOBSTAR", "SLASH_GLOBSTAR", "ANYMATCH_OPTS", "STRING_TYPE", "FUNCTION_TYPE", "EMPTY_STR", "EMPTY_FN", "isWindows", "isMacos", "stat", "readdir", "arrify", "value", "flatten", "list", "result", "item", "unifyPaths", "paths_", "paths", "p", "normalizePathToUnix", "toUnix", "string", "str", "prepend", "path", "normalizeIgnored", "cwd", "getAbsolutePath", "undef", "opts", "key", "DirEntry", "dir", "removeWatcher", "items", "STAT_METHOD_F", "STAT_METHOD_L", "WatchHelper", "watchPath", "follow", "fsw", "parts", "entry", "stats", "resolvedPath", "entryParts", "globstar", "part", "i", "FSWatcher", "_opts", "envPoll", "envLower", "envInterval", "awf", "readyCalls", "args", "_origAdd", "_internal", "disableGlobbing", "absPath", "res", "results", "closers", "closerList", "closer", "promise", "stream", "dirent", "watchList", "event", "val1", "val2", "val3", "pw", "awfEmit", "err", "fullPath", "error", "code", "actionType", "timeout", "action", "actionPath", "timeoutObject", "clear", "count", "thr", "threshold", "timeoutHandler", "now", "awaitWriteFinish", "prevStat", "curStat", "ign", "ignored", "depth", "directory", "st", "isDirectory", "nested", "parent", "wasTracked", "relPath", "eventName", "root", "options", "watch", "watcher", "import_fs", "import_path", "import_process", "p", "v", "rpc", "path", "import_fs", "import_vscode_languageserver_protocol", "fs", "path", "path", "platformDir", "jsonrpcVersion", "platformPath", "nodeModulesPlatformPath", "bscExeName", "bscNativeReScriptPartialPath", "analysisDevPath", "analysisProdPath", "rescriptBinName", "nodeModulesBinDir", "rescriptNodePartialPath", "rescriptBinName", "bsbLock", "bsconfigPartialPath", "rescriptJsonPartialPath", "compilerDirPartialPath", "compilerLogPartialPath", "resExt", "resiExt", "cmiExt", "startBuildAction", "bsconfigModuleDefault", "bsconfigSuffixDefault", "configurationRequestId", "pullConfigurationInterval", "getCompiledFolderName", "moduleFormat", "replaceFileExtension", "filePath", "ext", "name", "findFilePathFromProjectRoot", "directory", "filePartialPath", "parentDir", "readConfig", "projDir", "rescriptJson", "rescriptJsonPartialPath", "bsconfigJson", "bsconfigPartialPath", "configFile", "getSuffixAndPathFragmentFromBsconfig", "bsconfig", "pkgSpecs", "pathFragment", "module", "bsconfigModuleDefault", "moduleFormatObj", "suffix", "bsconfigSuffixDefault", "getFilenameFromBsconfig", "partialFilePath", "compiledPartialPath", "getFilenameFromRootBsconfig", "rootConfigPath", "rootConfig", "childProcess", "path", "t", "import_fs", "os", "p", "import_url", "wrapRangeInText", "range", "wrapStart", "wrapEnd", "offset", "startRange", "endRange", "insertBeforeEndingChar", "newText", "beforeEndingChar", "replaceText", "removeTrailingComma", "text", "str", "extractTypename", "lines", "arrFiltered", "i", "line", "typeStr", "_", "takeUntil", "array", "startsWith", "res", "arr", "matched", "findCodeActionsInDiagnosticsMessage", "diagnostic", "diagnosticMessage", "file", "codeActions", "index", "codeActionEtractors", "simpleTypeMismatches", "didYouMeanAction", "addUndefinedRecordFieldsV10", "addUndefinedRecordFieldsV11", "simpleConversion", "applyUncurried", "simpleAddMissingCases", "wrapInSome", "extractCodeAction", "didFindAction", "e", "regex", "match", "suggestion", "codeAction", "type", "restOfMessage", "lineIndexWithType", "l", "typ", "handleUndefinedRecordFieldsAction", "recordFieldNames", "multilineRecordDefinitionBody", "paddingCharacters", "paddingContentRecordField", "paddingContentEndBrace", "fieldName", "stop", "from", "to", "fn", "locOfOpenFnParens", "allCasesAsOneLine", "filePath", "newSwitchCode", "runAnalysisAfterSanityCheck", "lookFor", "thisHasTypeArr", "somewhereWantedArr", "thisHasType", "somewhereWanted", "defaultValue", "subscribers", "errorLastNotified", "onErrorReported", "cb", "s", "reportError", "identifier", "msg", "config", "config_default", "tempFilePrefix", "tempFileId", "createFileInTempDir", "extension", "tempFileName", "findProjectRootOfFile", "source", "dir", "fs", "rescriptJsonPartialPath", "bsconfigPartialPath", "findBinary", "binaryDirPath", "binaryName", "binaryPath", "formatCode", "bscPath", "filePath", "code", "allowBuiltInFormatter", "formatTempFileFullPath", "result", "runAnalysisAfterSanityCheck", "e", "findReScriptVersion", "projectRoot", "rescriptBinary", "findFilePathFromProjectRoot", "nodeModulesBinDir", "rescriptBinName", "args", "projectRequired", "analysisDevPath", "analysisProdPath", "projectRootPath", "rescriptVersion", "options", "stdout", "reportError", "runAnalysisCommand", "msg", "jsonrpcVersion", "getReferencesForPosition", "position", "toCamelCase", "text", "s", "getNamespaceNameFromConfigFile", "projDir", "config", "readConfig", "getCompiledFilePath", "error", "partialFilePath", "compiledPath", "getFilenameFromBsconfig", "getFilenameFromRootBsconfig", "runBuildWatcherUsingValidBuildPath", "buildPath", "cwdEnv", "pathToURI", "file", "parseFileAndRange", "fileAndRange", "regex", "trimmedFileAndRange", "match", "_source", "startLine", "startChar", "optionalEndGroup", "endLineOrChar", "_colonPlusEndCharOrNothing", "endCharOrNothing", "range", "start", "isSingleLine", "endLine", "endChar", "parseCompilerLogOutput", "content", "parsedDiagnostics", "linesWithParseErrors", "lines", "done", "i", "line", "warningNumber", "tag", "severity", "foundCodeActions", "parsedDiagnostic", "fileAndRangeLine", "diagnosticMessage", "diagnostic", "findCodeActionsInDiagnosticsMessage", "rangeContainsRange", "otherRange", "findPlatformPath", "config_default", "rescriptDir", "platformPath", "platformDir", "findBscExeBinary", "bscExeName", "chokidar", "import_console", "import_url", "path", "import_fs", "import_url", "import_readline", "import_perf_hooks", "p", "cp", "chokidar", "debug", "config_default", "INCREMENTAL_FOLDER_NAME", "INCREMENTAL_FILE_FOLDER_LOCATION", "incrementallyCompiledFileInfo", "hasReportedFeatureFailedError", "originalTypeFileToFilePath", "incrementalFilesWatcher", "e", "changedPath", "filePath", "entry", "cb", "cleanUpIncrementalFiles", "removeIncrementalFileFolder", "projectRootPath", "onAfterRemove", "fs", "_", "recreateIncrementalFileFolder", "ext", "namespace", "getNamespaceNameFromConfigFile", "fileNameNoExt", "moduleNameNamespaced", "file", "getBscArgs", "buildNinjaPath", "cacheEntry", "stat", "resolve", "_reject", "resolveResult", "result", "fileStream", "rl", "readline", "captureNextLine", "done", "stopped", "captured", "line", "argsFromCommandString", "cmdString", "s", "v", "args", "i", "item", "nextIndex", "nextItem", "arg", "x", "subItem", "break_", "removeAnsiCodes", "ansiEscape", "triggerIncrementalCompilationOfFile", "fileContent", "send", "onCompilationFinished", "incrementalFileCacheEntry", "findProjectRootOfFile", "namespaceName", "bscBinaryLocation", "findBscExeBinary", "moduleName", "incrementalFolderPath", "rescriptVersion", "originalTypeFileLocation", "parsed", "figureOutBscArgs", "triggerToken", "timeout", "compileContents", "verifyTriggerToken", "res", "astBuildCommand", "fullBuildCommand", "astArgs", "buildArgs", "callArgs", "key", "value", "startTime", "process", "error", "_stdout", "stderr", "hasIgnoredErrorMessages", "parseCompilerLogOutput", "d", "logfile", "params", "jsonrpcVersion", "notification", "handleUpdateOpenedFile", "handleClosedFile", "extensionClientCapabilities", "hasPromptedAboutBuiltInFormatter", "pullConfigurationPeriodically", "initialized", "serverSentRequestIdCounter", "shutdownRequestAlreadyReceived", "stupidFileContentCache", "projectsFiles", "codeActionsFromDiagnostics", "send", "_", "findRescriptBinary", "projectRootPath", "config_default", "findFilePathFromProjectRoot", "nodeModulesBinDir", "rescriptBinName", "findBinary", "createInterfaceRequest", "openCompiledFileRequest", "getCurrentCompilerDiagnosticsForFile", "fileUri", "diagnostics", "projectFile", "_projectRootPath", "sendUpdatedDiagnostics", "filesWithDiagnostics", "compilerLogPath", "compilerLogPartialPath", "content", "fs", "done", "filesAndErrors", "codeActions", "linesWithParseErrors", "parseCompilerLogOutput", "params", "jsonrpcVersion", "file", "deleteProjectDiagnostics", "root", "removeIncrementalFileFolder", "sendCompilationFinishedMessage", "compilerLogsWatcher", "_e", "_changedPath", "sendInlayHintsRefresh", "sendCodeLensRefresh", "stopWatchingCompilerLog", "openedFile", "fileContent", "filePath", "findProjectRootOfFile", "projectRootState", "recreateIncrementalFileFolder", "bsbLockPath", "bsbLock", "payload", "startBuildAction", "request", "closedFile", "handleClosedFile", "updateOpenedFile", "handleUpdateOpenedFile", "getOpenedFileContent", "listen", "useStdio", "writer", "process", "reader", "msg", "onMessage", "hover", "code", "tmpname", "createFileInTempDir", "response", "runAnalysisCommand", "inlayHint", "codeLens", "signatureHelp", "definition", "typeDefinition", "references", "result", "getReferencesForPosition", "prepareRename", "locations", "loc", "start", "end", "pos", "rename", "documentChanges", "runAnalysisAfterSanityCheck", "documentSymbol", "extension", "askForAllCurrentConfiguration", "req", "configurationRequestId", "semanticTokens", "completion", "codeAction", "localResults", "range", "rangeContainsRange", "format", "fakeSuccessResponse", "resExt", "resiExt", "bscExeBinaryPath", "findBscExeBinary", "formattedResult", "formatCode", "max", "updateDiagnosticSyntax", "compilerDiagnosticsForFile", "syntaxDiagnosticsForFile", "notification", "createInterface", "projDir", "resPartialPath", "namespaceResult", "getNamespaceNameFromConfigFile", "namespace", "suffixToAppend", "cmiPartialPath", "cmiExt", "cmiPath", "compilerDirPartialPath", "resiPath", "replaceFileExtension", "pathToURI", "openCompiledFile", "compiledFilePath", "getCompiledFilePath", "message", "extName", "changes", "initParams", "initialConfiguration", "extensionClientCapabilitiesFromClient", "pullConfigurationInterval", "configuration", "rescriptBinaryPath", "bsbProcess", "runBuildWatcherUsingValidBuildPath", "onErrorReported", "args", "help", "listen", "version", "fs", "path"]
|
|
7
|
+
}
|