diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md deleted file mode 100644 index 6f20c66c400e5..0000000000000 --- a/.github/copilot-instructions.md +++ /dev/null @@ -1,57 +0,0 @@ -# Coding Guidelines - -## Introduction - -These are VS Code coding guidelines. Please also review our [Source Code Organisation](https://github.com/microsoft/vscode/wiki/Source-Code-Organization) page. - -## Indentation - -We use tabs, not spaces. - -## Naming Conventions - -* Use PascalCase for `type` names -* Use PascalCase for `enum` values -* Use camelCase for `function` and `method` names -* Use camelCase for `property` names and `local variables` -* Use whole words in names when possible - -## Types - -* Do not export `types` or `functions` unless you need to share it across multiple components -* Do not introduce new `types` or `values` to the global namespace - -## Comments - -* When there are comments for `functions`, `interfaces`, `enums`, and `classes` use JSDoc style comments - -## Strings - -* Use "double quotes" for strings shown to the user that need to be externalized (localized) -* Use 'single quotes' otherwise -* All strings visible to the user need to be externalized - -## Style - -* Use arrow functions `=>` over anonymous function expressions -* Only surround arrow function parameters when necessary. For example, `(x) => x + x` is wrong but the following are correct: - -```javascript -x => x + x -(x, y) => x + y -(x: T, y: T) => x === y -``` - -* Always surround loop and conditional bodies with curly braces -* Open curly braces always go on the same line as whatever necessitates them -* Parenthesized constructs should have no surrounding whitespace. A single space follows commas, colons, and semicolons in those constructs. For example: - -```javascript -for (let i = 0, n = str.length; i < 10; i++) { - if (x < 10) { - foo(); - } -} - -function f(x: number, y: string): void { } -``` diff --git a/.vscode/notebooks/my-endgame.github-issues b/.vscode/notebooks/my-endgame.github-issues deleted file mode 100644 index 9d101de768b24..0000000000000 --- a/.vscode/notebooks/my-endgame.github-issues +++ /dev/null @@ -1,192 +0,0 @@ -[ - { - "kind": 1, - "language": "markdown", - "value": "#### Macros" - }, - { - "kind": 2, - "language": "github-issues", - "value": "$REPOS=repo:microsoft/lsprotocol repo:microsoft/monaco-editor repo:microsoft/vscode repo:microsoft/vscode-anycode repo:microsoft/vscode-autopep8 repo:microsoft/vscode-black-formatter repo:microsoft/vscode-copilot repo:microsoft/vscode-copilot-release repo:microsoft/vscode-dev repo:microsoft/vscode-dev-chrome-launcher repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-flake8 repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-hexeditor repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-isort repo:microsoft/vscode-js-debug repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-l10n repo:microsoft/vscode-livepreview repo:microsoft/vscode-markdown-languageservice repo:microsoft/vscode-markdown-tm-grammar repo:microsoft/vscode-mypy repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-pylint repo:microsoft/vscode-python repo:microsoft/vscode-python-debugger repo:microsoft/vscode-python-tools-extension-template repo:microsoft/vscode-references-view repo:microsoft/vscode-remote-release repo:microsoft/vscode-remote-repositories-github repo:microsoft/vscode-remote-tunnels repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-unpkg repo:microsoft/vscode-vsce\n\n$MILESTONE=milestone:\"November 2024\"\n\n$MINE=assignee:@me" - }, - { - "kind": 1, - "language": "markdown", - "value": "# Preparation" - }, - { - "kind": 1, - "language": "markdown", - "value": "## Open Pull Requests on the Milestone" - }, - { - "kind": 2, - "language": "github-issues", - "value": "$REPOS $MILESTONE $MINE is:pr is:open" - }, - { - "kind": 1, - "language": "markdown", - "value": "## Open Issues on the Milestone" - }, - { - "kind": 2, - "language": "github-issues", - "value": "$REPOS $MILESTONE $MINE is:issue is:open -label:iteration-plan -label:endgame-plan -label:testplan-item" - }, - { - "kind": 1, - "language": "markdown", - "value": "## Feature Requests Missing Labels" - }, - { - "kind": 2, - "language": "github-issues", - "value": "$REPOS $MILESTONE $MINE is:issue is:closed reason:completed label:feature-request -label:verification-needed -label:on-testplan -label:verified -label:*duplicate" - }, - { - "kind": 1, - "language": "markdown", - "value": "## Test Plan Items" - }, - { - "kind": 2, - "language": "github-issues", - "value": "$REPOS is:issue is:open author:@me label:testplan-item" - }, - { - "kind": 1, - "language": "markdown", - "value": "## Verification Needed" - }, - { - "kind": 2, - "language": "github-issues", - "value": "$REPOS $MILESTONE $MINE is:issue is:closed reason:completed label:feature-request label:verification-needed -label:verified" - }, - { - "kind": 1, - "language": "markdown", - "value": "# Testing" - }, - { - "kind": 1, - "language": "markdown", - "value": "## Test Plan Items" - }, - { - "kind": 2, - "language": "github-issues", - "value": "$REPOS $MINE is:issue is:open label:testplan-item" - }, - { - "kind": 1, - "language": "markdown", - "value": "## Verification Needed" - }, - { - "kind": 2, - "language": "github-issues", - "value": "$REPOS $MILESTONE -$MINE is:issue is:closed reason:completed -assignee:@me -label:verified -label:z-author-verified label:feature-request label:verification-needed -label:verification-steps-needed -label:unreleased" - }, - { - "kind": 1, - "language": "markdown", - "value": "# Fixing" - }, - { - "kind": 1, - "language": "markdown", - "value": "## Open Issues" - }, - { - "kind": 2, - "language": "github-issues", - "value": "$REPOS $MILESTONE $MINE is:issue is:open -label:endgame-plan -label:testplan-item -label:iteration-plan" - }, - { - "kind": 1, - "language": "markdown", - "value": "## Open Bugs" - }, - { - "kind": 2, - "language": "github-issues", - "value": "$REPOS $MILESTONE $MINE is:issue is:open label:bug" - }, - { - "kind": 1, - "language": "markdown", - "value": "# Verification" - }, - { - "kind": 1, - "language": "markdown", - "value": "## My Issues (verification-steps-needed)" - }, - { - "kind": 2, - "language": "github-issues", - "value": "$REPOS $MILESTONE $MINE is:issue label:bug label:verification-steps-needed" - }, - { - "kind": 1, - "language": "markdown", - "value": "## My Issues (verification-found)" - }, - { - "kind": 2, - "language": "github-issues", - "value": "$REPOS $MILESTONE $MINE is:issue label:bug label:verification-found" - }, - { - "kind": 1, - "language": "markdown", - "value": "## Issues filed by me" - }, - { - "kind": 2, - "language": "github-issues", - "value": "$REPOS $MILESTONE -$MINE is:issue is:closed reason:completed author:@me sort:updated-asc label:bug -label:unreleased -label:verified -label:z-author-verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:triage-needed -label:verification-found -label:*not-reproducible" - }, - { - "kind": 1, - "language": "markdown", - "value": "## Issues filed from outside team" - }, - { - "kind": 2, - "language": "github-issues", - "value": "$REPOS $MILESTONE -$MINE is:issue is:closed reason:completed sort:updated-asc label:bug -label:unreleased -label:verified -label:z-author-verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:*out-of-scope -label:error-telemetry -label:verification-steps-needed -label:verification-found -author:aeschli -author:alexdima -author:alexr00 -author:AmandaSilver -author:andreamah -author:bamurtaugh -author:bpasero -author:chrisdias -author:chrmarti -author:Chuxel -author:claudiaregio -author:connor4312 -author:dbaeumer -author:deepak1556 -author:devinvalenciano -author:digitarald -author:DonJayamanne -author:egamma -author:fiveisprime -author:gregvanl -author:hediet -author:isidorn -author:joaomoreno -author:joyceerhl -author:jrieken -author:kieferrm -author:lramos15 -author:lszomoru -author:meganrogge -author:misolori -author:mjbvz -author:rebornix -author:roblourens -author:rzhao271 -author:sandy081 -author:sbatten -author:stevencl -author:tanhakabir -author:TylerLeonhardt -author:Tyriar -author:weinand -author:amunger -author:karthiknadig -author:eleanorjboyd -author:Yoyokrazy -author:paulacamargo25 -author:ulugbekna -author:aiday-mar -author:daviddossett -author:bhavyaus -author:justschen -author:benibenj -author:luabud -author:anthonykim1 -author:joshspicer -author:osortega -author:legomushroom" - }, - { - "kind": 1, - "language": "markdown", - "value": "## Issues filed by others" - }, - { - "kind": 2, - "language": "github-issues", - "value": "$REPOS $MILESTONE -$MINE is:issue is:closed reason:completed -author:@me sort:updated-asc label:bug -label:unreleased -label:verified -label:z-author-verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:verification-found -label:*not-reproducible -label:*out-of-scope" - }, - { - "kind": 1, - "language": "markdown", - "value": "## Test steps needed from others" - }, - { - "kind": 2, - "language": "github-issues", - "value": "$REPOS $MILESTONE -$MINE is:issue label:bug label:verification-steps-needed -label:verified" - }, - { - "kind": 1, - "language": "markdown", - "value": "# Release Notes" - }, - { - "kind": 2, - "language": "github-issues", - "value": "$REPOS $MILESTONE $MINE is:issue is:closed reason:completed label:feature-request -label:on-release-notes\n$REPOS $MILESTONE $MINE is:issue is:closed reason:completed label:engineering -label:on-release-notes\n$REPOS $MILESTONE $MINE is:issue is:closed reason:completed label:plan-item -label:on-release-notes" - } -] \ No newline at end of file diff --git a/Source/vs/editor/browser/config/migrateOptions.ts b/Source/vs/editor/browser/config/migrateOptions.ts index 98499abfa45be..4adf4e3d848ea 100644 --- a/Source/vs/editor/browser/config/migrateOptions.ts +++ b/Source/vs/editor/browser/config/migrateOptions.ts @@ -2,326 +2,233 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IEditorOptions } from "../../common/config/editorOptions.js"; + +import { IEditorOptions } from '../../common/config/editorOptions.js'; export interface ISettingsReader { (key: string): any; } + export interface ISettingsWriter { (key: string, value: any): void; } + export class EditorSettingMigration { + public static items: EditorSettingMigration[] = []; constructor( public readonly key: string, - public readonly migrate: ( - value: any, - read: ISettingsReader, - write: ISettingsWriter, - ) => void, - ) {} + public readonly migrate: (value: any, read: ISettingsReader, write: ISettingsWriter) => void + ) { } apply(options: any): void { const value = EditorSettingMigration._read(options, this.key); - - const read = (key: string) => - EditorSettingMigration._read(options, key); - - const write = (key: string, value: any) => - EditorSettingMigration._write(options, key, value); - + const read = (key: string) => EditorSettingMigration._read(options, key); + const write = (key: string, value: any) => EditorSettingMigration._write(options, key, value); this.migrate(value, read, write); } private static _read(source: any, key: string): any { - if (typeof source === "undefined") { + if (typeof source === 'undefined') { return undefined; } - const firstDotIndex = key.indexOf("."); - + const firstDotIndex = key.indexOf('.'); if (firstDotIndex >= 0) { const firstSegment = key.substring(0, firstDotIndex); - - return this._read( - source[firstSegment], - key.substring(firstDotIndex + 1), - ); + return this._read(source[firstSegment], key.substring(firstDotIndex + 1)); } - return source[key]; } private static _write(target: any, key: string, value: any): void { - const firstDotIndex = key.indexOf("."); - + const firstDotIndex = key.indexOf('.'); if (firstDotIndex >= 0) { const firstSegment = key.substring(0, firstDotIndex); - target[firstSegment] = target[firstSegment] || {}; - - this._write( - target[firstSegment], - key.substring(firstDotIndex + 1), - value, - ); - + this._write(target[firstSegment], key.substring(firstDotIndex + 1), value); return; } - target[key] = value; } } -function registerEditorSettingMigration( - key: string, - migrate: ( - value: any, - read: ISettingsReader, - write: ISettingsWriter, - ) => void, -): void { + +function registerEditorSettingMigration(key: string, migrate: (value: any, read: ISettingsReader, write: ISettingsWriter) => void): void { EditorSettingMigration.items.push(new EditorSettingMigration(key, migrate)); } -function registerSimpleEditorSettingMigration( - key: string, - values: [any, any][], -): void { + +function registerSimpleEditorSettingMigration(key: string, values: [any, any][]): void { registerEditorSettingMigration(key, (value, read, write) => { - if (typeof value !== "undefined") { + if (typeof value !== 'undefined') { for (const [oldValue, newValue] of values) { if (value === oldValue) { write(key, newValue); - return; } } } }); } + /** * Compatibility with old options */ export function migrateOptions(options: IEditorOptions): void { - EditorSettingMigration.items.forEach((migration) => - migration.apply(options), - ); + EditorSettingMigration.items.forEach(migration => migration.apply(options)); } -registerSimpleEditorSettingMigration("wordWrap", [ - [true, "on"], - [false, "off"], -]); -registerSimpleEditorSettingMigration("lineNumbers", [ - [true, "on"], - [false, "off"], -]); -registerSimpleEditorSettingMigration("cursorBlinking", [["visible", "solid"]]); -registerSimpleEditorSettingMigration("renderWhitespace", [ - [true, "boundary"], - [false, "none"], -]); -registerSimpleEditorSettingMigration("renderLineHighlight", [ - [true, "line"], - [false, "none"], -]); -registerSimpleEditorSettingMigration("acceptSuggestionOnEnter", [ - [true, "on"], - [false, "off"], -]); -registerSimpleEditorSettingMigration("tabCompletion", [ - [false, "off"], - [true, "onlySnippets"], -]); -registerSimpleEditorSettingMigration("hover", [ - [true, { enabled: true }], - [false, { enabled: false }], -]); -registerSimpleEditorSettingMigration("parameterHints", [ - [true, { enabled: true }], - [false, { enabled: false }], -]); -registerSimpleEditorSettingMigration("autoIndent", [ - [false, "advanced"], - [true, "full"], -]); -registerSimpleEditorSettingMigration("matchBrackets", [ - [true, "always"], - [false, "never"], -]); -registerSimpleEditorSettingMigration("renderFinalNewline", [ - [true, "on"], - [false, "off"], -]); -registerSimpleEditorSettingMigration("cursorSmoothCaretAnimation", [ - [true, "on"], - [false, "off"], -]); -registerSimpleEditorSettingMigration("occurrencesHighlight", [ - [true, "singleFile"], - [false, "off"], -]); -registerSimpleEditorSettingMigration("wordBasedSuggestions", [ - [true, "matchingDocuments"], - [false, "off"], -]); -registerEditorSettingMigration("autoClosingBrackets", (value, read, write) => { - if (value === false) { - write("autoClosingBrackets", "never"); - if (typeof read("autoClosingQuotes") === "undefined") { - write("autoClosingQuotes", "never"); +registerSimpleEditorSettingMigration('wordWrap', [[true, 'on'], [false, 'off']]); +registerSimpleEditorSettingMigration('lineNumbers', [[true, 'on'], [false, 'off']]); +registerSimpleEditorSettingMigration('cursorBlinking', [['visible', 'solid']]); +registerSimpleEditorSettingMigration('renderWhitespace', [[true, 'boundary'], [false, 'none']]); +registerSimpleEditorSettingMigration('renderLineHighlight', [[true, 'line'], [false, 'none']]); +registerSimpleEditorSettingMigration('acceptSuggestionOnEnter', [[true, 'on'], [false, 'off']]); +registerSimpleEditorSettingMigration('tabCompletion', [[false, 'off'], [true, 'onlySnippets']]); +registerSimpleEditorSettingMigration('hover', [[true, { enabled: true }], [false, { enabled: false }]]); +registerSimpleEditorSettingMigration('parameterHints', [[true, { enabled: true }], [false, { enabled: false }]]); +registerSimpleEditorSettingMigration('autoIndent', [[false, 'advanced'], [true, 'full']]); +registerSimpleEditorSettingMigration('matchBrackets', [[true, 'always'], [false, 'never']]); +registerSimpleEditorSettingMigration('renderFinalNewline', [[true, 'on'], [false, 'off']]); +registerSimpleEditorSettingMigration('cursorSmoothCaretAnimation', [[true, 'on'], [false, 'off']]); +registerSimpleEditorSettingMigration('occurrencesHighlight', [[true, 'singleFile'], [false, 'off']]); +registerSimpleEditorSettingMigration('wordBasedSuggestions', [[true, 'matchingDocuments'], [false, 'off']]); +registerSimpleEditorSettingMigration('defaultColorDecorators', [[true, 'auto'], [false, 'never']]); + +registerEditorSettingMigration('autoClosingBrackets', (value, read, write) => { + if (value === false) { + write('autoClosingBrackets', 'never'); + if (typeof read('autoClosingQuotes') === 'undefined') { + write('autoClosingQuotes', 'never'); } - - if (typeof read("autoSurround") === "undefined") { - write("autoSurround", "never"); + if (typeof read('autoSurround') === 'undefined') { + write('autoSurround', 'never'); } } }); -registerEditorSettingMigration("renderIndentGuides", (value, read, write) => { - if (typeof value !== "undefined") { - write("renderIndentGuides", undefined); - if (typeof read("guides.indentation") === "undefined") { - write("guides.indentation", !!value); +registerEditorSettingMigration('renderIndentGuides', (value, read, write) => { + if (typeof value !== 'undefined') { + write('renderIndentGuides', undefined); + if (typeof read('guides.indentation') === 'undefined') { + write('guides.indentation', !!value); } } }); -registerEditorSettingMigration( - "highlightActiveIndentGuide", - (value, read, write) => { - if (typeof value !== "undefined") { - write("highlightActiveIndentGuide", undefined); - if ( - typeof read("guides.highlightActiveIndentation") === "undefined" - ) { - write("guides.highlightActiveIndentation", !!value); - } +registerEditorSettingMigration('highlightActiveIndentGuide', (value, read, write) => { + if (typeof value !== 'undefined') { + write('highlightActiveIndentGuide', undefined); + if (typeof read('guides.highlightActiveIndentation') === 'undefined') { + write('guides.highlightActiveIndentation', !!value); } - }, -); + } +}); const suggestFilteredTypesMapping: Record = { - method: "showMethods", - function: "showFunctions", - constructor: "showConstructors", - deprecated: "showDeprecated", - field: "showFields", - variable: "showVariables", - class: "showClasses", - struct: "showStructs", - interface: "showInterfaces", - module: "showModules", - property: "showProperties", - event: "showEvents", - operator: "showOperators", - unit: "showUnits", - value: "showValues", - constant: "showConstants", - enum: "showEnums", - enumMember: "showEnumMembers", - keyword: "showKeywords", - text: "showWords", - color: "showColors", - file: "showFiles", - reference: "showReferences", - folder: "showFolders", - typeParameter: "showTypeParameters", - snippet: "showSnippets", + method: 'showMethods', + function: 'showFunctions', + constructor: 'showConstructors', + deprecated: 'showDeprecated', + field: 'showFields', + variable: 'showVariables', + class: 'showClasses', + struct: 'showStructs', + interface: 'showInterfaces', + module: 'showModules', + property: 'showProperties', + event: 'showEvents', + operator: 'showOperators', + unit: 'showUnits', + value: 'showValues', + constant: 'showConstants', + enum: 'showEnums', + enumMember: 'showEnumMembers', + keyword: 'showKeywords', + text: 'showWords', + color: 'showColors', + file: 'showFiles', + reference: 'showReferences', + folder: 'showFolders', + typeParameter: 'showTypeParameters', + snippet: 'showSnippets', }; -registerEditorSettingMigration( - "suggest.filteredTypes", - (value, read, write) => { - if (value && typeof value === "object") { - for (const entry of Object.entries(suggestFilteredTypesMapping)) { - const v = value[entry[0]]; - if (v === false) { - if (typeof read(`suggest.${entry[1]}`) === "undefined") { - write(`suggest.${entry[1]}`, false); - } +registerEditorSettingMigration('suggest.filteredTypes', (value, read, write) => { + if (value && typeof value === 'object') { + for (const entry of Object.entries(suggestFilteredTypesMapping)) { + const v = value[entry[0]]; + if (v === false) { + if (typeof read(`suggest.${entry[1]}`) === 'undefined') { + write(`suggest.${entry[1]}`, false); } } - - write("suggest.filteredTypes", undefined); } - }, -); -registerEditorSettingMigration("quickSuggestions", (input, read, write) => { - if (typeof input === "boolean") { - const value = input ? "on" : "off"; + write('suggest.filteredTypes', undefined); + } +}); +registerEditorSettingMigration('quickSuggestions', (input, read, write) => { + if (typeof input === 'boolean') { + const value = input ? 'on' : 'off'; const newValue = { comments: value, strings: value, other: value }; - - write("quickSuggestions", newValue); + write('quickSuggestions', newValue); } }); + // Sticky Scroll -registerEditorSettingMigration( - "experimental.stickyScroll.enabled", - (value, read, write) => { - if (typeof value === "boolean") { - write("experimental.stickyScroll.enabled", undefined); - if (typeof read("stickyScroll.enabled") === "undefined") { - write("stickyScroll.enabled", value); - } +registerEditorSettingMigration('experimental.stickyScroll.enabled', (value, read, write) => { + if (typeof value === 'boolean') { + write('experimental.stickyScroll.enabled', undefined); + if (typeof read('stickyScroll.enabled') === 'undefined') { + write('stickyScroll.enabled', value); } - }, -); -registerEditorSettingMigration( - "experimental.stickyScroll.maxLineCount", - (value, read, write) => { - if (typeof value === "number") { - write("experimental.stickyScroll.maxLineCount", undefined); + } +}); - if (typeof read("stickyScroll.maxLineCount") === "undefined") { - write("stickyScroll.maxLineCount", value); - } +registerEditorSettingMigration('experimental.stickyScroll.maxLineCount', (value, read, write) => { + if (typeof value === 'number') { + write('experimental.stickyScroll.maxLineCount', undefined); + if (typeof read('stickyScroll.maxLineCount') === 'undefined') { + write('stickyScroll.maxLineCount', value); } - }, -); + } +}); + // Code Actions on Save -registerEditorSettingMigration("codeActionsOnSave", (value, read, write) => { - if (value && typeof value === "object") { +registerEditorSettingMigration('codeActionsOnSave', (value, read, write) => { + if (value && typeof value === 'object') { let toBeModified = false; - const newValue = {} as any; - for (const entry of Object.entries(value)) { - if (typeof entry[1] === "boolean") { + if (typeof entry[1] === 'boolean') { toBeModified = true; - - newValue[entry[0]] = entry[1] ? "explicit" : "never"; + newValue[entry[0]] = entry[1] ? 'explicit' : 'never'; } else { newValue[entry[0]] = entry[1]; } } - if (toBeModified) { write(`codeActionsOnSave`, newValue); } } }); -// Migrate Quick Fix Settings -registerEditorSettingMigration( - "codeActionWidget.includeNearbyQuickfixes", - (value, read, write) => { - if (typeof value === "boolean") { - write("codeActionWidget.includeNearbyQuickfixes", undefined); - if ( - typeof read("codeActionWidget.includeNearbyQuickFixes") === - "undefined" - ) { - write("codeActionWidget.includeNearbyQuickFixes", value); - } +// Migrate Quick Fix Settings +registerEditorSettingMigration('codeActionWidget.includeNearbyQuickfixes', (value, read, write) => { + if (typeof value === 'boolean') { + write('codeActionWidget.includeNearbyQuickfixes', undefined); + if (typeof read('codeActionWidget.includeNearbyQuickFixes') === 'undefined') { + write('codeActionWidget.includeNearbyQuickFixes', value); } - }, -); + } +}); + // Migrate the lightbulb settings -registerEditorSettingMigration("lightbulb.enabled", (value, read, write) => { - if (typeof value === "boolean") { - write("lightbulb.enabled", value ? undefined : "off"); +registerEditorSettingMigration('lightbulb.enabled', (value, read, write) => { + if (typeof value === 'boolean') { + write('lightbulb.enabled', value ? undefined : 'off'); } }); + diff --git a/Source/vs/editor/browser/widget/codeEditor/codeEditorWidget.ts b/Source/vs/editor/browser/widget/codeEditor/codeEditorWidget.ts index b8ec4fec5b7f8..ed20f95580a8e 100644 --- a/Source/vs/editor/browser/widget/codeEditor/codeEditorWidget.ts +++ b/Source/vs/editor/browser/widget/codeEditor/codeEditorWidget.ts @@ -3,529 +3,201 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import "../../services/markerDecorations.js"; - -import * as dom from "../../../../base/browser/dom.js"; -import { IKeyboardEvent } from "../../../../base/browser/keyboardEvent.js"; -import { IMouseWheelEvent } from "../../../../base/browser/mouseEvent.js"; -import { Color } from "../../../../base/common/color.js"; -import { onUnexpectedError } from "../../../../base/common/errors.js"; -import { - createEventDeliveryQueue, - Emitter, - EmitterOptions, - Event, - EventDeliveryQueue, -} from "../../../../base/common/event.js"; -import { hash } from "../../../../base/common/hash.js"; -import { - Disposable, - DisposableStore, - dispose, - IDisposable, -} from "../../../../base/common/lifecycle.js"; -import { Schemas } from "../../../../base/common/network.js"; - -import "./editor.css"; - -import * as nls from "../../../../nls.js"; -import { IAccessibilityService } from "../../../../platform/accessibility/common/accessibility.js"; -import { MenuId } from "../../../../platform/actions/common/actions.js"; -import { ICommandService } from "../../../../platform/commands/common/commands.js"; -import { - ContextKeyValue, - IContextKey, - IContextKeyService, -} from "../../../../platform/contextkey/common/contextkey.js"; -import { - IInstantiationService, - ServicesAccessor, -} from "../../../../platform/instantiation/common/instantiation.js"; -import { ServiceCollection } from "../../../../platform/instantiation/common/serviceCollection.js"; -import { - INotificationService, - Severity, -} from "../../../../platform/notification/common/notification.js"; -import { - editorErrorForeground, - editorHintForeground, - editorInfoForeground, - editorWarningForeground, -} from "../../../../platform/theme/common/colorRegistry.js"; -import { - IThemeService, - registerThemingParticipant, -} from "../../../../platform/theme/common/themeService.js"; -import { IEditorConfiguration } from "../../../common/config/editorConfiguration.js"; -import { - ConfigurationChangedEvent, - EditorLayoutInfo, - EditorOption, - filterValidationDecorations, - FindComputedEditorOptionValueById, - IComputedEditorOptions, - IEditorOptions, -} from "../../../common/config/editorOptions.js"; -import { CursorColumns } from "../../../common/core/cursorColumns.js"; -import { IDimension } from "../../../common/core/dimension.js"; -import { editorUnnecessaryCodeOpacity } from "../../../common/core/editorColorRegistry.js"; -import { IPosition, Position } from "../../../common/core/position.js"; -import { IRange, Range } from "../../../common/core/range.js"; -import { ISelection, Selection } from "../../../common/core/selection.js"; -import { IWordAtPosition } from "../../../common/core/wordHelper.js"; -import { WordOperations } from "../../../common/cursor/cursorWordOperations.js"; -import { - CursorChangeReason, - ICursorPositionChangedEvent, - ICursorSelectionChangedEvent, -} from "../../../common/cursorEvents.js"; -import { InternalEditorAction } from "../../../common/editorAction.js"; -import * as editorCommon from "../../../common/editorCommon.js"; -import { EditorContextKeys } from "../../../common/editorContextKeys.js"; -import { ILanguageConfigurationService } from "../../../common/languages/languageConfigurationRegistry.js"; -import { - EndOfLinePreference, - IAttachedView, - ICursorStateComputer, - IIdentifiedSingleEditOperation, - IModelDecoration, - IModelDecorationOptions, - IModelDecorationsChangeAccessor, - IModelDeltaDecoration, - ITextModel, -} from "../../../common/model.js"; -import { ClassName } from "../../../common/model/intervalTree.js"; -import { ModelDecorationOptions } from "../../../common/model/textModel.js"; -import { ILanguageFeaturesService } from "../../../common/services/languageFeatures.js"; -import { - IModelContentChangedEvent, - IModelDecorationsChangedEvent, - IModelLanguageChangedEvent, - IModelLanguageConfigurationChangedEvent, - IModelOptionsChangedEvent, - IModelTokensChangedEvent, -} from "../../../common/textModelEvents.js"; -import { VerticalRevealType } from "../../../common/viewEvents.js"; -import { IEditorWhitespace, IViewModel } from "../../../common/viewModel.js"; -import { MonospaceLineBreaksComputerFactory } from "../../../common/viewModel/monospaceLineBreaksComputer.js"; -import { ViewModel } from "../../../common/viewModel/viewModelImpl.js"; -import { OutgoingViewModelEventKind } from "../../../common/viewModelEventDispatcher.js"; -import { applyFontInfo } from "../../config/domFontInfo.js"; -import { - EditorConfiguration, - IEditorConstructionOptions, -} from "../../config/editorConfiguration.js"; -import { TabFocus } from "../../config/tabFocus.js"; -import * as editorBrowser from "../../editorBrowser.js"; -import { - EditorExtensionsRegistry, - IEditorContributionDescription, -} from "../../editorExtensions.js"; -import { ICodeEditorService } from "../../services/codeEditorService.js"; -import { - IContentWidgetData, - IGlyphMarginWidgetData, - IOverlayWidgetData, - View, -} from "../../view.js"; -import { DOMLineBreaksComputerFactory } from "../../view/domLineBreaksComputer.js"; -import { ICommandDelegate } from "../../view/viewController.js"; -import { ViewUserInputEvents } from "../../view/viewUserInputEvents.js"; -import { CodeEditorContributions } from "./codeEditorContributions.js"; - -export class CodeEditorWidget - extends Disposable - implements editorBrowser.ICodeEditor -{ - private static readonly dropIntoEditorDecorationOptions = - ModelDecorationOptions.register({ - description: "workbench-dnd-target", - className: "dnd-target", - }); +import '../../services/markerDecorations.js'; +import * as dom from '../../../../base/browser/dom.js'; +import { IKeyboardEvent } from '../../../../base/browser/keyboardEvent.js'; +import { IMouseWheelEvent } from '../../../../base/browser/mouseEvent.js'; +import { Color } from '../../../../base/common/color.js'; +import { onUnexpectedError } from '../../../../base/common/errors.js'; +import { Emitter, EmitterOptions, Event, EventDeliveryQueue, createEventDeliveryQueue } from '../../../../base/common/event.js'; +import { hash } from '../../../../base/common/hash.js'; +import { Disposable, DisposableStore, IDisposable, dispose } from '../../../../base/common/lifecycle.js'; +import { Schemas } from '../../../../base/common/network.js'; +import './editor.css'; +import { applyFontInfo } from '../../config/domFontInfo.js'; +import { EditorConfiguration, IEditorConstructionOptions } from '../../config/editorConfiguration.js'; +import { TabFocus } from '../../config/tabFocus.js'; +import * as editorBrowser from '../../editorBrowser.js'; +import { EditorExtensionsRegistry, IEditorContributionDescription } from '../../editorExtensions.js'; +import { ICodeEditorService } from '../../services/codeEditorService.js'; +import { IContentWidgetData, IGlyphMarginWidgetData, IOverlayWidgetData, View } from '../../view.js'; +import { DOMLineBreaksComputerFactory } from '../../view/domLineBreaksComputer.js'; +import { ICommandDelegate } from '../../view/viewController.js'; +import { ViewUserInputEvents } from '../../view/viewUserInputEvents.js'; +import { CodeEditorContributions } from './codeEditorContributions.js'; +import { IEditorConfiguration } from '../../../common/config/editorConfiguration.js'; +import { ConfigurationChangedEvent, EditorLayoutInfo, EditorOption, FindComputedEditorOptionValueById, IComputedEditorOptions, IEditorOptions, filterValidationDecorations } from '../../../common/config/editorOptions.js'; +import { CursorColumns } from '../../../common/core/cursorColumns.js'; +import { IDimension } from '../../../common/core/dimension.js'; +import { editorUnnecessaryCodeOpacity } from '../../../common/core/editorColorRegistry.js'; +import { IPosition, Position } from '../../../common/core/position.js'; +import { IRange, Range } from '../../../common/core/range.js'; +import { ISelection, Selection } from '../../../common/core/selection.js'; +import { IWordAtPosition } from '../../../common/core/wordHelper.js'; +import { WordOperations } from '../../../common/cursor/cursorWordOperations.js'; +import { CursorChangeReason, ICursorPositionChangedEvent, ICursorSelectionChangedEvent } from '../../../common/cursorEvents.js'; +import { InternalEditorAction } from '../../../common/editorAction.js'; +import * as editorCommon from '../../../common/editorCommon.js'; +import { EditorContextKeys } from '../../../common/editorContextKeys.js'; +import { ILanguageConfigurationService } from '../../../common/languages/languageConfigurationRegistry.js'; +import { EndOfLinePreference, IAttachedView, ICursorStateComputer, IIdentifiedSingleEditOperation, IModelDecoration, IModelDecorationOptions, IModelDecorationsChangeAccessor, IModelDeltaDecoration, ITextModel } from '../../../common/model.js'; +import { ClassName } from '../../../common/model/intervalTree.js'; +import { ModelDecorationOptions } from '../../../common/model/textModel.js'; +import { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js'; +import { IModelContentChangedEvent, IModelDecorationsChangedEvent, IModelLanguageChangedEvent, IModelLanguageConfigurationChangedEvent, IModelOptionsChangedEvent, IModelTokensChangedEvent } from '../../../common/textModelEvents.js'; +import { VerticalRevealType } from '../../../common/viewEvents.js'; +import { IEditorWhitespace, IViewModel } from '../../../common/viewModel.js'; +import { MonospaceLineBreaksComputerFactory } from '../../../common/viewModel/monospaceLineBreaksComputer.js'; +import { ViewModel } from '../../../common/viewModel/viewModelImpl.js'; +import { OutgoingViewModelEventKind } from '../../../common/viewModelEventDispatcher.js'; +import * as nls from '../../../../nls.js'; +import { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.js'; +import { ICommandService } from '../../../../platform/commands/common/commands.js'; +import { ContextKeyValue, IContextKey, IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js'; +import { IInstantiationService, ServicesAccessor } from '../../../../platform/instantiation/common/instantiation.js'; +import { ServiceCollection } from '../../../../platform/instantiation/common/serviceCollection.js'; +import { INotificationService, Severity } from '../../../../platform/notification/common/notification.js'; +import { editorErrorForeground, editorHintForeground, editorInfoForeground, editorWarningForeground } from '../../../../platform/theme/common/colorRegistry.js'; +import { IThemeService, registerThemingParticipant } from '../../../../platform/theme/common/themeService.js'; +import { MenuId } from '../../../../platform/actions/common/actions.js'; + +export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeEditor { + + private static readonly dropIntoEditorDecorationOptions = ModelDecorationOptions.register({ + description: 'workbench-dnd-target', + className: 'dnd-target' + }); //#region Eventing private readonly _deliveryQueue = createEventDeliveryQueue(); + protected readonly _contributions: CodeEditorContributions = this._register(new CodeEditorContributions()); - protected readonly _contributions: CodeEditorContributions = this._register( - new CodeEditorContributions(), - ); - - private readonly _onDidDispose: Emitter = this._register( - new Emitter(), - ); - + private readonly _onDidDispose: Emitter = this._register(new Emitter()); public readonly onDidDispose: Event = this._onDidDispose.event; - private readonly _onDidChangeModelContent: Emitter = - this._register( - new Emitter({ - deliveryQueue: this._deliveryQueue, - }), - ); - - public readonly onDidChangeModelContent: Event = - this._onDidChangeModelContent.event; - - private readonly _onDidChangeModelLanguage: Emitter = - this._register( - new Emitter({ - deliveryQueue: this._deliveryQueue, - }), - ); - - public readonly onDidChangeModelLanguage: Event = - this._onDidChangeModelLanguage.event; - - private readonly _onDidChangeModelLanguageConfiguration: Emitter = - this._register( - new Emitter({ - deliveryQueue: this._deliveryQueue, - }), - ); - - public readonly onDidChangeModelLanguageConfiguration: Event = - this._onDidChangeModelLanguageConfiguration.event; - - private readonly _onDidChangeModelOptions: Emitter = - this._register( - new Emitter({ - deliveryQueue: this._deliveryQueue, - }), - ); - - public readonly onDidChangeModelOptions: Event = - this._onDidChangeModelOptions.event; - - private readonly _onDidChangeModelDecorations: Emitter = - this._register( - new Emitter({ - deliveryQueue: this._deliveryQueue, - }), - ); - - public readonly onDidChangeModelDecorations: Event = - this._onDidChangeModelDecorations.event; - - private readonly _onDidChangeModelTokens: Emitter = - this._register( - new Emitter({ - deliveryQueue: this._deliveryQueue, - }), - ); - - public readonly onDidChangeModelTokens: Event = - this._onDidChangeModelTokens.event; - - private readonly _onDidChangeConfiguration: Emitter = - this._register( - new Emitter({ - deliveryQueue: this._deliveryQueue, - }), - ); - - public readonly onDidChangeConfiguration: Event = - this._onDidChangeConfiguration.event; - - protected readonly _onWillChangeModel: Emitter = - this._register( - new Emitter({ - deliveryQueue: this._deliveryQueue, - }), - ); - - public readonly onWillChangeModel: Event = - this._onWillChangeModel.event; - - protected readonly _onDidChangeModel: Emitter = - this._register( - new Emitter({ - deliveryQueue: this._deliveryQueue, - }), - ); + private readonly _onDidChangeModelContent: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); + public readonly onDidChangeModelContent: Event = this._onDidChangeModelContent.event; - public readonly onDidChangeModel: Event = - this._onDidChangeModel.event; + private readonly _onDidChangeModelLanguage: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); + public readonly onDidChangeModelLanguage: Event = this._onDidChangeModelLanguage.event; - private readonly _onDidChangeCursorPosition: Emitter = - this._register( - new Emitter({ - deliveryQueue: this._deliveryQueue, - }), - ); - - public readonly onDidChangeCursorPosition: Event = - this._onDidChangeCursorPosition.event; - - private readonly _onDidChangeCursorSelection: Emitter = - this._register( - new Emitter({ - deliveryQueue: this._deliveryQueue, - }), - ); + private readonly _onDidChangeModelLanguageConfiguration: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); + public readonly onDidChangeModelLanguageConfiguration: Event = this._onDidChangeModelLanguageConfiguration.event; - public readonly onDidChangeCursorSelection: Event = - this._onDidChangeCursorSelection.event; + private readonly _onDidChangeModelOptions: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); + public readonly onDidChangeModelOptions: Event = this._onDidChangeModelOptions.event; - private readonly _onDidAttemptReadOnlyEdit: Emitter = this._register( - new InteractionEmitter(this._contributions, this._deliveryQueue), - ); + private readonly _onDidChangeModelDecorations: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); + public readonly onDidChangeModelDecorations: Event = this._onDidChangeModelDecorations.event; - public readonly onDidAttemptReadOnlyEdit: Event = - this._onDidAttemptReadOnlyEdit.event; + private readonly _onDidChangeModelTokens: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); + public readonly onDidChangeModelTokens: Event = this._onDidChangeModelTokens.event; - private readonly _onDidLayoutChange: Emitter = - this._register( - new Emitter({ - deliveryQueue: this._deliveryQueue, - }), - ); + private readonly _onDidChangeConfiguration: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); + public readonly onDidChangeConfiguration: Event = this._onDidChangeConfiguration.event; - public readonly onDidLayoutChange: Event = - this._onDidLayoutChange.event; + protected readonly _onWillChangeModel: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); + public readonly onWillChangeModel: Event = this._onWillChangeModel.event; - private readonly _editorTextFocus: BooleanEventEmitter = this._register( - new BooleanEventEmitter({ deliveryQueue: this._deliveryQueue }), - ); + protected readonly _onDidChangeModel: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); + public readonly onDidChangeModel: Event = this._onDidChangeModel.event; - public readonly onDidFocusEditorText: Event = - this._editorTextFocus.onDidChangeToTrue; + private readonly _onDidChangeCursorPosition: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); + public readonly onDidChangeCursorPosition: Event = this._onDidChangeCursorPosition.event; - public readonly onDidBlurEditorText: Event = - this._editorTextFocus.onDidChangeToFalse; + private readonly _onDidChangeCursorSelection: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); + public readonly onDidChangeCursorSelection: Event = this._onDidChangeCursorSelection.event; - private readonly _editorWidgetFocus: BooleanEventEmitter = this._register( - new BooleanEventEmitter({ deliveryQueue: this._deliveryQueue }), - ); + private readonly _onDidAttemptReadOnlyEdit: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); + public readonly onDidAttemptReadOnlyEdit: Event = this._onDidAttemptReadOnlyEdit.event; - public readonly onDidFocusEditorWidget: Event = - this._editorWidgetFocus.onDidChangeToTrue; + private readonly _onDidLayoutChange: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); + public readonly onDidLayoutChange: Event = this._onDidLayoutChange.event; - public readonly onDidBlurEditorWidget: Event = - this._editorWidgetFocus.onDidChangeToFalse; + private readonly _editorTextFocus: BooleanEventEmitter = this._register(new BooleanEventEmitter({ deliveryQueue: this._deliveryQueue })); + public readonly onDidFocusEditorText: Event = this._editorTextFocus.onDidChangeToTrue; + public readonly onDidBlurEditorText: Event = this._editorTextFocus.onDidChangeToFalse; - private readonly _onWillType: Emitter = this._register( - new InteractionEmitter( - this._contributions, - this._deliveryQueue, - ), - ); + private readonly _editorWidgetFocus: BooleanEventEmitter = this._register(new BooleanEventEmitter({ deliveryQueue: this._deliveryQueue })); + public readonly onDidFocusEditorWidget: Event = this._editorWidgetFocus.onDidChangeToTrue; + public readonly onDidBlurEditorWidget: Event = this._editorWidgetFocus.onDidChangeToFalse; + private readonly _onWillType: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); public readonly onWillType = this._onWillType.event; - private readonly _onDidType: Emitter = this._register( - new InteractionEmitter( - this._contributions, - this._deliveryQueue, - ), - ); - + private readonly _onDidType: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); public readonly onDidType = this._onDidType.event; - private readonly _onDidCompositionStart: Emitter = this._register( - new InteractionEmitter(this._contributions, this._deliveryQueue), - ); - + private readonly _onDidCompositionStart: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); public readonly onDidCompositionStart = this._onDidCompositionStart.event; - private readonly _onDidCompositionEnd: Emitter = this._register( - new InteractionEmitter(this._contributions, this._deliveryQueue), - ); - + private readonly _onDidCompositionEnd: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); public readonly onDidCompositionEnd = this._onDidCompositionEnd.event; - private readonly _onDidPaste: Emitter = - this._register( - new InteractionEmitter( - this._contributions, - this._deliveryQueue, - ), - ); - + private readonly _onDidPaste: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); public readonly onDidPaste = this._onDidPaste.event; - private readonly _onMouseUp: Emitter = - this._register( - new InteractionEmitter( - this._contributions, - this._deliveryQueue, - ), - ); - - public readonly onMouseUp: Event = - this._onMouseUp.event; - - private readonly _onMouseDown: Emitter = - this._register( - new InteractionEmitter( - this._contributions, - this._deliveryQueue, - ), - ); - - public readonly onMouseDown: Event = - this._onMouseDown.event; - - private readonly _onMouseDrag: Emitter = - this._register( - new InteractionEmitter( - this._contributions, - this._deliveryQueue, - ), - ); - - public readonly onMouseDrag: Event = - this._onMouseDrag.event; - - private readonly _onMouseDrop: Emitter = - this._register( - new InteractionEmitter( - this._contributions, - this._deliveryQueue, - ), - ); - - public readonly onMouseDrop: Event = - this._onMouseDrop.event; + private readonly _onMouseUp: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); + public readonly onMouseUp: Event = this._onMouseUp.event; - private readonly _onMouseDropCanceled: Emitter = this._register( - new InteractionEmitter(this._contributions, this._deliveryQueue), - ); + private readonly _onMouseDown: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); + public readonly onMouseDown: Event = this._onMouseDown.event; - public readonly onMouseDropCanceled: Event = - this._onMouseDropCanceled.event; + private readonly _onMouseDrag: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); + public readonly onMouseDrag: Event = this._onMouseDrag.event; - private readonly _onDropIntoEditor = this._register( - new InteractionEmitter<{ - readonly position: IPosition; + private readonly _onMouseDrop: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); + public readonly onMouseDrop: Event = this._onMouseDrop.event; - readonly event: DragEvent; - }>(this._contributions, this._deliveryQueue), - ); + private readonly _onMouseDropCanceled: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); + public readonly onMouseDropCanceled: Event = this._onMouseDropCanceled.event; + private readonly _onDropIntoEditor = this._register(new InteractionEmitter<{ readonly position: IPosition; readonly event: DragEvent }>(this._contributions, this._deliveryQueue)); public readonly onDropIntoEditor = this._onDropIntoEditor.event; - private readonly _onContextMenu: Emitter = - this._register( - new InteractionEmitter( - this._contributions, - this._deliveryQueue, - ), - ); - - public readonly onContextMenu: Event = - this._onContextMenu.event; - - private readonly _onMouseMove: Emitter = - this._register( - new InteractionEmitter( - this._contributions, - this._deliveryQueue, - ), - ); - - public readonly onMouseMove: Event = - this._onMouseMove.event; - - private readonly _onMouseLeave: Emitter = - this._register( - new InteractionEmitter( - this._contributions, - this._deliveryQueue, - ), - ); - - public readonly onMouseLeave: Event = - this._onMouseLeave.event; + private readonly _onContextMenu: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); + public readonly onContextMenu: Event = this._onContextMenu.event; - private readonly _onMouseWheel: Emitter = this._register( - new InteractionEmitter( - this._contributions, - this._deliveryQueue, - ), - ); + private readonly _onMouseMove: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); + public readonly onMouseMove: Event = this._onMouseMove.event; - public readonly onMouseWheel: Event = - this._onMouseWheel.event; + private readonly _onMouseLeave: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); + public readonly onMouseLeave: Event = this._onMouseLeave.event; - private readonly _onKeyUp: Emitter = this._register( - new InteractionEmitter( - this._contributions, - this._deliveryQueue, - ), - ); + private readonly _onMouseWheel: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); + public readonly onMouseWheel: Event = this._onMouseWheel.event; + private readonly _onKeyUp: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); public readonly onKeyUp: Event = this._onKeyUp.event; - private readonly _onKeyDown: Emitter = this._register( - new InteractionEmitter( - this._contributions, - this._deliveryQueue, - ), - ); - + private readonly _onKeyDown: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); public readonly onKeyDown: Event = this._onKeyDown.event; - private readonly _onDidContentSizeChange: Emitter = - this._register( - new Emitter({ - deliveryQueue: this._deliveryQueue, - }), - ); - - public readonly onDidContentSizeChange: Event = - this._onDidContentSizeChange.event; - - private readonly _onDidScrollChange: Emitter = - this._register( - new Emitter({ - deliveryQueue: this._deliveryQueue, - }), - ); - - public readonly onDidScrollChange: Event = - this._onDidScrollChange.event; - - private readonly _onDidChangeViewZones: Emitter = this._register( - new Emitter({ deliveryQueue: this._deliveryQueue }), - ); + private readonly _onDidContentSizeChange: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); + public readonly onDidContentSizeChange: Event = this._onDidContentSizeChange.event; - public readonly onDidChangeViewZones: Event = - this._onDidChangeViewZones.event; + private readonly _onDidScrollChange: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); + public readonly onDidScrollChange: Event = this._onDidScrollChange.event; - private readonly _onDidChangeHiddenAreas: Emitter = this._register( - new Emitter({ deliveryQueue: this._deliveryQueue }), - ); + private readonly _onDidChangeViewZones: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); + public readonly onDidChangeViewZones: Event = this._onDidChangeViewZones.event; - public readonly onDidChangeHiddenAreas: Event = - this._onDidChangeHiddenAreas.event; + private readonly _onDidChangeHiddenAreas: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); + public readonly onDidChangeHiddenAreas: Event = this._onDidChangeHiddenAreas.event; private _updateCounter = 0; - private readonly _onWillTriggerEditorOperationEvent: Emitter = - this._register( - new Emitter(), - ); - - public readonly onWillTriggerEditorOperationEvent: Event = - this._onWillTriggerEditorOperationEvent.event; - - private readonly _onBeginUpdate: Emitter = this._register( - new Emitter(), - ); + private readonly _onWillTriggerEditorOperationEvent: Emitter = this._register(new Emitter()); + public readonly onWillTriggerEditorOperationEvent: Event = this._onWillTriggerEditorOperationEvent.event; + private readonly _onBeginUpdate: Emitter = this._register(new Emitter()); public readonly onBeginUpdate: Event = this._onBeginUpdate.event; - private readonly _onEndUpdate: Emitter = this._register( - new Emitter(), - ); - + private readonly _onEndUpdate: Emitter = this._register(new Emitter()); public readonly onEndUpdate: Event = this._onEndUpdate.event; - private readonly _onBeforeExecuteEdit = this._register( - new Emitter<{ source: string | undefined }>(), - ); - + private readonly _onBeforeExecuteEdit = this._register(new Emitter<{ source: string | undefined }>()); public readonly onBeforeExecuteEdit = this._onBeforeExecuteEdit.event; //#endregion @@ -541,13 +213,9 @@ export class CodeEditorWidget private readonly _telemetryData?: object; private readonly _domElement: HTMLElement; - private readonly _overflowWidgetsDomNode: HTMLElement | undefined; - private readonly _id: number; - private readonly _configuration: IEditorConfiguration; - private _contributionsDisposable: IDisposable | undefined; protected readonly _actions = new Map(); @@ -556,42 +224,30 @@ export class CodeEditorWidget protected _modelData: ModelData | null; protected readonly _instantiationService: IInstantiationService; - protected readonly _contextKeyService: IContextKeyService; - - get contextKeyService() { - return this._contextKeyService; - } - + get contextKeyService() { return this._contextKeyService; } private readonly _notificationService: INotificationService; - protected readonly _codeEditorService: ICodeEditorService; - private readonly _commandService: ICommandService; - private readonly _themeService: IThemeService; private readonly _focusTracker: CodeEditorWidgetFocusTracker; private _contentWidgets: { [key: string]: IContentWidgetData }; - private _overlayWidgets: { [key: string]: IOverlayWidgetData }; - private _glyphMarginWidgets: { [key: string]: IGlyphMarginWidgetData }; /** * map from "parent" decoration type to live decoration ids. */ private _decorationTypeKeysToIds: { [decorationTypeKey: string]: string[] }; - - private _decorationTypeSubtypes: { - [decorationTypeKey: string]: { [subtype: string]: boolean }; - }; + private _decorationTypeSubtypes: { [decorationTypeKey: string]: { [subtype: string]: boolean } }; private _bannerDomNode: HTMLElement | null = null; - private _dropIntoEditorDecorations: EditorDecorationsCollection = - this.createDecorationsCollection(); + private _dropIntoEditorDecorations: EditorDecorationsCollection = this.createDecorationsCollection(); + + public inComposition: boolean = false; constructor( domElement: HTMLElement, @@ -604,134 +260,69 @@ export class CodeEditorWidget @IThemeService themeService: IThemeService, @INotificationService notificationService: INotificationService, @IAccessibilityService accessibilityService: IAccessibilityService, - @ILanguageConfigurationService - private readonly languageConfigurationService: ILanguageConfigurationService, - @ILanguageFeaturesService - languageFeaturesService: ILanguageFeaturesService, + @ILanguageConfigurationService private readonly languageConfigurationService: ILanguageConfigurationService, + @ILanguageFeaturesService languageFeaturesService: ILanguageFeaturesService, ) { super(); - codeEditorService.willCreateCodeEditor(); const options = { ..._options }; this._domElement = domElement; - this._overflowWidgetsDomNode = options.overflowWidgetsDomNode; - delete options.overflowWidgetsDomNode; - - this._id = ++EDITOR_ID; - + this._id = (++EDITOR_ID); this._decorationTypeKeysToIds = {}; - this._decorationTypeSubtypes = {}; - this._telemetryData = codeEditorWidgetOptions.telemetryData; - this._configuration = this._register( - this._createConfiguration( - codeEditorWidgetOptions.isSimpleWidget || false, - codeEditorWidgetOptions.contextMenuId ?? - (codeEditorWidgetOptions.isSimpleWidget - ? MenuId.SimpleEditorContext - : MenuId.EditorContext), - options, - accessibilityService, - ), - ); - - this._register( - this._configuration.onDidChange((e) => { - this._onDidChangeConfiguration.fire(e); - - const options = this._configuration.options; - - if (e.hasChanged(EditorOption.layoutInfo)) { - const layoutInfo = options.get(EditorOption.layoutInfo); - - this._onDidLayoutChange.fire(layoutInfo); - } - }), - ); + this._configuration = this._register(this._createConfiguration(codeEditorWidgetOptions.isSimpleWidget || false, + codeEditorWidgetOptions.contextMenuId ?? (codeEditorWidgetOptions.isSimpleWidget ? MenuId.SimpleEditorContext : MenuId.EditorContext), + options, accessibilityService)); + this._register(this._configuration.onDidChange((e) => { + this._onDidChangeConfiguration.fire(e); - this._contextKeyService = this._register( - contextKeyService.createScoped(this._domElement), - ); + const options = this._configuration.options; + if (e.hasChanged(EditorOption.layoutInfo)) { + const layoutInfo = options.get(EditorOption.layoutInfo); + this._onDidLayoutChange.fire(layoutInfo); + } + })); + this._contextKeyService = this._register(contextKeyService.createScoped(this._domElement)); this._notificationService = notificationService; - this._codeEditorService = codeEditorService; - this._commandService = commandService; - this._themeService = themeService; + this._register(new EditorContextKeysManager(this, this._contextKeyService)); + this._register(new EditorModeContext(this, this._contextKeyService, languageFeaturesService)); - this._register( - new EditorContextKeysManager(this, this._contextKeyService), - ); - - this._register( - new EditorModeContext( - this, - this._contextKeyService, - languageFeaturesService, - ), - ); - - this._instantiationService = this._register( - instantiationService.createChild( - new ServiceCollection([ - IContextKeyService, - this._contextKeyService, - ]), - ), - ); + this._instantiationService = this._register(instantiationService.createChild(new ServiceCollection([IContextKeyService, this._contextKeyService]))); this._modelData = null; - this._focusTracker = new CodeEditorWidgetFocusTracker( - domElement, - this._overflowWidgetsDomNode, - ); - - this._register( - this._focusTracker.onChange(() => { - this._editorWidgetFocus.setValue(this._focusTracker.hasFocus()); - }), - ); + this._focusTracker = new CodeEditorWidgetFocusTracker(domElement, this._overflowWidgetsDomNode); + this._register(this._focusTracker.onChange(() => { + this._editorWidgetFocus.setValue(this._focusTracker.hasFocus()); + })); this._contentWidgets = {}; - this._overlayWidgets = {}; - this._glyphMarginWidgets = {}; let contributions: IEditorContributionDescription[]; - if (Array.isArray(codeEditorWidgetOptions.contributions)) { contributions = codeEditorWidgetOptions.contributions; } else { contributions = EditorExtensionsRegistry.getEditorContributions(); } - - this._contributions.initialize( - this, - contributions, - this._instantiationService, - ); + this._contributions.initialize(this, contributions, this._instantiationService); for (const action of EditorExtensionsRegistry.getEditorActions()) { if (this._actions.has(action.id)) { - onUnexpectedError( - new Error( - `Cannot have two actions with the same id ${action.id}`, - ), - ); - + onUnexpectedError(new Error(`Cannot have two actions with the same id ${action.id}`)); continue; } - const internalAction = new InternalEditorAction( action.id, action.label, @@ -739,75 +330,54 @@ export class CodeEditorWidget action.metadata, action.precondition ?? undefined, (args: unknown): Promise => { - return this._instantiationService.invokeFunction( - (accessor) => { - return Promise.resolve( - action.runEditorCommand(accessor, this, args), - ); - }, - ); + return this._instantiationService.invokeFunction((accessor) => { + return Promise.resolve(action.runEditorCommand(accessor, this, args)); + }); }, - this._contextKeyService, + this._contextKeyService ); - this._actions.set(internalAction.id, internalAction); } const isDropIntoEnabled = () => { - return ( - !this._configuration.options.get(EditorOption.readOnly) && - this._configuration.options.get(EditorOption.dropIntoEditor) - .enabled - ); + return !this._configuration.options.get(EditorOption.readOnly) + && this._configuration.options.get(EditorOption.dropIntoEditor).enabled; }; - this._register( - new dom.DragAndDropObserver(this._domElement, { - onDragOver: (e) => { - if (!isDropIntoEnabled()) { - return; - } - - const target = this.getTargetAtClientPoint( - e.clientX, - e.clientY, - ); - - if (target?.position) { - this.showDropIndicatorAt(target.position); - } - }, - onDrop: async (e) => { - if (!isDropIntoEnabled()) { - return; - } + this._register(new dom.DragAndDropObserver(this._domElement, { + onDragOver: e => { + if (!isDropIntoEnabled()) { + return; + } - this.removeDropIndicator(); + const target = this.getTargetAtClientPoint(e.clientX, e.clientY); + if (target?.position) { + this.showDropIndicatorAt(target.position); + } + }, + onDrop: async e => { + if (!isDropIntoEnabled()) { + return; + } - if (!e.dataTransfer) { - return; - } + this.removeDropIndicator(); - const target = this.getTargetAtClientPoint( - e.clientX, - e.clientY, - ); + if (!e.dataTransfer) { + return; + } - if (target?.position) { - this._onDropIntoEditor.fire({ - position: target.position, - event: e, - }); - } - }, - onDragLeave: () => { - this.removeDropIndicator(); - }, - onDragEnd: () => { - this.removeDropIndicator(); - }, - }), - ); + const target = this.getTargetAtClientPoint(e.clientX, e.clientY); + if (target?.position) { + this._onDropIntoEditor.fire({ position: target.position, event: e }); + } + }, + onDragLeave: () => { + this.removeDropIndicator(); + }, + onDragEnd: () => { + this.removeDropIndicator(); + }, + })); this._codeEditorService.addCodeEditor(this); } @@ -816,23 +386,12 @@ export class CodeEditorWidget this._modelData?.view.writeScreenReaderContent(reason); } - protected _createConfiguration( - isSimpleWidget: boolean, - contextMenuId: MenuId, - options: Readonly, - accessibilityService: IAccessibilityService, - ): EditorConfiguration { - return new EditorConfiguration( - isSimpleWidget, - contextMenuId, - options, - this._domElement, - accessibilityService, - ); + protected _createConfiguration(isSimpleWidget: boolean, contextMenuId: MenuId, options: Readonly, accessibilityService: IAccessibilityService): EditorConfiguration { + return new EditorConfiguration(isSimpleWidget, contextMenuId, options, this._domElement, accessibilityService); } public getId(): string { - return this.getEditorType() + ":" + this._id; + return this.getEditorType() + ':' + this._id; } public getEditorType(): string { @@ -843,15 +402,11 @@ export class CodeEditorWidget this._codeEditorService.removeCodeEditor(this); this._focusTracker.dispose(); - this._actions.clear(); - this._contentWidgets = {}; - this._overlayWidgets = {}; this._removeDecorationTypes(); - this._postDetachModelCleanup(this._detachModel()); this._onDidDispose.fire(); @@ -863,9 +418,7 @@ export class CodeEditorWidget return this._instantiationService.invokeFunction(fn); } - public updateOptions( - newOptions: Readonly | undefined, - ): void { + public updateOptions(newOptions: Readonly | undefined): void { this._configuration.updateOptions(newOptions || {}); } @@ -873,9 +426,7 @@ export class CodeEditorWidget return this._configuration.options; } - public getOption( - id: T, - ): FindComputedEditorOptionValueById { + public getOption(id: T): FindComputedEditorOptionValueById { return this._configuration.options.get(id); } @@ -887,54 +438,34 @@ export class CodeEditorWidget return this._overflowWidgetsDomNode; } - public getConfiguredWordAtPosition( - position: Position, - ): IWordAtPosition | null { + public getConfiguredWordAtPosition(position: Position): IWordAtPosition | null { if (!this._modelData) { return null; } - - return WordOperations.getWordAtPosition( - this._modelData.model, - this._configuration.options.get(EditorOption.wordSeparators), - this._configuration.options.get(EditorOption.wordSegmenterLocales), - position, - ); + return WordOperations.getWordAtPosition(this._modelData.model, this._configuration.options.get(EditorOption.wordSeparators), this._configuration.options.get(EditorOption.wordSegmenterLocales), position); } - public getValue( - options: { preserveBOM: boolean; lineEnding: string } | null = null, - ): string { + public getValue(options: { preserveBOM: boolean; lineEnding: string } | null = null): string { if (!this._modelData) { - return ""; + return ''; } - const preserveBOM: boolean = - options && options.preserveBOM ? true : false; - + const preserveBOM: boolean = (options && options.preserveBOM) ? true : false; let eolPreference = EndOfLinePreference.TextDefined; - - if (options && options.lineEnding && options.lineEnding === "\n") { + if (options && options.lineEnding && options.lineEnding === '\n') { eolPreference = EndOfLinePreference.LF; - } else if ( - options && - options.lineEnding && - options.lineEnding === "\r\n" - ) { + } else if (options && options.lineEnding && options.lineEnding === '\r\n') { eolPreference = EndOfLinePreference.CRLF; } - return this._modelData.model.getValue(eolPreference, preserveBOM); } public setValue(newValue: string): void { try { this._beginUpdate(); - if (!this._modelData) { return; } - this._modelData.model.setValue(newValue); } finally { this._endUpdate(); @@ -945,27 +476,17 @@ export class CodeEditorWidget if (!this._modelData) { return null; } - return this._modelData.model; } - public setModel( - _model: - | ITextModel - | editorCommon.IDiffEditorModel - | editorCommon.IDiffEditorViewModel - | null = null, - ): void { + public setModel(_model: ITextModel | editorCommon.IDiffEditorModel | editorCommon.IDiffEditorViewModel | null = null): void { try { this._beginUpdate(); - const model = _model; - if (this._modelData === null && model === null) { // Current model is the new model return; } - if (this._modelData && this._modelData.model === model) { // Current model is the new model return; @@ -973,29 +494,22 @@ export class CodeEditorWidget const e: editorCommon.IModelChangedEvent = { oldModelUrl: this._modelData?.model.uri || null, - newModelUrl: model?.uri || null, + newModelUrl: model?.uri || null }; - this._onWillChangeModel.fire(e); const hasTextFocus = this.hasTextFocus(); - const detachedModel = this._detachModel(); - this._attachModel(model); - if (hasTextFocus && this.hasModel()) { this.focus(); } this._removeDecorationTypes(); - this._onDidChangeModel.fire(e); - this._postDetachModelCleanup(detachedModel); - this._contributionsDisposable = - this._contributions.onAfterModelAttached(); + this._contributionsDisposable = this._contributions.onAfterModelAttached(); } finally { this._endUpdate(); } @@ -1003,16 +517,13 @@ export class CodeEditorWidget private _removeDecorationTypes(): void { this._decorationTypeKeysToIds = {}; - if (this._decorationTypeSubtypes) { for (const decorationType in this._decorationTypeSubtypes) { const subTypes = this._decorationTypeSubtypes[decorationType]; - for (const subType in subTypes) { - this._removeDecorationType(decorationType + "-" + subType); + this._removeDecorationType(decorationType + '-' + subType); } } - this._decorationTypeSubtypes = {}; } } @@ -1021,7 +532,6 @@ export class CodeEditorWidget if (!this._modelData) { return []; } - return this._modelData.viewModel.getVisibleRanges(); } @@ -1029,7 +539,6 @@ export class CodeEditorWidget if (!this._modelData) { return []; } - return this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow(); } @@ -1037,111 +546,51 @@ export class CodeEditorWidget if (!this._modelData) { return []; } - return this._modelData.viewModel.viewLayout.getWhitespaces(); } - private static _getVerticalOffsetAfterPosition( - modelData: ModelData, - modelLineNumber: number, - modelColumn: number, - includeViewZones: boolean, - ): number { + private static _getVerticalOffsetAfterPosition(modelData: ModelData, modelLineNumber: number, modelColumn: number, includeViewZones: boolean): number { const modelPosition = modelData.model.validatePosition({ lineNumber: modelLineNumber, - column: modelColumn, + column: modelColumn }); - - const viewPosition = - modelData.viewModel.coordinatesConverter.convertModelPositionToViewPosition( - modelPosition, - ); - - return modelData.viewModel.viewLayout.getVerticalOffsetAfterLineNumber( - viewPosition.lineNumber, - includeViewZones, - ); + const viewPosition = modelData.viewModel.coordinatesConverter.convertModelPositionToViewPosition(modelPosition); + return modelData.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(viewPosition.lineNumber, includeViewZones); } - public getTopForLineNumber( - lineNumber: number, - includeViewZones: boolean = false, - ): number { + public getTopForLineNumber(lineNumber: number, includeViewZones: boolean = false): number { if (!this._modelData) { return -1; } - - return CodeEditorWidget._getVerticalOffsetForPosition( - this._modelData, - lineNumber, - 1, - includeViewZones, - ); + return CodeEditorWidget._getVerticalOffsetForPosition(this._modelData, lineNumber, 1, includeViewZones); } public getTopForPosition(lineNumber: number, column: number): number { if (!this._modelData) { return -1; } - - return CodeEditorWidget._getVerticalOffsetForPosition( - this._modelData, - lineNumber, - column, - false, - ); + return CodeEditorWidget._getVerticalOffsetForPosition(this._modelData, lineNumber, column, false); } - private static _getVerticalOffsetForPosition( - modelData: ModelData, - modelLineNumber: number, - modelColumn: number, - includeViewZones: boolean = false, - ): number { + private static _getVerticalOffsetForPosition(modelData: ModelData, modelLineNumber: number, modelColumn: number, includeViewZones: boolean = false): number { const modelPosition = modelData.model.validatePosition({ lineNumber: modelLineNumber, - column: modelColumn, + column: modelColumn }); - - const viewPosition = - modelData.viewModel.coordinatesConverter.convertModelPositionToViewPosition( - modelPosition, - ); - - return modelData.viewModel.viewLayout.getVerticalOffsetForLineNumber( - viewPosition.lineNumber, - includeViewZones, - ); + const viewPosition = modelData.viewModel.coordinatesConverter.convertModelPositionToViewPosition(modelPosition); + return modelData.viewModel.viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber, includeViewZones); } - public getBottomForLineNumber( - lineNumber: number, - includeViewZones: boolean = false, - ): number { + public getBottomForLineNumber(lineNumber: number, includeViewZones: boolean = false): number { if (!this._modelData) { return -1; } - const maxCol = this._modelData.model.getLineMaxColumn(lineNumber); - - return CodeEditorWidget._getVerticalOffsetAfterPosition( - this._modelData, - lineNumber, - maxCol, - includeViewZones, - ); + return CodeEditorWidget._getVerticalOffsetAfterPosition(this._modelData, lineNumber, maxCol, includeViewZones); } - public setHiddenAreas( - ranges: IRange[], - source?: unknown, - forceUpdate?: boolean, - ): void { - this._modelData?.viewModel.setHiddenAreas( - ranges.map((r) => Range.lift(r)), - source, - forceUpdate, - ); + public setHiddenAreas(ranges: IRange[], source?: unknown, forceUpdate?: boolean): void { + this._modelData?.viewModel.setHiddenAreas(ranges.map(r => Range.lift(r)), source, forceUpdate); } public getVisibleColumnFromPosition(rawPosition: IPosition): number { @@ -1150,16 +599,9 @@ export class CodeEditorWidget } const position = this._modelData.model.validatePosition(rawPosition); - const tabSize = this._modelData.model.getOptions().tabSize; - return ( - CursorColumns.visibleColumnFromColumn( - this._modelData.model.getLineContent(position.lineNumber), - position.column, - tabSize, - ) + 1 - ); + return CursorColumns.visibleColumnFromColumn(this._modelData.model.getLineContent(position.lineNumber), position.column, tabSize) + 1; } public getStatusbarColumn(rawPosition: IPosition): number { @@ -1168,191 +610,121 @@ export class CodeEditorWidget } const position = this._modelData.model.validatePosition(rawPosition); - const tabSize = this._modelData.model.getOptions().tabSize; - return CursorColumns.toStatusbarColumn( - this._modelData.model.getLineContent(position.lineNumber), - position.column, - tabSize, - ); + return CursorColumns.toStatusbarColumn(this._modelData.model.getLineContent(position.lineNumber), position.column, tabSize); } public getPosition(): Position | null { if (!this._modelData) { return null; } - return this._modelData.viewModel.getPosition(); } - public setPosition(position: IPosition, source: string = "api"): void { + public setPosition(position: IPosition, source: string = 'api'): void { if (!this._modelData) { return; } - if (!Position.isIPosition(position)) { - throw new Error("Invalid arguments"); + throw new Error('Invalid arguments'); } - - this._modelData.viewModel.setSelections(source, [ - { - selectionStartLineNumber: position.lineNumber, - selectionStartColumn: position.column, - positionLineNumber: position.lineNumber, - positionColumn: position.column, - }, - ]); + this._modelData.viewModel.setSelections(source, [{ + selectionStartLineNumber: position.lineNumber, + selectionStartColumn: position.column, + positionLineNumber: position.lineNumber, + positionColumn: position.column + }]); } - private _sendRevealRange( - modelRange: Range, - verticalType: VerticalRevealType, - revealHorizontal: boolean, - scrollType: editorCommon.ScrollType, - ): void { + private _sendRevealRange(modelRange: Range, verticalType: VerticalRevealType, revealHorizontal: boolean, scrollType: editorCommon.ScrollType): void { if (!this._modelData) { return; } - if (!Range.isIRange(modelRange)) { - throw new Error("Invalid arguments"); + throw new Error('Invalid arguments'); } + const validatedModelRange = this._modelData.model.validateRange(modelRange); + const viewRange = this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(validatedModelRange); - const validatedModelRange = - this._modelData.model.validateRange(modelRange); - - const viewRange = - this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange( - validatedModelRange, - ); - - this._modelData.viewModel.revealRange( - "api", - revealHorizontal, - viewRange, - verticalType, - scrollType, - ); + this._modelData.viewModel.revealRange('api', revealHorizontal, viewRange, verticalType, scrollType); } - public revealLine( - lineNumber: number, - scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth, - ): void { + public revealLine(lineNumber: number, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { this._revealLine(lineNumber, VerticalRevealType.Simple, scrollType); } - public revealLineInCenter( - lineNumber: number, - scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth, - ): void { + public revealLineInCenter(lineNumber: number, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { this._revealLine(lineNumber, VerticalRevealType.Center, scrollType); } - public revealLineInCenterIfOutsideViewport( - lineNumber: number, - scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth, - ): void { - this._revealLine( - lineNumber, - VerticalRevealType.CenterIfOutsideViewport, - scrollType, - ); + public revealLineInCenterIfOutsideViewport(lineNumber: number, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { + this._revealLine(lineNumber, VerticalRevealType.CenterIfOutsideViewport, scrollType); } - public revealLineNearTop( - lineNumber: number, - scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth, - ): void { + public revealLineNearTop(lineNumber: number, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { this._revealLine(lineNumber, VerticalRevealType.NearTop, scrollType); } - private _revealLine( - lineNumber: number, - revealType: VerticalRevealType, - scrollType: editorCommon.ScrollType, - ): void { - if (typeof lineNumber !== "number") { - throw new Error("Invalid arguments"); + private _revealLine(lineNumber: number, revealType: VerticalRevealType, scrollType: editorCommon.ScrollType): void { + if (typeof lineNumber !== 'number') { + throw new Error('Invalid arguments'); } this._sendRevealRange( new Range(lineNumber, 1, lineNumber, 1), revealType, false, - scrollType, + scrollType ); } - public revealPosition( - position: IPosition, - scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth, - ): void { + public revealPosition(position: IPosition, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { this._revealPosition( position, VerticalRevealType.Simple, true, - scrollType, + scrollType ); } - public revealPositionInCenter( - position: IPosition, - scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth, - ): void { + public revealPositionInCenter(position: IPosition, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { this._revealPosition( position, VerticalRevealType.Center, true, - scrollType, + scrollType ); } - public revealPositionInCenterIfOutsideViewport( - position: IPosition, - scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth, - ): void { + public revealPositionInCenterIfOutsideViewport(position: IPosition, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { this._revealPosition( position, VerticalRevealType.CenterIfOutsideViewport, true, - scrollType, + scrollType ); } - public revealPositionNearTop( - position: IPosition, - scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth, - ): void { + public revealPositionNearTop(position: IPosition, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { this._revealPosition( position, VerticalRevealType.NearTop, true, - scrollType, + scrollType ); } - private _revealPosition( - position: IPosition, - verticalType: VerticalRevealType, - revealHorizontal: boolean, - scrollType: editorCommon.ScrollType, - ): void { + private _revealPosition(position: IPosition, verticalType: VerticalRevealType, revealHorizontal: boolean, scrollType: editorCommon.ScrollType): void { if (!Position.isIPosition(position)) { - throw new Error("Invalid arguments"); + throw new Error('Invalid arguments'); } this._sendRevealRange( - new Range( - position.lineNumber, - position.column, - position.lineNumber, - position.column, - ), + new Range(position.lineNumber, position.column, position.lineNumber, position.column), verticalType, revealHorizontal, - scrollType, + scrollType ); } @@ -1360,7 +732,6 @@ export class CodeEditorWidget if (!this._modelData) { return null; } - return this._modelData.viewModel.getSelection(); } @@ -1368,25 +739,19 @@ export class CodeEditorWidget if (!this._modelData) { return null; } - return this._modelData.viewModel.getSelections(); } public setSelection(range: IRange, source?: string): void; - public setSelection(editorRange: Range, source?: string): void; - public setSelection(selection: ISelection, source?: string): void; - public setSelection(editorSelection: Selection, source?: string): void; - - public setSelection(something: any, source: string = "api"): void { + public setSelection(something: any, source: string = 'api'): void { const isSelection = Selection.isISelection(something); - const isRange = Range.isIRange(something); if (!isSelection && !isRange) { - throw new Error("Invalid arguments"); + throw new Error('Invalid arguments'); } if (isSelection) { @@ -1397,9 +762,8 @@ export class CodeEditorWidget selectionStartLineNumber: something.startLineNumber, selectionStartColumn: something.startColumn, positionLineNumber: something.endLineNumber, - positionColumn: something.endColumn, + positionColumn: something.endColumn }; - this._setSelectionImpl(selection, source); } } @@ -1408,188 +772,138 @@ export class CodeEditorWidget if (!this._modelData) { return; } - - const selection = new Selection( - sel.selectionStartLineNumber, - sel.selectionStartColumn, - sel.positionLineNumber, - sel.positionColumn, - ); - + const selection = new Selection(sel.selectionStartLineNumber, sel.selectionStartColumn, sel.positionLineNumber, sel.positionColumn); this._modelData.viewModel.setSelections(source, [selection]); } - public revealLines( - startLineNumber: number, - endLineNumber: number, - scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth, - ): void { + public revealLines(startLineNumber: number, endLineNumber: number, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { this._revealLines( startLineNumber, endLineNumber, VerticalRevealType.Simple, - scrollType, + scrollType ); } - public revealLinesInCenter( - startLineNumber: number, - endLineNumber: number, - scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth, - ): void { + public revealLinesInCenter(startLineNumber: number, endLineNumber: number, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { this._revealLines( startLineNumber, endLineNumber, VerticalRevealType.Center, - scrollType, + scrollType ); } - public revealLinesInCenterIfOutsideViewport( - startLineNumber: number, - endLineNumber: number, - scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth, - ): void { + public revealLinesInCenterIfOutsideViewport(startLineNumber: number, endLineNumber: number, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { this._revealLines( startLineNumber, endLineNumber, VerticalRevealType.CenterIfOutsideViewport, - scrollType, + scrollType ); } - public revealLinesNearTop( - startLineNumber: number, - endLineNumber: number, - scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth, - ): void { + public revealLinesNearTop(startLineNumber: number, endLineNumber: number, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { this._revealLines( startLineNumber, endLineNumber, VerticalRevealType.NearTop, - scrollType, + scrollType ); } - private _revealLines( - startLineNumber: number, - endLineNumber: number, - verticalType: VerticalRevealType, - scrollType: editorCommon.ScrollType, - ): void { - if ( - typeof startLineNumber !== "number" || - typeof endLineNumber !== "number" - ) { - throw new Error("Invalid arguments"); + private _revealLines(startLineNumber: number, endLineNumber: number, verticalType: VerticalRevealType, scrollType: editorCommon.ScrollType): void { + if (typeof startLineNumber !== 'number' || typeof endLineNumber !== 'number') { + throw new Error('Invalid arguments'); } this._sendRevealRange( new Range(startLineNumber, 1, endLineNumber, 1), verticalType, false, - scrollType, + scrollType ); } - public revealRange( - range: IRange, - scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth, - revealVerticalInCenter: boolean = false, - revealHorizontal: boolean = true, - ): void { + public revealRange(range: IRange, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth, revealVerticalInCenter: boolean = false, revealHorizontal: boolean = true): void { this._revealRange( range, - revealVerticalInCenter - ? VerticalRevealType.Center - : VerticalRevealType.Simple, + revealVerticalInCenter ? VerticalRevealType.Center : VerticalRevealType.Simple, revealHorizontal, - scrollType, + scrollType ); } - public revealRangeInCenter( - range: IRange, - scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth, - ): void { - this._revealRange(range, VerticalRevealType.Center, true, scrollType); + public revealRangeInCenter(range: IRange, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { + this._revealRange( + range, + VerticalRevealType.Center, + true, + scrollType + ); } - public revealRangeInCenterIfOutsideViewport( - range: IRange, - scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth, - ): void { + public revealRangeInCenterIfOutsideViewport(range: IRange, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { this._revealRange( range, VerticalRevealType.CenterIfOutsideViewport, true, - scrollType, + scrollType ); } - public revealRangeNearTop( - range: IRange, - scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth, - ): void { - this._revealRange(range, VerticalRevealType.NearTop, true, scrollType); + public revealRangeNearTop(range: IRange, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { + this._revealRange( + range, + VerticalRevealType.NearTop, + true, + scrollType + ); } - public revealRangeNearTopIfOutsideViewport( - range: IRange, - scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth, - ): void { + public revealRangeNearTopIfOutsideViewport(range: IRange, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { this._revealRange( range, VerticalRevealType.NearTopIfOutsideViewport, true, - scrollType, + scrollType ); } - public revealRangeAtTop( - range: IRange, - scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth, - ): void { - this._revealRange(range, VerticalRevealType.Top, true, scrollType); + public revealRangeAtTop(range: IRange, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { + this._revealRange( + range, + VerticalRevealType.Top, + true, + scrollType + ); } - private _revealRange( - range: IRange, - verticalType: VerticalRevealType, - revealHorizontal: boolean, - scrollType: editorCommon.ScrollType, - ): void { + private _revealRange(range: IRange, verticalType: VerticalRevealType, revealHorizontal: boolean, scrollType: editorCommon.ScrollType): void { if (!Range.isIRange(range)) { - throw new Error("Invalid arguments"); + throw new Error('Invalid arguments'); } this._sendRevealRange( Range.lift(range), verticalType, revealHorizontal, - scrollType, + scrollType ); } - public setSelections( - ranges: readonly ISelection[], - source: string = "api", - reason = CursorChangeReason.NotSet, - ): void { + public setSelections(ranges: readonly ISelection[], source: string = 'api', reason = CursorChangeReason.NotSet): void { if (!this._modelData) { return; } - if (!ranges || ranges.length === 0) { - throw new Error("Invalid arguments"); + throw new Error('Invalid arguments'); } - for (let i = 0, len = ranges.length; i < len; i++) { if (!Selection.isISelection(ranges[i])) { - throw new Error("Invalid arguments"); + throw new Error('Invalid arguments'); } } - this._modelData.viewModel.setSelections(source, ranges, reason); } @@ -1597,7 +911,6 @@ export class CodeEditorWidget if (!this._modelData) { return -1; } - return this._modelData.viewModel.viewLayout.getContentWidth(); } @@ -1605,15 +918,12 @@ export class CodeEditorWidget if (!this._modelData) { return -1; } - return this._modelData.viewModel.viewLayout.getScrollWidth(); } - public getScrollLeft(): number { if (!this._modelData) { return -1; } - return this._modelData.viewModel.viewLayout.getCurrentScrollLeft(); } @@ -1621,7 +931,6 @@ export class CodeEditorWidget if (!this._modelData) { return -1; } - return this._modelData.viewModel.viewLayout.getContentHeight(); } @@ -1629,77 +938,47 @@ export class CodeEditorWidget if (!this._modelData) { return -1; } - return this._modelData.viewModel.viewLayout.getScrollHeight(); } - public getScrollTop(): number { if (!this._modelData) { return -1; } - return this._modelData.viewModel.viewLayout.getCurrentScrollTop(); } - public setScrollLeft( - newScrollLeft: number, - scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Immediate, - ): void { + public setScrollLeft(newScrollLeft: number, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Immediate): void { if (!this._modelData) { return; } - - if (typeof newScrollLeft !== "number") { - throw new Error("Invalid arguments"); + if (typeof newScrollLeft !== 'number') { + throw new Error('Invalid arguments'); } - - this._modelData.viewModel.viewLayout.setScrollPosition( - { - scrollLeft: newScrollLeft, - }, - scrollType, - ); + this._modelData.viewModel.viewLayout.setScrollPosition({ + scrollLeft: newScrollLeft + }, scrollType); } - - public setScrollTop( - newScrollTop: number, - scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Immediate, - ): void { + public setScrollTop(newScrollTop: number, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Immediate): void { if (!this._modelData) { return; } - - if (typeof newScrollTop !== "number") { - throw new Error("Invalid arguments"); + if (typeof newScrollTop !== 'number') { + throw new Error('Invalid arguments'); } - - this._modelData.viewModel.viewLayout.setScrollPosition( - { - scrollTop: newScrollTop, - }, - scrollType, - ); + this._modelData.viewModel.viewLayout.setScrollPosition({ + scrollTop: newScrollTop + }, scrollType); } - - public setScrollPosition( - position: editorCommon.INewScrollPosition, - scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Immediate, - ): void { + public setScrollPosition(position: editorCommon.INewScrollPosition, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Immediate): void { if (!this._modelData) { return; } - - this._modelData.viewModel.viewLayout.setScrollPosition( - position, - scrollType, - ); + this._modelData.viewModel.viewLayout.setScrollPosition(position, scrollType); } - public hasPendingScrollAnimation(): boolean { if (!this._modelData) { return false; } - return this._modelData.viewModel.viewLayout.hasPendingScrollAnimation(); } @@ -1707,17 +986,13 @@ export class CodeEditorWidget if (!this._modelData) { return null; } - const contributionsState = this._contributions.saveViewState(); - const cursorState = this._modelData.viewModel.saveCursorState(); - const viewState = this._modelData.viewModel.saveState(); - return { cursorState: cursorState, viewState: viewState, - contributionsState: contributionsState, + contributionsState: contributionsState }; } @@ -1725,37 +1000,20 @@ export class CodeEditorWidget if (!this._modelData || !this._modelData.hasRealView) { return; } - const codeEditorState = s as editorCommon.ICodeEditorViewState | null; - - if ( - codeEditorState && - codeEditorState.cursorState && - codeEditorState.viewState - ) { + if (codeEditorState && codeEditorState.cursorState && codeEditorState.viewState) { const cursorState = codeEditorState.cursorState; - if (Array.isArray(cursorState)) { if (cursorState.length > 0) { - this._modelData.viewModel.restoreCursorState( - cursorState, - ); + this._modelData.viewModel.restoreCursorState(cursorState); } } else { // Backwards compatibility - this._modelData.viewModel.restoreCursorState([ - cursorState, - ]); + this._modelData.viewModel.restoreCursorState([cursorState]); } - this._contributions.restoreViewState( - codeEditorState.contributionsState || {}, - ); - - const reducedState = this._modelData.viewModel.reduceRestoreState( - codeEditorState.viewState, - ); - + this._contributions.restoreViewState(codeEditorState.contributionsState || {}); + const reducedState = this._modelData.viewModel.reduceRestoreState(codeEditorState.viewState); this._modelData.view.restoreState(reducedState); } } @@ -1770,13 +1028,10 @@ export class CodeEditorWidget public onHide(): void { this._modelData?.view.refreshFocusState(); - this._focusTracker.refreshState(); } - public getContribution( - id: string, - ): T | null { + public getContribution(id: string): T | null { return this._contributions.get(id) as T | null; } @@ -1787,7 +1042,7 @@ export class CodeEditorWidget public getSupportedActions(): editorCommon.IEditorAction[] { let result = this.getActions(); - result = result.filter((action) => action.isSupported()); + result = result.filter(action => action.isSupported()); return result; } @@ -1796,102 +1051,48 @@ export class CodeEditorWidget return this._actions.get(id) || null; } - public trigger( - source: string | null | undefined, - handlerId: string, - payload: any, - ): void { + public trigger(source: string | null | undefined, handlerId: string, payload: any): void { payload = payload || {}; try { - this._onWillTriggerEditorOperationEvent.fire({ - source: source, - handlerId: handlerId, - payload: payload, - }); - + this._onWillTriggerEditorOperationEvent.fire({ source: source, handlerId: handlerId, payload: payload }); this._beginUpdate(); switch (handlerId) { case editorCommon.Handler.CompositionStart: this._startComposition(); - return; - case editorCommon.Handler.CompositionEnd: this._endComposition(source); - return; - case editorCommon.Handler.Type: { const args = >payload; - - this._type(source, args.text || ""); - + this._type(source, args.text || ''); return; } - case editorCommon.Handler.ReplacePreviousChar: { - const args = < - Partial - >payload; - - this._compositionType( - source, - args.text || "", - args.replaceCharCnt || 0, - 0, - 0, - ); - + const args = >payload; + this._compositionType(source, args.text || '', args.replaceCharCnt || 0, 0, 0); return; } - case editorCommon.Handler.CompositionType: { - const args = >( - payload - ); - - this._compositionType( - source, - args.text || "", - args.replacePrevCharCnt || 0, - args.replaceNextCharCnt || 0, - args.positionDelta || 0, - ); - + const args = >payload; + this._compositionType(source, args.text || '', args.replacePrevCharCnt || 0, args.replaceNextCharCnt || 0, args.positionDelta || 0); return; } - case editorCommon.Handler.Paste: { const args = >payload; - - this._paste( - source, - args.text || "", - args.pasteOnNewLine || false, - args.multicursorText || null, - args.mode || null, - args.clipboardEvent, - ); - + this._paste(source, args.text || '', args.pasteOnNewLine || false, args.multicursorText || null, args.mode || null, args.clipboardEvent); return; } - case editorCommon.Handler.Cut: this._cut(source); - return; } const action = this.getAction(handlerId); - if (action) { - Promise.resolve(action.run(payload)).then( - undefined, - onUnexpectedError, - ); - + Promise.resolve(action.run(payload)).then(undefined, onUnexpectedError); return; } @@ -1917,9 +1118,8 @@ export class CodeEditorWidget if (!this._modelData) { return; } - + this.inComposition = true; this._modelData.viewModel.startComposition(); - this._onDidCompositionStart.fire(); } @@ -1927,9 +1127,8 @@ export class CodeEditorWidget if (!this._modelData) { return; } - + this.inComposition = false; this._modelData.viewModel.endComposition(source); - this._onDidCompositionEnd.fire(); } @@ -1937,68 +1136,35 @@ export class CodeEditorWidget if (!this._modelData || text.length === 0) { return; } - - if (source === "keyboard") { + if (source === 'keyboard') { this._onWillType.fire(text); } - this._modelData.viewModel.type(text, source); - - if (source === "keyboard") { + if (source === 'keyboard') { this._onDidType.fire(text); } } - private _compositionType( - source: string | null | undefined, - text: string, - replacePrevCharCnt: number, - replaceNextCharCnt: number, - positionDelta: number, - ): void { + private _compositionType(source: string | null | undefined, text: string, replacePrevCharCnt: number, replaceNextCharCnt: number, positionDelta: number): void { if (!this._modelData) { return; } - - this._modelData.viewModel.compositionType( - text, - replacePrevCharCnt, - replaceNextCharCnt, - positionDelta, - source, - ); + this._modelData.viewModel.compositionType(text, replacePrevCharCnt, replaceNextCharCnt, positionDelta, source); } - private _paste( - source: string | null | undefined, - text: string, - pasteOnNewLine: boolean, - multicursorText: string[] | null, - mode: string | null, - clipboardEvent?: ClipboardEvent, - ): void { + private _paste(source: string | null | undefined, text: string, pasteOnNewLine: boolean, multicursorText: string[] | null, mode: string | null, clipboardEvent?: ClipboardEvent): void { if (!this._modelData) { return; } - const viewModel = this._modelData.viewModel; - const startPosition = viewModel.getSelection().getStartPosition(); - viewModel.paste(text, pasteOnNewLine, multicursorText, source); - const endPosition = viewModel.getSelection().getStartPosition(); - - if (source === "keyboard") { + if (source === 'keyboard') { this._onDidPaste.fire({ clipboardEvent, - range: new Range( - startPosition.lineNumber, - startPosition.column, - endPosition.lineNumber, - endPosition.column, - ), - languageId: mode, + range: new Range(startPosition.lineNumber, startPosition.column, endPosition.lineNumber, endPosition.column), + languageId: mode }); } } @@ -2007,28 +1173,17 @@ export class CodeEditorWidget if (!this._modelData) { return; } - this._modelData.viewModel.cut(source); } - private _triggerEditorCommand( - source: string | null | undefined, - handlerId: string, - payload: any, - ): boolean { + private _triggerEditorCommand(source: string | null | undefined, handlerId: string, payload: any): boolean { const command = EditorExtensionsRegistry.getEditorCommand(handlerId); - if (command) { payload = payload || {}; - payload.source = source; - this._instantiationService.invokeFunction((accessor) => { - Promise.resolve( - command.runEditorCommand(accessor, this, payload), - ).then(undefined, onUnexpectedError); + Promise.resolve(command.runEditorCommand(accessor, this, payload)).then(undefined, onUnexpectedError); }); - return true; } @@ -2039,7 +1194,6 @@ export class CodeEditorWidget if (!this._modelData) { return null; } - return this._modelData.viewModel; } @@ -2047,14 +1201,11 @@ export class CodeEditorWidget if (!this._modelData) { return false; } - if (this._configuration.options.get(EditorOption.readOnly)) { // read only editor => sorry! return false; } - this._modelData.model.pushStackElement(); - return true; } @@ -2062,33 +1213,24 @@ export class CodeEditorWidget if (!this._modelData) { return false; } - if (this._configuration.options.get(EditorOption.readOnly)) { // read only editor => sorry! return false; } - this._modelData.model.popStackElement(); - return true; } - public executeEdits( - source: string | null | undefined, - edits: IIdentifiedSingleEditOperation[], - endCursorState?: ICursorStateComputer | Selection[], - ): boolean { + public executeEdits(source: string | null | undefined, edits: IIdentifiedSingleEditOperation[], endCursorState?: ICursorStateComputer | Selection[]): boolean { if (!this._modelData) { return false; } - if (this._configuration.options.get(EditorOption.readOnly)) { // read only editor => sorry! return false; } let cursorStateComputer: ICursorStateComputer; - if (!endCursorState) { cursorStateComputer = () => null; } else if (Array.isArray(endCursorState)) { @@ -2099,51 +1241,33 @@ export class CodeEditorWidget this._onBeforeExecuteEdit.fire({ source: source ?? undefined }); - this._modelData.viewModel.executeEdits( - source, - edits, - cursorStateComputer, - ); - + this._modelData.viewModel.executeEdits(source, edits, cursorStateComputer); return true; } - public executeCommand( - source: string | null | undefined, - command: editorCommon.ICommand, - ): void { + public executeCommand(source: string | null | undefined, command: editorCommon.ICommand): void { if (!this._modelData) { return; } - this._modelData.viewModel.executeCommand(command, source); } - public executeCommands( - source: string | null | undefined, - commands: editorCommon.ICommand[], - ): void { + public executeCommands(source: string | null | undefined, commands: editorCommon.ICommand[]): void { if (!this._modelData) { return; } - this._modelData.viewModel.executeCommands(commands, source); } - public createDecorationsCollection( - decorations?: IModelDeltaDecoration[], - ): EditorDecorationsCollection { + public createDecorationsCollection(decorations?: IModelDeltaDecoration[]): EditorDecorationsCollection { return new EditorDecorationsCollection(this, decorations); } - public changeDecorations( - callback: (changeAccessor: IModelDecorationsChangeAccessor) => any, - ): any { + public changeDecorations(callback: (changeAccessor: IModelDecorationsChangeAccessor) => any): any { if (!this._modelData) { // callback will not be called return null; } - return this._modelData.model.changeDecorations(callback, this._id); } @@ -2151,33 +1275,20 @@ export class CodeEditorWidget if (!this._modelData) { return null; } - - return this._modelData.model.getLineDecorations( - lineNumber, - this._id, - filterValidationDecorations(this._configuration.options), - ); + return this._modelData.model.getLineDecorations(lineNumber, this._id, filterValidationDecorations(this._configuration.options)); } public getDecorationsInRange(range: Range): IModelDecoration[] | null { if (!this._modelData) { return null; } - - return this._modelData.model.getDecorationsInRange( - range, - this._id, - filterValidationDecorations(this._configuration.options), - ); + return this._modelData.model.getDecorationsInRange(range, this._id, filterValidationDecorations(this._configuration.options)); } /** * @deprecated */ - public deltaDecorations( - oldDecorations: string[], - newDecorations: IModelDeltaDecoration[], - ): string[] { + public deltaDecorations(oldDecorations: string[], newDecorations: IModelDeltaDecoration[]): string[] { if (!this._modelData) { return []; } @@ -2186,11 +1297,7 @@ export class CodeEditorWidget return oldDecorations; } - return this._modelData.model.deltaDecorations( - oldDecorations, - newDecorations, - this._id, - ); + return this._modelData.model.deltaDecorations(oldDecorations, newDecorations, this._id); } public removeDecorations(decorationIds: string[]): void { @@ -2203,140 +1310,77 @@ export class CodeEditorWidget }); } - public setDecorationsByType( - description: string, - decorationTypeKey: string, - decorationOptions: editorCommon.IDecorationOptions[], - ): void { - const newDecorationsSubTypes: { [key: string]: boolean } = {}; - - const oldDecorationsSubTypes = - this._decorationTypeSubtypes[decorationTypeKey] || {}; + public setDecorationsByType(description: string, decorationTypeKey: string, decorationOptions: editorCommon.IDecorationOptions[]): void { - this._decorationTypeSubtypes[decorationTypeKey] = - newDecorationsSubTypes; + const newDecorationsSubTypes: { [key: string]: boolean } = {}; + const oldDecorationsSubTypes = this._decorationTypeSubtypes[decorationTypeKey] || {}; + this._decorationTypeSubtypes[decorationTypeKey] = newDecorationsSubTypes; const newModelDecorations: IModelDeltaDecoration[] = []; for (const decorationOption of decorationOptions) { let typeKey = decorationTypeKey; - if (decorationOption.renderOptions) { // identify custom render options by a hash code over all keys and values // For custom render options register a decoration type if necessary - const subType = hash(decorationOption.renderOptions).toString( - 16, - ); + const subType = hash(decorationOption.renderOptions).toString(16); // The fact that `decorationTypeKey` appears in the typeKey has no influence // it is just a mechanism to get predictable and unique keys (repeatable for the same options and unique across clients) - typeKey = decorationTypeKey + "-" + subType; - - if ( - !oldDecorationsSubTypes[subType] && - !newDecorationsSubTypes[subType] - ) { + typeKey = decorationTypeKey + '-' + subType; + if (!oldDecorationsSubTypes[subType] && !newDecorationsSubTypes[subType]) { // decoration type did not exist before, register new one - this._registerDecorationType( - description, - typeKey, - decorationOption.renderOptions, - decorationTypeKey, - ); + this._registerDecorationType(description, typeKey, decorationOption.renderOptions, decorationTypeKey); } - newDecorationsSubTypes[subType] = true; } - - const opts = this._resolveDecorationOptions( - typeKey, - !!decorationOption.hoverMessage, - ); - + const opts = this._resolveDecorationOptions(typeKey, !!decorationOption.hoverMessage); if (decorationOption.hoverMessage) { opts.hoverMessage = decorationOption.hoverMessage; } - - newModelDecorations.push({ - range: decorationOption.range, - options: opts, - }); + newModelDecorations.push({ range: decorationOption.range, options: opts }); } // remove decoration sub types that are no longer used, deregister decoration type if necessary for (const subType in oldDecorationsSubTypes) { if (!newDecorationsSubTypes[subType]) { - this._removeDecorationType(decorationTypeKey + "-" + subType); + this._removeDecorationType(decorationTypeKey + '-' + subType); } } // update all decorations - const oldDecorationsIds = - this._decorationTypeKeysToIds[decorationTypeKey] || []; - - this.changeDecorations( - (accessor) => - (this._decorationTypeKeysToIds[decorationTypeKey] = - accessor.deltaDecorations( - oldDecorationsIds, - newModelDecorations, - )), - ); + const oldDecorationsIds = this._decorationTypeKeysToIds[decorationTypeKey] || []; + this.changeDecorations(accessor => this._decorationTypeKeysToIds[decorationTypeKey] = accessor.deltaDecorations(oldDecorationsIds, newModelDecorations)); } - public setDecorationsByTypeFast( - decorationTypeKey: string, - ranges: IRange[], - ): void { - // remove decoration sub types that are no longer used, deregister decoration type if necessary - const oldDecorationsSubTypes = - this._decorationTypeSubtypes[decorationTypeKey] || {}; + public setDecorationsByTypeFast(decorationTypeKey: string, ranges: IRange[]): void { + // remove decoration sub types that are no longer used, deregister decoration type if necessary + const oldDecorationsSubTypes = this._decorationTypeSubtypes[decorationTypeKey] || {}; for (const subType in oldDecorationsSubTypes) { - this._removeDecorationType(decorationTypeKey + "-" + subType); + this._removeDecorationType(decorationTypeKey + '-' + subType); } - this._decorationTypeSubtypes[decorationTypeKey] = {}; - const opts = ModelDecorationOptions.createDynamic( - this._resolveDecorationOptions(decorationTypeKey, false), - ); - - const newModelDecorations: IModelDeltaDecoration[] = - new Array(ranges.length); - + const opts = ModelDecorationOptions.createDynamic(this._resolveDecorationOptions(decorationTypeKey, false)); + const newModelDecorations: IModelDeltaDecoration[] = new Array(ranges.length); for (let i = 0, len = ranges.length; i < len; i++) { newModelDecorations[i] = { range: ranges[i], options: opts }; } // update all decorations - const oldDecorationsIds = - this._decorationTypeKeysToIds[decorationTypeKey] || []; - - this.changeDecorations( - (accessor) => - (this._decorationTypeKeysToIds[decorationTypeKey] = - accessor.deltaDecorations( - oldDecorationsIds, - newModelDecorations, - )), - ); + const oldDecorationsIds = this._decorationTypeKeysToIds[decorationTypeKey] || []; + this.changeDecorations(accessor => this._decorationTypeKeysToIds[decorationTypeKey] = accessor.deltaDecorations(oldDecorationsIds, newModelDecorations)); } public removeDecorationsByType(decorationTypeKey: string): void { // remove decorations for type and sub type - const oldDecorationsIds = - this._decorationTypeKeysToIds[decorationTypeKey]; - + const oldDecorationsIds = this._decorationTypeKeysToIds[decorationTypeKey]; if (oldDecorationsIds) { - this.changeDecorations((accessor) => - accessor.deltaDecorations(oldDecorationsIds, []), - ); + this.changeDecorations(accessor => accessor.deltaDecorations(oldDecorationsIds, [])); } - if (this._decorationTypeKeysToIds.hasOwnProperty(decorationTypeKey)) { delete this._decorationTypeKeysToIds[decorationTypeKey]; } - if (this._decorationTypeSubtypes.hasOwnProperty(decorationTypeKey)) { delete this._decorationTypeSubtypes[decorationTypeKey]; } @@ -2344,19 +1388,14 @@ export class CodeEditorWidget public getLayoutInfo(): EditorLayoutInfo { const options = this._configuration.options; - const layoutInfo = options.get(EditorOption.layoutInfo); - return layoutInfo; } - public createOverviewRuler( - cssClassName: string, - ): editorBrowser.IOverviewRuler | null { + public createOverviewRuler(cssClassName: string): editorBrowser.IOverviewRuler | null { if (!this._modelData || !this._modelData.hasRealView) { return null; } - return this._modelData.view.createOverviewRuler(cssClassName); } @@ -2368,17 +1407,13 @@ export class CodeEditorWidget if (!this._modelData || !this._modelData.hasRealView) { return null; } - return this._modelData.view.domNode.domNode; } - public delegateVerticalScrollbarPointerDown( - browserEvent: PointerEvent, - ): void { + public delegateVerticalScrollbarPointerDown(browserEvent: PointerEvent): void { if (!this._modelData || !this._modelData.hasRealView) { return; } - this._modelData.view.delegateVerticalScrollbarPointerDown(browserEvent); } @@ -2386,16 +1421,11 @@ export class CodeEditorWidget if (!this._modelData || !this._modelData.hasRealView) { return; } - this._modelData.view.delegateScrollFromMouseWheelEvent(browserEvent); } - public layout( - dimension?: IDimension, - postponeRendering: boolean = false, - ): void { + public layout(dimension?: IDimension, postponeRendering: boolean = false): void { this._configuration.observeContainer(dimension); - if (!postponeRendering) { this.render(); } @@ -2405,7 +1435,6 @@ export class CodeEditorWidget if (!this._modelData || !this._modelData.hasRealView) { return; } - this._modelData.view.focus(); } @@ -2413,7 +1442,6 @@ export class CodeEditorWidget if (!this._modelData || !this._modelData.hasRealView) { return false; } - return this._modelData.view.isFocused(); } @@ -2424,14 +1452,11 @@ export class CodeEditorWidget public addContentWidget(widget: editorBrowser.IContentWidget): void { const widgetData: IContentWidgetData = { widget: widget, - position: widget.getPosition(), + position: widget.getPosition() }; if (this._contentWidgets.hasOwnProperty(widget.getId())) { - console.warn( - "Overwriting a content widget with the same id:" + - widget.getId(), - ); + console.warn('Overwriting a content widget with the same id:' + widget.getId()); } this._contentWidgets[widget.getId()] = widgetData; @@ -2443,12 +1468,9 @@ export class CodeEditorWidget public layoutContentWidget(widget: editorBrowser.IContentWidget): void { const widgetId = widget.getId(); - if (this._contentWidgets.hasOwnProperty(widgetId)) { const widgetData = this._contentWidgets[widgetId]; - widgetData.position = widget.getPosition(); - if (this._modelData && this._modelData.hasRealView) { this._modelData.view.layoutContentWidget(widgetData); } @@ -2457,12 +1479,9 @@ export class CodeEditorWidget public removeContentWidget(widget: editorBrowser.IContentWidget): void { const widgetId = widget.getId(); - if (this._contentWidgets.hasOwnProperty(widgetId)) { const widgetData = this._contentWidgets[widgetId]; - delete this._contentWidgets[widgetId]; - if (this._modelData && this._modelData.hasRealView) { this._modelData.view.removeContentWidget(widgetData); } @@ -2472,15 +1491,14 @@ export class CodeEditorWidget public addOverlayWidget(widget: editorBrowser.IOverlayWidget): void { const widgetData: IOverlayWidgetData = { widget: widget, - position: widget.getPosition(), + position: widget.getPosition() }; if (this._overlayWidgets.hasOwnProperty(widget.getId())) { - console.warn("Overwriting an overlay widget with the same id."); + console.warn('Overwriting an overlay widget with the same id.'); } this._overlayWidgets[widget.getId()] = widgetData; - if (this._modelData && this._modelData.hasRealView) { this._modelData.view.addOverlayWidget(widgetData); } @@ -2488,12 +1506,9 @@ export class CodeEditorWidget public layoutOverlayWidget(widget: editorBrowser.IOverlayWidget): void { const widgetId = widget.getId(); - if (this._overlayWidgets.hasOwnProperty(widgetId)) { const widgetData = this._overlayWidgets[widgetId]; - widgetData.position = widget.getPosition(); - if (this._modelData && this._modelData.hasRealView) { this._modelData.view.layoutOverlayWidget(widgetData); } @@ -2502,28 +1517,23 @@ export class CodeEditorWidget public removeOverlayWidget(widget: editorBrowser.IOverlayWidget): void { const widgetId = widget.getId(); - if (this._overlayWidgets.hasOwnProperty(widgetId)) { const widgetData = this._overlayWidgets[widgetId]; - delete this._overlayWidgets[widgetId]; - if (this._modelData && this._modelData.hasRealView) { this._modelData.view.removeOverlayWidget(widgetData); } } } - public addGlyphMarginWidget( - widget: editorBrowser.IGlyphMarginWidget, - ): void { + public addGlyphMarginWidget(widget: editorBrowser.IGlyphMarginWidget): void { const widgetData: IGlyphMarginWidgetData = { widget: widget, - position: widget.getPosition(), + position: widget.getPosition() }; if (this._glyphMarginWidgets.hasOwnProperty(widget.getId())) { - console.warn("Overwriting a glyph margin widget with the same id."); + console.warn('Overwriting a glyph margin widget with the same id.'); } this._glyphMarginWidgets[widget.getId()] = widgetData; @@ -2533,93 +1543,58 @@ export class CodeEditorWidget } } - public layoutGlyphMarginWidget( - widget: editorBrowser.IGlyphMarginWidget, - ): void { + public layoutGlyphMarginWidget(widget: editorBrowser.IGlyphMarginWidget): void { const widgetId = widget.getId(); - if (this._glyphMarginWidgets.hasOwnProperty(widgetId)) { const widgetData = this._glyphMarginWidgets[widgetId]; - widgetData.position = widget.getPosition(); - if (this._modelData && this._modelData.hasRealView) { this._modelData.view.layoutGlyphMarginWidget(widgetData); } } } - public removeGlyphMarginWidget( - widget: editorBrowser.IGlyphMarginWidget, - ): void { + public removeGlyphMarginWidget(widget: editorBrowser.IGlyphMarginWidget): void { const widgetId = widget.getId(); - if (this._glyphMarginWidgets.hasOwnProperty(widgetId)) { const widgetData = this._glyphMarginWidgets[widgetId]; - delete this._glyphMarginWidgets[widgetId]; - if (this._modelData && this._modelData.hasRealView) { this._modelData.view.removeGlyphMarginWidget(widgetData); } } } - public changeViewZones( - callback: (accessor: editorBrowser.IViewZoneChangeAccessor) => void, - ): void { + public changeViewZones(callback: (accessor: editorBrowser.IViewZoneChangeAccessor) => void): void { if (!this._modelData || !this._modelData.hasRealView) { return; } - this._modelData.view.change(callback); } - public getTargetAtClientPoint( - clientX: number, - clientY: number, - ): editorBrowser.IMouseTarget | null { + public getTargetAtClientPoint(clientX: number, clientY: number): editorBrowser.IMouseTarget | null { if (!this._modelData || !this._modelData.hasRealView) { return null; } - return this._modelData.view.getTargetAtClientPoint(clientX, clientY); } - public getScrolledVisiblePosition( - rawPosition: IPosition, - ): { top: number; left: number; height: number } | null { + public getScrolledVisiblePosition(rawPosition: IPosition): { top: number; left: number; height: number } | null { if (!this._modelData || !this._modelData.hasRealView) { return null; } const position = this._modelData.model.validatePosition(rawPosition); - const options = this._configuration.options; - const layoutInfo = options.get(EditorOption.layoutInfo); - const top = - CodeEditorWidget._getVerticalOffsetForPosition( - this._modelData, - position.lineNumber, - position.column, - ) - this.getScrollTop(); - - const left = - this._modelData.view.getOffsetForColumn( - position.lineNumber, - position.column, - ) + - layoutInfo.glyphMarginWidth + - layoutInfo.lineNumbersWidth + - layoutInfo.decorationsWidth - - this.getScrollLeft(); + const top = CodeEditorWidget._getVerticalOffsetForPosition(this._modelData, position.lineNumber, position.column) - this.getScrollTop(); + const left = this._modelData.view.getOffsetForColumn(position.lineNumber, position.column) + layoutInfo.glyphMarginWidth + layoutInfo.lineNumbersWidth + layoutInfo.decorationsWidth - this.getScrollLeft(); return { top: top, left: left, - height: options.get(EditorOption.lineHeight), + height: options.get(EditorOption.lineHeight) }; } @@ -2627,7 +1602,6 @@ export class CodeEditorWidget if (!this._modelData || !this._modelData.hasRealView) { return -1; } - return this._modelData.view.getOffsetForColumn(lineNumber, column); } @@ -2635,7 +1609,6 @@ export class CodeEditorWidget if (!this._modelData || !this._modelData.hasRealView) { return; } - this._modelData.viewModel.batchEvents(() => { this._modelData!.view.render(true, forceRedraw); }); @@ -2645,27 +1618,19 @@ export class CodeEditorWidget if (!this._modelData || !this._modelData.hasRealView) { return; } - this._modelData.view.setAriaOptions(options); } public applyFontInfo(target: HTMLElement): void { - applyFontInfo( - target, - this._configuration.options.get(EditorOption.fontInfo), - ); + applyFontInfo(target, this._configuration.options.get(EditorOption.fontInfo)); } public setBanner(domNode: HTMLElement | null, domNodeHeight: number): void { - if ( - this._bannerDomNode && - this._domElement.contains(this._bannerDomNode) - ) { + if (this._bannerDomNode && this._domElement.contains(this._bannerDomNode)) { this._bannerDomNode.remove(); } this._bannerDomNode = domNode; - this._configuration.setReservedHeight(domNode ? domNodeHeight : 0); if (this._bannerDomNode) { @@ -2676,18 +1641,13 @@ export class CodeEditorWidget protected _attachModel(model: ITextModel | null): void { if (!model) { this._modelData = null; - return; } const listenersToRemove: IDisposable[] = []; - this._domElement.setAttribute("data-mode-id", model.getLanguageId()); - - this._configuration.setIsDominatedByLongLines( - model.isDominatedByLongLines(), - ); - + this._domElement.setAttribute('data-mode-id', model.getLanguageId()); + this._configuration.setIsDominatedByLongLines(model.isDominatedByLongLines()); this._configuration.setModelLineCount(model.getLineCount()); const attachedView = model.onBeforeAttached(); @@ -2696,17 +1656,9 @@ export class CodeEditorWidget this._id, this._configuration, model, - DOMLineBreaksComputerFactory.create( - dom.getWindow(this._domElement), - ), - MonospaceLineBreaksComputerFactory.create( - this._configuration.options, - ), - (callback) => - dom.scheduleAtNextAnimationFrame( - dom.getWindow(this._domElement), - callback, - ), + DOMLineBreaksComputerFactory.create(dom.getWindow(this._domElement)), + MonospaceLineBreaksComputerFactory.create(this._configuration.options), + (callback) => dom.scheduleAtNextAnimationFrame(dom.getWindow(this._domElement), callback), this.languageConfigurationService, this._themeService, attachedView, @@ -2714,363 +1666,205 @@ export class CodeEditorWidget batchChanges: (cb) => { try { this._beginUpdate(); - return cb(); } finally { this._endUpdate(); } }, - }, + } ); // Someone might destroy the model from under the editor, so prevent any exceptions by setting a null model listenersToRemove.push(model.onWillDispose(() => this.setModel(null))); - listenersToRemove.push( - viewModel.onEvent((e) => { - switch (e.kind) { - case OutgoingViewModelEventKind.ContentSizeChanged: - this._onDidContentSizeChange.fire(e); - - break; - - case OutgoingViewModelEventKind.FocusChanged: - this._editorTextFocus.setValue(e.hasFocus); - - break; - - case OutgoingViewModelEventKind.ScrollChanged: - this._onDidScrollChange.fire(e); - - break; - - case OutgoingViewModelEventKind.ViewZonesChanged: - this._onDidChangeViewZones.fire(); - - break; - - case OutgoingViewModelEventKind.HiddenAreasChanged: - this._onDidChangeHiddenAreas.fire(); - - break; - - case OutgoingViewModelEventKind.ReadOnlyEditAttempt: - this._onDidAttemptReadOnlyEdit.fire(); - - break; - - case OutgoingViewModelEventKind.CursorStateChanged: { - if (e.reachedMaxCursorCount) { - const multiCursorLimit = this.getOption( - EditorOption.multiCursorLimit, - ); - - const message = nls.localize( - "cursors.maximum", - "The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.", - multiCursorLimit, - ); - - this._notificationService.prompt( - Severity.Warning, - message, - [ - { - label: "Find and Replace", - run: () => { - this._commandService.executeCommand( - "editor.action.startFindReplaceAction", - ); - }, - }, - { - label: nls.localize( - "goToSetting", - "Increase Multi Cursor Limit", - ), - run: () => { - this._commandService.executeCommand( - "workbench.action.openSettings2", - { - query: "editor.multiCursorLimit", - }, - ); - }, - }, - ], - ); - } - - const positions: Position[] = []; - - for ( - let i = 0, len = e.selections.length; - - i < len; - - i++ - ) { - positions[i] = e.selections[i].getPosition(); - } - - const e1: ICursorPositionChangedEvent = { - position: positions[0], - secondaryPositions: positions.slice(1), - reason: e.reason, - source: e.source, - }; - - this._onDidChangeCursorPosition.fire(e1); - - const e2: ICursorSelectionChangedEvent = { - selection: e.selections[0], - secondarySelections: e.selections.slice(1), - modelVersionId: e.modelVersionId, - oldSelections: e.oldSelections, - oldModelVersionId: e.oldModelVersionId, - source: e.source, - reason: e.reason, - }; - - this._onDidChangeCursorSelection.fire(e2); - - break; + listenersToRemove.push(viewModel.onEvent((e) => { + switch (e.kind) { + case OutgoingViewModelEventKind.ContentSizeChanged: + this._onDidContentSizeChange.fire(e); + break; + case OutgoingViewModelEventKind.FocusChanged: + this._editorTextFocus.setValue(e.hasFocus); + break; + case OutgoingViewModelEventKind.ScrollChanged: + this._onDidScrollChange.fire(e); + break; + case OutgoingViewModelEventKind.ViewZonesChanged: + this._onDidChangeViewZones.fire(); + break; + case OutgoingViewModelEventKind.HiddenAreasChanged: + this._onDidChangeHiddenAreas.fire(); + break; + case OutgoingViewModelEventKind.ReadOnlyEditAttempt: + this._onDidAttemptReadOnlyEdit.fire(); + break; + case OutgoingViewModelEventKind.CursorStateChanged: { + if (e.reachedMaxCursorCount) { + + const multiCursorLimit = this.getOption(EditorOption.multiCursorLimit); + const message = nls.localize('cursors.maximum', "The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.", multiCursorLimit); + this._notificationService.prompt(Severity.Warning, message, [ + { + label: 'Find and Replace', + run: () => { + this._commandService.executeCommand('editor.action.startFindReplaceAction'); + } + }, + { + label: nls.localize('goToSetting', 'Increase Multi Cursor Limit'), + run: () => { + this._commandService.executeCommand('workbench.action.openSettings2', { + query: 'editor.multiCursorLimit' + }); + } + } + ]); } - case OutgoingViewModelEventKind.ModelDecorationsChanged: - this._onDidChangeModelDecorations.fire(e.event); - - break; - - case OutgoingViewModelEventKind.ModelLanguageChanged: - this._domElement.setAttribute( - "data-mode-id", - model.getLanguageId(), - ); - - this._onDidChangeModelLanguage.fire(e.event); - - break; - - case OutgoingViewModelEventKind.ModelLanguageConfigurationChanged: - this._onDidChangeModelLanguageConfiguration.fire( - e.event, - ); - - break; - - case OutgoingViewModelEventKind.ModelContentChanged: - this._onDidChangeModelContent.fire(e.event); - - break; - - case OutgoingViewModelEventKind.ModelOptionsChanged: - this._onDidChangeModelOptions.fire(e.event); - - break; + const positions: Position[] = []; + for (let i = 0, len = e.selections.length; i < len; i++) { + positions[i] = e.selections[i].getPosition(); + } - case OutgoingViewModelEventKind.ModelTokensChanged: - this._onDidChangeModelTokens.fire(e.event); + const e1: ICursorPositionChangedEvent = { + position: positions[0], + secondaryPositions: positions.slice(1), + reason: e.reason, + source: e.source + }; + this._onDidChangeCursorPosition.fire(e1); + + const e2: ICursorSelectionChangedEvent = { + selection: e.selections[0], + secondarySelections: e.selections.slice(1), + modelVersionId: e.modelVersionId, + oldSelections: e.oldSelections, + oldModelVersionId: e.oldModelVersionId, + source: e.source, + reason: e.reason + }; + this._onDidChangeCursorSelection.fire(e2); - break; + break; } - }), - ); + case OutgoingViewModelEventKind.ModelDecorationsChanged: + this._onDidChangeModelDecorations.fire(e.event); + break; + case OutgoingViewModelEventKind.ModelLanguageChanged: + this._domElement.setAttribute('data-mode-id', model.getLanguageId()); + this._onDidChangeModelLanguage.fire(e.event); + break; + case OutgoingViewModelEventKind.ModelLanguageConfigurationChanged: + this._onDidChangeModelLanguageConfiguration.fire(e.event); + break; + case OutgoingViewModelEventKind.ModelContentChanged: + this._onDidChangeModelContent.fire(e.event); + break; + case OutgoingViewModelEventKind.ModelOptionsChanged: + this._onDidChangeModelOptions.fire(e.event); + break; + case OutgoingViewModelEventKind.ModelTokensChanged: + this._onDidChangeModelTokens.fire(e.event); + break; - const [view, hasRealView] = this._createView(viewModel); + } + })); + const [view, hasRealView] = this._createView(viewModel); if (hasRealView) { this._domElement.appendChild(view.domNode.domNode); let keys = Object.keys(this._contentWidgets); - for (let i = 0, len = keys.length; i < len; i++) { const widgetId = keys[i]; - view.addContentWidget(this._contentWidgets[widgetId]); } keys = Object.keys(this._overlayWidgets); - for (let i = 0, len = keys.length; i < len; i++) { const widgetId = keys[i]; - view.addOverlayWidget(this._overlayWidgets[widgetId]); } keys = Object.keys(this._glyphMarginWidgets); - for (let i = 0, len = keys.length; i < len; i++) { const widgetId = keys[i]; - view.addGlyphMarginWidget(this._glyphMarginWidgets[widgetId]); } view.render(false, true); - - view.domNode.domNode.setAttribute("data-uri", model.uri.toString()); + view.domNode.domNode.setAttribute('data-uri', model.uri.toString()); } - this._modelData = new ModelData( - model, - viewModel, - view, - hasRealView, - listenersToRemove, - attachedView, - ); + this._modelData = new ModelData(model, viewModel, view, hasRealView, listenersToRemove, attachedView); } protected _createView(viewModel: ViewModel): [View, boolean] { let commandDelegate: ICommandDelegate; - if (this.isSimpleWidget) { commandDelegate = { - paste: ( - text: string, - pasteOnNewLine: boolean, - multicursorText: string[] | null, - mode: string | null, - ) => { - this._paste( - "keyboard", - text, - pasteOnNewLine, - multicursorText, - mode, - ); + paste: (text: string, pasteOnNewLine: boolean, multicursorText: string[] | null, mode: string | null) => { + this._paste('keyboard', text, pasteOnNewLine, multicursorText, mode); }, type: (text: string) => { - this._type("keyboard", text); + this._type('keyboard', text); }, - compositionType: ( - text: string, - replacePrevCharCnt: number, - replaceNextCharCnt: number, - positionDelta: number, - ) => { - this._compositionType( - "keyboard", - text, - replacePrevCharCnt, - replaceNextCharCnt, - positionDelta, - ); + compositionType: (text: string, replacePrevCharCnt: number, replaceNextCharCnt: number, positionDelta: number) => { + this._compositionType('keyboard', text, replacePrevCharCnt, replaceNextCharCnt, positionDelta); }, startComposition: () => { this._startComposition(); }, endComposition: () => { - this._endComposition("keyboard"); + this._endComposition('keyboard'); }, cut: () => { - this._cut("keyboard"); - }, + this._cut('keyboard'); + } }; } else { commandDelegate = { - paste: ( - text: string, - pasteOnNewLine: boolean, - multicursorText: string[] | null, - mode: string | null, - ) => { - const payload: editorBrowser.PastePayload = { - text, - pasteOnNewLine, - multicursorText, - mode, - }; - - this._commandService.executeCommand( - editorCommon.Handler.Paste, - payload, - ); + paste: (text: string, pasteOnNewLine: boolean, multicursorText: string[] | null, mode: string | null) => { + const payload: editorBrowser.PastePayload = { text, pasteOnNewLine, multicursorText, mode }; + this._commandService.executeCommand(editorCommon.Handler.Paste, payload); }, type: (text: string) => { const payload: editorCommon.TypePayload = { text }; - - this._commandService.executeCommand( - editorCommon.Handler.Type, - payload, - ); + this._commandService.executeCommand(editorCommon.Handler.Type, payload); }, - compositionType: ( - text: string, - replacePrevCharCnt: number, - replaceNextCharCnt: number, - positionDelta: number, - ) => { + compositionType: (text: string, replacePrevCharCnt: number, replaceNextCharCnt: number, positionDelta: number) => { // Try if possible to go through the existing `replacePreviousChar` command if (replaceNextCharCnt || positionDelta) { // must be handled through the new command - const payload: editorCommon.CompositionTypePayload = { - text, - replacePrevCharCnt, - replaceNextCharCnt, - positionDelta, - }; - - this._commandService.executeCommand( - editorCommon.Handler.CompositionType, - payload, - ); + const payload: editorCommon.CompositionTypePayload = { text, replacePrevCharCnt, replaceNextCharCnt, positionDelta }; + this._commandService.executeCommand(editorCommon.Handler.CompositionType, payload); } else { - const payload: editorCommon.ReplacePreviousCharPayload = - { text, replaceCharCnt: replacePrevCharCnt }; - - this._commandService.executeCommand( - editorCommon.Handler.ReplacePreviousChar, - payload, - ); + const payload: editorCommon.ReplacePreviousCharPayload = { text, replaceCharCnt: replacePrevCharCnt }; + this._commandService.executeCommand(editorCommon.Handler.ReplacePreviousChar, payload); } }, startComposition: () => { - this._commandService.executeCommand( - editorCommon.Handler.CompositionStart, - {}, - ); + this._commandService.executeCommand(editorCommon.Handler.CompositionStart, {}); }, endComposition: () => { - this._commandService.executeCommand( - editorCommon.Handler.CompositionEnd, - {}, - ); + this._commandService.executeCommand(editorCommon.Handler.CompositionEnd, {}); }, cut: () => { - this._commandService.executeCommand( - editorCommon.Handler.Cut, - {}, - ); - }, + this._commandService.executeCommand(editorCommon.Handler.Cut, {}); + } }; } - const viewUserInputEvents = new ViewUserInputEvents( - viewModel.coordinatesConverter, - ); - + const viewUserInputEvents = new ViewUserInputEvents(viewModel.coordinatesConverter); viewUserInputEvents.onKeyDown = (e) => this._onKeyDown.fire(e); - viewUserInputEvents.onKeyUp = (e) => this._onKeyUp.fire(e); - viewUserInputEvents.onContextMenu = (e) => this._onContextMenu.fire(e); - viewUserInputEvents.onMouseMove = (e) => this._onMouseMove.fire(e); - viewUserInputEvents.onMouseLeave = (e) => this._onMouseLeave.fire(e); - viewUserInputEvents.onMouseDown = (e) => this._onMouseDown.fire(e); - viewUserInputEvents.onMouseUp = (e) => this._onMouseUp.fire(e); - viewUserInputEvents.onMouseDrag = (e) => this._onMouseDrag.fire(e); - viewUserInputEvents.onMouseDrop = (e) => this._onMouseDrop.fire(e); - - viewUserInputEvents.onMouseDropCanceled = (e) => - this._onMouseDropCanceled.fire(e); - + viewUserInputEvents.onMouseDropCanceled = (e) => this._onMouseDropCanceled.fire(e); viewUserInputEvents.onMouseWheel = (e) => this._onMouseWheel.fire(e); const view = new View( @@ -3081,7 +1875,7 @@ export class CodeEditorWidget viewModel, viewUserInputEvents, this._overflowWidgetsDomNode, - this._instantiationService, + this._instantiationService ); return [view, true]; @@ -3093,66 +1887,36 @@ export class CodeEditorWidget private _detachModel(): ITextModel | null { this._contributionsDisposable?.dispose(); - this._contributionsDisposable = undefined; - if (!this._modelData) { return null; } - const model = this._modelData.model; - - const removeDomNode = this._modelData.hasRealView - ? this._modelData.view.domNode.domNode - : null; + const removeDomNode = this._modelData.hasRealView ? this._modelData.view.domNode.domNode : null; this._modelData.dispose(); - this._modelData = null; - this._domElement.removeAttribute("data-mode-id"); - + this._domElement.removeAttribute('data-mode-id'); if (removeDomNode && this._domElement.contains(removeDomNode)) { removeDomNode.remove(); } - - if ( - this._bannerDomNode && - this._domElement.contains(this._bannerDomNode) - ) { + if (this._bannerDomNode && this._domElement.contains(this._bannerDomNode)) { this._bannerDomNode.remove(); } - return model; } - private _registerDecorationType( - description: string, - key: string, - options: editorCommon.IDecorationRenderOptions, - parentTypeKey?: string, - ): void { - this._codeEditorService.registerDecorationType( - description, - key, - options, - parentTypeKey, - this, - ); + private _registerDecorationType(description: string, key: string, options: editorCommon.IDecorationRenderOptions, parentTypeKey?: string): void { + this._codeEditorService.registerDecorationType(description, key, options, parentTypeKey, this); } private _removeDecorationType(key: string): void { this._codeEditorService.removeDecorationType(key); } - private _resolveDecorationOptions( - typeKey: string, - writable: boolean, - ): IModelDecorationOptions { - return this._codeEditorService.resolveDecorationOptions( - typeKey, - writable, - ); + private _resolveDecorationOptions(typeKey: string, writable: boolean): IModelDecorationOptions { + return this._codeEditorService.resolveDecorationOptions(typeKey, writable); } public getTelemetryData(): { [key: string]: any } | undefined { @@ -3160,24 +1924,16 @@ export class CodeEditorWidget } public hasModel(): this is editorBrowser.IActiveCodeEditor { - return this._modelData !== null; + return (this._modelData !== null); } private showDropIndicatorAt(position: Position): void { - const newDecorations: IModelDeltaDecoration[] = [ - { - range: new Range( - position.lineNumber, - position.column, - position.lineNumber, - position.column, - ), - options: CodeEditorWidget.dropIntoEditorDecorationOptions, - }, - ]; + const newDecorations: IModelDeltaDecoration[] = [{ + range: new Range(position.lineNumber, position.column, position.lineNumber, position.column), + options: CodeEditorWidget.dropIntoEditorDecorationOptions + }]; this._dropIntoEditorDecorations.set(newDecorations); - this.revealPosition(position, editorCommon.ScrollType.Immediate); } @@ -3191,7 +1947,6 @@ export class CodeEditorWidget private _beginUpdate(): void { this._updateCounter++; - if (this._updateCounter === 1) { this._onBeginUpdate.fire(); } @@ -3199,7 +1954,6 @@ export class CodeEditorWidget private _endUpdate(): void { this._updateCounter--; - if (this._updateCounter === 0) { this._onEndUpdate.fire(); } @@ -3244,17 +1998,15 @@ class ModelData { public readonly hasRealView: boolean, public readonly listenersToRemove: IDisposable[], public readonly attachedView: IAttachedView, - ) {} + ) { + } public dispose(): void { dispose(this.listenersToRemove); - this.model.onBeforeDetached(this.attachedView); - if (this.hasRealView) { this.view.dispose(); } - this.viewModel.dispose(); } } @@ -3262,41 +2014,31 @@ class ModelData { const enum BooleanEventValue { NotSet, False, - True, + True } export class BooleanEventEmitter extends Disposable { - private readonly _onDidChangeToTrue: Emitter = this._register( - new Emitter(this._emitterOptions), - ); - - public readonly onDidChangeToTrue: Event = - this._onDidChangeToTrue.event; - - private readonly _onDidChangeToFalse: Emitter = this._register( - new Emitter(this._emitterOptions), - ); + private readonly _onDidChangeToTrue: Emitter = this._register(new Emitter(this._emitterOptions)); + public readonly onDidChangeToTrue: Event = this._onDidChangeToTrue.event; - public readonly onDidChangeToFalse: Event = - this._onDidChangeToFalse.event; + private readonly _onDidChangeToFalse: Emitter = this._register(new Emitter(this._emitterOptions)); + public readonly onDidChangeToFalse: Event = this._onDidChangeToFalse.event; private _value: BooleanEventValue; - constructor(private readonly _emitterOptions: EmitterOptions) { + constructor( + private readonly _emitterOptions: EmitterOptions + ) { super(); - this._value = BooleanEventValue.NotSet; } public setValue(_value: boolean) { - const value = _value ? BooleanEventValue.True : BooleanEventValue.False; - + const value = (_value ? BooleanEventValue.True : BooleanEventValue.False); if (this._value === value) { return; } - this._value = value; - if (this._value === BooleanEventValue.True) { this._onDidChangeToTrue.fire(); } else if (this._value === BooleanEventValue.False) { @@ -3309,140 +2051,72 @@ export class BooleanEventEmitter extends Disposable { * A regular event emitter that also makes sure contributions are instantiated if necessary */ class InteractionEmitter extends Emitter { + constructor( private readonly _contributions: CodeEditorContributions, - deliveryQueue: EventDeliveryQueue, + deliveryQueue: EventDeliveryQueue ) { super({ deliveryQueue }); } override fire(event: T): void { this._contributions.onBeforeInteractionEvent(); - super.fire(event); } } class EditorContextKeysManager extends Disposable { - private readonly _editor: CodeEditorWidget; + private readonly _editor: CodeEditorWidget; private readonly _editorSimpleInput: IContextKey; - private readonly _editorFocus: IContextKey; - private readonly _textInputFocus: IContextKey; - private readonly _editorTextFocus: IContextKey; - private readonly _tabMovesFocus: IContextKey; - private readonly _editorReadonly: IContextKey; - private readonly _inDiffEditor: IContextKey; - private readonly _editorColumnSelection: IContextKey; - private readonly _hasMultipleSelections: IContextKey; - private readonly _hasNonEmptySelection: IContextKey; - private readonly _canUndo: IContextKey; - private readonly _canRedo: IContextKey; constructor( editor: CodeEditorWidget, - contextKeyService: IContextKeyService, + contextKeyService: IContextKeyService ) { super(); this._editor = editor; - contextKeyService.createKey("editorId", editor.getId()); - - this._editorSimpleInput = - EditorContextKeys.editorSimpleInput.bindTo(contextKeyService); + contextKeyService.createKey('editorId', editor.getId()); + this._editorSimpleInput = EditorContextKeys.editorSimpleInput.bindTo(contextKeyService); this._editorFocus = EditorContextKeys.focus.bindTo(contextKeyService); - - this._textInputFocus = - EditorContextKeys.textInputFocus.bindTo(contextKeyService); - - this._editorTextFocus = - EditorContextKeys.editorTextFocus.bindTo(contextKeyService); - - this._tabMovesFocus = - EditorContextKeys.tabMovesFocus.bindTo(contextKeyService); - - this._editorReadonly = - EditorContextKeys.readOnly.bindTo(contextKeyService); - - this._inDiffEditor = - EditorContextKeys.inDiffEditor.bindTo(contextKeyService); - - this._editorColumnSelection = - EditorContextKeys.columnSelection.bindTo(contextKeyService); - - this._hasMultipleSelections = - EditorContextKeys.hasMultipleSelections.bindTo(contextKeyService); - - this._hasNonEmptySelection = - EditorContextKeys.hasNonEmptySelection.bindTo(contextKeyService); - + this._textInputFocus = EditorContextKeys.textInputFocus.bindTo(contextKeyService); + this._editorTextFocus = EditorContextKeys.editorTextFocus.bindTo(contextKeyService); + this._tabMovesFocus = EditorContextKeys.tabMovesFocus.bindTo(contextKeyService); + this._editorReadonly = EditorContextKeys.readOnly.bindTo(contextKeyService); + this._inDiffEditor = EditorContextKeys.inDiffEditor.bindTo(contextKeyService); + this._editorColumnSelection = EditorContextKeys.columnSelection.bindTo(contextKeyService); + this._hasMultipleSelections = EditorContextKeys.hasMultipleSelections.bindTo(contextKeyService); + this._hasNonEmptySelection = EditorContextKeys.hasNonEmptySelection.bindTo(contextKeyService); this._canUndo = EditorContextKeys.canUndo.bindTo(contextKeyService); - this._canRedo = EditorContextKeys.canRedo.bindTo(contextKeyService); - this._register( - this._editor.onDidChangeConfiguration(() => - this._updateFromConfig(), - ), - ); - - this._register( - this._editor.onDidChangeCursorSelection(() => - this._updateFromSelection(), - ), - ); - - this._register( - this._editor.onDidFocusEditorWidget(() => this._updateFromFocus()), - ); - - this._register( - this._editor.onDidBlurEditorWidget(() => this._updateFromFocus()), - ); - - this._register( - this._editor.onDidFocusEditorText(() => this._updateFromFocus()), - ); - - this._register( - this._editor.onDidBlurEditorText(() => this._updateFromFocus()), - ); - - this._register( - this._editor.onDidChangeModel(() => this._updateFromModel()), - ); - - this._register( - this._editor.onDidChangeConfiguration(() => - this._updateFromModel(), - ), - ); - - this._register( - TabFocus.onDidChangeTabFocus((tabFocusMode: boolean) => - this._tabMovesFocus.set(tabFocusMode), - ), - ); + this._register(this._editor.onDidChangeConfiguration(() => this._updateFromConfig())); + this._register(this._editor.onDidChangeCursorSelection(() => this._updateFromSelection())); + this._register(this._editor.onDidFocusEditorWidget(() => this._updateFromFocus())); + this._register(this._editor.onDidBlurEditorWidget(() => this._updateFromFocus())); + this._register(this._editor.onDidFocusEditorText(() => this._updateFromFocus())); + this._register(this._editor.onDidBlurEditorText(() => this._updateFromFocus())); + this._register(this._editor.onDidChangeModel(() => this._updateFromModel())); + this._register(this._editor.onDidChangeConfiguration(() => this._updateFromModel())); + this._register(TabFocus.onDidChangeTabFocus((tabFocusMode: boolean) => this._tabMovesFocus.set(tabFocusMode))); this._updateFromConfig(); - this._updateFromSelection(); - this._updateFromFocus(); - this._updateFromModel(); this._editorSimpleInput.set(this._editor.isSimpleWidget); @@ -3452,92 +2126,56 @@ class EditorContextKeysManager extends Disposable { const options = this._editor.getOptions(); this._tabMovesFocus.set(TabFocus.getTabFocusMode()); - this._editorReadonly.set(options.get(EditorOption.readOnly)); - this._inDiffEditor.set(options.get(EditorOption.inDiffEditor)); - - this._editorColumnSelection.set( - options.get(EditorOption.columnSelection), - ); + this._editorColumnSelection.set(options.get(EditorOption.columnSelection)); } private _updateFromSelection(): void { const selections = this._editor.getSelections(); - if (!selections) { this._hasMultipleSelections.reset(); - this._hasNonEmptySelection.reset(); } else { this._hasMultipleSelections.set(selections.length > 1); - - this._hasNonEmptySelection.set( - selections.some((s) => !s.isEmpty()), - ); + this._hasNonEmptySelection.set(selections.some(s => !s.isEmpty())); } } private _updateFromFocus(): void { - this._editorFocus.set( - this._editor.hasWidgetFocus() && !this._editor.isSimpleWidget, - ); - - this._editorTextFocus.set( - this._editor.hasTextFocus() && !this._editor.isSimpleWidget, - ); - + this._editorFocus.set(this._editor.hasWidgetFocus() && !this._editor.isSimpleWidget); + this._editorTextFocus.set(this._editor.hasTextFocus() && !this._editor.isSimpleWidget); this._textInputFocus.set(this._editor.hasTextFocus()); } private _updateFromModel(): void { const model = this._editor.getModel(); - this._canUndo.set(Boolean(model && model.canUndo())); - this._canRedo.set(Boolean(model && model.canRedo())); } } export class EditorModeContext extends Disposable { - private readonly _langId: IContextKey; + private readonly _langId: IContextKey; private readonly _hasCompletionItemProvider: IContextKey; - private readonly _hasCodeActionsProvider: IContextKey; - private readonly _hasCodeLensProvider: IContextKey; - private readonly _hasDefinitionProvider: IContextKey; - private readonly _hasDeclarationProvider: IContextKey; - private readonly _hasImplementationProvider: IContextKey; - private readonly _hasTypeDefinitionProvider: IContextKey; - private readonly _hasHoverProvider: IContextKey; - private readonly _hasDocumentHighlightProvider: IContextKey; - private readonly _hasDocumentSymbolProvider: IContextKey; - private readonly _hasReferenceProvider: IContextKey; - private readonly _hasRenameProvider: IContextKey; - private readonly _hasDocumentFormattingProvider: IContextKey; - private readonly _hasDocumentSelectionFormattingProvider: IContextKey; - private readonly _hasMultipleDocumentFormattingProvider: IContextKey; - private readonly _hasMultipleDocumentSelectionFormattingProvider: IContextKey; - private readonly _hasSignatureHelpProvider: IContextKey; - private readonly _hasInlayHintsProvider: IContextKey; - private readonly _isInEmbeddedEditor: IContextKey; constructor( @@ -3548,161 +2186,49 @@ export class EditorModeContext extends Disposable { super(); this._langId = EditorContextKeys.languageId.bindTo(_contextKeyService); - - this._hasCompletionItemProvider = - EditorContextKeys.hasCompletionItemProvider.bindTo( - _contextKeyService, - ); - - this._hasCodeActionsProvider = - EditorContextKeys.hasCodeActionsProvider.bindTo(_contextKeyService); - - this._hasCodeLensProvider = - EditorContextKeys.hasCodeLensProvider.bindTo(_contextKeyService); - - this._hasDefinitionProvider = - EditorContextKeys.hasDefinitionProvider.bindTo(_contextKeyService); - - this._hasDeclarationProvider = - EditorContextKeys.hasDeclarationProvider.bindTo(_contextKeyService); - - this._hasImplementationProvider = - EditorContextKeys.hasImplementationProvider.bindTo( - _contextKeyService, - ); - - this._hasTypeDefinitionProvider = - EditorContextKeys.hasTypeDefinitionProvider.bindTo( - _contextKeyService, - ); - - this._hasHoverProvider = - EditorContextKeys.hasHoverProvider.bindTo(_contextKeyService); - - this._hasDocumentHighlightProvider = - EditorContextKeys.hasDocumentHighlightProvider.bindTo( - _contextKeyService, - ); - - this._hasDocumentSymbolProvider = - EditorContextKeys.hasDocumentSymbolProvider.bindTo( - _contextKeyService, - ); - - this._hasReferenceProvider = - EditorContextKeys.hasReferenceProvider.bindTo(_contextKeyService); - - this._hasRenameProvider = - EditorContextKeys.hasRenameProvider.bindTo(_contextKeyService); - - this._hasSignatureHelpProvider = - EditorContextKeys.hasSignatureHelpProvider.bindTo( - _contextKeyService, - ); - - this._hasInlayHintsProvider = - EditorContextKeys.hasInlayHintsProvider.bindTo(_contextKeyService); - - this._hasDocumentFormattingProvider = - EditorContextKeys.hasDocumentFormattingProvider.bindTo( - _contextKeyService, - ); - - this._hasDocumentSelectionFormattingProvider = - EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo( - _contextKeyService, - ); - - this._hasMultipleDocumentFormattingProvider = - EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo( - _contextKeyService, - ); - - this._hasMultipleDocumentSelectionFormattingProvider = - EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo( - _contextKeyService, - ); - - this._isInEmbeddedEditor = - EditorContextKeys.isInEmbeddedEditor.bindTo(_contextKeyService); + this._hasCompletionItemProvider = EditorContextKeys.hasCompletionItemProvider.bindTo(_contextKeyService); + this._hasCodeActionsProvider = EditorContextKeys.hasCodeActionsProvider.bindTo(_contextKeyService); + this._hasCodeLensProvider = EditorContextKeys.hasCodeLensProvider.bindTo(_contextKeyService); + this._hasDefinitionProvider = EditorContextKeys.hasDefinitionProvider.bindTo(_contextKeyService); + this._hasDeclarationProvider = EditorContextKeys.hasDeclarationProvider.bindTo(_contextKeyService); + this._hasImplementationProvider = EditorContextKeys.hasImplementationProvider.bindTo(_contextKeyService); + this._hasTypeDefinitionProvider = EditorContextKeys.hasTypeDefinitionProvider.bindTo(_contextKeyService); + this._hasHoverProvider = EditorContextKeys.hasHoverProvider.bindTo(_contextKeyService); + this._hasDocumentHighlightProvider = EditorContextKeys.hasDocumentHighlightProvider.bindTo(_contextKeyService); + this._hasDocumentSymbolProvider = EditorContextKeys.hasDocumentSymbolProvider.bindTo(_contextKeyService); + this._hasReferenceProvider = EditorContextKeys.hasReferenceProvider.bindTo(_contextKeyService); + this._hasRenameProvider = EditorContextKeys.hasRenameProvider.bindTo(_contextKeyService); + this._hasSignatureHelpProvider = EditorContextKeys.hasSignatureHelpProvider.bindTo(_contextKeyService); + this._hasInlayHintsProvider = EditorContextKeys.hasInlayHintsProvider.bindTo(_contextKeyService); + this._hasDocumentFormattingProvider = EditorContextKeys.hasDocumentFormattingProvider.bindTo(_contextKeyService); + this._hasDocumentSelectionFormattingProvider = EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(_contextKeyService); + this._hasMultipleDocumentFormattingProvider = EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo(_contextKeyService); + this._hasMultipleDocumentSelectionFormattingProvider = EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo(_contextKeyService); + this._isInEmbeddedEditor = EditorContextKeys.isInEmbeddedEditor.bindTo(_contextKeyService); const update = () => this._update(); // update when model/mode changes this._register(_editor.onDidChangeModel(update)); - this._register(_editor.onDidChangeModelLanguage(update)); // update when registries change - this._register( - _languageFeaturesService.completionProvider.onDidChange(update), - ); - - this._register( - _languageFeaturesService.codeActionProvider.onDidChange(update), - ); - - this._register( - _languageFeaturesService.codeLensProvider.onDidChange(update), - ); - - this._register( - _languageFeaturesService.definitionProvider.onDidChange(update), - ); - - this._register( - _languageFeaturesService.declarationProvider.onDidChange(update), - ); - - this._register( - _languageFeaturesService.implementationProvider.onDidChange(update), - ); - - this._register( - _languageFeaturesService.typeDefinitionProvider.onDidChange(update), - ); - - this._register( - _languageFeaturesService.hoverProvider.onDidChange(update), - ); - - this._register( - _languageFeaturesService.documentHighlightProvider.onDidChange( - update, - ), - ); - - this._register( - _languageFeaturesService.documentSymbolProvider.onDidChange(update), - ); - - this._register( - _languageFeaturesService.referenceProvider.onDidChange(update), - ); - - this._register( - _languageFeaturesService.renameProvider.onDidChange(update), - ); - - this._register( - _languageFeaturesService.documentFormattingEditProvider.onDidChange( - update, - ), - ); - - this._register( - _languageFeaturesService.documentRangeFormattingEditProvider.onDidChange( - update, - ), - ); - - this._register( - _languageFeaturesService.signatureHelpProvider.onDidChange(update), - ); - - this._register( - _languageFeaturesService.inlayHintsProvider.onDidChange(update), - ); + this._register(_languageFeaturesService.completionProvider.onDidChange(update)); + this._register(_languageFeaturesService.codeActionProvider.onDidChange(update)); + this._register(_languageFeaturesService.codeLensProvider.onDidChange(update)); + this._register(_languageFeaturesService.definitionProvider.onDidChange(update)); + this._register(_languageFeaturesService.declarationProvider.onDidChange(update)); + this._register(_languageFeaturesService.implementationProvider.onDidChange(update)); + this._register(_languageFeaturesService.typeDefinitionProvider.onDidChange(update)); + this._register(_languageFeaturesService.hoverProvider.onDidChange(update)); + this._register(_languageFeaturesService.documentHighlightProvider.onDidChange(update)); + this._register(_languageFeaturesService.documentSymbolProvider.onDidChange(update)); + this._register(_languageFeaturesService.referenceProvider.onDidChange(update)); + this._register(_languageFeaturesService.renameProvider.onDidChange(update)); + this._register(_languageFeaturesService.documentFormattingEditProvider.onDidChange(update)); + this._register(_languageFeaturesService.documentRangeFormattingEditProvider.onDidChange(update)); + this._register(_languageFeaturesService.signatureHelpProvider.onDidChange(update)); + this._register(_languageFeaturesService.inlayHintsProvider.onDidChange(update)); update(); } @@ -3714,225 +2240,103 @@ export class EditorModeContext extends Disposable { reset() { this._contextKeyService.bufferChangeEvents(() => { this._langId.reset(); - this._hasCompletionItemProvider.reset(); - this._hasCodeActionsProvider.reset(); - this._hasCodeLensProvider.reset(); - this._hasDefinitionProvider.reset(); - this._hasDeclarationProvider.reset(); - this._hasImplementationProvider.reset(); - this._hasTypeDefinitionProvider.reset(); - this._hasHoverProvider.reset(); - this._hasDocumentHighlightProvider.reset(); - this._hasDocumentSymbolProvider.reset(); - this._hasReferenceProvider.reset(); - this._hasRenameProvider.reset(); - this._hasDocumentFormattingProvider.reset(); - this._hasDocumentSelectionFormattingProvider.reset(); - this._hasSignatureHelpProvider.reset(); - this._isInEmbeddedEditor.reset(); }); } private _update() { const model = this._editor.getModel(); - if (!model) { this.reset(); - return; } - this._contextKeyService.bufferChangeEvents(() => { this._langId.set(model.getLanguageId()); - - this._hasCompletionItemProvider.set( - this._languageFeaturesService.completionProvider.has(model), - ); - - this._hasCodeActionsProvider.set( - this._languageFeaturesService.codeActionProvider.has(model), - ); - - this._hasCodeLensProvider.set( - this._languageFeaturesService.codeLensProvider.has(model), - ); - - this._hasDefinitionProvider.set( - this._languageFeaturesService.definitionProvider.has(model), - ); - - this._hasDeclarationProvider.set( - this._languageFeaturesService.declarationProvider.has(model), - ); - - this._hasImplementationProvider.set( - this._languageFeaturesService.implementationProvider.has(model), - ); - - this._hasTypeDefinitionProvider.set( - this._languageFeaturesService.typeDefinitionProvider.has(model), - ); - - this._hasHoverProvider.set( - this._languageFeaturesService.hoverProvider.has(model), - ); - - this._hasDocumentHighlightProvider.set( - this._languageFeaturesService.documentHighlightProvider.has( - model, - ), - ); - - this._hasDocumentSymbolProvider.set( - this._languageFeaturesService.documentSymbolProvider.has(model), - ); - - this._hasReferenceProvider.set( - this._languageFeaturesService.referenceProvider.has(model), - ); - - this._hasRenameProvider.set( - this._languageFeaturesService.renameProvider.has(model), - ); - - this._hasSignatureHelpProvider.set( - this._languageFeaturesService.signatureHelpProvider.has(model), - ); - - this._hasInlayHintsProvider.set( - this._languageFeaturesService.inlayHintsProvider.has(model), - ); - - this._hasDocumentFormattingProvider.set( - this._languageFeaturesService.documentFormattingEditProvider.has( - model, - ) || - this._languageFeaturesService.documentRangeFormattingEditProvider.has( - model, - ), - ); - - this._hasDocumentSelectionFormattingProvider.set( - this._languageFeaturesService.documentRangeFormattingEditProvider.has( - model, - ), - ); - - this._hasMultipleDocumentFormattingProvider.set( - this._languageFeaturesService.documentFormattingEditProvider.all( - model, - ).length + - this._languageFeaturesService.documentRangeFormattingEditProvider.all( - model, - ).length > - 1, - ); - - this._hasMultipleDocumentSelectionFormattingProvider.set( - this._languageFeaturesService.documentRangeFormattingEditProvider.all( - model, - ).length > 1, - ); - - this._isInEmbeddedEditor.set( - model.uri.scheme === Schemas.walkThroughSnippet || - model.uri.scheme === Schemas.vscodeChatCodeBlock, - ); + this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(model)); + this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(model)); + this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(model)); + this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(model)); + this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(model)); + this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(model)); + this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(model)); + this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(model)); + this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(model)); + this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(model)); + this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(model)); + this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(model)); + this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(model)); + this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(model)); + this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(model) || this._languageFeaturesService.documentRangeFormattingEditProvider.has(model)); + this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(model)); + this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(model).length + this._languageFeaturesService.documentRangeFormattingEditProvider.all(model).length > 1); + this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(model).length > 1); + this._isInEmbeddedEditor.set(model.uri.scheme === Schemas.walkThroughSnippet || model.uri.scheme === Schemas.vscodeChatCodeBlock); }); } } class CodeEditorWidgetFocusTracker extends Disposable { - private _hasDomElementFocus: boolean; + private _hasDomElementFocus: boolean; private readonly _domFocusTracker: dom.IFocusTracker; - private readonly _overflowWidgetsDomNode: dom.IFocusTracker | undefined; - private readonly _onChange: Emitter = this._register( - new Emitter(), - ); - + private readonly _onChange: Emitter = this._register(new Emitter()); public readonly onChange: Event = this._onChange.event; private _overflowWidgetsDomNodeHasFocus: boolean; private _hadFocus: boolean | undefined = undefined; - constructor( - domElement: HTMLElement, - overflowWidgetsDomNode: HTMLElement | undefined, - ) { + constructor(domElement: HTMLElement, overflowWidgetsDomNode: HTMLElement | undefined) { super(); this._hasDomElementFocus = false; - this._domFocusTracker = this._register(dom.trackFocus(domElement)); this._overflowWidgetsDomNodeHasFocus = false; - this._register( - this._domFocusTracker.onDidFocus(() => { - this._hasDomElementFocus = true; + this._register(this._domFocusTracker.onDidFocus(() => { + this._hasDomElementFocus = true; + this._update(); + })); + this._register(this._domFocusTracker.onDidBlur(() => { + this._hasDomElementFocus = false; + this._update(); + })); + if (overflowWidgetsDomNode) { + this._overflowWidgetsDomNode = this._register(dom.trackFocus(overflowWidgetsDomNode)); + this._register(this._overflowWidgetsDomNode.onDidFocus(() => { + this._overflowWidgetsDomNodeHasFocus = true; this._update(); - }), - ); - - this._register( - this._domFocusTracker.onDidBlur(() => { - this._hasDomElementFocus = false; - + })); + this._register(this._overflowWidgetsDomNode.onDidBlur(() => { + this._overflowWidgetsDomNodeHasFocus = false; this._update(); - }), - ); - - if (overflowWidgetsDomNode) { - this._overflowWidgetsDomNode = this._register( - dom.trackFocus(overflowWidgetsDomNode), - ); - - this._register( - this._overflowWidgetsDomNode.onDidFocus(() => { - this._overflowWidgetsDomNodeHasFocus = true; - - this._update(); - }), - ); - - this._register( - this._overflowWidgetsDomNode.onDidBlur(() => { - this._overflowWidgetsDomNodeHasFocus = false; - - this._update(); - }), - ); + })); } } private _update() { - const focused = - this._hasDomElementFocus || this._overflowWidgetsDomNodeHasFocus; - + const focused = this._hasDomElementFocus || this._overflowWidgetsDomNodeHasFocus; if (this._hadFocus !== focused) { this._hadFocus = focused; - this._onChange.fire(undefined); } } @@ -3943,16 +2347,13 @@ class CodeEditorWidgetFocusTracker extends Disposable { public refreshState(): void { this._domFocusTracker.refreshState(); - this._overflowWidgetsDomNode?.refreshState?.(); } } -class EditorDecorationsCollection - implements editorCommon.IEditorDecorationsCollection -{ - private _decorationIds: string[] = []; +class EditorDecorationsCollection implements editorCommon.IEditorDecorationsCollection { + private _decorationIds: string[] = []; private _isChangingDecorations: boolean = false; public get length(): number { @@ -3961,23 +2362,18 @@ class EditorDecorationsCollection constructor( private readonly _editor: editorBrowser.ICodeEditor, - decorations: IModelDeltaDecoration[] | undefined, + decorations: IModelDeltaDecoration[] | undefined ) { if (Array.isArray(decorations) && decorations.length > 0) { this.set(decorations); } } - public onDidChange( - listener: (e: IModelDecorationsChangedEvent) => any, - thisArgs?: any, - disposables?: IDisposable[] | DisposableStore, - ): IDisposable { + public onDidChange(listener: (e: IModelDecorationsChangedEvent) => any, thisArgs?: any, disposables?: IDisposable[] | DisposableStore): IDisposable { return this._editor.onDidChangeModelDecorations((e) => { if (this._isChangingDecorations) { return; } - listener.call(thisArgs, e); }, disposables); } @@ -3986,33 +2382,24 @@ class EditorDecorationsCollection if (!this._editor.hasModel()) { return null; } - if (index >= this._decorationIds.length) { return null; } - - return this._editor - .getModel() - .getDecorationRange(this._decorationIds[index]); + return this._editor.getModel().getDecorationRange(this._decorationIds[index]); } public getRanges(): Range[] { if (!this._editor.hasModel()) { return []; } - const model = this._editor.getModel(); - const result: Range[] = []; - for (const decorationId of this._decorationIds) { const range = model.getDecorationRange(decorationId); - if (range) { result.push(range); } } - return result; } @@ -4025,69 +2412,45 @@ class EditorDecorationsCollection // nothing to do return; } - this.set([]); } public set(newDecorations: readonly IModelDeltaDecoration[]): string[] { try { this._isChangingDecorations = true; - this._editor.changeDecorations((accessor) => { - this._decorationIds = accessor.deltaDecorations( - this._decorationIds, - newDecorations, - ); + this._decorationIds = accessor.deltaDecorations(this._decorationIds, newDecorations); }); } finally { this._isChangingDecorations = false; } - return this._decorationIds; } public append(newDecorations: readonly IModelDeltaDecoration[]): string[] { let newDecorationIds: string[] = []; - try { this._isChangingDecorations = true; - this._editor.changeDecorations((accessor) => { - newDecorationIds = accessor.deltaDecorations( - [], - newDecorations, - ); - - this._decorationIds = - this._decorationIds.concat(newDecorationIds); + newDecorationIds = accessor.deltaDecorations([], newDecorations); + this._decorationIds = this._decorationIds.concat(newDecorationIds); }); } finally { this._isChangingDecorations = false; } - return newDecorationIds; } } -const squigglyStart = encodeURIComponent( - ``, -); +const squigglyStart = encodeURIComponent(``); function getSquigglySVGData(color: Color) { return squigglyStart + encodeURIComponent(color.toString()) + squigglyEnd; } -const dotdotdotStart = encodeURIComponent( - ``, -); +const dotdotdotStart = encodeURIComponent(``); function getDotDotDotSVGData(color: Color) { return dotdotdotStart + encodeURIComponent(color.toString()) + dotdotdotEnd; @@ -4095,42 +2458,23 @@ function getDotDotDotSVGData(color: Color) { registerThemingParticipant((theme, collector) => { const errorForeground = theme.getColor(editorErrorForeground); - if (errorForeground) { - collector.addRule( - `.monaco-editor .${ClassName.EditorErrorDecoration} { background: url("data:image/svg+xml,${getSquigglySVGData(errorForeground)}") repeat-x bottom left; }`, - ); + collector.addRule(`.monaco-editor .${ClassName.EditorErrorDecoration} { background: url("data:image/svg+xml,${getSquigglySVGData(errorForeground)}") repeat-x bottom left; }`); } - const warningForeground = theme.getColor(editorWarningForeground); - if (warningForeground) { - collector.addRule( - `.monaco-editor .${ClassName.EditorWarningDecoration} { background: url("data:image/svg+xml,${getSquigglySVGData(warningForeground)}") repeat-x bottom left; }`, - ); + collector.addRule(`.monaco-editor .${ClassName.EditorWarningDecoration} { background: url("data:image/svg+xml,${getSquigglySVGData(warningForeground)}") repeat-x bottom left; }`); } - const infoForeground = theme.getColor(editorInfoForeground); - if (infoForeground) { - collector.addRule( - `.monaco-editor .${ClassName.EditorInfoDecoration} { background: url("data:image/svg+xml,${getSquigglySVGData(infoForeground)}") repeat-x bottom left; }`, - ); + collector.addRule(`.monaco-editor .${ClassName.EditorInfoDecoration} { background: url("data:image/svg+xml,${getSquigglySVGData(infoForeground)}") repeat-x bottom left; }`); } - const hintForeground = theme.getColor(editorHintForeground); - if (hintForeground) { - collector.addRule( - `.monaco-editor .${ClassName.EditorHintDecoration} { background: url("data:image/svg+xml,${getDotDotDotSVGData(hintForeground)}") no-repeat bottom left; }`, - ); + collector.addRule(`.monaco-editor .${ClassName.EditorHintDecoration} { background: url("data:image/svg+xml,${getDotDotDotSVGData(hintForeground)}") no-repeat bottom left; }`); } - const unnecessaryForeground = theme.getColor(editorUnnecessaryCodeOpacity); - if (unnecessaryForeground) { - collector.addRule( - `.monaco-editor.showUnused .${ClassName.EditorUnnecessaryInlineDecoration} { opacity: ${unnecessaryForeground.rgba.a}; }`, - ); + collector.addRule(`.monaco-editor.showUnused .${ClassName.EditorUnnecessaryInlineDecoration} { opacity: ${unnecessaryForeground.rgba.a}; }`); } }); diff --git a/Source/vs/editor/contrib/colorPicker/browser/color.ts b/Source/vs/editor/contrib/colorPicker/browser/color.ts index 18ac137c4e9a2..3118b6d2383b8 100644 --- a/Source/vs/editor/contrib/colorPicker/browser/color.ts +++ b/Source/vs/editor/contrib/colorPicker/browser/color.ts @@ -2,173 +2,89 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { CancellationToken } from "../../../../base/common/cancellation.js"; -import { - illegalArgument, - onUnexpectedExternalError, -} from "../../../../base/common/errors.js"; -import { URI } from "../../../../base/common/uri.js"; -import { IConfigurationService } from "../../../../platform/configuration/common/configuration.js"; -import { ServicesAccessor } from "../../../browser/editorExtensions.js"; -import { IRange } from "../../../common/core/range.js"; -import { LanguageFeatureRegistry } from "../../../common/languageFeatureRegistry.js"; -import { - DocumentColorProvider, - IColorInformation, - IColorPresentation, -} from "../../../common/languages.js"; -import { ITextModel } from "../../../common/model.js"; -import { ILanguageFeaturesService } from "../../../common/services/languageFeatures.js"; -import { IModelService } from "../../../common/services/model.js"; -import { DefaultDocumentColorProvider } from "./defaultDocumentColorProvider.js"; -export async function getColors( - colorProviderRegistry: LanguageFeatureRegistry, - model: ITextModel, - token: CancellationToken, - isDefaultColorDecoratorsEnabled: boolean = true, -): Promise { - return _findColorData( - new ColorDataCollector(), - colorProviderRegistry, - model, - token, - isDefaultColorDecoratorsEnabled, - ); +import { CancellationToken } from '../../../../base/common/cancellation.js'; +import { illegalArgument, onUnexpectedExternalError } from '../../../../base/common/errors.js'; +import { URI } from '../../../../base/common/uri.js'; +import { IRange } from '../../../common/core/range.js'; +import { ITextModel } from '../../../common/model.js'; +import { DocumentColorProvider, IColorInformation, IColorPresentation } from '../../../common/languages.js'; +import { IModelService } from '../../../common/services/model.js'; +import { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js'; +import { LanguageFeatureRegistry } from '../../../common/languageFeatureRegistry.js'; +import { DefaultDocumentColorProvider } from './defaultDocumentColorProvider.js'; +import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js'; +import { ServicesAccessor } from '../../../browser/editorExtensions.js'; + +export async function getColors(colorProviderRegistry: LanguageFeatureRegistry, model: ITextModel, token: CancellationToken, defaultColorDecoratorsEnablement: 'auto' | 'always' | 'never' = 'auto'): Promise { + return _findColorData(new ColorDataCollector(), colorProviderRegistry, model, token, defaultColorDecoratorsEnablement); } -export function getColorPresentations( - model: ITextModel, - colorInfo: IColorInformation, - provider: DocumentColorProvider, - token: CancellationToken, -): Promise { - return Promise.resolve( - provider.provideColorPresentations(model, colorInfo, token), - ); + +export function getColorPresentations(model: ITextModel, colorInfo: IColorInformation, provider: DocumentColorProvider, token: CancellationToken): Promise { + return Promise.resolve(provider.provideColorPresentations(model, colorInfo, token)); } + export interface IColorData { colorInfo: IColorInformation; - provider: DocumentColorProvider; } -export interface IExtColorData { - range: IRange; - color: [number, number, number, number]; -} +export interface IExtColorData { range: IRange; color: [number, number, number, number] } + interface DataCollector { - compute( - provider: DocumentColorProvider, - model: ITextModel, - token: CancellationToken, - result: T[], - ): Promise; + compute(provider: DocumentColorProvider, model: ITextModel, token: CancellationToken, result: T[]): Promise; } -class ColorDataCollector implements DataCollector { - constructor() {} - - async compute( - provider: DocumentColorProvider, - model: ITextModel, - token: CancellationToken, - colors: IColorData[], - ): Promise { - const documentColors = await provider.provideDocumentColors( - model, - token, - ); +class ColorDataCollector implements DataCollector { + constructor() { } + async compute(provider: DocumentColorProvider, model: ITextModel, token: CancellationToken, colors: IColorData[]): Promise { + const documentColors = await provider.provideDocumentColors(model, token); if (Array.isArray(documentColors)) { for (const colorInfo of documentColors) { colors.push({ colorInfo, provider }); } } - return Array.isArray(documentColors); } } -export class ExtColorDataCollector implements DataCollector { - constructor() {} - - async compute( - provider: DocumentColorProvider, - model: ITextModel, - token: CancellationToken, - colors: IExtColorData[], - ): Promise { - const documentColors = await provider.provideDocumentColors( - model, - token, - ); +export class ExtColorDataCollector implements DataCollector { + constructor() { } + async compute(provider: DocumentColorProvider, model: ITextModel, token: CancellationToken, colors: IExtColorData[]): Promise { + const documentColors = await provider.provideDocumentColors(model, token); if (Array.isArray(documentColors)) { for (const colorInfo of documentColors) { - colors.push({ - range: colorInfo.range, - color: [ - colorInfo.color.red, - colorInfo.color.green, - colorInfo.color.blue, - colorInfo.color.alpha, - ], - }); + colors.push({ range: colorInfo.range, color: [colorInfo.color.red, colorInfo.color.green, colorInfo.color.blue, colorInfo.color.alpha] }); } } - return Array.isArray(documentColors); } -} -export class ColorPresentationsCollector - implements DataCollector -{ - constructor(private colorInfo: IColorInformation) {} - async compute( - provider: DocumentColorProvider, - model: ITextModel, - _token: CancellationToken, - colors: IColorPresentation[], - ): Promise { - const documentColors = await provider.provideColorPresentations( - model, - this.colorInfo, - CancellationToken.None, - ); +} +export class ColorPresentationsCollector implements DataCollector { + constructor(private colorInfo: IColorInformation) { } + async compute(provider: DocumentColorProvider, model: ITextModel, _token: CancellationToken, colors: IColorPresentation[]): Promise { + const documentColors = await provider.provideColorPresentations(model, this.colorInfo, CancellationToken.None); if (Array.isArray(documentColors)) { colors.push(...documentColors); } - return Array.isArray(documentColors); } } -export async function _findColorData< - T extends IColorPresentation | IExtColorData | IColorData, ->( - collector: DataCollector, - colorProviderRegistry: LanguageFeatureRegistry, - model: ITextModel, - token: CancellationToken, - isDefaultColorDecoratorsEnabled: boolean, -): Promise { - let validDocumentColorProviderFound = false; +export async function _findColorData(collector: DataCollector, colorProviderRegistry: LanguageFeatureRegistry, model: ITextModel, token: CancellationToken, defaultColorDecoratorsEnablement: 'auto' | 'always' | 'never'): Promise { + let validDocumentColorProviderFound = false; let defaultProvider: DefaultDocumentColorProvider | undefined; - const colorData: T[] = []; - const documentColorProviders = colorProviderRegistry.ordered(model); - for (let i = documentColorProviders.length - 1; i >= 0; i--) { const provider = documentColorProviders[i]; - - if (provider instanceof DefaultDocumentColorProvider) { + if (defaultColorDecoratorsEnablement !== 'always' && provider instanceof DefaultDocumentColorProvider) { defaultProvider = provider; } else { try { - if ( - await collector.compute(provider, model, token, colorData) - ) { + if (await collector.compute(provider, model, token, colorData)) { validDocumentColorProviderFound = true; } } catch (e) { @@ -176,42 +92,23 @@ export async function _findColorData< } } } - if (validDocumentColorProviderFound) { return colorData; } - - if (defaultProvider && isDefaultColorDecoratorsEnabled) { + if (defaultProvider && defaultColorDecoratorsEnablement !== 'never') { await collector.compute(defaultProvider, model, token, colorData); - return colorData; } - return []; } -export function _setupColorCommand( - accessor: ServicesAccessor, - resource: URI, -): { - model: ITextModel; - - colorProviderRegistry: LanguageFeatureRegistry; - - isDefaultColorDecoratorsEnabled: boolean; -} { - const { colorProvider: colorProviderRegistry } = accessor.get( - ILanguageFeaturesService, - ); +export function _setupColorCommand(accessor: ServicesAccessor, resource: URI): { model: ITextModel; colorProviderRegistry: LanguageFeatureRegistry; defaultColorDecoratorsEnablement: 'auto' | 'always' | 'never' } { + const { colorProvider: colorProviderRegistry } = accessor.get(ILanguageFeaturesService); const model = accessor.get(IModelService).getModel(resource); - if (!model) { throw illegalArgument(); } - - const isDefaultColorDecoratorsEnabled = accessor - .get(IConfigurationService) - .getValue("editor.defaultColorDecorators", { resource }); - - return { model, colorProviderRegistry, isDefaultColorDecoratorsEnabled }; + const defaultColorDecoratorsEnablement = accessor.get(IConfigurationService).getValue<'auto' | 'always' | 'never'>('editor.defaultColorDecorators', { resource }); + return { model, colorProviderRegistry, defaultColorDecoratorsEnablement }; } + diff --git a/Source/vs/editor/contrib/colorPicker/browser/colorPickerContribution.ts b/Source/vs/editor/contrib/colorPicker/browser/colorPickerContribution.ts index b6f06f6bbe4a1..68f4e89edc8a2 100644 --- a/Source/vs/editor/contrib/colorPicker/browser/colorPickerContribution.ts +++ b/Source/vs/editor/contrib/colorPicker/browser/colorPickerContribution.ts @@ -2,115 +2,52 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { CancellationToken } from "../../../../base/common/cancellation.js"; -import { illegalArgument } from "../../../../base/common/errors.js"; -import { URI } from "../../../../base/common/uri.js"; -import { registerAction2 } from "../../../../platform/actions/common/actions.js"; -import { CommandsRegistry } from "../../../../platform/commands/common/commands.js"; -import { - EditorContributionInstantiation, - registerEditorAction, - registerEditorContribution, -} from "../../../browser/editorExtensions.js"; -import { Range } from "../../../common/core/range.js"; -import { registerEditorFeature } from "../../../common/editorFeatures.js"; -import { IColorPresentation } from "../../../common/languages.js"; -import { HoverParticipantRegistry } from "../../hover/browser/hoverTypes.js"; -import { - _findColorData, - _setupColorCommand, - ColorPresentationsCollector, - ExtColorDataCollector, - IExtColorData, -} from "./color.js"; -import { ColorDetector } from "./colorDetector.js"; -import { DefaultDocumentColorProviderFeature } from "./defaultDocumentColorProvider.js"; -import { HoverColorPickerContribution } from "./hoverColorPicker/hoverColorPickerContribution.js"; -import { HoverColorPickerParticipant } from "./hoverColorPicker/hoverColorPickerParticipant.js"; -import { - HideStandaloneColorPicker, - InsertColorWithStandaloneColorPicker, - ShowOrFocusStandaloneColorPicker, -} from "./standaloneColorPicker/standaloneColorPickerActions.js"; -import { StandaloneColorPickerController } from "./standaloneColorPicker/standaloneColorPickerController.js"; + +import { CancellationToken } from '../../../../base/common/cancellation.js'; +import { illegalArgument } from '../../../../base/common/errors.js'; +import { URI } from '../../../../base/common/uri.js'; +import { registerAction2 } from '../../../../platform/actions/common/actions.js'; +import { CommandsRegistry } from '../../../../platform/commands/common/commands.js'; +import { EditorContributionInstantiation, registerEditorAction, registerEditorContribution } from '../../../browser/editorExtensions.js'; +import { registerEditorFeature } from '../../../common/editorFeatures.js'; +import { IColorPresentation } from '../../../common/languages.js'; +import { HoverParticipantRegistry } from '../../hover/browser/hoverTypes.js'; +import { _findColorData, _setupColorCommand, ColorPresentationsCollector, ExtColorDataCollector, IExtColorData } from './color.js'; +import { ColorDetector } from './colorDetector.js'; +import { DefaultDocumentColorProviderFeature } from './defaultDocumentColorProvider.js'; +import { HoverColorPickerContribution } from './hoverColorPicker/hoverColorPickerContribution.js'; +import { HoverColorPickerParticipant } from './hoverColorPicker/hoverColorPickerParticipant.js'; +import { HideStandaloneColorPicker, InsertColorWithStandaloneColorPicker, ShowOrFocusStandaloneColorPicker } from './standaloneColorPicker/standaloneColorPickerActions.js'; +import { StandaloneColorPickerController } from './standaloneColorPicker/standaloneColorPickerController.js'; +import { Range } from '../../../common/core/range.js'; registerEditorAction(HideStandaloneColorPicker); registerEditorAction(InsertColorWithStandaloneColorPicker); registerAction2(ShowOrFocusStandaloneColorPicker); -registerEditorContribution( - HoverColorPickerContribution.ID, - HoverColorPickerContribution, - EditorContributionInstantiation.BeforeFirstInteraction, -); -registerEditorContribution( - StandaloneColorPickerController.ID, - StandaloneColorPickerController, - EditorContributionInstantiation.AfterFirstRender, -); -registerEditorContribution( - ColorDetector.ID, - ColorDetector, - EditorContributionInstantiation.AfterFirstRender, -); -registerEditorFeature(DefaultDocumentColorProviderFeature); -HoverParticipantRegistry.register(HoverColorPickerParticipant); -CommandsRegistry.registerCommand( - "_executeDocumentColorProvider", - function (accessor, ...args) { - const [resource] = args; - - if (!(resource instanceof URI)) { - throw illegalArgument(); - } - - const { - model, - colorProviderRegistry, - isDefaultColorDecoratorsEnabled, - } = _setupColorCommand(accessor, resource); - return _findColorData( - new ExtColorDataCollector(), - colorProviderRegistry, - model, - CancellationToken.None, - isDefaultColorDecoratorsEnabled, - ); - }, -); -CommandsRegistry.registerCommand( - "_executeColorPresentationProvider", - function (accessor, ...args) { - const [color, context] = args; - - const { uri, range } = context; - - if ( - !(uri instanceof URI) || - !Array.isArray(color) || - color.length !== 4 || - !Range.isIRange(range) - ) { - throw illegalArgument(); - } - - const { - model, - colorProviderRegistry, - isDefaultColorDecoratorsEnabled, - } = _setupColorCommand(accessor, uri); +registerEditorContribution(HoverColorPickerContribution.ID, HoverColorPickerContribution, EditorContributionInstantiation.BeforeFirstInteraction); +registerEditorContribution(StandaloneColorPickerController.ID, StandaloneColorPickerController, EditorContributionInstantiation.AfterFirstRender); +registerEditorContribution(ColorDetector.ID, ColorDetector, EditorContributionInstantiation.AfterFirstRender); +registerEditorFeature(DefaultDocumentColorProviderFeature); - const [red, green, blue, alpha] = color; +HoverParticipantRegistry.register(HoverColorPickerParticipant); - return _findColorData( - new ColorPresentationsCollector({ - range: range, - color: { red, green, blue, alpha }, - }), - colorProviderRegistry, - model, - CancellationToken.None, - isDefaultColorDecoratorsEnabled, - ); - }, -); +CommandsRegistry.registerCommand('_executeDocumentColorProvider', function (accessor, ...args) { + const [resource] = args; + if (!(resource instanceof URI)) { + throw illegalArgument(); + } + const { model, colorProviderRegistry, defaultColorDecoratorsEnablement } = _setupColorCommand(accessor, resource); + return _findColorData(new ExtColorDataCollector(), colorProviderRegistry, model, CancellationToken.None, defaultColorDecoratorsEnablement); +}); + +CommandsRegistry.registerCommand('_executeColorPresentationProvider', function (accessor, ...args) { + const [color, context] = args; + const { uri, range } = context; + if (!(uri instanceof URI) || !Array.isArray(color) || color.length !== 4 || !Range.isIRange(range)) { + throw illegalArgument(); + } + const { model, colorProviderRegistry, defaultColorDecoratorsEnablement } = _setupColorCommand(accessor, uri); + const [red, green, blue, alpha] = color; + return _findColorData(new ColorPresentationsCollector({ range: range, color: { red, green, blue, alpha } }), colorProviderRegistry, model, CancellationToken.None, defaultColorDecoratorsEnablement); +}); diff --git a/Source/vs/editor/contrib/find/browser/findController.ts b/Source/vs/editor/contrib/find/browser/findController.ts index 5379d28e99ab2..128d89dc571f3 100644 --- a/Source/vs/editor/contrib/find/browser/findController.ts +++ b/Source/vs/editor/contrib/find/browser/findController.ts @@ -3,85 +3,40 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Delayer } from "../../../../base/common/async.js"; -import { KeyCode, KeyMod } from "../../../../base/common/keyCodes.js"; -import { - Disposable, - DisposableStore, -} from "../../../../base/common/lifecycle.js"; -import * as strings from "../../../../base/common/strings.js"; -import * as nls from "../../../../nls.js"; -import { MenuId } from "../../../../platform/actions/common/actions.js"; -import { IClipboardService } from "../../../../platform/clipboard/common/clipboardService.js"; -import { - ContextKeyExpr, - IContextKey, - IContextKeyService, -} from "../../../../platform/contextkey/common/contextkey.js"; -import { IContextViewService } from "../../../../platform/contextview/browser/contextView.js"; -import { IHoverService } from "../../../../platform/hover/browser/hover.js"; -import { IKeybindingService } from "../../../../platform/keybinding/common/keybinding.js"; -import { KeybindingWeight } from "../../../../platform/keybinding/common/keybindingsRegistry.js"; -import { - INotificationService, - Severity, -} from "../../../../platform/notification/common/notification.js"; -import { IQuickInputService } from "../../../../platform/quickinput/common/quickInput.js"; -import { - IStorageService, - StorageScope, - StorageTarget, -} from "../../../../platform/storage/common/storage.js"; -import { - IThemeService, - themeColorFromId, -} from "../../../../platform/theme/common/themeService.js"; -import { ICodeEditor } from "../../../browser/editorBrowser.js"; -import { - EditorAction, - EditorCommand, - EditorContributionInstantiation, - MultiEditorAction, - registerEditorAction, - registerEditorCommand, - registerEditorContribution, - registerMultiEditorAction, - ServicesAccessor, -} from "../../../browser/editorExtensions.js"; -import { EditorOption } from "../../../common/config/editorOptions.js"; -import { overviewRulerRangeHighlight } from "../../../common/core/editorColorRegistry.js"; -import { IRange } from "../../../common/core/range.js"; -import { Selection } from "../../../common/core/selection.js"; -import { IEditorContribution } from "../../../common/editorCommon.js"; -import { EditorContextKeys } from "../../../common/editorContextKeys.js"; -import { OverviewRulerLane } from "../../../common/model.js"; -import { - CONTEXT_FIND_INPUT_FOCUSED, - CONTEXT_FIND_WIDGET_VISIBLE, - CONTEXT_REPLACE_INPUT_FOCUSED, - FIND_IDS, - FindModelBoundToEditorModel, - ToggleCaseSensitiveKeybinding, - TogglePreserveCaseKeybinding, - ToggleRegexKeybinding, - ToggleSearchScopeKeybinding, - ToggleWholeWordKeybinding, -} from "./findModel.js"; -import { FindOptionsWidget } from "./findOptionsWidget.js"; -import { - FindReplaceState, - FindReplaceStateChangedEvent, - INewFindReplaceState, -} from "./findState.js"; -import { FindWidget, IFindController } from "./findWidget.js"; +import { Delayer } from '../../../../base/common/async.js'; +import { KeyCode, KeyMod } from '../../../../base/common/keyCodes.js'; +import { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js'; +import * as strings from '../../../../base/common/strings.js'; +import { ICodeEditor } from '../../../browser/editorBrowser.js'; +import { EditorAction, EditorCommand, EditorContributionInstantiation, MultiEditorAction, registerEditorAction, registerEditorCommand, registerEditorContribution, registerMultiEditorAction, ServicesAccessor } from '../../../browser/editorExtensions.js'; +import { EditorOption } from '../../../common/config/editorOptions.js'; +import { overviewRulerRangeHighlight } from '../../../common/core/editorColorRegistry.js'; +import { IRange } from '../../../common/core/range.js'; +import { IEditorContribution } from '../../../common/editorCommon.js'; +import { EditorContextKeys } from '../../../common/editorContextKeys.js'; +import { OverviewRulerLane } from '../../../common/model.js'; +import { CONTEXT_FIND_INPUT_FOCUSED, CONTEXT_FIND_WIDGET_VISIBLE, CONTEXT_REPLACE_INPUT_FOCUSED, FindModelBoundToEditorModel, FIND_IDS, ToggleCaseSensitiveKeybinding, TogglePreserveCaseKeybinding, ToggleRegexKeybinding, ToggleSearchScopeKeybinding, ToggleWholeWordKeybinding } from './findModel.js'; +import { FindOptionsWidget } from './findOptionsWidget.js'; +import { FindReplaceState, FindReplaceStateChangedEvent, INewFindReplaceState } from './findState.js'; +import { FindWidget, IFindController } from './findWidget.js'; +import * as nls from '../../../../nls.js'; +import { MenuId } from '../../../../platform/actions/common/actions.js'; +import { IClipboardService } from '../../../../platform/clipboard/common/clipboardService.js'; +import { ContextKeyExpr, IContextKey, IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js'; +import { IContextViewService } from '../../../../platform/contextview/browser/contextView.js'; +import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js'; +import { KeybindingWeight } from '../../../../platform/keybinding/common/keybindingsRegistry.js'; +import { INotificationService, Severity } from '../../../../platform/notification/common/notification.js'; +import { IQuickInputService } from '../../../../platform/quickinput/common/quickInput.js'; +import { IStorageService, StorageScope, StorageTarget } from '../../../../platform/storage/common/storage.js'; +import { IThemeService, themeColorFromId } from '../../../../platform/theme/common/themeService.js'; +import { Selection } from '../../../common/core/selection.js'; +import { IHoverService } from '../../../../platform/hover/browser/hover.js'; +import { FindWidgetSearchHistory } from './findWidgetSearchHistory.js'; const SEARCH_STRING_MAX_LENGTH = 524288; -export function getSelectionSearchString( - editor: ICodeEditor, - seedSearchStringFromSelection: "single" | "multiple" = "single", - seedSearchStringFromNonEmptySelection: boolean = false, -): string | null { +export function getSelectionSearchString(editor: ICodeEditor, seedSearchStringFromSelection: 'single' | 'multiple' = 'single', seedSearchStringFromNonEmptySelection: boolean = false): string | null { if (!editor.hasModel()) { return null; } @@ -89,27 +44,15 @@ export function getSelectionSearchString( const selection = editor.getSelection(); // if selection spans multiple lines, default search string to empty - if ( - (seedSearchStringFromSelection === "single" && - selection.startLineNumber === selection.endLineNumber) || - seedSearchStringFromSelection === "multiple" - ) { + if ((seedSearchStringFromSelection === 'single' && selection.startLineNumber === selection.endLineNumber) + || seedSearchStringFromSelection === 'multiple') { if (selection.isEmpty()) { - const wordAtPosition = editor.getConfiguredWordAtPosition( - selection.getStartPosition(), - ); - - if ( - wordAtPosition && - false === seedSearchStringFromNonEmptySelection - ) { + const wordAtPosition = editor.getConfiguredWordAtPosition(selection.getStartPosition()); + if (wordAtPosition && (false === seedSearchStringFromNonEmptySelection)) { return wordAtPosition.word; } } else { - if ( - editor.getModel().getValueLengthInRange(selection) < - SEARCH_STRING_MAX_LENGTH - ) { + if (editor.getModel().getValueLengthInRange(selection) < SEARCH_STRING_MAX_LENGTH) { return editor.getModel().getValueInRange(selection); } } @@ -121,67 +64,43 @@ export function getSelectionSearchString( export const enum FindStartFocusAction { NoFocusChange, FocusFindInput, - FocusReplaceInput, + FocusReplaceInput } export interface IFindStartOptions { forceRevealReplace: boolean; - - seedSearchStringFromSelection: "none" | "single" | "multiple"; - + seedSearchStringFromSelection: 'none' | 'single' | 'multiple'; seedSearchStringFromNonEmptySelection: boolean; - seedSearchStringFromGlobalClipboard: boolean; - shouldFocus: FindStartFocusAction; - shouldAnimate: boolean; - updateSearchScope: boolean; - loop: boolean; } export interface IFindStartArguments { searchString?: string; - replaceString?: string; - isRegex?: boolean; - matchWholeWord?: boolean; - isCaseSensitive?: boolean; - preserveCase?: boolean; - findInSelection?: boolean; } -export class CommonFindController - extends Disposable - implements IEditorContribution -{ - public static readonly ID = "editor.contrib.findController"; +export class CommonFindController extends Disposable implements IEditorContribution { - protected _editor: ICodeEditor; + public static readonly ID = 'editor.contrib.findController'; + protected _editor: ICodeEditor; private readonly _findWidgetVisible: IContextKey; - protected _state: FindReplaceState; - protected _updateHistoryDelayer: Delayer; - private _model: FindModelBoundToEditorModel | null; - protected readonly _storageService: IStorageService; - private readonly _clipboardService: IClipboardService; - protected readonly _contextKeyService: IContextKeyService; - protected readonly _notificationService: INotificationService; - protected readonly _hoverService: IHoverService; get editor() { @@ -189,9 +108,7 @@ export class CommonFindController } public static get(editor: ICodeEditor): CommonFindController | null { - return editor.getContribution( - CommonFindController.ID, - ); + return editor.getContribution(CommonFindController.ID); } constructor( @@ -200,99 +117,60 @@ export class CommonFindController @IStorageService storageService: IStorageService, @IClipboardService clipboardService: IClipboardService, @INotificationService notificationService: INotificationService, - @IHoverService hoverService: IHoverService, + @IHoverService hoverService: IHoverService ) { super(); - this._editor = editor; - - this._findWidgetVisible = - CONTEXT_FIND_WIDGET_VISIBLE.bindTo(contextKeyService); - + this._findWidgetVisible = CONTEXT_FIND_WIDGET_VISIBLE.bindTo(contextKeyService); this._contextKeyService = contextKeyService; - this._storageService = storageService; - this._clipboardService = clipboardService; - this._notificationService = notificationService; - this._hoverService = hoverService; this._updateHistoryDelayer = new Delayer(500); - this._state = this._register(new FindReplaceState()); - this.loadQueryState(); - - this._register( - this._state.onFindReplaceStateChange((e) => - this._onStateChanged(e), - ), - ); + this._register(this._state.onFindReplaceStateChange((e) => this._onStateChanged(e))); this._model = null; - this._register( - this._editor.onDidChangeModel(() => { - const shouldRestartFind = - this._editor.getModel() && this._state.isRevealed; + this._register(this._editor.onDidChangeModel(() => { + const shouldRestartFind = (this._editor.getModel() && this._state.isRevealed); - this.disposeModel(); + this.disposeModel(); - this._state.change( - { - searchScope: null, - matchCase: this._storageService.getBoolean( - "editor.matchCase", - StorageScope.WORKSPACE, - false, - ), - wholeWord: this._storageService.getBoolean( - "editor.wholeWord", - StorageScope.WORKSPACE, - false, - ), - isRegex: this._storageService.getBoolean( - "editor.isRegex", - StorageScope.WORKSPACE, - false, - ), - preserveCase: this._storageService.getBoolean( - "editor.preserveCase", - StorageScope.WORKSPACE, - false, - ), - }, - false, - ); - - if (shouldRestartFind) { - this._start({ - forceRevealReplace: false, - seedSearchStringFromSelection: "none", - seedSearchStringFromNonEmptySelection: false, - seedSearchStringFromGlobalClipboard: false, - shouldFocus: FindStartFocusAction.NoFocusChange, - shouldAnimate: false, - updateSearchScope: false, - loop: this._editor.getOption(EditorOption.find).loop, - }); - } - }), - ); + this._state.change({ + searchScope: null, + matchCase: this._storageService.getBoolean('editor.matchCase', StorageScope.WORKSPACE, false), + wholeWord: this._storageService.getBoolean('editor.wholeWord', StorageScope.WORKSPACE, false), + isRegex: this._storageService.getBoolean('editor.isRegex', StorageScope.WORKSPACE, false), + preserveCase: this._storageService.getBoolean('editor.preserveCase', StorageScope.WORKSPACE, false) + }, false); + + if (shouldRestartFind) { + this._start({ + forceRevealReplace: false, + seedSearchStringFromSelection: 'none', + seedSearchStringFromNonEmptySelection: false, + seedSearchStringFromGlobalClipboard: false, + shouldFocus: FindStartFocusAction.NoFocusChange, + shouldAnimate: false, + updateSearchScope: false, + loop: this._editor.getOption(EditorOption.find).loop + }); + } + })); } public override dispose(): void { this.disposeModel(); - super.dispose(); } private disposeModel(): void { if (this._model) { this._model.dispose(); - this._model = null; } } @@ -305,11 +183,9 @@ export class CommonFindController this._findWidgetVisible.set(true); } else { this._findWidgetVisible.reset(); - this.disposeModel(); } } - if (e.searchString) { this.setGlobalBufferTerm(this._state.searchString); } @@ -317,68 +193,26 @@ export class CommonFindController private saveQueryState(e: FindReplaceStateChangedEvent) { if (e.isRegex) { - this._storageService.store( - "editor.isRegex", - this._state.actualIsRegex, - StorageScope.WORKSPACE, - StorageTarget.MACHINE, - ); + this._storageService.store('editor.isRegex', this._state.actualIsRegex, StorageScope.WORKSPACE, StorageTarget.MACHINE); } - if (e.wholeWord) { - this._storageService.store( - "editor.wholeWord", - this._state.actualWholeWord, - StorageScope.WORKSPACE, - StorageTarget.MACHINE, - ); + this._storageService.store('editor.wholeWord', this._state.actualWholeWord, StorageScope.WORKSPACE, StorageTarget.MACHINE); } - if (e.matchCase) { - this._storageService.store( - "editor.matchCase", - this._state.actualMatchCase, - StorageScope.WORKSPACE, - StorageTarget.MACHINE, - ); + this._storageService.store('editor.matchCase', this._state.actualMatchCase, StorageScope.WORKSPACE, StorageTarget.MACHINE); } - if (e.preserveCase) { - this._storageService.store( - "editor.preserveCase", - this._state.actualPreserveCase, - StorageScope.WORKSPACE, - StorageTarget.MACHINE, - ); + this._storageService.store('editor.preserveCase', this._state.actualPreserveCase, StorageScope.WORKSPACE, StorageTarget.MACHINE); } } private loadQueryState() { - this._state.change( - { - matchCase: this._storageService.getBoolean( - "editor.matchCase", - StorageScope.WORKSPACE, - this._state.matchCase, - ), - wholeWord: this._storageService.getBoolean( - "editor.wholeWord", - StorageScope.WORKSPACE, - this._state.wholeWord, - ), - isRegex: this._storageService.getBoolean( - "editor.isRegex", - StorageScope.WORKSPACE, - this._state.isRegex, - ), - preserveCase: this._storageService.getBoolean( - "editor.preserveCase", - StorageScope.WORKSPACE, - this._state.preserveCase, - ), - }, - false, - ); + this._state.change({ + matchCase: this._storageService.getBoolean('editor.matchCase', StorageScope.WORKSPACE, this._state.matchCase), + wholeWord: this._storageService.getBoolean('editor.wholeWord', StorageScope.WORKSPACE, this._state.wholeWord), + isRegex: this._storageService.getBoolean('editor.isRegex', StorageScope.WORKSPACE, this._state.isRegex), + preserveCase: this._storageService.getBoolean('editor.preserveCase', StorageScope.WORKSPACE, this._state.preserveCase) + }, false); } public isFindInputFocused(): boolean { @@ -390,20 +224,15 @@ export class CommonFindController } public closeFindWidget(): void { - this._state.change( - { - isRevealed: false, - searchScope: null, - }, - false, - ); - + this._state.change({ + isRevealed: false, + searchScope: null + }, false); this._editor.focus(); } public toggleCaseSensitive(): void { this._state.change({ matchCase: !this._state.matchCase }, false); - if (!this._state.isRevealed) { this.highlightFindOptions(); } @@ -411,7 +240,6 @@ export class CommonFindController public toggleWholeWords(): void { this._state.change({ wholeWord: !this._state.wholeWord }, false); - if (!this._state.isRevealed) { this.highlightFindOptions(); } @@ -419,7 +247,6 @@ export class CommonFindController public toggleRegex(): void { this._state.change({ isRegex: !this._state.isRegex }, false); - if (!this._state.isRevealed) { this.highlightFindOptions(); } @@ -427,7 +254,6 @@ export class CommonFindController public togglePreserveCase(): void { this._state.change({ preserveCase: !this._state.preserveCase }, false); - if (!this._state.isRevealed) { this.highlightFindOptions(); } @@ -439,30 +265,18 @@ export class CommonFindController } else { if (this._editor.hasModel()) { let selections = this._editor.getSelections(); - - selections = selections - .map((selection) => { - if ( - selection.endColumn === 1 && - selection.endLineNumber > selection.startLineNumber - ) { - selection = selection.setEndPosition( - selection.endLineNumber - 1, - this._editor - .getModel()! - .getLineMaxColumn( - selection.endLineNumber - 1, - ), - ); - } - - if (!selection.isEmpty()) { - return selection; - } - - return null; - }) - .filter((element): element is Selection => !!element); + selections = selections.map(selection => { + if (selection.endColumn === 1 && selection.endLineNumber > selection.startLineNumber) { + selection = selection.setEndPosition( + selection.endLineNumber - 1, + this._editor.getModel()!.getLineMaxColumn(selection.endLineNumber - 1) + ); + } + if (!selection.isEmpty()) { + return selection; + } + return null; + }).filter((element): element is Selection => !!element); if (selections.length) { this._state.change({ searchScope: selections }, true); @@ -475,7 +289,6 @@ export class CommonFindController if (this._state.isRegex) { searchString = strings.escapeRegExpCharacters(searchString); } - this._state.change({ searchString: searchString }, false); } @@ -483,10 +296,7 @@ export class CommonFindController // overwritten in subclass } - protected async _start( - opts: IFindStartOptions, - newState?: INewFindReplaceState, - ): Promise { + protected async _start(opts: IFindStartOptions, newState?: INewFindReplaceState): Promise { this.disposeModel(); if (!this._editor.hasModel()) { @@ -496,43 +306,26 @@ export class CommonFindController const stateChanges: INewFindReplaceState = { ...newState, - isRevealed: true, + isRevealed: true }; - if (opts.seedSearchStringFromSelection === "single") { - const selectionSearchString = getSelectionSearchString( - this._editor, - opts.seedSearchStringFromSelection, - opts.seedSearchStringFromNonEmptySelection, - ); - + if (opts.seedSearchStringFromSelection === 'single') { + const selectionSearchString = getSelectionSearchString(this._editor, opts.seedSearchStringFromSelection, opts.seedSearchStringFromNonEmptySelection); if (selectionSearchString) { if (this._state.isRegex) { - stateChanges.searchString = strings.escapeRegExpCharacters( - selectionSearchString, - ); + stateChanges.searchString = strings.escapeRegExpCharacters(selectionSearchString); } else { stateChanges.searchString = selectionSearchString; } } - } else if ( - opts.seedSearchStringFromSelection === "multiple" && - !opts.updateSearchScope - ) { - const selectionSearchString = getSelectionSearchString( - this._editor, - opts.seedSearchStringFromSelection, - ); - + } else if (opts.seedSearchStringFromSelection === 'multiple' && !opts.updateSearchScope) { + const selectionSearchString = getSelectionSearchString(this._editor, opts.seedSearchStringFromSelection); if (selectionSearchString) { stateChanges.searchString = selectionSearchString; } } - if ( - !stateChanges.searchString && - opts.seedSearchStringFromGlobalClipboard - ) { + if (!stateChanges.searchString && opts.seedSearchStringFromGlobalClipboard) { const selectionSearchString = await this.getGlobalBufferTerm(); if (!this._editor.hasModel()) { @@ -554,8 +347,7 @@ export class CommonFindController if (opts.updateSearchScope) { const currentSelections = this._editor.getSelections(); - - if (currentSelections.some((selection) => !selection.isEmpty())) { + if (currentSelections.some(selection => !selection.isEmpty())) { stateChanges.searchScope = currentSelections; } } @@ -565,110 +357,81 @@ export class CommonFindController this._state.change(stateChanges, false); if (!this._model) { - this._model = new FindModelBoundToEditorModel( - this._editor, - this._state, - ); + this._model = new FindModelBoundToEditorModel(this._editor, this._state); } } - public start( - opts: IFindStartOptions, - newState?: INewFindReplaceState, - ): Promise { + public start(opts: IFindStartOptions, newState?: INewFindReplaceState): Promise { return this._start(opts, newState); } public moveToNextMatch(): boolean { if (this._model) { this._model.moveToNextMatch(); - return true; } - return false; } public moveToPrevMatch(): boolean { if (this._model) { this._model.moveToPrevMatch(); - return true; } - return false; } public goToMatch(index: number): boolean { if (this._model) { this._model.moveToMatch(index); - return true; } - return false; } public replace(): boolean { if (this._model) { this._model.replace(); - return true; } - return false; } public replaceAll(): boolean { if (this._model) { if (this._editor.getModel()?.isTooLargeForHeapOperation()) { - this._notificationService.warn( - nls.localize( - "too.large.for.replaceall", - "The file is too large to perform a replace all operation.", - ), - ); - + this._notificationService.warn(nls.localize('too.large.for.replaceall', "The file is too large to perform a replace all operation.")); return false; } - this._model.replaceAll(); - return true; } - return false; } public selectAllMatches(): boolean { if (this._model) { this._model.selectAllMatches(); - this._editor.focus(); - return true; } - return false; } public async getGlobalBufferTerm(): Promise { - if ( - this._editor.getOption(EditorOption.find).globalFindClipboard && - this._editor.hasModel() && - !this._editor.getModel().isTooLargeForSyncing() + if (this._editor.getOption(EditorOption.find).globalFindClipboard + && this._editor.hasModel() + && !this._editor.getModel().isTooLargeForSyncing() ) { return this._clipboardService.readFindText(); } - - return ""; + return ''; } public setGlobalBufferTerm(text: string): void { - if ( - this._editor.getOption(EditorOption.find).globalFindClipboard && - this._editor.hasModel() && - !this._editor.getModel().isTooLargeForSyncing() + if (this._editor.getOption(EditorOption.find).globalFindClipboard + && this._editor.hasModel() + && !this._editor.getModel().isTooLargeForSyncing() ) { // intentionally not awaited this._clipboardService.writeFindText(text); @@ -676,74 +439,49 @@ export class CommonFindController } } -export class FindController - extends CommonFindController - implements IFindController -{ - private _widget: FindWidget | null; +export class FindController extends CommonFindController implements IFindController { + private _widget: FindWidget | null; private _findOptionsWidget: FindOptionsWidget | null; + private _findWidgetSearchHistory: FindWidgetSearchHistory; constructor( editor: ICodeEditor, - @IContextViewService - private readonly _contextViewService: IContextViewService, + @IContextViewService private readonly _contextViewService: IContextViewService, @IContextKeyService _contextKeyService: IContextKeyService, - @IKeybindingService - private readonly _keybindingService: IKeybindingService, + @IKeybindingService private readonly _keybindingService: IKeybindingService, @IThemeService private readonly _themeService: IThemeService, @INotificationService notificationService: INotificationService, @IStorageService _storageService: IStorageService, @IClipboardService clipboardService: IClipboardService, @IHoverService hoverService: IHoverService, ) { - super( - editor, - _contextKeyService, - _storageService, - clipboardService, - notificationService, - hoverService, - ); - + super(editor, _contextKeyService, _storageService, clipboardService, notificationService, hoverService); this._widget = null; - this._findOptionsWidget = null; + this._findWidgetSearchHistory = FindWidgetSearchHistory.getOrCreate(_storageService); } - protected override async _start( - opts: IFindStartOptions, - newState?: INewFindReplaceState, - ): Promise { + protected override async _start(opts: IFindStartOptions, newState?: INewFindReplaceState): Promise { if (!this._widget) { this._createFindWidget(); } const selection = this._editor.getSelection(); - let updateSearchScope = false; switch (this._editor.getOption(EditorOption.find).autoFindInSelection) { - case "always": + case 'always': updateSearchScope = true; - break; - - case "never": + case 'never': updateSearchScope = false; - break; - - case "multiline": { - const isSelectionMultipleLine = - !!selection && - selection.startLineNumber !== selection.endLineNumber; - + case 'multiline': { + const isSelectionMultipleLine = !!selection && selection.startLineNumber !== selection.endLineNumber; updateSearchScope = isSelectionMultipleLine; - break; } - default: break; } @@ -755,21 +493,16 @@ export class FindController if (this._widget) { if (opts.shouldFocus === FindStartFocusAction.FocusReplaceInput) { this._widget.focusReplaceInput(); - } else if ( - opts.shouldFocus === FindStartFocusAction.FocusFindInput - ) { + } else if (opts.shouldFocus === FindStartFocusAction.FocusFindInput) { this._widget.focusFindInput(); } } } - public override highlightFindOptions( - ignoreWhenVisible: boolean = false, - ): void { + public override highlightFindOptions(ignoreWhenVisible: boolean = false): void { if (!this._widget) { this._createFindWidget(); } - if (this._state.isRevealed && !ignoreWhenVisible) { this._widget!.highlightFindOptions(); } else { @@ -778,28 +511,8 @@ export class FindController } private _createFindWidget() { - this._widget = this._register( - new FindWidget( - this._editor, - this, - this._state, - this._contextViewService, - this._keybindingService, - this._contextKeyService, - this._themeService, - this._storageService, - this._notificationService, - this._hoverService, - ), - ); - - this._findOptionsWidget = this._register( - new FindOptionsWidget( - this._editor, - this._state, - this._keybindingService, - ), - ); + this._widget = this._register(new FindWidget(this._editor, this, this._state, this._contextViewService, this._keybindingService, this._contextKeyService, this._themeService, this._storageService, this._notificationService, this._hoverService, this._findWidgetSearchHistory)); + this._findOptionsWidget = this._register(new FindOptionsWidget(this._editor, this._state, this._keybindingService)); } saveViewState(): any { @@ -811,147 +524,101 @@ export class FindController } } -export const StartFindAction = registerMultiEditorAction( - new MultiEditorAction({ - id: FIND_IDS.StartFindAction, - label: nls.localize2("startFindAction", "Find"), - precondition: ContextKeyExpr.or( - EditorContextKeys.focus, - ContextKeyExpr.has("editorIsOpen"), - ), - kbOpts: { - kbExpr: null, - primary: KeyMod.CtrlCmd | KeyCode.KeyF, - weight: KeybindingWeight.EditorContrib, - }, - menuOpts: { - menuId: MenuId.MenubarEditMenu, - group: "3_find", - title: nls.localize( - { key: "miFind", comment: ["&& denotes a mnemonic"] }, - "&&Find", - ), - order: 1, - }, - }), -); - -StartFindAction.addImplementation( - 0, - ( - accessor: ServicesAccessor, - editor: ICodeEditor, - args: any, - ): boolean | Promise => { - const controller = CommonFindController.get(editor); - - if (!controller) { - return false; - } - - return controller.start({ - forceRevealReplace: false, - seedSearchStringFromSelection: - editor.getOption(EditorOption.find) - .seedSearchStringFromSelection !== "never" - ? "single" - : "none", - seedSearchStringFromNonEmptySelection: - editor.getOption(EditorOption.find) - .seedSearchStringFromSelection === "selection", - seedSearchStringFromGlobalClipboard: editor.getOption( - EditorOption.find, - ).globalFindClipboard, - shouldFocus: FindStartFocusAction.FocusFindInput, - shouldAnimate: true, - updateSearchScope: false, - loop: editor.getOption(EditorOption.find).loop, - }); +export const StartFindAction = registerMultiEditorAction(new MultiEditorAction({ + id: FIND_IDS.StartFindAction, + label: nls.localize2('startFindAction', "Find"), + precondition: ContextKeyExpr.or(EditorContextKeys.focus, ContextKeyExpr.has('editorIsOpen')), + kbOpts: { + kbExpr: null, + primary: KeyMod.CtrlCmd | KeyCode.KeyF, + weight: KeybindingWeight.EditorContrib }, -); + menuOpts: { + menuId: MenuId.MenubarEditMenu, + group: '3_find', + title: nls.localize({ key: 'miFind', comment: ['&& denotes a mnemonic'] }, "&&Find"), + order: 1 + } +})); + +StartFindAction.addImplementation(0, (accessor: ServicesAccessor, editor: ICodeEditor, args: any): boolean | Promise => { + const controller = CommonFindController.get(editor); + if (!controller) { + return false; + } + return controller.start({ + forceRevealReplace: false, + seedSearchStringFromSelection: editor.getOption(EditorOption.find).seedSearchStringFromSelection !== 'never' ? 'single' : 'none', + seedSearchStringFromNonEmptySelection: editor.getOption(EditorOption.find).seedSearchStringFromSelection === 'selection', + seedSearchStringFromGlobalClipboard: editor.getOption(EditorOption.find).globalFindClipboard, + shouldFocus: FindStartFocusAction.FocusFindInput, + shouldAnimate: true, + updateSearchScope: false, + loop: editor.getOption(EditorOption.find).loop + }); +}); const findArgDescription = { - description: "Open a new In-Editor Find Widget.", - args: [ - { - name: "Open a new In-Editor Find Widget args", - schema: { - properties: { - searchString: { type: "string" }, - replaceString: { type: "string" }, - isRegex: { type: "boolean" }, - matchWholeWord: { type: "boolean" }, - isCaseSensitive: { type: "boolean" }, - preserveCase: { type: "boolean" }, - findInSelection: { type: "boolean" }, - }, - }, - }, - ], + description: 'Open a new In-Editor Find Widget.', + args: [{ + name: 'Open a new In-Editor Find Widget args', + schema: { + properties: { + searchString: { type: 'string' }, + replaceString: { type: 'string' }, + isRegex: { type: 'boolean' }, + matchWholeWord: { type: 'boolean' }, + isCaseSensitive: { type: 'boolean' }, + preserveCase: { type: 'boolean' }, + findInSelection: { type: 'boolean' }, + } + } + }] } as const; export class StartFindWithArgsAction extends EditorAction { + constructor() { super({ id: FIND_IDS.StartFindWithArgs, - label: nls.localize2( - "startFindWithArgsAction", - "Find With Arguments", - ), + label: nls.localize2('startFindWithArgsAction', "Find With Arguments"), precondition: undefined, kbOpts: { kbExpr: null, primary: 0, - weight: KeybindingWeight.EditorContrib, + weight: KeybindingWeight.EditorContrib }, - metadata: findArgDescription, + metadata: findArgDescription }); } - public async run( - accessor: ServicesAccessor | null, - editor: ICodeEditor, - args?: IFindStartArguments, - ): Promise { + public async run(accessor: ServicesAccessor | null, editor: ICodeEditor, args?: IFindStartArguments): Promise { const controller = CommonFindController.get(editor); - if (controller) { - const newState: INewFindReplaceState = args - ? { - searchString: args.searchString, - replaceString: args.replaceString, - isReplaceRevealed: args.replaceString !== undefined, - isRegex: args.isRegex, - // isRegexOverride: args.regexOverride, - wholeWord: args.matchWholeWord, - // wholeWordOverride: args.wholeWordOverride, - matchCase: args.isCaseSensitive, - // matchCaseOverride: args.matchCaseOverride, - preserveCase: args.preserveCase, - // preserveCaseOverride: args.preserveCaseOverride, - } - : {}; + const newState: INewFindReplaceState = args ? { + searchString: args.searchString, + replaceString: args.replaceString, + isReplaceRevealed: args.replaceString !== undefined, + isRegex: args.isRegex, + // isRegexOverride: args.regexOverride, + wholeWord: args.matchWholeWord, + // wholeWordOverride: args.wholeWordOverride, + matchCase: args.isCaseSensitive, + // matchCaseOverride: args.matchCaseOverride, + preserveCase: args.preserveCase, + // preserveCaseOverride: args.preserveCaseOverride, + } : {}; - await controller.start( - { - forceRevealReplace: false, - seedSearchStringFromSelection: - controller.getState().searchString.length === 0 && - editor.getOption(EditorOption.find) - .seedSearchStringFromSelection !== "never" - ? "single" - : "none", - seedSearchStringFromNonEmptySelection: - editor.getOption(EditorOption.find) - .seedSearchStringFromSelection === "selection", - seedSearchStringFromGlobalClipboard: true, - shouldFocus: FindStartFocusAction.FocusFindInput, - shouldAnimate: true, - updateSearchScope: args?.findInSelection || false, - loop: editor.getOption(EditorOption.find).loop, - }, - newState, - ); + await controller.start({ + forceRevealReplace: false, + seedSearchStringFromSelection: (controller.getState().searchString.length === 0) && editor.getOption(EditorOption.find).seedSearchStringFromSelection !== 'never' ? 'single' : 'none', + seedSearchStringFromNonEmptySelection: editor.getOption(EditorOption.find).seedSearchStringFromSelection === 'selection', + seedSearchStringFromGlobalClipboard: true, + shouldFocus: FindStartFocusAction.FocusFindInput, + shouldAnimate: true, + updateSearchScope: args?.findInSelection || false, + loop: editor.getOption(EditorOption.find).loop + }, newState); controller.setGlobalBufferTerm(controller.getState().searchString); } @@ -959,13 +626,11 @@ export class StartFindWithArgsAction extends EditorAction { } export class StartFindWithSelectionAction extends EditorAction { + constructor() { super({ id: FIND_IDS.StartFindWithSelection, - label: nls.localize2( - "startFindWithSelectionAction", - "Find With Selection", - ), + label: nls.localize2('startFindWithSelectionAction', "Find With Selection"), precondition: undefined, kbOpts: { kbExpr: null, @@ -973,27 +638,23 @@ export class StartFindWithSelectionAction extends EditorAction { mac: { primary: KeyMod.CtrlCmd | KeyCode.KeyE, }, - weight: KeybindingWeight.EditorContrib, - }, + weight: KeybindingWeight.EditorContrib + } }); } - public async run( - accessor: ServicesAccessor | null, - editor: ICodeEditor, - ): Promise { + public async run(accessor: ServicesAccessor | null, editor: ICodeEditor): Promise { const controller = CommonFindController.get(editor); - if (controller) { await controller.start({ forceRevealReplace: false, - seedSearchStringFromSelection: "multiple", + seedSearchStringFromSelection: 'multiple', seedSearchStringFromNonEmptySelection: false, seedSearchStringFromGlobalClipboard: false, shouldFocus: FindStartFocusAction.NoFocusChange, shouldAnimate: true, updateSearchScope: false, - loop: editor.getOption(EditorOption.find).loop, + loop: editor.getOption(EditorOption.find).loop }); controller.setGlobalBufferTerm(controller.getState().searchString); @@ -1001,31 +662,19 @@ export class StartFindWithSelectionAction extends EditorAction { } } export abstract class MatchFindAction extends EditorAction { - public async run( - accessor: ServicesAccessor | null, - editor: ICodeEditor, - ): Promise { + public async run(accessor: ServicesAccessor | null, editor: ICodeEditor): Promise { const controller = CommonFindController.get(editor); - if (controller && !this._run(controller)) { await controller.start({ forceRevealReplace: false, - seedSearchStringFromSelection: - controller.getState().searchString.length === 0 && - editor.getOption(EditorOption.find) - .seedSearchStringFromSelection !== "never" - ? "single" - : "none", - seedSearchStringFromNonEmptySelection: - editor.getOption(EditorOption.find) - .seedSearchStringFromSelection === "selection", + seedSearchStringFromSelection: (controller.getState().searchString.length === 0) && editor.getOption(EditorOption.find).seedSearchStringFromSelection !== 'never' ? 'single' : 'none', + seedSearchStringFromNonEmptySelection: editor.getOption(EditorOption.find).seedSearchStringFromSelection === 'selection', seedSearchStringFromGlobalClipboard: true, shouldFocus: FindStartFocusAction.NoFocusChange, shouldAnimate: true, updateSearchScope: false, - loop: editor.getOption(EditorOption.find).loop, + loop: editor.getOption(EditorOption.find).loop }); - this._run(controller); } } @@ -1034,39 +683,29 @@ export abstract class MatchFindAction extends EditorAction { } export class NextMatchFindAction extends MatchFindAction { + constructor() { super({ id: FIND_IDS.NextMatchFindAction, - label: nls.localize2("findNextMatchAction", "Find Next"), + label: nls.localize2('findNextMatchAction', "Find Next"), precondition: undefined, - kbOpts: [ - { - kbExpr: EditorContextKeys.focus, - primary: KeyCode.F3, - mac: { - primary: KeyMod.CtrlCmd | KeyCode.KeyG, - secondary: [KeyCode.F3], - }, - weight: KeybindingWeight.EditorContrib, - }, - { - kbExpr: ContextKeyExpr.and( - EditorContextKeys.focus, - CONTEXT_FIND_INPUT_FOCUSED, - ), - primary: KeyCode.Enter, - weight: KeybindingWeight.EditorContrib, - }, - ], + kbOpts: [{ + kbExpr: EditorContextKeys.focus, + primary: KeyCode.F3, + mac: { primary: KeyMod.CtrlCmd | KeyCode.KeyG, secondary: [KeyCode.F3] }, + weight: KeybindingWeight.EditorContrib + }, { + kbExpr: ContextKeyExpr.and(EditorContextKeys.focus, CONTEXT_FIND_INPUT_FOCUSED), + primary: KeyCode.Enter, + weight: KeybindingWeight.EditorContrib + }] }); } protected _run(controller: CommonFindController): boolean { const result = controller.moveToNextMatch(); - if (result) { controller.editor.pushUndoStop(); - return true; } @@ -1074,31 +713,25 @@ export class NextMatchFindAction extends MatchFindAction { } } + export class PreviousMatchFindAction extends MatchFindAction { + constructor() { super({ id: FIND_IDS.PreviousMatchFindAction, - label: nls.localize2("findPreviousMatchAction", "Find Previous"), + label: nls.localize2('findPreviousMatchAction', "Find Previous"), precondition: undefined, - kbOpts: [ - { - kbExpr: EditorContextKeys.focus, - primary: KeyMod.Shift | KeyCode.F3, - mac: { - primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyG, - secondary: [KeyMod.Shift | KeyCode.F3], - }, - weight: KeybindingWeight.EditorContrib, - }, - { - kbExpr: ContextKeyExpr.and( - EditorContextKeys.focus, - CONTEXT_FIND_INPUT_FOCUSED, - ), - primary: KeyMod.Shift | KeyCode.Enter, - weight: KeybindingWeight.EditorContrib, - }, - ], + kbOpts: [{ + kbExpr: EditorContextKeys.focus, + primary: KeyMod.Shift | KeyCode.F3, + mac: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyG, secondary: [KeyMod.Shift | KeyCode.F3] }, + weight: KeybindingWeight.EditorContrib + }, { + kbExpr: ContextKeyExpr.and(EditorContextKeys.focus, CONTEXT_FIND_INPUT_FOCUSED), + primary: KeyMod.Shift | KeyCode.Enter, + weight: KeybindingWeight.EditorContrib + } + ] }); } @@ -1108,64 +741,44 @@ export class PreviousMatchFindAction extends MatchFindAction { } export class MoveToMatchFindAction extends EditorAction { - private _highlightDecorations: string[] = []; + private _highlightDecorations: string[] = []; constructor() { super({ id: FIND_IDS.GoToMatchFindAction, - label: nls.localize2("findMatchAction.goToMatch", "Go to Match..."), - precondition: CONTEXT_FIND_WIDGET_VISIBLE, + label: nls.localize2('findMatchAction.goToMatch', "Go to Match..."), + precondition: CONTEXT_FIND_WIDGET_VISIBLE }); } - public run( - accessor: ServicesAccessor, - editor: ICodeEditor, - args: any, - ): void | Promise { + public run(accessor: ServicesAccessor, editor: ICodeEditor, args: any): void | Promise { const controller = CommonFindController.get(editor); - if (!controller) { return; } const matchesCount = controller.getState().matchesCount; - if (matchesCount < 1) { const notificationService = accessor.get(INotificationService); - notificationService.notify({ severity: Severity.Warning, - message: nls.localize( - "findMatchAction.noResults", - "No matches. Try searching for something else.", - ), + message: nls.localize('findMatchAction.noResults', "No matches. Try searching for something else.") }); - return; } const quickInputService = accessor.get(IQuickInputService); - const disposables = new DisposableStore(); - const inputBox = disposables.add(quickInputService.createInputBox()); - - inputBox.placeholder = nls.localize( - "findMatchAction.inputPlaceHolder", - "Type a number to go to a specific match (between 1 and {0})", - matchesCount, - ); + inputBox.placeholder = nls.localize('findMatchAction.inputPlaceHolder', "Type a number to go to a specific match (between 1 and {0})", matchesCount); const toFindMatchIndex = (value: string): number | undefined => { const index = parseInt(value); - if (isNaN(index)) { return undefined; } const matchCount = controller.getState().matchesCount; - if (index > 0 && index <= matchCount) { return index - 1; // zero based } else if (index < 0 && index >= -matchCount) { @@ -1177,139 +790,95 @@ export class MoveToMatchFindAction extends EditorAction { const updatePickerAndEditor = (value: string) => { const index = toFindMatchIndex(value); - - if (typeof index === "number") { + if (typeof index === 'number') { // valid inputBox.validationMessage = undefined; - controller.goToMatch(index); - const currentMatch = controller.getState().currentMatch; - if (currentMatch) { this.addDecorations(editor, currentMatch); } } else { - inputBox.validationMessage = nls.localize( - "findMatchAction.inputValidationMessage", - "Please type a number between 1 and {0}", - controller.getState().matchesCount, - ); - + inputBox.validationMessage = nls.localize('findMatchAction.inputValidationMessage', "Please type a number between 1 and {0}", controller.getState().matchesCount); this.clearDecorations(editor); } }; + disposables.add(inputBox.onDidChangeValue(value => { + updatePickerAndEditor(value); + })); - disposables.add( - inputBox.onDidChangeValue((value) => { - updatePickerAndEditor(value); - }), - ); - - disposables.add( - inputBox.onDidAccept(() => { - const index = toFindMatchIndex(inputBox.value); - - if (typeof index === "number") { - controller.goToMatch(index); - - inputBox.hide(); - } else { - inputBox.validationMessage = nls.localize( - "findMatchAction.inputValidationMessage", - "Please type a number between 1 and {0}", - controller.getState().matchesCount, - ); - } - }), - ); - - disposables.add( - inputBox.onDidHide(() => { - this.clearDecorations(editor); + disposables.add(inputBox.onDidAccept(() => { + const index = toFindMatchIndex(inputBox.value); + if (typeof index === 'number') { + controller.goToMatch(index); + inputBox.hide(); + } else { + inputBox.validationMessage = nls.localize('findMatchAction.inputValidationMessage', "Please type a number between 1 and {0}", controller.getState().matchesCount); + } + })); - disposables.dispose(); - }), - ); + disposables.add(inputBox.onDidHide(() => { + this.clearDecorations(editor); + disposables.dispose(); + })); inputBox.show(); } private clearDecorations(editor: ICodeEditor): void { - editor.changeDecorations((changeAccessor) => { - this._highlightDecorations = changeAccessor.deltaDecorations( - this._highlightDecorations, - [], - ); + editor.changeDecorations(changeAccessor => { + this._highlightDecorations = changeAccessor.deltaDecorations(this._highlightDecorations, []); }); } private addDecorations(editor: ICodeEditor, range: IRange): void { - editor.changeDecorations((changeAccessor) => { - this._highlightDecorations = changeAccessor.deltaDecorations( - this._highlightDecorations, - [ - { - range, - options: { - description: - "find-match-quick-access-range-highlight", - className: "rangeHighlight", - isWholeLine: true, - }, - }, - { - range, - options: { - description: - "find-match-quick-access-range-highlight-overview", - overviewRuler: { - color: themeColorFromId( - overviewRulerRangeHighlight, - ), - position: OverviewRulerLane.Full, - }, - }, - }, - ], - ); + editor.changeDecorations(changeAccessor => { + this._highlightDecorations = changeAccessor.deltaDecorations(this._highlightDecorations, [ + { + range, + options: { + description: 'find-match-quick-access-range-highlight', + className: 'rangeHighlight', + isWholeLine: true + } + }, + { + range, + options: { + description: 'find-match-quick-access-range-highlight-overview', + overviewRuler: { + color: themeColorFromId(overviewRulerRangeHighlight), + position: OverviewRulerLane.Full + } + } + } + ]); }); } } export abstract class SelectionMatchFindAction extends EditorAction { - public async run( - accessor: ServicesAccessor | null, - editor: ICodeEditor, - ): Promise { + public async run(accessor: ServicesAccessor | null, editor: ICodeEditor): Promise { const controller = CommonFindController.get(editor); - if (!controller) { return; } - const selectionSearchString = getSelectionSearchString( - editor, - "single", - false, - ); - + const selectionSearchString = getSelectionSearchString(editor, 'single', false); if (selectionSearchString) { controller.setSearchString(selectionSearchString); } - if (!this._run(controller)) { await controller.start({ forceRevealReplace: false, - seedSearchStringFromSelection: "none", + seedSearchStringFromSelection: 'none', seedSearchStringFromNonEmptySelection: false, seedSearchStringFromGlobalClipboard: false, shouldFocus: FindStartFocusAction.NoFocusChange, shouldAnimate: true, updateSearchScope: false, - loop: editor.getOption(EditorOption.find).loop, + loop: editor.getOption(EditorOption.find).loop }); - this._run(controller); } } @@ -1318,19 +887,17 @@ export abstract class SelectionMatchFindAction extends EditorAction { } export class NextSelectionMatchFindAction extends SelectionMatchFindAction { + constructor() { super({ id: FIND_IDS.NextSelectionMatchFindAction, - label: nls.localize2( - "nextSelectionMatchFindAction", - "Find Next Selection", - ), + label: nls.localize2('nextSelectionMatchFindAction', "Find Next Selection"), precondition: undefined, kbOpts: { kbExpr: EditorContextKeys.focus, primary: KeyMod.CtrlCmd | KeyCode.F3, - weight: KeybindingWeight.EditorContrib, - }, + weight: KeybindingWeight.EditorContrib + } }); } @@ -1340,19 +907,17 @@ export class NextSelectionMatchFindAction extends SelectionMatchFindAction { } export class PreviousSelectionMatchFindAction extends SelectionMatchFindAction { + constructor() { super({ id: FIND_IDS.PreviousSelectionMatchFindAction, - label: nls.localize2( - "previousSelectionMatchFindAction", - "Find Previous Selection", - ), + label: nls.localize2('previousSelectionMatchFindAction', "Find Previous Selection"), precondition: undefined, kbOpts: { kbExpr: EditorContextKeys.focus, primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.F3, - weight: KeybindingWeight.EditorContrib, - }, + weight: KeybindingWeight.EditorContrib + } }); } @@ -1361,97 +926,64 @@ export class PreviousSelectionMatchFindAction extends SelectionMatchFindAction { } } -export const StartFindReplaceAction = registerMultiEditorAction( - new MultiEditorAction({ - id: FIND_IDS.StartFindReplaceAction, - label: nls.localize2("startReplace", "Replace"), - precondition: ContextKeyExpr.or( - EditorContextKeys.focus, - ContextKeyExpr.has("editorIsOpen"), - ), - kbOpts: { - kbExpr: null, - primary: KeyMod.CtrlCmd | KeyCode.KeyH, - mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyF }, - weight: KeybindingWeight.EditorContrib, - }, - menuOpts: { - menuId: MenuId.MenubarEditMenu, - group: "3_find", - title: nls.localize( - { key: "miReplace", comment: ["&& denotes a mnemonic"] }, - "&&Replace", - ), - order: 2, - }, - }), -); - -StartFindReplaceAction.addImplementation( - 0, - ( - accessor: ServicesAccessor, - editor: ICodeEditor, - args: any, - ): boolean | Promise => { - if (!editor.hasModel() || editor.getOption(EditorOption.readOnly)) { - return false; - } - - const controller = CommonFindController.get(editor); +export const StartFindReplaceAction = registerMultiEditorAction(new MultiEditorAction({ + id: FIND_IDS.StartFindReplaceAction, + label: nls.localize2('startReplace', "Replace"), + precondition: ContextKeyExpr.or(EditorContextKeys.focus, ContextKeyExpr.has('editorIsOpen')), + kbOpts: { + kbExpr: null, + primary: KeyMod.CtrlCmd | KeyCode.KeyH, + mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyF }, + weight: KeybindingWeight.EditorContrib + }, + menuOpts: { + menuId: MenuId.MenubarEditMenu, + group: '3_find', + title: nls.localize({ key: 'miReplace', comment: ['&& denotes a mnemonic'] }, "&&Replace"), + order: 2 + } +})); - if (!controller) { - return false; - } +StartFindReplaceAction.addImplementation(0, (accessor: ServicesAccessor, editor: ICodeEditor, args: any): boolean | Promise => { + if (!editor.hasModel() || editor.getOption(EditorOption.readOnly)) { + return false; + } + const controller = CommonFindController.get(editor); + if (!controller) { + return false; + } - const currentSelection = editor.getSelection(); - - const findInputFocused = controller.isFindInputFocused(); - // we only seed search string from selection when the current selection is single line and not empty, - // + the find input is not focused - const seedSearchStringFromSelection = - !currentSelection.isEmpty() && - currentSelection.startLineNumber === - currentSelection.endLineNumber && - editor.getOption(EditorOption.find) - .seedSearchStringFromSelection !== "never" && - !findInputFocused; - /* + const currentSelection = editor.getSelection(); + const findInputFocused = controller.isFindInputFocused(); + // we only seed search string from selection when the current selection is single line and not empty, + // + the find input is not focused + const seedSearchStringFromSelection = !currentSelection.isEmpty() + && currentSelection.startLineNumber === currentSelection.endLineNumber + && (editor.getOption(EditorOption.find).seedSearchStringFromSelection !== 'never') + && !findInputFocused; + /* * if the existing search string in find widget is empty and we don't seed search string from selection, it means the Find Input is still empty, so we should focus the Find Input instead of Replace Input. * findInputFocused true -> seedSearchStringFromSelection false, FocusReplaceInput * findInputFocused false, seedSearchStringFromSelection true FocusReplaceInput * findInputFocused false seedSearchStringFromSelection false FocusFindInput */ - const shouldFocus = - findInputFocused || seedSearchStringFromSelection - ? FindStartFocusAction.FocusReplaceInput - : FindStartFocusAction.FocusFindInput; - - return controller.start({ - forceRevealReplace: true, - seedSearchStringFromSelection: seedSearchStringFromSelection - ? "single" - : "none", - seedSearchStringFromNonEmptySelection: - editor.getOption(EditorOption.find) - .seedSearchStringFromSelection === "selection", - seedSearchStringFromGlobalClipboard: - editor.getOption(EditorOption.find) - .seedSearchStringFromSelection !== "never", - shouldFocus: shouldFocus, - shouldAnimate: true, - updateSearchScope: false, - loop: editor.getOption(EditorOption.find).loop, - }); - }, -); - -registerEditorContribution( - CommonFindController.ID, - FindController, - EditorContributionInstantiation.Eager, -); // eager because it uses `saveViewState`/`restoreViewState` + const shouldFocus = (findInputFocused || seedSearchStringFromSelection) ? + FindStartFocusAction.FocusReplaceInput : FindStartFocusAction.FocusFindInput; + + return controller.start({ + forceRevealReplace: true, + seedSearchStringFromSelection: seedSearchStringFromSelection ? 'single' : 'none', + seedSearchStringFromNonEmptySelection: editor.getOption(EditorOption.find).seedSearchStringFromSelection === 'selection', + seedSearchStringFromGlobalClipboard: editor.getOption(EditorOption.find).seedSearchStringFromSelection !== 'never', + shouldFocus: shouldFocus, + shouldAnimate: true, + updateSearchScope: false, + loop: editor.getOption(EditorOption.find).loop + }); +}); + +registerEditorContribution(CommonFindController.ID, FindController, EditorContributionInstantiation.Eager); // eager because it uses `saveViewState`/`restoreViewState` registerEditorAction(StartFindWithArgsAction); registerEditorAction(StartFindWithSelectionAction); @@ -1461,177 +993,144 @@ registerEditorAction(MoveToMatchFindAction); registerEditorAction(NextSelectionMatchFindAction); registerEditorAction(PreviousSelectionMatchFindAction); -const FindCommand = EditorCommand.bindToContribution( - CommonFindController.get, -); - -registerEditorCommand( - new FindCommand({ - id: FIND_IDS.CloseFindWidgetCommand, - precondition: CONTEXT_FIND_WIDGET_VISIBLE, - handler: (x) => x.closeFindWidget(), - kbOpts: { - weight: KeybindingWeight.EditorContrib + 5, - kbExpr: ContextKeyExpr.and( - EditorContextKeys.focus, - ContextKeyExpr.not("isComposing"), - ), - primary: KeyCode.Escape, - secondary: [KeyMod.Shift | KeyCode.Escape], - }, - }), -); - -registerEditorCommand( - new FindCommand({ - id: FIND_IDS.ToggleCaseSensitiveCommand, - precondition: undefined, - handler: (x) => x.toggleCaseSensitive(), - kbOpts: { - weight: KeybindingWeight.EditorContrib + 5, - kbExpr: EditorContextKeys.focus, - primary: ToggleCaseSensitiveKeybinding.primary, - mac: ToggleCaseSensitiveKeybinding.mac, - win: ToggleCaseSensitiveKeybinding.win, - linux: ToggleCaseSensitiveKeybinding.linux, - }, - }), -); - -registerEditorCommand( - new FindCommand({ - id: FIND_IDS.ToggleWholeWordCommand, - precondition: undefined, - handler: (x) => x.toggleWholeWords(), - kbOpts: { - weight: KeybindingWeight.EditorContrib + 5, - kbExpr: EditorContextKeys.focus, - primary: ToggleWholeWordKeybinding.primary, - mac: ToggleWholeWordKeybinding.mac, - win: ToggleWholeWordKeybinding.win, - linux: ToggleWholeWordKeybinding.linux, - }, - }), -); - -registerEditorCommand( - new FindCommand({ - id: FIND_IDS.ToggleRegexCommand, - precondition: undefined, - handler: (x) => x.toggleRegex(), - kbOpts: { - weight: KeybindingWeight.EditorContrib + 5, - kbExpr: EditorContextKeys.focus, - primary: ToggleRegexKeybinding.primary, - mac: ToggleRegexKeybinding.mac, - win: ToggleRegexKeybinding.win, - linux: ToggleRegexKeybinding.linux, - }, - }), -); - -registerEditorCommand( - new FindCommand({ - id: FIND_IDS.ToggleSearchScopeCommand, - precondition: undefined, - handler: (x) => x.toggleSearchScope(), - kbOpts: { - weight: KeybindingWeight.EditorContrib + 5, - kbExpr: EditorContextKeys.focus, - primary: ToggleSearchScopeKeybinding.primary, - mac: ToggleSearchScopeKeybinding.mac, - win: ToggleSearchScopeKeybinding.win, - linux: ToggleSearchScopeKeybinding.linux, - }, - }), -); - -registerEditorCommand( - new FindCommand({ - id: FIND_IDS.TogglePreserveCaseCommand, - precondition: undefined, - handler: (x) => x.togglePreserveCase(), - kbOpts: { - weight: KeybindingWeight.EditorContrib + 5, - kbExpr: EditorContextKeys.focus, - primary: TogglePreserveCaseKeybinding.primary, - mac: TogglePreserveCaseKeybinding.mac, - win: TogglePreserveCaseKeybinding.win, - linux: TogglePreserveCaseKeybinding.linux, - }, - }), -); - -registerEditorCommand( - new FindCommand({ - id: FIND_IDS.ReplaceOneAction, - precondition: CONTEXT_FIND_WIDGET_VISIBLE, - handler: (x) => x.replace(), - kbOpts: { - weight: KeybindingWeight.EditorContrib + 5, - kbExpr: EditorContextKeys.focus, - primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Digit1, - }, - }), -); - -registerEditorCommand( - new FindCommand({ - id: FIND_IDS.ReplaceOneAction, - precondition: CONTEXT_FIND_WIDGET_VISIBLE, - handler: (x) => x.replace(), - kbOpts: { - weight: KeybindingWeight.EditorContrib + 5, - kbExpr: ContextKeyExpr.and( - EditorContextKeys.focus, - CONTEXT_REPLACE_INPUT_FOCUSED, - ), - primary: KeyCode.Enter, - }, - }), -); - -registerEditorCommand( - new FindCommand({ - id: FIND_IDS.ReplaceAllAction, - precondition: CONTEXT_FIND_WIDGET_VISIBLE, - handler: (x) => x.replaceAll(), - kbOpts: { - weight: KeybindingWeight.EditorContrib + 5, - kbExpr: EditorContextKeys.focus, - primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Enter, - }, - }), -); - -registerEditorCommand( - new FindCommand({ - id: FIND_IDS.ReplaceAllAction, - precondition: CONTEXT_FIND_WIDGET_VISIBLE, - handler: (x) => x.replaceAll(), - kbOpts: { - weight: KeybindingWeight.EditorContrib + 5, - kbExpr: ContextKeyExpr.and( - EditorContextKeys.focus, - CONTEXT_REPLACE_INPUT_FOCUSED, - ), - primary: undefined, - mac: { - primary: KeyMod.CtrlCmd | KeyCode.Enter, - }, - }, - }), -); - -registerEditorCommand( - new FindCommand({ - id: FIND_IDS.SelectAllMatchesAction, - precondition: CONTEXT_FIND_WIDGET_VISIBLE, - handler: (x) => x.selectAllMatches(), - kbOpts: { - weight: KeybindingWeight.EditorContrib + 5, - kbExpr: EditorContextKeys.focus, - primary: KeyMod.Alt | KeyCode.Enter, - }, - }), -); +const FindCommand = EditorCommand.bindToContribution(CommonFindController.get); + +registerEditorCommand(new FindCommand({ + id: FIND_IDS.CloseFindWidgetCommand, + precondition: CONTEXT_FIND_WIDGET_VISIBLE, + handler: x => x.closeFindWidget(), + kbOpts: { + weight: KeybindingWeight.EditorContrib + 5, + kbExpr: ContextKeyExpr.and(EditorContextKeys.focus, ContextKeyExpr.not('isComposing')), + primary: KeyCode.Escape, + secondary: [KeyMod.Shift | KeyCode.Escape] + } +})); + +registerEditorCommand(new FindCommand({ + id: FIND_IDS.ToggleCaseSensitiveCommand, + precondition: undefined, + handler: x => x.toggleCaseSensitive(), + kbOpts: { + weight: KeybindingWeight.EditorContrib + 5, + kbExpr: EditorContextKeys.focus, + primary: ToggleCaseSensitiveKeybinding.primary, + mac: ToggleCaseSensitiveKeybinding.mac, + win: ToggleCaseSensitiveKeybinding.win, + linux: ToggleCaseSensitiveKeybinding.linux + } +})); + +registerEditorCommand(new FindCommand({ + id: FIND_IDS.ToggleWholeWordCommand, + precondition: undefined, + handler: x => x.toggleWholeWords(), + kbOpts: { + weight: KeybindingWeight.EditorContrib + 5, + kbExpr: EditorContextKeys.focus, + primary: ToggleWholeWordKeybinding.primary, + mac: ToggleWholeWordKeybinding.mac, + win: ToggleWholeWordKeybinding.win, + linux: ToggleWholeWordKeybinding.linux + } +})); + +registerEditorCommand(new FindCommand({ + id: FIND_IDS.ToggleRegexCommand, + precondition: undefined, + handler: x => x.toggleRegex(), + kbOpts: { + weight: KeybindingWeight.EditorContrib + 5, + kbExpr: EditorContextKeys.focus, + primary: ToggleRegexKeybinding.primary, + mac: ToggleRegexKeybinding.mac, + win: ToggleRegexKeybinding.win, + linux: ToggleRegexKeybinding.linux + } +})); + +registerEditorCommand(new FindCommand({ + id: FIND_IDS.ToggleSearchScopeCommand, + precondition: undefined, + handler: x => x.toggleSearchScope(), + kbOpts: { + weight: KeybindingWeight.EditorContrib + 5, + kbExpr: EditorContextKeys.focus, + primary: ToggleSearchScopeKeybinding.primary, + mac: ToggleSearchScopeKeybinding.mac, + win: ToggleSearchScopeKeybinding.win, + linux: ToggleSearchScopeKeybinding.linux + } +})); + +registerEditorCommand(new FindCommand({ + id: FIND_IDS.TogglePreserveCaseCommand, + precondition: undefined, + handler: x => x.togglePreserveCase(), + kbOpts: { + weight: KeybindingWeight.EditorContrib + 5, + kbExpr: EditorContextKeys.focus, + primary: TogglePreserveCaseKeybinding.primary, + mac: TogglePreserveCaseKeybinding.mac, + win: TogglePreserveCaseKeybinding.win, + linux: TogglePreserveCaseKeybinding.linux + } +})); + +registerEditorCommand(new FindCommand({ + id: FIND_IDS.ReplaceOneAction, + precondition: CONTEXT_FIND_WIDGET_VISIBLE, + handler: x => x.replace(), + kbOpts: { + weight: KeybindingWeight.EditorContrib + 5, + kbExpr: EditorContextKeys.focus, + primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Digit1 + } +})); + +registerEditorCommand(new FindCommand({ + id: FIND_IDS.ReplaceOneAction, + precondition: CONTEXT_FIND_WIDGET_VISIBLE, + handler: x => x.replace(), + kbOpts: { + weight: KeybindingWeight.EditorContrib + 5, + kbExpr: ContextKeyExpr.and(EditorContextKeys.focus, CONTEXT_REPLACE_INPUT_FOCUSED), + primary: KeyCode.Enter + } +})); + +registerEditorCommand(new FindCommand({ + id: FIND_IDS.ReplaceAllAction, + precondition: CONTEXT_FIND_WIDGET_VISIBLE, + handler: x => x.replaceAll(), + kbOpts: { + weight: KeybindingWeight.EditorContrib + 5, + kbExpr: EditorContextKeys.focus, + primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Enter + } +})); + +registerEditorCommand(new FindCommand({ + id: FIND_IDS.ReplaceAllAction, + precondition: CONTEXT_FIND_WIDGET_VISIBLE, + handler: x => x.replaceAll(), + kbOpts: { + weight: KeybindingWeight.EditorContrib + 5, + kbExpr: ContextKeyExpr.and(EditorContextKeys.focus, CONTEXT_REPLACE_INPUT_FOCUSED), + primary: undefined, + mac: { + primary: KeyMod.CtrlCmd | KeyCode.Enter, + } + } +})); + +registerEditorCommand(new FindCommand({ + id: FIND_IDS.SelectAllMatchesAction, + precondition: CONTEXT_FIND_WIDGET_VISIBLE, + handler: x => x.selectAllMatches(), + kbOpts: { + weight: KeybindingWeight.EditorContrib + 5, + kbExpr: EditorContextKeys.focus, + primary: KeyMod.Alt | KeyCode.Enter + } +})); diff --git a/Source/vs/editor/contrib/find/browser/findWidget.ts b/Source/vs/editor/contrib/find/browser/findWidget.ts index ed0067147c5e5..96786676a39ca 100644 --- a/Source/vs/editor/contrib/find/browser/findWidget.ts +++ b/Source/vs/editor/contrib/find/browser/findWidget.ts @@ -3,375 +3,164 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as dom from "../../../../base/browser/dom.js"; -import { IKeyboardEvent } from "../../../../base/browser/keyboardEvent.js"; -import { IMouseEvent } from "../../../../base/browser/mouseEvent.js"; -import { alert as alertFn } from "../../../../base/browser/ui/aria/aria.js"; -import { IContextViewProvider } from "../../../../base/browser/ui/contextview/contextview.js"; -import { FindInput } from "../../../../base/browser/ui/findinput/findInput.js"; -import { ReplaceInput } from "../../../../base/browser/ui/findinput/replaceInput.js"; -import { IMessage as InputBoxMessage } from "../../../../base/browser/ui/inputbox/inputBox.js"; -import { - ISashEvent, - IVerticalSashLayoutProvider, - Orientation, - Sash, -} from "../../../../base/browser/ui/sash/sash.js"; -import { Toggle } from "../../../../base/browser/ui/toggle/toggle.js"; -import { Widget } from "../../../../base/browser/ui/widget.js"; -import { Delayer } from "../../../../base/common/async.js"; -import { Codicon } from "../../../../base/common/codicons.js"; -import { onUnexpectedError } from "../../../../base/common/errors.js"; -import { KeyCode, KeyMod } from "../../../../base/common/keyCodes.js"; -import { toDisposable } from "../../../../base/common/lifecycle.js"; -import * as platform from "../../../../base/common/platform.js"; -import * as strings from "../../../../base/common/strings.js"; - -import "./findWidget.css"; - -import { IHoverDelegate } from "../../../../base/browser/ui/hover/hoverDelegate.js"; -import { - createInstantHoverDelegate, - getDefaultHoverDelegate, -} from "../../../../base/browser/ui/hover/hoverDelegateFactory.js"; -import { IHistory } from "../../../../base/common/history.js"; -import { ThemeIcon } from "../../../../base/common/themables.js"; -import { assertIsDefined } from "../../../../base/common/types.js"; -import * as nls from "../../../../nls.js"; -import { AccessibilitySupport } from "../../../../platform/accessibility/common/accessibility.js"; -import { - IContextKey, - IContextKeyService, -} from "../../../../platform/contextkey/common/contextkey.js"; -import { - ContextScopedFindInput, - ContextScopedReplaceInput, -} from "../../../../platform/history/browser/contextScopedHistoryWidget.js"; -import { showHistoryKeybindingHint } from "../../../../platform/history/browser/historyWidgetKeybindingHint.js"; -import { IHoverService } from "../../../../platform/hover/browser/hover.js"; -import { IKeybindingService } from "../../../../platform/keybinding/common/keybinding.js"; -import { INotificationService } from "../../../../platform/notification/common/notification.js"; -import { - IStorageService, - StorageScope, - StorageTarget, -} from "../../../../platform/storage/common/storage.js"; -import { - defaultInputBoxStyles, - defaultToggleStyles, -} from "../../../../platform/theme/browser/defaultStyles.js"; -import { - asCssVariable, - contrastBorder, - editorFindMatchForeground, - editorFindMatchHighlightBorder, - editorFindMatchHighlightForeground, - editorFindRangeHighlightBorder, - inputActiveOptionBackground, - inputActiveOptionBorder, - inputActiveOptionForeground, -} from "../../../../platform/theme/common/colorRegistry.js"; -import { - registerIcon, - widgetClose, -} from "../../../../platform/theme/common/iconRegistry.js"; -import { isHighContrast } from "../../../../platform/theme/common/theme.js"; -import { - IThemeService, - registerThemingParticipant, -} from "../../../../platform/theme/common/themeService.js"; -import { - ICodeEditor, - IOverlayWidget, - IOverlayWidgetPosition, - IViewZone, - OverlayWidgetPositionPreference, -} from "../../../browser/editorBrowser.js"; -import { - ConfigurationChangedEvent, - EditorOption, -} from "../../../common/config/editorOptions.js"; -import { Range } from "../../../common/core/range.js"; -import { Selection } from "../../../common/core/selection.js"; -import { - CONTEXT_FIND_INPUT_FOCUSED, - CONTEXT_REPLACE_INPUT_FOCUSED, - FIND_IDS, - MATCHES_LIMIT, -} from "./findModel.js"; -import { FindReplaceState, FindReplaceStateChangedEvent } from "./findState.js"; -import { FindWidgetSearchHistory } from "./findWidgetSearchHistory.js"; - -const findCollapsedIcon = registerIcon( - "find-collapsed", - Codicon.chevronRight, - nls.localize( - "findCollapsedIcon", - "Icon to indicate that the editor find widget is collapsed.", - ), -); - -const findExpandedIcon = registerIcon( - "find-expanded", - Codicon.chevronDown, - nls.localize( - "findExpandedIcon", - "Icon to indicate that the editor find widget is expanded.", - ), -); - -export const findSelectionIcon = registerIcon( - "find-selection", - Codicon.selection, - nls.localize( - "findSelectionIcon", - "Icon for 'Find in Selection' in the editor find widget.", - ), -); - -export const findReplaceIcon = registerIcon( - "find-replace", - Codicon.replace, - nls.localize( - "findReplaceIcon", - "Icon for 'Replace' in the editor find widget.", - ), -); - -export const findReplaceAllIcon = registerIcon( - "find-replace-all", - Codicon.replaceAll, - nls.localize( - "findReplaceAllIcon", - "Icon for 'Replace All' in the editor find widget.", - ), -); - -export const findPreviousMatchIcon = registerIcon( - "find-previous-match", - Codicon.arrowUp, - nls.localize( - "findPreviousMatchIcon", - "Icon for 'Find Previous' in the editor find widget.", - ), -); - -export const findNextMatchIcon = registerIcon( - "find-next-match", - Codicon.arrowDown, - nls.localize( - "findNextMatchIcon", - "Icon for 'Find Next' in the editor find widget.", - ), -); +import * as dom from '../../../../base/browser/dom.js'; +import { IKeyboardEvent } from '../../../../base/browser/keyboardEvent.js'; +import { IMouseEvent } from '../../../../base/browser/mouseEvent.js'; +import { alert as alertFn } from '../../../../base/browser/ui/aria/aria.js'; +import { Toggle } from '../../../../base/browser/ui/toggle/toggle.js'; +import { IContextViewProvider } from '../../../../base/browser/ui/contextview/contextview.js'; +import { FindInput } from '../../../../base/browser/ui/findinput/findInput.js'; +import { ReplaceInput } from '../../../../base/browser/ui/findinput/replaceInput.js'; +import { IMessage as InputBoxMessage } from '../../../../base/browser/ui/inputbox/inputBox.js'; +import { ISashEvent, IVerticalSashLayoutProvider, Orientation, Sash } from '../../../../base/browser/ui/sash/sash.js'; +import { Widget } from '../../../../base/browser/ui/widget.js'; +import { Delayer } from '../../../../base/common/async.js'; +import { Codicon } from '../../../../base/common/codicons.js'; +import { onUnexpectedError } from '../../../../base/common/errors.js'; +import { KeyCode, KeyMod } from '../../../../base/common/keyCodes.js'; +import { toDisposable } from '../../../../base/common/lifecycle.js'; +import * as platform from '../../../../base/common/platform.js'; +import * as strings from '../../../../base/common/strings.js'; +import './findWidget.css'; +import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, IViewZone, OverlayWidgetPositionPreference } from '../../../browser/editorBrowser.js'; +import { ConfigurationChangedEvent, EditorOption } from '../../../common/config/editorOptions.js'; +import { Range } from '../../../common/core/range.js'; +import { CONTEXT_FIND_INPUT_FOCUSED, CONTEXT_REPLACE_INPUT_FOCUSED, FIND_IDS, MATCHES_LIMIT } from './findModel.js'; +import { FindReplaceState, FindReplaceStateChangedEvent } from './findState.js'; +import * as nls from '../../../../nls.js'; +import { AccessibilitySupport } from '../../../../platform/accessibility/common/accessibility.js'; +import { ContextScopedFindInput, ContextScopedReplaceInput } from '../../../../platform/history/browser/contextScopedHistoryWidget.js'; +import { showHistoryKeybindingHint } from '../../../../platform/history/browser/historyWidgetKeybindingHint.js'; +import { IContextKey, IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js'; +import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js'; +import { INotificationService } from '../../../../platform/notification/common/notification.js'; +import { IStorageService, StorageScope, StorageTarget } from '../../../../platform/storage/common/storage.js'; +import { asCssVariable, contrastBorder, editorFindMatchForeground, editorFindMatchHighlightBorder, editorFindMatchHighlightForeground, editorFindRangeHighlightBorder, inputActiveOptionBackground, inputActiveOptionBorder, inputActiveOptionForeground } from '../../../../platform/theme/common/colorRegistry.js'; +import { registerIcon, widgetClose } from '../../../../platform/theme/common/iconRegistry.js'; +import { IThemeService, registerThemingParticipant } from '../../../../platform/theme/common/themeService.js'; +import { ThemeIcon } from '../../../../base/common/themables.js'; +import { isHighContrast } from '../../../../platform/theme/common/theme.js'; +import { assertIsDefined } from '../../../../base/common/types.js'; +import { defaultInputBoxStyles, defaultToggleStyles } from '../../../../platform/theme/browser/defaultStyles.js'; +import { Selection } from '../../../common/core/selection.js'; +import { createInstantHoverDelegate, getDefaultHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegateFactory.js'; +import { IHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegate.js'; +import { IHoverService } from '../../../../platform/hover/browser/hover.js'; +import { IHistory } from '../../../../base/common/history.js'; + +const findCollapsedIcon = registerIcon('find-collapsed', Codicon.chevronRight, nls.localize('findCollapsedIcon', 'Icon to indicate that the editor find widget is collapsed.')); +const findExpandedIcon = registerIcon('find-expanded', Codicon.chevronDown, nls.localize('findExpandedIcon', 'Icon to indicate that the editor find widget is expanded.')); + +export const findSelectionIcon = registerIcon('find-selection', Codicon.selection, nls.localize('findSelectionIcon', 'Icon for \'Find in Selection\' in the editor find widget.')); +export const findReplaceIcon = registerIcon('find-replace', Codicon.replace, nls.localize('findReplaceIcon', 'Icon for \'Replace\' in the editor find widget.')); +export const findReplaceAllIcon = registerIcon('find-replace-all', Codicon.replaceAll, nls.localize('findReplaceAllIcon', 'Icon for \'Replace All\' in the editor find widget.')); +export const findPreviousMatchIcon = registerIcon('find-previous-match', Codicon.arrowUp, nls.localize('findPreviousMatchIcon', 'Icon for \'Find Previous\' in the editor find widget.')); +export const findNextMatchIcon = registerIcon('find-next-match', Codicon.arrowDown, nls.localize('findNextMatchIcon', 'Icon for \'Find Next\' in the editor find widget.')); export interface IFindController { replace(): void; - replaceAll(): void; - getGlobalBufferTerm(): Promise; } -const NLS_FIND_DIALOG_LABEL = nls.localize( - "label.findDialog", - "Find / Replace", -); - -const NLS_FIND_INPUT_LABEL = nls.localize("label.find", "Find"); - -const NLS_FIND_INPUT_PLACEHOLDER = nls.localize("placeholder.find", "Find"); - -const NLS_PREVIOUS_MATCH_BTN_LABEL = nls.localize( - "label.previousMatchButton", - "Previous Match", -); - -const NLS_NEXT_MATCH_BTN_LABEL = nls.localize( - "label.nextMatchButton", - "Next Match", -); - -const NLS_TOGGLE_SELECTION_FIND_TITLE = nls.localize( - "label.toggleSelectionFind", - "Find in Selection", -); - -const NLS_CLOSE_BTN_LABEL = nls.localize("label.closeButton", "Close"); - -const NLS_REPLACE_INPUT_LABEL = nls.localize("label.replace", "Replace"); - -const NLS_REPLACE_INPUT_PLACEHOLDER = nls.localize( - "placeholder.replace", - "Replace", -); - -const NLS_REPLACE_BTN_LABEL = nls.localize("label.replaceButton", "Replace"); - -const NLS_REPLACE_ALL_BTN_LABEL = nls.localize( - "label.replaceAllButton", - "Replace All", -); - -const NLS_TOGGLE_REPLACE_MODE_BTN_LABEL = nls.localize( - "label.toggleReplaceButton", - "Toggle Replace", -); - -const NLS_MATCHES_COUNT_LIMIT_TITLE = nls.localize( - "title.matchesCountLimit", - "Only the first {0} results are highlighted, but all find operations work on the entire text.", - MATCHES_LIMIT, -); - -export const NLS_MATCHES_LOCATION = nls.localize( - "label.matchesLocation", - "{0} of {1}", -); - -export const NLS_NO_RESULTS = nls.localize("label.noResults", "No results"); +const NLS_FIND_DIALOG_LABEL = nls.localize('label.findDialog', "Find / Replace"); +const NLS_FIND_INPUT_LABEL = nls.localize('label.find', "Find"); +const NLS_FIND_INPUT_PLACEHOLDER = nls.localize('placeholder.find', "Find"); +const NLS_PREVIOUS_MATCH_BTN_LABEL = nls.localize('label.previousMatchButton', "Previous Match"); +const NLS_NEXT_MATCH_BTN_LABEL = nls.localize('label.nextMatchButton', "Next Match"); +const NLS_TOGGLE_SELECTION_FIND_TITLE = nls.localize('label.toggleSelectionFind', "Find in Selection"); +const NLS_CLOSE_BTN_LABEL = nls.localize('label.closeButton', "Close"); +const NLS_REPLACE_INPUT_LABEL = nls.localize('label.replace', "Replace"); +const NLS_REPLACE_INPUT_PLACEHOLDER = nls.localize('placeholder.replace', "Replace"); +const NLS_REPLACE_BTN_LABEL = nls.localize('label.replaceButton', "Replace"); +const NLS_REPLACE_ALL_BTN_LABEL = nls.localize('label.replaceAllButton', "Replace All"); +const NLS_TOGGLE_REPLACE_MODE_BTN_LABEL = nls.localize('label.toggleReplaceButton', "Toggle Replace"); +const NLS_MATCHES_COUNT_LIMIT_TITLE = nls.localize('title.matchesCountLimit', "Only the first {0} results are highlighted, but all find operations work on the entire text.", MATCHES_LIMIT); +export const NLS_MATCHES_LOCATION = nls.localize('label.matchesLocation', "{0} of {1}"); +export const NLS_NO_RESULTS = nls.localize('label.noResults', "No results"); const FIND_WIDGET_INITIAL_WIDTH = 419; - const PART_WIDTH = 275; - const FIND_INPUT_AREA_WIDTH = PART_WIDTH - 54; let MAX_MATCHES_COUNT_WIDTH = 69; // let FIND_ALL_CONTROLS_WIDTH = 17/** Find Input margin-left */ + (MAX_MATCHES_COUNT_WIDTH + 3 + 1) /** Match Results */ + 23 /** Button */ * 4 + 2/** sash */; const FIND_INPUT_AREA_HEIGHT = 33; // The height of Find Widget when Replace Input is not visible. -const ctrlEnterReplaceAllWarningPromptedKey = - "ctrlEnterReplaceAll.windows.donotask"; - -const ctrlKeyMod = platform.isMacintosh ? KeyMod.WinCtrl : KeyMod.CtrlCmd; +const ctrlEnterReplaceAllWarningPromptedKey = 'ctrlEnterReplaceAll.windows.donotask'; +const ctrlKeyMod = (platform.isMacintosh ? KeyMod.WinCtrl : KeyMod.CtrlCmd); export class FindWidgetViewZone implements IViewZone { public readonly afterLineNumber: number; - public heightInPx: number; - public readonly suppressMouseDown: boolean; - public readonly domNode: HTMLElement; constructor(afterLineNumber: number) { this.afterLineNumber = afterLineNumber; this.heightInPx = FIND_INPUT_AREA_HEIGHT; - this.suppressMouseDown = false; - - this.domNode = document.createElement("div"); - - this.domNode.className = "dock-find-viewzone"; + this.domNode = document.createElement('div'); + this.domNode.className = 'dock-find-viewzone'; } } -function stopPropagationForMultiLineUpwards( - event: IKeyboardEvent, - value: string, - textarea: HTMLTextAreaElement | null, -) { +function stopPropagationForMultiLineUpwards(event: IKeyboardEvent, value: string, textarea: HTMLTextAreaElement | null) { const isMultiline = !!value.match(/\n/); - if (textarea && isMultiline && textarea.selectionStart > 0) { event.stopPropagation(); - return; } } -function stopPropagationForMultiLineDownwards( - event: IKeyboardEvent, - value: string, - textarea: HTMLTextAreaElement | null, -) { +function stopPropagationForMultiLineDownwards(event: IKeyboardEvent, value: string, textarea: HTMLTextAreaElement | null) { const isMultiline = !!value.match(/\n/); - - if ( - textarea && - isMultiline && - textarea.selectionEnd < textarea.value.length - ) { + if (textarea && isMultiline && textarea.selectionEnd < textarea.value.length) { event.stopPropagation(); - return; } } -export class FindWidget - extends Widget - implements IOverlayWidget, IVerticalSashLayoutProvider -{ - private static readonly ID = "editor.contrib.findWidget"; - +export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashLayoutProvider { + private static readonly ID = 'editor.contrib.findWidget'; private readonly _codeEditor: ICodeEditor; - private readonly _state: FindReplaceState; - private readonly _controller: IFindController; - private readonly _contextViewProvider: IContextViewProvider; - private readonly _keybindingService: IKeybindingService; - private readonly _contextKeyService: IContextKeyService; - private readonly _storageService: IStorageService; - private readonly _notificationService: INotificationService; - private _findWidgetSearchHistory: IHistory; - private _domNode!: HTMLElement; - private _cachedHeight: number | null = null; - private _findInput!: FindInput; - private _replaceInput!: ReplaceInput; private _toggleReplaceBtn!: SimpleButton; - private _matchesCount!: HTMLElement; - private _prevBtn!: SimpleButton; - private _nextBtn!: SimpleButton; - private _toggleSelectionFind!: Toggle; - private _closeBtn!: SimpleButton; - private _replaceBtn!: SimpleButton; - private _replaceAllBtn!: SimpleButton; private _isVisible: boolean; - private _isReplaceVisible: boolean; - private _ignoreChangeEvent: boolean; - private _ctrlEnterReplaceAllWarningPrompted: boolean; private readonly _findFocusTracker: dom.IFocusTracker; - private readonly _findInputFocused: IContextKey; - private readonly _replaceFocusTracker: dom.IFocusTracker; - private readonly _replaceInputFocused: IContextKey; - private _viewZone?: FindWidgetViewZone; - private _viewZoneId?: string; private _resizeSash!: Sash; - private _resized!: boolean; - private readonly _updateHistoryDelayer: Delayer; constructor( @@ -385,209 +174,120 @@ export class FindWidget storageService: IStorageService, notificationService: INotificationService, private readonly _hoverService: IHoverService, + private readonly _findWidgetSearchHistory: IHistory | undefined, ) { super(); - this._codeEditor = codeEditor; - this._controller = controller; - this._state = state; - this._contextViewProvider = contextViewProvider; - this._keybindingService = keybindingService; - this._contextKeyService = contextKeyService; - this._storageService = storageService; - this._notificationService = notificationService; - this._findWidgetSearchHistory = new FindWidgetSearchHistory( - this._storageService, - ); - - this._ctrlEnterReplaceAllWarningPrompted = !!storageService.getBoolean( - ctrlEnterReplaceAllWarningPromptedKey, - StorageScope.PROFILE, - ); + this._ctrlEnterReplaceAllWarningPrompted = !!storageService.getBoolean(ctrlEnterReplaceAllWarningPromptedKey, StorageScope.PROFILE); this._isVisible = false; - this._isReplaceVisible = false; - this._ignoreChangeEvent = false; this._updateHistoryDelayer = new Delayer(500); - this._register(toDisposable(() => this._updateHistoryDelayer.cancel())); - - this._register( - this._state.onFindReplaceStateChange((e) => - this._onStateChanged(e), - ), - ); - + this._register(this._state.onFindReplaceStateChange((e) => this._onStateChanged(e))); this._buildDomNode(); - this._updateButtons(); - this._tryUpdateWidgetWidth(); - this._findInput.inputBox.layout(); - this._register( - this._codeEditor.onDidChangeConfiguration( - (e: ConfigurationChangedEvent) => { - if (e.hasChanged(EditorOption.readOnly)) { - if (this._codeEditor.getOption(EditorOption.readOnly)) { - // Hide replace part if editor becomes read only - this._state.change( - { isReplaceRevealed: false }, - false, - ); - } - - this._updateButtons(); - } - - if (e.hasChanged(EditorOption.layoutInfo)) { - this._tryUpdateWidgetWidth(); - } - - if (e.hasChanged(EditorOption.accessibilitySupport)) { - this.updateAccessibilitySupport(); - } - - if (e.hasChanged(EditorOption.find)) { - const supportLoop = this._codeEditor.getOption( - EditorOption.find, - ).loop; - - this._state.change({ loop: supportLoop }, false); - - const addExtraSpaceOnTop = this._codeEditor.getOption( - EditorOption.find, - ).addExtraSpaceOnTop; - - if (addExtraSpaceOnTop && !this._viewZone) { - this._viewZone = new FindWidgetViewZone(0); - - this._showViewZone(); - } - - if (!addExtraSpaceOnTop && this._viewZone) { - this._removeViewZone(); - } - } - }, - ), - ); + this._register(this._codeEditor.onDidChangeConfiguration((e: ConfigurationChangedEvent) => { + if (e.hasChanged(EditorOption.readOnly)) { + if (this._codeEditor.getOption(EditorOption.readOnly)) { + // Hide replace part if editor becomes read only + this._state.change({ isReplaceRevealed: false }, false); + } + this._updateButtons(); + } + if (e.hasChanged(EditorOption.layoutInfo)) { + this._tryUpdateWidgetWidth(); + } - this.updateAccessibilitySupport(); + if (e.hasChanged(EditorOption.accessibilitySupport)) { + this.updateAccessibilitySupport(); + } - this._register( - this._codeEditor.onDidChangeCursorSelection(() => { - if (this._isVisible) { - this._updateToggleSelectionFindButton(); + if (e.hasChanged(EditorOption.find)) { + const supportLoop = this._codeEditor.getOption(EditorOption.find).loop; + this._state.change({ loop: supportLoop }, false); + const addExtraSpaceOnTop = this._codeEditor.getOption(EditorOption.find).addExtraSpaceOnTop; + if (addExtraSpaceOnTop && !this._viewZone) { + this._viewZone = new FindWidgetViewZone(0); + this._showViewZone(); } - }), - ); - - this._register( - this._codeEditor.onDidFocusEditorWidget(async () => { - if (this._isVisible) { - const globalBufferTerm = - await this._controller.getGlobalBufferTerm(); - - if ( - globalBufferTerm && - globalBufferTerm !== this._state.searchString - ) { - this._state.change( - { searchString: globalBufferTerm }, - false, - ); - - this._findInput.select(); - } + if (!addExtraSpaceOnTop && this._viewZone) { + this._removeViewZone(); } - }), - ); - - this._findInputFocused = - CONTEXT_FIND_INPUT_FOCUSED.bindTo(contextKeyService); - - this._findFocusTracker = this._register( - dom.trackFocus(this._findInput.inputBox.inputElement), - ); - - this._register( - this._findFocusTracker.onDidFocus(() => { - this._findInputFocused.set(true); - - this._updateSearchScope(); - }), - ); - - this._register( - this._findFocusTracker.onDidBlur(() => { - this._findInputFocused.set(false); - }), - ); - - this._replaceInputFocused = - CONTEXT_REPLACE_INPUT_FOCUSED.bindTo(contextKeyService); - - this._replaceFocusTracker = this._register( - dom.trackFocus(this._replaceInput.inputBox.inputElement), - ); - - this._register( - this._replaceFocusTracker.onDidFocus(() => { - this._replaceInputFocused.set(true); - - this._updateSearchScope(); - }), - ); - - this._register( - this._replaceFocusTracker.onDidBlur(() => { - this._replaceInputFocused.set(false); - }), - ); + } + })); + this.updateAccessibilitySupport(); + this._register(this._codeEditor.onDidChangeCursorSelection(() => { + if (this._isVisible) { + this._updateToggleSelectionFindButton(); + } + })); + this._register(this._codeEditor.onDidFocusEditorWidget(async () => { + if (this._isVisible) { + const globalBufferTerm = await this._controller.getGlobalBufferTerm(); + if (globalBufferTerm && globalBufferTerm !== this._state.searchString) { + this._state.change({ searchString: globalBufferTerm }, false); + this._findInput.select(); + } + } + })); + this._findInputFocused = CONTEXT_FIND_INPUT_FOCUSED.bindTo(contextKeyService); + this._findFocusTracker = this._register(dom.trackFocus(this._findInput.inputBox.inputElement)); + this._register(this._findFocusTracker.onDidFocus(() => { + this._findInputFocused.set(true); + this._updateSearchScope(); + })); + this._register(this._findFocusTracker.onDidBlur(() => { + this._findInputFocused.set(false); + })); + + this._replaceInputFocused = CONTEXT_REPLACE_INPUT_FOCUSED.bindTo(contextKeyService); + this._replaceFocusTracker = this._register(dom.trackFocus(this._replaceInput.inputBox.inputElement)); + this._register(this._replaceFocusTracker.onDidFocus(() => { + this._replaceInputFocused.set(true); + this._updateSearchScope(); + })); + this._register(this._replaceFocusTracker.onDidBlur(() => { + this._replaceInputFocused.set(false); + })); this._codeEditor.addOverlayWidget(this); - if (this._codeEditor.getOption(EditorOption.find).addExtraSpaceOnTop) { this._viewZone = new FindWidgetViewZone(0); // Put it before the first line then users can scroll beyond the first line. } - this._register( - this._codeEditor.onDidChangeModel(() => { - if (!this._isVisible) { - return; - } - - this._viewZoneId = undefined; - }), - ); + this._register(this._codeEditor.onDidChangeModel(() => { + if (!this._isVisible) { + return; + } + this._viewZoneId = undefined; + })); - this._register( - this._codeEditor.onDidScrollChange((e) => { - if (e.scrollTopChanged) { - this._layoutViewZone(); - return; - } + this._register(this._codeEditor.onDidScrollChange((e) => { + if (e.scrollTopChanged) { + this._layoutViewZone(); + return; + } - // for other scroll changes, layout the viewzone in next tick to avoid ruining current rendering. - setTimeout(() => { - this._layoutViewZone(); - }, 0); - }), - ); + // for other scroll changes, layout the viewzone in next tick to avoid ruining current rendering. + setTimeout(() => { + this._layoutViewZone(); + }, 0); + })); } // ----- IOverlayWidget API @@ -603,10 +303,9 @@ export class FindWidget public getPosition(): IOverlayWidgetPosition | null { if (this._isVisible) { return { - preference: OverlayWidgetPositionPreference.TOP_RIGHT_CORNER, + preference: OverlayWidgetPositionPreference.TOP_RIGHT_CORNER }; } - return null; } @@ -616,19 +315,15 @@ export class FindWidget if (e.searchString) { try { this._ignoreChangeEvent = true; - this._findInput.setValue(this._state.searchString); } finally { this._ignoreChangeEvent = false; } - this._updateButtons(); } - if (e.replaceString) { this._replaceInput.inputBox.value = this._state.replaceString; } - if (e.isRevealed) { if (this._state.isRevealed) { this._reveal(); @@ -636,36 +331,22 @@ export class FindWidget this._hide(true); } } - if (e.isReplaceRevealed) { if (this._state.isReplaceRevealed) { - if ( - !this._codeEditor.getOption(EditorOption.readOnly) && - !this._isReplaceVisible - ) { + if (!this._codeEditor.getOption(EditorOption.readOnly) && !this._isReplaceVisible) { this._isReplaceVisible = true; - - this._replaceInput.width = dom.getTotalWidth( - this._findInput.domNode, - ); - + this._replaceInput.width = dom.getTotalWidth(this._findInput.domNode); this._updateButtons(); - this._replaceInput.inputBox.layout(); } } else { if (this._isReplaceVisible) { this._isReplaceVisible = false; - this._updateButtons(); } } } - - if ( - (e.isRevealed || e.isReplaceRevealed) && - (this._state.isRevealed || this._state.isReplaceRevealed) - ) { + if ((e.isRevealed || e.isReplaceRevealed) && (this._state.isRevealed || this._state.isReplaceRevealed)) { if (this._tryUpdateHeight()) { this._showViewZone(); } @@ -674,172 +355,106 @@ export class FindWidget if (e.isRegex) { this._findInput.setRegex(this._state.isRegex); } - if (e.wholeWord) { this._findInput.setWholeWords(this._state.wholeWord); } - if (e.matchCase) { this._findInput.setCaseSensitive(this._state.matchCase); } - if (e.preserveCase) { this._replaceInput.setPreserveCase(this._state.preserveCase); } - if (e.searchScope) { if (this._state.searchScope) { this._toggleSelectionFind.checked = true; } else { this._toggleSelectionFind.checked = false; } - this._updateToggleSelectionFindButton(); } - if (e.searchString || e.matchesCount || e.matchesPosition) { - const showRedOutline = - this._state.searchString.length > 0 && - this._state.matchesCount === 0; - - this._domNode.classList.toggle("no-results", showRedOutline); + const showRedOutline = (this._state.searchString.length > 0 && this._state.matchesCount === 0); + this._domNode.classList.toggle('no-results', showRedOutline); this._updateMatchesCount(); - this._updateButtons(); } - if (e.searchString || e.currentMatch) { this._layoutViewZone(); } - if (e.updateHistory) { this._delayedUpdateHistory(); } - if (e.loop) { this._updateButtons(); } } private _delayedUpdateHistory() { - this._updateHistoryDelayer - .trigger(this._updateHistory.bind(this)) - .then(undefined, onUnexpectedError); + this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(undefined, onUnexpectedError); } private _updateHistory() { if (this._state.searchString) { this._findInput.inputBox.addToHistory(); } - if (this._state.replaceString) { this._replaceInput.inputBox.addToHistory(); } } private _updateMatchesCount(): void { - this._matchesCount.style.minWidth = MAX_MATCHES_COUNT_WIDTH + "px"; - + this._matchesCount.style.minWidth = MAX_MATCHES_COUNT_WIDTH + 'px'; if (this._state.matchesCount >= MATCHES_LIMIT) { this._matchesCount.title = NLS_MATCHES_COUNT_LIMIT_TITLE; } else { - this._matchesCount.title = ""; + this._matchesCount.title = ''; } // remove previous content this._matchesCount.firstChild?.remove(); let label: string; - if (this._state.matchesCount > 0) { let matchesCount: string = String(this._state.matchesCount); - if (this._state.matchesCount >= MATCHES_LIMIT) { - matchesCount += "+"; + matchesCount += '+'; } - let matchesPosition: string = String(this._state.matchesPosition); - - if (matchesPosition === "0") { - matchesPosition = "?"; + if (matchesPosition === '0') { + matchesPosition = '?'; } - - label = strings.format( - NLS_MATCHES_LOCATION, - matchesPosition, - matchesCount, - ); + label = strings.format(NLS_MATCHES_LOCATION, matchesPosition, matchesCount); } else { label = NLS_NO_RESULTS; } this._matchesCount.appendChild(document.createTextNode(label)); - alertFn( - this._getAriaLabel( - label, - this._state.currentMatch, - this._state.searchString, - ), - ); - - MAX_MATCHES_COUNT_WIDTH = Math.max( - MAX_MATCHES_COUNT_WIDTH, - this._matchesCount.clientWidth, - ); + alertFn(this._getAriaLabel(label, this._state.currentMatch, this._state.searchString)); + MAX_MATCHES_COUNT_WIDTH = Math.max(MAX_MATCHES_COUNT_WIDTH, this._matchesCount.clientWidth); } // ----- actions - private _getAriaLabel( - label: string, - currentMatch: Range | null, - searchString: string, - ): string { + private _getAriaLabel(label: string, currentMatch: Range | null, searchString: string): string { if (label === NLS_NO_RESULTS) { - return searchString === "" - ? nls.localize("ariaSearchNoResultEmpty", "{0} found", label) - : nls.localize( - "ariaSearchNoResult", - "{0} found for '{1}'", - label, - searchString, - ); + return searchString === '' + ? nls.localize('ariaSearchNoResultEmpty', "{0} found", label) + : nls.localize('ariaSearchNoResult', "{0} found for '{1}'", label, searchString); } - if (currentMatch) { - const ariaLabel = nls.localize( - "ariaSearchNoResultWithLineNum", - "{0} found for '{1}', at {2}", - label, - searchString, - currentMatch.startLineNumber + ":" + currentMatch.startColumn, - ); - + const ariaLabel = nls.localize('ariaSearchNoResultWithLineNum', "{0} found for '{1}', at {2}", label, searchString, currentMatch.startLineNumber + ':' + currentMatch.startColumn); const model = this._codeEditor.getModel(); - - if ( - model && - currentMatch.startLineNumber <= model.getLineCount() && - currentMatch.startLineNumber >= 1 - ) { - const lineContent = model.getLineContent( - currentMatch.startLineNumber, - ); - + if (model && (currentMatch.startLineNumber <= model.getLineCount()) && (currentMatch.startLineNumber >= 1)) { + const lineContent = model.getLineContent(currentMatch.startLineNumber); return `${lineContent}, ${ariaLabel}`; } return ariaLabel; } - return nls.localize( - "ariaSearchNoResultWithLineNumNoCurrentMatch", - "{0} found for '{1}'", - label, - searchString, - ); + return nls.localize('ariaSearchNoResultWithLineNumNoCurrentMatch', "{0} found for '{1}'", label, searchString); } /** @@ -848,12 +463,7 @@ export class FindWidget */ private _updateToggleSelectionFindButton(): void { const selection = this._codeEditor.getSelection(); - - const isSelection = selection - ? selection.startLineNumber !== selection.endLineNumber || - selection.startColumn !== selection.endColumn - : false; - + const isSelection = selection ? (selection.startLineNumber !== selection.endLineNumber || selection.startColumn !== selection.endColumn) : false; const isChecked = this._toggleSelectionFind.checked; if (this._isVisible && (isChecked || isSelection)) { @@ -865,57 +475,28 @@ export class FindWidget private _updateButtons(): void { this._findInput.setEnabled(this._isVisible); - - this._replaceInput.setEnabled( - this._isVisible && this._isReplaceVisible, - ); - + this._replaceInput.setEnabled(this._isVisible && this._isReplaceVisible); this._updateToggleSelectionFindButton(); - this._closeBtn.setEnabled(this._isVisible); - const findInputIsNonEmpty = this._state.searchString.length > 0; - + const findInputIsNonEmpty = (this._state.searchString.length > 0); const matchesCount = this._state.matchesCount ? true : false; + this._prevBtn.setEnabled(this._isVisible && findInputIsNonEmpty && matchesCount && this._state.canNavigateBack()); + this._nextBtn.setEnabled(this._isVisible && findInputIsNonEmpty && matchesCount && this._state.canNavigateForward()); + this._replaceBtn.setEnabled(this._isVisible && this._isReplaceVisible && findInputIsNonEmpty); + this._replaceAllBtn.setEnabled(this._isVisible && this._isReplaceVisible && findInputIsNonEmpty); - this._prevBtn.setEnabled( - this._isVisible && - findInputIsNonEmpty && - matchesCount && - this._state.canNavigateBack(), - ); - - this._nextBtn.setEnabled( - this._isVisible && - findInputIsNonEmpty && - matchesCount && - this._state.canNavigateForward(), - ); - - this._replaceBtn.setEnabled( - this._isVisible && this._isReplaceVisible && findInputIsNonEmpty, - ); - - this._replaceAllBtn.setEnabled( - this._isVisible && this._isReplaceVisible && findInputIsNonEmpty, - ); - - this._domNode.classList.toggle( - "replaceToggled", - this._isReplaceVisible, - ); - + this._domNode.classList.toggle('replaceToggled', this._isReplaceVisible); this._toggleReplaceBtn.setExpanded(this._isReplaceVisible); const canReplace = !this._codeEditor.getOption(EditorOption.readOnly); - this._toggleReplaceBtn.setEnabled(this._isVisible && canReplace); } private _revealTimeouts: any[] = []; private _reveal(): void { - this._revealTimeouts.forEach((e) => { + this._revealTimeouts.forEach(e => { clearTimeout(e); }); @@ -926,118 +507,69 @@ export class FindWidget const selection = this._codeEditor.getSelection(); - switch ( - this._codeEditor.getOption(EditorOption.find) - .autoFindInSelection - ) { - case "always": + switch (this._codeEditor.getOption(EditorOption.find).autoFindInSelection) { + case 'always': this._toggleSelectionFind.checked = true; - break; - - case "never": + case 'never': this._toggleSelectionFind.checked = false; - break; - - case "multiline": { - const isSelectionMultipleLine = - !!selection && - selection.startLineNumber !== selection.endLineNumber; - + case 'multiline': { + const isSelectionMultipleLine = !!selection && selection.startLineNumber !== selection.endLineNumber; this._toggleSelectionFind.checked = isSelectionMultipleLine; - break; } - default: break; } this._tryUpdateWidgetWidth(); - this._updateButtons(); - this._revealTimeouts.push( - setTimeout(() => { - this._domNode.classList.add("visible"); - - this._domNode.setAttribute("aria-hidden", "false"); - }, 0), - ); + this._revealTimeouts.push(setTimeout(() => { + this._domNode.classList.add('visible'); + this._domNode.setAttribute('aria-hidden', 'false'); + }, 0)); // validate query again as it's being dismissed when we hide the find widget. - this._revealTimeouts.push( - setTimeout(() => { - this._findInput.validate(); - }, 200), - ); + this._revealTimeouts.push(setTimeout(() => { + this._findInput.validate(); + }, 200)); this._codeEditor.layoutOverlayWidget(this); let adjustEditorScrollTop = true; - - if ( - this._codeEditor.getOption(EditorOption.find) - .seedSearchStringFromSelection && - selection - ) { + if (this._codeEditor.getOption(EditorOption.find).seedSearchStringFromSelection && selection) { const domNode = this._codeEditor.getDomNode(); - if (domNode) { const editorCoords = dom.getDomNodePagePosition(domNode); - - const startCoords = - this._codeEditor.getScrolledVisiblePosition( - selection.getStartPosition(), - ); - - const startLeft = - editorCoords.left + - (startCoords ? startCoords.left : 0); - + const startCoords = this._codeEditor.getScrolledVisiblePosition(selection.getStartPosition()); + const startLeft = editorCoords.left + (startCoords ? startCoords.left : 0); const startTop = startCoords ? startCoords.top : 0; - if ( - this._viewZone && - startTop < this._viewZone.heightInPx - ) { - if ( - selection.endLineNumber > selection.startLineNumber - ) { + if (this._viewZone && startTop < this._viewZone.heightInPx) { + if (selection.endLineNumber > selection.startLineNumber) { adjustEditorScrollTop = false; } - const leftOfFindWidget = dom.getTopLeftOffset( - this._domNode, - ).left; - + const leftOfFindWidget = dom.getTopLeftOffset(this._domNode).left; if (startLeft > leftOfFindWidget) { adjustEditorScrollTop = false; } - - const endCoords = - this._codeEditor.getScrolledVisiblePosition( - selection.getEndPosition(), - ); - - const endLeft = - editorCoords.left + - (endCoords ? endCoords.left : 0); - + const endCoords = this._codeEditor.getScrolledVisiblePosition(selection.getEndPosition()); + const endLeft = editorCoords.left + (endCoords ? endCoords.left : 0); if (endLeft > leftOfFindWidget) { adjustEditorScrollTop = false; } } } } - this._showViewZone(adjustEditorScrollTop); } } private _hide(focusTheEditor: boolean): void { - this._revealTimeouts.forEach((e) => { + this._revealTimeouts.forEach(e => { clearTimeout(e); }); @@ -1048,52 +580,38 @@ export class FindWidget this._updateButtons(); - this._domNode.classList.remove("visible"); - - this._domNode.setAttribute("aria-hidden", "true"); - + this._domNode.classList.remove('visible'); + this._domNode.setAttribute('aria-hidden', 'true'); this._findInput.clearMessage(); - if (focusTheEditor) { this._codeEditor.focus(); } - this._codeEditor.layoutOverlayWidget(this); - this._removeViewZone(); } } private _layoutViewZone(targetScrollTop?: number) { - const addExtraSpaceOnTop = this._codeEditor.getOption( - EditorOption.find, - ).addExtraSpaceOnTop; + const addExtraSpaceOnTop = this._codeEditor.getOption(EditorOption.find).addExtraSpaceOnTop; if (!addExtraSpaceOnTop) { this._removeViewZone(); - return; } if (!this._isVisible) { return; } - const viewZone = this._viewZone; - if (this._viewZoneId !== undefined || !viewZone) { return; } this._codeEditor.changeViewZones((accessor) => { viewZone.heightInPx = this._getHeight(); - this._viewZoneId = accessor.addZone(viewZone); // scroll top adjust to make sure the editor doesn't scroll when adding viewzone at the beginning. - this._codeEditor.setScrollTop( - targetScrollTop || - this._codeEditor.getScrollTop() + viewZone.heightInPx, - ); + this._codeEditor.setScrollTop(targetScrollTop || this._codeEditor.getScrollTop() + viewZone.heightInPx); }); } @@ -1102,9 +620,7 @@ export class FindWidget return; } - const addExtraSpaceOnTop = this._codeEditor.getOption( - EditorOption.find, - ).addExtraSpaceOnTop; + const addExtraSpaceOnTop = this._codeEditor.getOption(EditorOption.find).addExtraSpaceOnTop; if (!addExtraSpaceOnTop) { return; @@ -1120,21 +636,16 @@ export class FindWidget if (this._viewZoneId !== undefined) { // the view zone already exists, we need to update the height const newHeight = this._getHeight(); - if (newHeight === viewZone.heightInPx) { return; } const scrollAdjustment = newHeight - viewZone.heightInPx; - viewZone.heightInPx = newHeight; - accessor.layoutZone(this._viewZoneId); if (adjustScroll) { - this._codeEditor.setScrollTop( - this._codeEditor.getScrollTop() + scrollAdjustment, - ); + this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() + scrollAdjustment); } return; @@ -1142,22 +653,16 @@ export class FindWidget let scrollAdjustment = this._getHeight(); // if the editor has top padding, factor that into the zone height - scrollAdjustment -= this._codeEditor.getOption( - EditorOption.padding, - ).top; - + scrollAdjustment -= this._codeEditor.getOption(EditorOption.padding).top; if (scrollAdjustment <= 0) { return; } viewZone.heightInPx = scrollAdjustment; - this._viewZoneId = accessor.addZone(viewZone); if (adjustScroll) { - this._codeEditor.setScrollTop( - this._codeEditor.getScrollTop() + scrollAdjustment, - ); + this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() + scrollAdjustment); } } }); @@ -1167,15 +672,9 @@ export class FindWidget this._codeEditor.changeViewZones((accessor) => { if (this._viewZoneId !== undefined) { accessor.removeZone(this._viewZoneId); - this._viewZoneId = undefined; - if (this._viewZone) { - this._codeEditor.setScrollTop( - this._codeEditor.getScrollTop() - - this._viewZone.heightInPx, - ); - + this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() - this._viewZone.heightInPx); this._viewZone = undefined; } } @@ -1186,33 +685,26 @@ export class FindWidget if (!this._isVisible) { return; } - if (!this._domNode.isConnected) { // the widget is not in the DOM return; } const layoutInfo = this._codeEditor.getLayoutInfo(); - const editorContentWidth = layoutInfo.contentWidth; if (editorContentWidth <= 0) { // for example, diff view original editor - this._domNode.classList.add("hiddenEditor"); - + this._domNode.classList.add('hiddenEditor'); return; - } else if (this._domNode.classList.contains("hiddenEditor")) { - this._domNode.classList.remove("hiddenEditor"); + } else if (this._domNode.classList.contains('hiddenEditor')) { + this._domNode.classList.remove('hiddenEditor'); } const editorWidth = layoutInfo.width; - const minimapWidth = layoutInfo.minimap.minimapWidth; - let collapsedFindWidget = false; - let reducedFindWidget = false; - let narrowFindWidget = false; if (this._resized) { @@ -1221,11 +713,7 @@ export class FindWidget if (widgetWidth > FIND_WIDGET_INITIAL_WIDTH) { // as the widget is resized by users, we may need to change the max width of the widget as the editor width changes. this._domNode.style.maxWidth = `${editorWidth - 28 - minimapWidth - 15}px`; - - this._replaceInput.width = dom.getTotalWidth( - this._findInput.domNode, - ); - + this._replaceInput.width = dom.getTotalWidth(this._findInput.domNode); return; } } @@ -1233,60 +721,29 @@ export class FindWidget if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth >= editorWidth) { reducedFindWidget = true; } - - if ( - FIND_WIDGET_INITIAL_WIDTH + - 28 + - minimapWidth - - MAX_MATCHES_COUNT_WIDTH >= - editorWidth - ) { + if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth - MAX_MATCHES_COUNT_WIDTH >= editorWidth) { narrowFindWidget = true; } - - if ( - FIND_WIDGET_INITIAL_WIDTH + - 28 + - minimapWidth - - MAX_MATCHES_COUNT_WIDTH >= - editorWidth + 50 - ) { + if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth - MAX_MATCHES_COUNT_WIDTH >= editorWidth + 50) { collapsedFindWidget = true; } - - this._domNode.classList.toggle( - "collapsed-find-widget", - collapsedFindWidget, - ); - - this._domNode.classList.toggle("narrow-find-widget", narrowFindWidget); - - this._domNode.classList.toggle( - "reduced-find-widget", - reducedFindWidget, - ); + this._domNode.classList.toggle('collapsed-find-widget', collapsedFindWidget); + this._domNode.classList.toggle('narrow-find-widget', narrowFindWidget); + this._domNode.classList.toggle('reduced-find-widget', reducedFindWidget); if (!narrowFindWidget && !collapsedFindWidget) { // the minimal left offset of findwidget is 15px. this._domNode.style.maxWidth = `${editorWidth - 28 - minimapWidth - 15}px`; } - this._findInput.layout({ - collapsedFindWidget, - narrowFindWidget, - reducedFindWidget, - }); - + this._findInput.layout({ collapsedFindWidget, narrowFindWidget, reducedFindWidget }); if (this._resized) { const findInputWidth = this._findInput.inputBox.element.clientWidth; - if (findInputWidth > 0) { this._replaceInput.width = findInputWidth; } } else if (this._isReplaceVisible) { - this._replaceInput.width = dom.getTotalWidth( - this._findInput.domNode, - ); + this._replaceInput.width = dom.getTotalWidth(this._findInput.domNode); } } @@ -1297,32 +754,27 @@ export class FindWidget totalheight += 4; // find input height - totalheight += - this._findInput.inputBox.height + 2 /** input box border */; + totalheight += this._findInput.inputBox.height + 2 /** input box border */; if (this._isReplaceVisible) { // replace input margin totalheight += 4; - totalheight += - this._replaceInput.inputBox.height + 2 /** input box border */; + totalheight += this._replaceInput.inputBox.height + 2 /** input box border */; } // margin bottom totalheight += 4; - return totalheight; } private _tryUpdateHeight(): boolean { const totalHeight = this._getHeight(); - if (this._cachedHeight !== null && this._cachedHeight === totalHeight) { return false; } this._cachedHeight = totalHeight; - this._domNode.style.height = `${totalHeight}px`; return true; @@ -1354,37 +806,24 @@ export class FindWidget if (this._toggleSelectionFind.checked) { const selections = this._codeEditor.getSelections(); - selections - .map((selection) => { - if ( - selection.endColumn === 1 && - selection.endLineNumber > selection.startLineNumber - ) { - selection = selection.setEndPosition( - selection.endLineNumber - 1, - this._codeEditor - .getModel()! - .getLineMaxColumn(selection.endLineNumber - 1), - ); - } - - const currentMatch = this._state.currentMatch; - - if (selection.startLineNumber !== selection.endLineNumber) { - if (!Range.equalsRange(selection, currentMatch)) { - return selection; - } + selections.map(selection => { + if (selection.endColumn === 1 && selection.endLineNumber > selection.startLineNumber) { + selection = selection.setEndPosition( + selection.endLineNumber - 1, + this._codeEditor.getModel()!.getLineMaxColumn(selection.endLineNumber - 1) + ); + } + const currentMatch = this._state.currentMatch; + if (selection.startLineNumber !== selection.endLineNumber) { + if (!Range.equalsRange(selection, currentMatch)) { + return selection; } - - return null; - }) - .filter((element) => !!element); + } + return null; + }).filter(element => !!element); if (selections.length) { - this._state.change( - { searchScope: selections as Range[] }, - true, - ); + this._state.change({ searchScope: selections as Range[] }, true); } } } @@ -1400,13 +839,10 @@ export class FindWidget if (e.equals(ctrlKeyMod | KeyCode.Enter)) { if (this._keybindingService.dispatchEvent(e, e.target)) { e.preventDefault(); - return; } else { - this._findInput.inputBox.insertAtCursor("\n"); - + this._findInput.inputBox.insertAtCursor('\n'); e.preventDefault(); - return; } } @@ -1417,34 +853,22 @@ export class FindWidget } else { this._findInput.focusOnCaseSensitive(); } - e.preventDefault(); - return; } if (e.equals(KeyMod.CtrlCmd | KeyCode.DownArrow)) { this._codeEditor.focus(); - e.preventDefault(); - return; } if (e.equals(KeyCode.UpArrow)) { - return stopPropagationForMultiLineUpwards( - e, - this._findInput.getValue(), - this._findInput.domNode.querySelector("textarea"), - ); + return stopPropagationForMultiLineUpwards(e, this._findInput.getValue(), this._findInput.domNode.querySelector('textarea')); } if (e.equals(KeyCode.DownArrow)) { - return stopPropagationForMultiLineDownwards( - e, - this._findInput.getValue(), - this._findInput.domNode.querySelector("textarea"), - ); + return stopPropagationForMultiLineDownwards(e, this._findInput.getValue(), this._findInput.domNode.querySelector('textarea')); } } @@ -1452,78 +876,50 @@ export class FindWidget if (e.equals(ctrlKeyMod | KeyCode.Enter)) { if (this._keybindingService.dispatchEvent(e, e.target)) { e.preventDefault(); - return; } else { - if ( - platform.isWindows && - platform.isNative && - !this._ctrlEnterReplaceAllWarningPrompted - ) { + if (platform.isWindows && platform.isNative && !this._ctrlEnterReplaceAllWarningPrompted) { // this is the first time when users press Ctrl + Enter to replace all this._notificationService.info( - nls.localize( - "ctrlEnter.keybindingChanged", - "Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.", - ), + nls.localize('ctrlEnter.keybindingChanged', + 'Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.') ); this._ctrlEnterReplaceAllWarningPrompted = true; - - this._storageService.store( - ctrlEnterReplaceAllWarningPromptedKey, - true, - StorageScope.PROFILE, - StorageTarget.USER, - ); + this._storageService.store(ctrlEnterReplaceAllWarningPromptedKey, true, StorageScope.PROFILE, StorageTarget.USER); } - this._replaceInput.inputBox.insertAtCursor("\n"); - + this._replaceInput.inputBox.insertAtCursor('\n'); e.preventDefault(); - return; } + } if (e.equals(KeyCode.Tab)) { this._findInput.focusOnCaseSensitive(); - e.preventDefault(); - return; } if (e.equals(KeyMod.Shift | KeyCode.Tab)) { this._findInput.focus(); - e.preventDefault(); - return; } if (e.equals(KeyMod.CtrlCmd | KeyCode.DownArrow)) { this._codeEditor.focus(); - e.preventDefault(); - return; } if (e.equals(KeyCode.UpArrow)) { - return stopPropagationForMultiLineUpwards( - e, - this._replaceInput.inputBox.value, - this._replaceInput.inputBox.element.querySelector("textarea"), - ); + return stopPropagationForMultiLineUpwards(e, this._replaceInput.inputBox.value, this._replaceInput.inputBox.element.querySelector('textarea')); } if (e.equals(KeyCode.DownArrow)) { - return stopPropagationForMultiLineDownwards( - e, - this._replaceInput.inputBox.value, - this._replaceInput.inputBox.element.querySelector("textarea"), - ); + return stopPropagationForMultiLineDownwards(e, this._replaceInput.inputBox.value, this._replaceInput.inputBox.element.querySelector('textarea')); } } @@ -1535,639 +931,377 @@ export class FindWidget private _keybindingLabelFor(actionId: string): string { const kb = this._keybindingService.lookupKeybinding(actionId); - if (!kb) { - return ""; + return ''; } - return ` (${kb.getLabel()})`; } private _buildDomNode(): void { const flexibleHeight = true; - const flexibleWidth = true; // Find input - const findSearchHistoryConfig = this._codeEditor.getOption( - EditorOption.find, - ).findSearchHistory; - - this._findInput = this._register( - new ContextScopedFindInput( - null, - this._contextViewProvider, - { - width: FIND_INPUT_AREA_WIDTH, - label: NLS_FIND_INPUT_LABEL, - placeholder: NLS_FIND_INPUT_PLACEHOLDER, - appendCaseSensitiveLabel: this._keybindingLabelFor( - FIND_IDS.ToggleCaseSensitiveCommand, - ), - appendWholeWordsLabel: this._keybindingLabelFor( - FIND_IDS.ToggleWholeWordCommand, - ), - appendRegexLabel: this._keybindingLabelFor( - FIND_IDS.ToggleRegexCommand, - ), - validation: (value: string): InputBoxMessage | null => { - if (value.length === 0 || !this._findInput.getRegex()) { - return null; - } - - try { - // use `g` and `u` which are also used by the TextModel search - new RegExp(value, "gu"); - - return null; - } catch (e) { - return { content: e.message }; - } - }, - flexibleHeight, - flexibleWidth, - flexibleMaxHeight: 118, - showCommonFindToggles: true, - showHistoryHint: () => - showHistoryKeybindingHint(this._keybindingService), - inputBoxStyles: defaultInputBoxStyles, - toggleStyles: defaultToggleStyles, - history: - findSearchHistoryConfig === "workspace" - ? this._findWidgetSearchHistory - : new Set([]), - }, - this._contextKeyService, - ), - ); - + const findSearchHistoryConfig = this._codeEditor.getOption(EditorOption.find).history; + this._findInput = this._register(new ContextScopedFindInput(null, this._contextViewProvider, { + width: FIND_INPUT_AREA_WIDTH, + label: NLS_FIND_INPUT_LABEL, + placeholder: NLS_FIND_INPUT_PLACEHOLDER, + appendCaseSensitiveLabel: this._keybindingLabelFor(FIND_IDS.ToggleCaseSensitiveCommand), + appendWholeWordsLabel: this._keybindingLabelFor(FIND_IDS.ToggleWholeWordCommand), + appendRegexLabel: this._keybindingLabelFor(FIND_IDS.ToggleRegexCommand), + validation: (value: string): InputBoxMessage | null => { + if (value.length === 0 || !this._findInput.getRegex()) { + return null; + } + try { + // use `g` and `u` which are also used by the TextModel search + new RegExp(value, 'gu'); + return null; + } catch (e) { + return { content: e.message }; + } + }, + flexibleHeight, + flexibleWidth, + flexibleMaxHeight: 118, + showCommonFindToggles: true, + showHistoryHint: () => showHistoryKeybindingHint(this._keybindingService), + inputBoxStyles: defaultInputBoxStyles, + toggleStyles: defaultToggleStyles, + history: findSearchHistoryConfig === 'workspace' ? this._findWidgetSearchHistory : new Set([]), + }, this._contextKeyService)); this._findInput.setRegex(!!this._state.isRegex); - this._findInput.setCaseSensitive(!!this._state.matchCase); - this._findInput.setWholeWords(!!this._state.wholeWord); - - this._register( - this._findInput.onKeyDown((e) => this._onFindInputKeyDown(e)), - ); - - this._register( - this._findInput.inputBox.onDidChange(() => { - if (this._ignoreChangeEvent) { - return; - } - - this._state.change( - { searchString: this._findInput.getValue() }, - true, - ); - }), - ); - - this._register( - this._findInput.onDidOptionChange(() => { - this._state.change( - { - isRegex: this._findInput.getRegex(), - wholeWord: this._findInput.getWholeWords(), - matchCase: this._findInput.getCaseSensitive(), - }, - true, - ); - }), - ); - - this._register( - this._findInput.onCaseSensitiveKeyDown((e) => { - if (e.equals(KeyMod.Shift | KeyCode.Tab)) { - if (this._isReplaceVisible) { - this._replaceInput.focus(); - - e.preventDefault(); - } - } - }), - ); - - this._register( - this._findInput.onRegexKeyDown((e) => { - if (e.equals(KeyCode.Tab)) { - if (this._isReplaceVisible) { - this._replaceInput.focusOnPreserve(); - - e.preventDefault(); - } + this._register(this._findInput.onKeyDown((e) => this._onFindInputKeyDown(e))); + this._register(this._findInput.inputBox.onDidChange(() => { + if (this._ignoreChangeEvent) { + return; + } + this._state.change({ searchString: this._findInput.getValue() }, true); + })); + this._register(this._findInput.onDidOptionChange(() => { + this._state.change({ + isRegex: this._findInput.getRegex(), + wholeWord: this._findInput.getWholeWords(), + matchCase: this._findInput.getCaseSensitive() + }, true); + })); + this._register(this._findInput.onCaseSensitiveKeyDown((e) => { + if (e.equals(KeyMod.Shift | KeyCode.Tab)) { + if (this._isReplaceVisible) { + this._replaceInput.focus(); + e.preventDefault(); } - }), - ); - - this._register( - this._findInput.inputBox.onDidHeightChange((e) => { - if (this._tryUpdateHeight()) { - this._showViewZone(); + } + })); + this._register(this._findInput.onRegexKeyDown((e) => { + if (e.equals(KeyCode.Tab)) { + if (this._isReplaceVisible) { + this._replaceInput.focusOnPreserve(); + e.preventDefault(); } - }), - ); - + } + })); + this._register(this._findInput.inputBox.onDidHeightChange((e) => { + if (this._tryUpdateHeight()) { + this._showViewZone(); + } + })); if (platform.isLinux) { - this._register( - this._findInput.onMouseDown((e) => - this._onFindInputMouseDown(e), - ), - ); + this._register(this._findInput.onMouseDown((e) => this._onFindInputMouseDown(e))); } - this._matchesCount = document.createElement("div"); - - this._matchesCount.className = "matchesCount"; - + this._matchesCount = document.createElement('div'); + this._matchesCount.className = 'matchesCount'; this._updateMatchesCount(); // Create a scoped hover delegate for all find related buttons const hoverDelegate = this._register(createInstantHoverDelegate()); // Previous button - this._prevBtn = this._register( - new SimpleButton( - { - label: - NLS_PREVIOUS_MATCH_BTN_LABEL + - this._keybindingLabelFor( - FIND_IDS.PreviousMatchFindAction, - ), - icon: findPreviousMatchIcon, - hoverDelegate, - onTrigger: () => { - assertIsDefined( - this._codeEditor.getAction( - FIND_IDS.PreviousMatchFindAction, - ), - ) - .run() - .then(undefined, onUnexpectedError); - }, - }, - this._hoverService, - ), - ); + this._prevBtn = this._register(new SimpleButton({ + label: NLS_PREVIOUS_MATCH_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.PreviousMatchFindAction), + icon: findPreviousMatchIcon, + hoverDelegate, + onTrigger: () => { + assertIsDefined(this._codeEditor.getAction(FIND_IDS.PreviousMatchFindAction)).run().then(undefined, onUnexpectedError); + } + }, this._hoverService)); // Next button - this._nextBtn = this._register( - new SimpleButton( - { - label: - NLS_NEXT_MATCH_BTN_LABEL + - this._keybindingLabelFor(FIND_IDS.NextMatchFindAction), - icon: findNextMatchIcon, - hoverDelegate, - onTrigger: () => { - assertIsDefined( - this._codeEditor.getAction( - FIND_IDS.NextMatchFindAction, - ), - ) - .run() - .then(undefined, onUnexpectedError); - }, - }, - this._hoverService, - ), - ); - - const findPart = document.createElement("div"); - - findPart.className = "find-part"; + this._nextBtn = this._register(new SimpleButton({ + label: NLS_NEXT_MATCH_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.NextMatchFindAction), + icon: findNextMatchIcon, + hoverDelegate, + onTrigger: () => { + assertIsDefined(this._codeEditor.getAction(FIND_IDS.NextMatchFindAction)).run().then(undefined, onUnexpectedError); + } + }, this._hoverService)); + const findPart = document.createElement('div'); + findPart.className = 'find-part'; findPart.appendChild(this._findInput.domNode); - - const actionsContainer = document.createElement("div"); - - actionsContainer.className = "find-actions"; - + const actionsContainer = document.createElement('div'); + actionsContainer.className = 'find-actions'; findPart.appendChild(actionsContainer); - actionsContainer.appendChild(this._matchesCount); - actionsContainer.appendChild(this._prevBtn.domNode); - actionsContainer.appendChild(this._nextBtn.domNode); // Toggle selection button - this._toggleSelectionFind = this._register( - new Toggle({ - icon: findSelectionIcon, - title: - NLS_TOGGLE_SELECTION_FIND_TITLE + - this._keybindingLabelFor(FIND_IDS.ToggleSearchScopeCommand), - isChecked: false, - hoverDelegate: hoverDelegate, - inputActiveOptionBackground: asCssVariable( - inputActiveOptionBackground, - ), - inputActiveOptionBorder: asCssVariable(inputActiveOptionBorder), - inputActiveOptionForeground: asCssVariable( - inputActiveOptionForeground, - ), - }), - ); - - this._register( - this._toggleSelectionFind.onChange(() => { - if (this._toggleSelectionFind.checked) { - if (this._codeEditor.hasModel()) { - let selections = this._codeEditor.getSelections(); - - selections = selections - .map((selection) => { - if ( - selection.endColumn === 1 && - selection.endLineNumber > - selection.startLineNumber - ) { - selection = selection.setEndPosition( - selection.endLineNumber - 1, - this._codeEditor - .getModel()! - .getLineMaxColumn( - selection.endLineNumber - 1, - ), - ); - } - - if (!selection.isEmpty()) { - return selection; - } - - return null; - }) - .filter( - (element): element is Selection => !!element, - ); - - if (selections.length) { - this._state.change( - { searchScope: selections as Range[] }, - true, - ); + this._toggleSelectionFind = this._register(new Toggle({ + icon: findSelectionIcon, + title: NLS_TOGGLE_SELECTION_FIND_TITLE + this._keybindingLabelFor(FIND_IDS.ToggleSearchScopeCommand), + isChecked: false, + hoverDelegate: hoverDelegate, + inputActiveOptionBackground: asCssVariable(inputActiveOptionBackground), + inputActiveOptionBorder: asCssVariable(inputActiveOptionBorder), + inputActiveOptionForeground: asCssVariable(inputActiveOptionForeground), + })); + + this._register(this._toggleSelectionFind.onChange(() => { + if (this._toggleSelectionFind.checked) { + if (this._codeEditor.hasModel()) { + let selections = this._codeEditor.getSelections(); + selections = selections.map(selection => { + if (selection.endColumn === 1 && selection.endLineNumber > selection.startLineNumber) { + selection = selection.setEndPosition(selection.endLineNumber - 1, this._codeEditor.getModel()!.getLineMaxColumn(selection.endLineNumber - 1)); } + if (!selection.isEmpty()) { + return selection; + } + return null; + }).filter((element): element is Selection => !!element); + + if (selections.length) { + this._state.change({ searchScope: selections as Range[] }, true); } - } else { - this._state.change({ searchScope: null }, true); } - }), - ); + } else { + this._state.change({ searchScope: null }, true); + } + })); actionsContainer.appendChild(this._toggleSelectionFind.domNode); // Close button - this._closeBtn = this._register( - new SimpleButton( - { - label: - NLS_CLOSE_BTN_LABEL + - this._keybindingLabelFor( - FIND_IDS.CloseFindWidgetCommand, - ), - icon: widgetClose, - hoverDelegate, - onTrigger: () => { - this._state.change( - { isRevealed: false, searchScope: null }, - false, - ); - }, - onKeyDown: (e) => { - if (e.equals(KeyCode.Tab)) { - if (this._isReplaceVisible) { - if (this._replaceBtn.isEnabled()) { - this._replaceBtn.focus(); - } else { - this._codeEditor.focus(); - } - - e.preventDefault(); - } + this._closeBtn = this._register(new SimpleButton({ + label: NLS_CLOSE_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.CloseFindWidgetCommand), + icon: widgetClose, + hoverDelegate, + onTrigger: () => { + this._state.change({ isRevealed: false, searchScope: null }, false); + }, + onKeyDown: (e) => { + if (e.equals(KeyCode.Tab)) { + if (this._isReplaceVisible) { + if (this._replaceBtn.isEnabled()) { + this._replaceBtn.focus(); + } else { + this._codeEditor.focus(); } - }, - }, - this._hoverService, - ), - ); + e.preventDefault(); + } + } + } + }, this._hoverService)); // Replace input - this._replaceInput = this._register( - new ContextScopedReplaceInput( - null, - undefined, - { - label: NLS_REPLACE_INPUT_LABEL, - placeholder: NLS_REPLACE_INPUT_PLACEHOLDER, - appendPreserveCaseLabel: this._keybindingLabelFor( - FIND_IDS.TogglePreserveCaseCommand, - ), - history: [], - flexibleHeight, - flexibleWidth, - flexibleMaxHeight: 118, - showHistoryHint: () => - showHistoryKeybindingHint(this._keybindingService), - inputBoxStyles: defaultInputBoxStyles, - toggleStyles: defaultToggleStyles, - }, - this._contextKeyService, - true, - ), - ); - + this._replaceInput = this._register(new ContextScopedReplaceInput(null, undefined, { + label: NLS_REPLACE_INPUT_LABEL, + placeholder: NLS_REPLACE_INPUT_PLACEHOLDER, + appendPreserveCaseLabel: this._keybindingLabelFor(FIND_IDS.TogglePreserveCaseCommand), + history: [], + flexibleHeight, + flexibleWidth, + flexibleMaxHeight: 118, + showHistoryHint: () => showHistoryKeybindingHint(this._keybindingService), + inputBoxStyles: defaultInputBoxStyles, + toggleStyles: defaultToggleStyles + }, this._contextKeyService, true)); this._replaceInput.setPreserveCase(!!this._state.preserveCase); - - this._register( - this._replaceInput.onKeyDown((e) => this._onReplaceInputKeyDown(e)), - ); - - this._register( - this._replaceInput.inputBox.onDidChange(() => { - this._state.change( - { replaceString: this._replaceInput.inputBox.value }, - false, - ); - }), - ); - - this._register( - this._replaceInput.inputBox.onDidHeightChange((e) => { - if (this._isReplaceVisible && this._tryUpdateHeight()) { - this._showViewZone(); + this._register(this._replaceInput.onKeyDown((e) => this._onReplaceInputKeyDown(e))); + this._register(this._replaceInput.inputBox.onDidChange(() => { + this._state.change({ replaceString: this._replaceInput.inputBox.value }, false); + })); + this._register(this._replaceInput.inputBox.onDidHeightChange((e) => { + if (this._isReplaceVisible && this._tryUpdateHeight()) { + this._showViewZone(); + } + })); + this._register(this._replaceInput.onDidOptionChange(() => { + this._state.change({ + preserveCase: this._replaceInput.getPreserveCase() + }, true); + })); + this._register(this._replaceInput.onPreserveCaseKeyDown((e) => { + if (e.equals(KeyCode.Tab)) { + if (this._prevBtn.isEnabled()) { + this._prevBtn.focus(); + } else if (this._nextBtn.isEnabled()) { + this._nextBtn.focus(); + } else if (this._toggleSelectionFind.enabled) { + this._toggleSelectionFind.focus(); + } else if (this._closeBtn.isEnabled()) { + this._closeBtn.focus(); } - }), - ); - - this._register( - this._replaceInput.onDidOptionChange(() => { - this._state.change( - { - preserveCase: this._replaceInput.getPreserveCase(), - }, - true, - ); - }), - ); - - this._register( - this._replaceInput.onPreserveCaseKeyDown((e) => { - if (e.equals(KeyCode.Tab)) { - if (this._prevBtn.isEnabled()) { - this._prevBtn.focus(); - } else if (this._nextBtn.isEnabled()) { - this._nextBtn.focus(); - } else if (this._toggleSelectionFind.enabled) { - this._toggleSelectionFind.focus(); - } else if (this._closeBtn.isEnabled()) { - this._closeBtn.focus(); - } - e.preventDefault(); - } - }), - ); + e.preventDefault(); + } + })); // Create scoped hover delegate for replace actions - const replaceHoverDelegate = this._register( - createInstantHoverDelegate(), - ); + const replaceHoverDelegate = this._register(createInstantHoverDelegate()); // Replace one button - this._replaceBtn = this._register( - new SimpleButton( - { - label: - NLS_REPLACE_BTN_LABEL + - this._keybindingLabelFor(FIND_IDS.ReplaceOneAction), - icon: findReplaceIcon, - hoverDelegate: replaceHoverDelegate, - onTrigger: () => { - this._controller.replace(); - }, - onKeyDown: (e) => { - if (e.equals(KeyMod.Shift | KeyCode.Tab)) { - this._closeBtn.focus(); - - e.preventDefault(); - } - }, - }, - this._hoverService, - ), - ); + this._replaceBtn = this._register(new SimpleButton({ + label: NLS_REPLACE_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.ReplaceOneAction), + icon: findReplaceIcon, + hoverDelegate: replaceHoverDelegate, + onTrigger: () => { + this._controller.replace(); + }, + onKeyDown: (e) => { + if (e.equals(KeyMod.Shift | KeyCode.Tab)) { + this._closeBtn.focus(); + e.preventDefault(); + } + } + }, this._hoverService)); // Replace all button - this._replaceAllBtn = this._register( - new SimpleButton( - { - label: - NLS_REPLACE_ALL_BTN_LABEL + - this._keybindingLabelFor(FIND_IDS.ReplaceAllAction), - icon: findReplaceAllIcon, - hoverDelegate: replaceHoverDelegate, - onTrigger: () => { - this._controller.replaceAll(); - }, - }, - this._hoverService, - ), - ); - - const replacePart = document.createElement("div"); - - replacePart.className = "replace-part"; + this._replaceAllBtn = this._register(new SimpleButton({ + label: NLS_REPLACE_ALL_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.ReplaceAllAction), + icon: findReplaceAllIcon, + hoverDelegate: replaceHoverDelegate, + onTrigger: () => { + this._controller.replaceAll(); + } + }, this._hoverService)); + const replacePart = document.createElement('div'); + replacePart.className = 'replace-part'; replacePart.appendChild(this._replaceInput.domNode); - const replaceActionsContainer = document.createElement("div"); - - replaceActionsContainer.className = "replace-actions"; - + const replaceActionsContainer = document.createElement('div'); + replaceActionsContainer.className = 'replace-actions'; replacePart.appendChild(replaceActionsContainer); replaceActionsContainer.appendChild(this._replaceBtn.domNode); - replaceActionsContainer.appendChild(this._replaceAllBtn.domNode); // Toggle replace button - this._toggleReplaceBtn = this._register( - new SimpleButton( - { - label: NLS_TOGGLE_REPLACE_MODE_BTN_LABEL, - className: "codicon toggle left", - onTrigger: () => { - this._state.change( - { isReplaceRevealed: !this._isReplaceVisible }, - false, - ); - - if (this._isReplaceVisible) { - this._replaceInput.width = dom.getTotalWidth( - this._findInput.domNode, - ); - - this._replaceInput.inputBox.layout(); - } - - this._showViewZone(); - }, - }, - this._hoverService, - ), - ); - + this._toggleReplaceBtn = this._register(new SimpleButton({ + label: NLS_TOGGLE_REPLACE_MODE_BTN_LABEL, + className: 'codicon toggle left', + onTrigger: () => { + this._state.change({ isReplaceRevealed: !this._isReplaceVisible }, false); + if (this._isReplaceVisible) { + this._replaceInput.width = dom.getTotalWidth(this._findInput.domNode); + this._replaceInput.inputBox.layout(); + } + this._showViewZone(); + } + }, this._hoverService)); this._toggleReplaceBtn.setExpanded(this._isReplaceVisible); // Widget - this._domNode = document.createElement("div"); - - this._domNode.className = "editor-widget find-widget"; - - this._domNode.setAttribute("aria-hidden", "true"); - + this._domNode = document.createElement('div'); + this._domNode.className = 'editor-widget find-widget'; + this._domNode.setAttribute('aria-hidden', 'true'); this._domNode.ariaLabel = NLS_FIND_DIALOG_LABEL; - - this._domNode.role = "dialog"; + this._domNode.role = 'dialog'; // We need to set this explicitly, otherwise on IE11, the width inheritence of flex doesn't work. this._domNode.style.width = `${FIND_WIDGET_INITIAL_WIDTH}px`; this._domNode.appendChild(this._toggleReplaceBtn.domNode); - this._domNode.appendChild(findPart); - this._domNode.appendChild(this._closeBtn.domNode); - this._domNode.appendChild(replacePart); - this._resizeSash = this._register( - new Sash(this._domNode, this, { - orientation: Orientation.VERTICAL, - size: 2, - }), - ); - + this._resizeSash = this._register(new Sash(this._domNode, this, { orientation: Orientation.VERTICAL, size: 2 })); this._resized = false; - let originalWidth = FIND_WIDGET_INITIAL_WIDTH; - this._register( - this._resizeSash.onDidStart(() => { - originalWidth = dom.getTotalWidth(this._domNode); - }), - ); - - this._register( - this._resizeSash.onDidChange((evt: ISashEvent) => { - this._resized = true; - - const width = originalWidth + evt.startX - evt.currentX; + this._register(this._resizeSash.onDidStart(() => { + originalWidth = dom.getTotalWidth(this._domNode); + })); - if (width < FIND_WIDGET_INITIAL_WIDTH) { - // narrow down the find widget should be handled by CSS. - return; - } + this._register(this._resizeSash.onDidChange((evt: ISashEvent) => { + this._resized = true; + const width = originalWidth + evt.startX - evt.currentX; - const maxWidth = - parseFloat(dom.getComputedStyle(this._domNode).maxWidth) || - 0; - - if (width > maxWidth) { - return; - } - - this._domNode.style.width = `${width}px`; + if (width < FIND_WIDGET_INITIAL_WIDTH) { + // narrow down the find widget should be handled by CSS. + return; + } - if (this._isReplaceVisible) { - this._replaceInput.width = dom.getTotalWidth( - this._findInput.domNode, - ); - } + const maxWidth = parseFloat(dom.getComputedStyle(this._domNode).maxWidth) || 0; + if (width > maxWidth) { + return; + } + this._domNode.style.width = `${width}px`; + if (this._isReplaceVisible) { + this._replaceInput.width = dom.getTotalWidth(this._findInput.domNode); + } - this._findInput.inputBox.layout(); + this._findInput.inputBox.layout(); + this._tryUpdateHeight(); + })); - this._tryUpdateHeight(); - }), - ); + this._register(this._resizeSash.onDidReset(() => { + // users double click on the sash + const currentWidth = dom.getTotalWidth(this._domNode); - this._register( - this._resizeSash.onDidReset(() => { - // users double click on the sash - const currentWidth = dom.getTotalWidth(this._domNode); + if (currentWidth < FIND_WIDGET_INITIAL_WIDTH) { + // The editor is narrow and the width of the find widget is controlled fully by CSS. + return; + } - if (currentWidth < FIND_WIDGET_INITIAL_WIDTH) { - // The editor is narrow and the width of the find widget is controlled fully by CSS. - return; - } + let width = FIND_WIDGET_INITIAL_WIDTH; - let width = FIND_WIDGET_INITIAL_WIDTH; - - if ( - !this._resized || - currentWidth === FIND_WIDGET_INITIAL_WIDTH - ) { - // 1. never resized before, double click should maximizes it - // 2. users resized it already but its width is the same as default - const layoutInfo = this._codeEditor.getLayoutInfo(); - - width = - layoutInfo.width - - 28 - - layoutInfo.minimap.minimapWidth - - 15; - - this._resized = true; - } else { - /** - * no op, the find widget should be shrinked to its default size. - */ - } + if (!this._resized || currentWidth === FIND_WIDGET_INITIAL_WIDTH) { + // 1. never resized before, double click should maximizes it + // 2. users resized it already but its width is the same as default + const layoutInfo = this._codeEditor.getLayoutInfo(); + width = layoutInfo.width - 28 - layoutInfo.minimap.minimapWidth - 15; + this._resized = true; + } else { + /** + * no op, the find widget should be shrinked to its default size. + */ + } - this._domNode.style.width = `${width}px`; - if (this._isReplaceVisible) { - this._replaceInput.width = dom.getTotalWidth( - this._findInput.domNode, - ); - } + this._domNode.style.width = `${width}px`; + if (this._isReplaceVisible) { + this._replaceInput.width = dom.getTotalWidth(this._findInput.domNode); + } - this._findInput.inputBox.layout(); - }), - ); + this._findInput.inputBox.layout(); + })); } private updateAccessibilitySupport(): void { - const value = this._codeEditor.getOption( - EditorOption.accessibilitySupport, - ); - - this._findInput.setFocusInputOnOptionClick( - value !== AccessibilitySupport.Enabled, - ); + const value = this._codeEditor.getOption(EditorOption.accessibilitySupport); + this._findInput.setFocusInputOnOptionClick(value !== AccessibilitySupport.Enabled); } getViewState() { let widgetViewZoneVisible = false; - if (this._viewZone && this._viewZoneId) { - widgetViewZoneVisible = - this._viewZone.heightInPx > this._codeEditor.getScrollTop(); + widgetViewZoneVisible = this._viewZone.heightInPx > this._codeEditor.getScrollTop(); } return { widgetViewZoneVisible, - scrollTop: this._codeEditor.getScrollTop(), + scrollTop: this._codeEditor.getScrollTop() }; } - setViewState(state?: { - widgetViewZoneVisible: boolean; - - scrollTop: number; - }) { + setViewState(state?: { widgetViewZoneVisible: boolean; scrollTop: number }) { if (!state) { return; } @@ -2181,72 +1315,51 @@ export class FindWidget export interface ISimpleButtonOpts { readonly label: string; - readonly className?: string; - readonly icon?: ThemeIcon; - readonly hoverDelegate?: IHoverDelegate; - readonly onTrigger: () => void; - readonly onKeyDown?: (e: IKeyboardEvent) => void; } export class SimpleButton extends Widget { - private readonly _opts: ISimpleButtonOpts; + private readonly _opts: ISimpleButtonOpts; private readonly _domNode: HTMLElement; - constructor(opts: ISimpleButtonOpts, hoverService: IHoverService) { + constructor( + opts: ISimpleButtonOpts, + hoverService: IHoverService + ) { super(); - this._opts = opts; - let className = "button"; - + let className = 'button'; if (this._opts.className) { - className = className + " " + this._opts.className; + className = className + ' ' + this._opts.className; } - if (this._opts.icon) { - className = - className + " " + ThemeIcon.asClassName(this._opts.icon); + className = className + ' ' + ThemeIcon.asClassName(this._opts.icon); } - this._domNode = document.createElement("div"); - + this._domNode = document.createElement('div'); this._domNode.tabIndex = 0; - this._domNode.className = className; - - this._domNode.setAttribute("role", "button"); - - this._domNode.setAttribute("aria-label", this._opts.label); - - this._register( - hoverService.setupManagedHover( - opts.hoverDelegate ?? getDefaultHoverDelegate("element"), - this._domNode, - this._opts.label, - ), - ); + this._domNode.setAttribute('role', 'button'); + this._domNode.setAttribute('aria-label', this._opts.label); + this._register(hoverService.setupManagedHover(opts.hoverDelegate ?? getDefaultHoverDelegate('element'), this._domNode, this._opts.label)); this.onclick(this._domNode, (e) => { this._opts.onTrigger(); - e.preventDefault(); }); this.onkeydown(this._domNode, (e) => { if (e.equals(KeyCode.Space) || e.equals(KeyCode.Enter)) { this._opts.onTrigger(); - e.preventDefault(); - return; } - this._opts.onKeyDown?.(e); }); } @@ -2256,7 +1369,7 @@ export class SimpleButton extends Widget { } public isEnabled(): boolean { - return this._domNode.tabIndex >= 0; + return (this._domNode.tabIndex >= 0); } public focus(): void { @@ -2264,32 +1377,19 @@ export class SimpleButton extends Widget { } public setEnabled(enabled: boolean): void { - this._domNode.classList.toggle("disabled", !enabled); - - this._domNode.setAttribute("aria-disabled", String(!enabled)); - + this._domNode.classList.toggle('disabled', !enabled); + this._domNode.setAttribute('aria-disabled', String(!enabled)); this._domNode.tabIndex = enabled ? 0 : -1; } public setExpanded(expanded: boolean): void { - this._domNode.setAttribute("aria-expanded", String(!!expanded)); - + this._domNode.setAttribute('aria-expanded', String(!!expanded)); if (expanded) { - this._domNode.classList.remove( - ...ThemeIcon.asClassNameArray(findCollapsedIcon), - ); - - this._domNode.classList.add( - ...ThemeIcon.asClassNameArray(findExpandedIcon), - ); + this._domNode.classList.remove(...ThemeIcon.asClassNameArray(findCollapsedIcon)); + this._domNode.classList.add(...ThemeIcon.asClassNameArray(findExpandedIcon)); } else { - this._domNode.classList.remove( - ...ThemeIcon.asClassNameArray(findExpandedIcon), - ); - - this._domNode.classList.add( - ...ThemeIcon.asClassNameArray(findCollapsedIcon), - ); + this._domNode.classList.remove(...ThemeIcon.asClassNameArray(findExpandedIcon)); + this._domNode.classList.add(...ThemeIcon.asClassNameArray(findCollapsedIcon)); } } } @@ -2297,49 +1397,26 @@ export class SimpleButton extends Widget { // theming registerThemingParticipant((theme, collector) => { - const findMatchHighlightBorder = theme.getColor( - editorFindMatchHighlightBorder, - ); - + const findMatchHighlightBorder = theme.getColor(editorFindMatchHighlightBorder); if (findMatchHighlightBorder) { - collector.addRule( - `.monaco-editor .findMatch { border: 1px ${isHighContrast(theme.type) ? "dotted" : "solid"} ${findMatchHighlightBorder}; box-sizing: border-box; }`, - ); + collector.addRule(`.monaco-editor .findMatch { border: 1px ${isHighContrast(theme.type) ? 'dotted' : 'solid'} ${findMatchHighlightBorder}; box-sizing: border-box; }`); } - const findRangeHighlightBorder = theme.getColor( - editorFindRangeHighlightBorder, - ); - + const findRangeHighlightBorder = theme.getColor(editorFindRangeHighlightBorder); if (findRangeHighlightBorder) { - collector.addRule( - `.monaco-editor .findScope { border: 1px ${isHighContrast(theme.type) ? "dashed" : "solid"} ${findRangeHighlightBorder}; }`, - ); + collector.addRule(`.monaco-editor .findScope { border: 1px ${isHighContrast(theme.type) ? 'dashed' : 'solid'} ${findRangeHighlightBorder}; }`); } const hcBorder = theme.getColor(contrastBorder); - if (hcBorder) { - collector.addRule( - `.monaco-editor .find-widget { border: 1px solid ${hcBorder}; }`, - ); + collector.addRule(`.monaco-editor .find-widget { border: 1px solid ${hcBorder}; }`); } - const findMatchForeground = theme.getColor(editorFindMatchForeground); - if (findMatchForeground) { - collector.addRule( - `.monaco-editor .findMatchInline { color: ${findMatchForeground}; }`, - ); + collector.addRule(`.monaco-editor .findMatchInline { color: ${findMatchForeground}; }`); } - - const findMatchHighlightForeground = theme.getColor( - editorFindMatchHighlightForeground, - ); - + const findMatchHighlightForeground = theme.getColor(editorFindMatchHighlightForeground); if (findMatchHighlightForeground) { - collector.addRule( - `.monaco-editor .currentFindMatchInline { color: ${findMatchHighlightForeground}; }`, - ); + collector.addRule(`.monaco-editor .currentFindMatchInline { color: ${findMatchHighlightForeground}; }`); } }); diff --git a/Source/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.ts b/Source/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.ts index 03c52c844cd23..70c093ee9d8f3 100644 --- a/Source/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.ts +++ b/Source/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.ts @@ -2,141 +2,90 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IKeyboardEvent } from "../../../../../base/browser/keyboardEvent.js"; -import { - CancelablePromise, - createCancelablePromise, -} from "../../../../../base/common/async.js"; -import { CancellationToken } from "../../../../../base/common/cancellation.js"; -import { onUnexpectedError } from "../../../../../base/common/errors.js"; -import { MarkdownString } from "../../../../../base/common/htmlContent.js"; -import { DisposableStore } from "../../../../../base/common/lifecycle.js"; - -import "./goToDefinitionAtPosition.css"; - -import * as nls from "../../../../../nls.js"; -import { IContextKeyService } from "../../../../../platform/contextkey/common/contextkey.js"; -import { ServicesAccessor } from "../../../../../platform/instantiation/common/instantiation.js"; -import { - ICodeEditor, - MouseTargetType, -} from "../../../../browser/editorBrowser.js"; -import { - EditorContributionInstantiation, - registerEditorContribution, -} from "../../../../browser/editorExtensions.js"; -import { EditorOption } from "../../../../common/config/editorOptions.js"; -import { Position } from "../../../../common/core/position.js"; -import { IRange, Range } from "../../../../common/core/range.js"; -import { IWordAtPosition } from "../../../../common/core/wordHelper.js"; -import { - IEditorContribution, - IEditorDecorationsCollection, -} from "../../../../common/editorCommon.js"; -import { LocationLink } from "../../../../common/languages.js"; -import { ILanguageService } from "../../../../common/languages/language.js"; -import { IModelDeltaDecoration, ITextModel } from "../../../../common/model.js"; -import { ModelDecorationInjectedTextOptions } from "../../../../common/model/textModel.js"; -import { ILanguageFeaturesService } from "../../../../common/services/languageFeatures.js"; -import { ITextModelService } from "../../../../common/services/resolverService.js"; -import { - CodeEditorStateFlag, - EditorState, -} from "../../../editorState/browser/editorState.js"; -import { PeekContext } from "../../../peekView/browser/peekView.js"; -import { DefinitionAction } from "../goToCommands.js"; -import { getDefinitionsAtPosition } from "../goToSymbol.js"; -import { - ClickLinkGesture, - ClickLinkKeyboardEvent, - ClickLinkMouseEvent, -} from "./clickLinkGesture.js"; - -export class GotoDefinitionAtPositionEditorContribution - implements IEditorContribution -{ - public static readonly ID = "editor.contrib.gotodefinitionatposition"; +import { IKeyboardEvent } from '../../../../../base/browser/keyboardEvent.js'; +import { CancelablePromise, createCancelablePromise } from '../../../../../base/common/async.js'; +import { CancellationToken } from '../../../../../base/common/cancellation.js'; +import { onUnexpectedError } from '../../../../../base/common/errors.js'; +import { MarkdownString } from '../../../../../base/common/htmlContent.js'; +import { DisposableStore } from '../../../../../base/common/lifecycle.js'; +import './goToDefinitionAtPosition.css'; +import { CodeEditorStateFlag, EditorState } from '../../../editorState/browser/editorState.js'; +import { ICodeEditor, MouseTargetType } from '../../../../browser/editorBrowser.js'; +import { EditorContributionInstantiation, registerEditorContribution } from '../../../../browser/editorExtensions.js'; +import { EditorOption } from '../../../../common/config/editorOptions.js'; +import { Position } from '../../../../common/core/position.js'; +import { IRange, Range } from '../../../../common/core/range.js'; +import { IEditorContribution, IEditorDecorationsCollection } from '../../../../common/editorCommon.js'; +import { IModelDeltaDecoration, ITextModel } from '../../../../common/model.js'; +import { LocationLink } from '../../../../common/languages.js'; +import { ILanguageService } from '../../../../common/languages/language.js'; +import { ITextModelService } from '../../../../common/services/resolverService.js'; +import { ClickLinkGesture, ClickLinkKeyboardEvent, ClickLinkMouseEvent } from './clickLinkGesture.js'; +import { PeekContext } from '../../../peekView/browser/peekView.js'; +import * as nls from '../../../../../nls.js'; +import { IContextKeyService } from '../../../../../platform/contextkey/common/contextkey.js'; +import { ServicesAccessor } from '../../../../../platform/instantiation/common/instantiation.js'; +import { DefinitionAction } from '../goToCommands.js'; +import { getDefinitionsAtPosition } from '../goToSymbol.js'; +import { IWordAtPosition } from '../../../../common/core/wordHelper.js'; +import { ILanguageFeaturesService } from '../../../../common/services/languageFeatures.js'; +import { ModelDecorationInjectedTextOptions } from '../../../../common/model/textModel.js'; + +export class GotoDefinitionAtPositionEditorContribution implements IEditorContribution { + + public static readonly ID = 'editor.contrib.gotodefinitionatposition'; static readonly MAX_SOURCE_PREVIEW_LINES = 8; private readonly editor: ICodeEditor; - private readonly toUnhook = new DisposableStore(); - private readonly toUnhookForKeyboard = new DisposableStore(); - private readonly linkDecorations: IEditorDecorationsCollection; - private currentWordAtPosition: IWordAtPosition | null = null; - - private previousPromise: CancelablePromise | null = - null; + private previousPromise: CancelablePromise | null = null; constructor( editor: ICodeEditor, - @ITextModelService - private readonly textModelResolverService: ITextModelService, - @ILanguageService - private readonly languageService: ILanguageService, - @ILanguageFeaturesService - private readonly languageFeaturesService: ILanguageFeaturesService, + @ITextModelService private readonly textModelResolverService: ITextModelService, + @ILanguageService private readonly languageService: ILanguageService, + @ILanguageFeaturesService private readonly languageFeaturesService: ILanguageFeaturesService, ) { this.editor = editor; - this.linkDecorations = this.editor.createDecorationsCollection(); const linkGesture = new ClickLinkGesture(editor); - this.toUnhook.add(linkGesture); - this.toUnhook.add( - linkGesture.onMouseMoveOrRelevantKeyDown( - ([mouseEvent, keyboardEvent]) => { - this.startFindDefinitionFromMouse( - mouseEvent, - keyboardEvent ?? undefined, - ); - }, - ), - ); - - this.toUnhook.add( - linkGesture.onExecute((mouseEvent: ClickLinkMouseEvent) => { - if (this.isEnabled(mouseEvent)) { - this.gotoDefinition( - mouseEvent.target.position!, - mouseEvent.hasSideBySideModifier, - ) - .catch((error: Error) => { - onUnexpectedError(error); - }) - .finally(() => { - this.removeLinkDecorations(); - }); - } - }), - ); - - this.toUnhook.add( - linkGesture.onCancel(() => { - this.removeLinkDecorations(); + this.toUnhook.add(linkGesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, keyboardEvent]) => { + this.startFindDefinitionFromMouse(mouseEvent, keyboardEvent ?? undefined); + })); + + this.toUnhook.add(linkGesture.onExecute((mouseEvent: ClickLinkMouseEvent) => { + if (this.isEnabled(mouseEvent)) { + this.gotoDefinition(mouseEvent.target.position!, mouseEvent.hasSideBySideModifier) + .catch((error: Error) => { + onUnexpectedError(error); + }) + .finally(() => { + this.removeLinkDecorations(); + }); + } + })); - this.currentWordAtPosition = null; - }), - ); + this.toUnhook.add(linkGesture.onCancel(() => { + this.removeLinkDecorations(); + this.currentWordAtPosition = null; + })); } - static get( - editor: ICodeEditor, - ): GotoDefinitionAtPositionEditorContribution | null { - return editor.getContribution( - GotoDefinitionAtPositionEditorContribution.ID, - ); + static get(editor: ICodeEditor): GotoDefinitionAtPositionEditorContribution | null { + return editor.getContribution(GotoDefinitionAtPositionEditorContribution.ID); } async startFindDefinitionFromCursor(position: Position) { // For issue: https://github.com/microsoft/vscode/issues/46257 // equivalent to mouse move with meta/ctrl key + // First find the definition and add decorations // to the editor to be shown with the content hover widget await this.startFindDefinition(position); @@ -145,46 +94,30 @@ export class GotoDefinitionAtPositionEditorContribution // the hover widget. There is no event for the widget itself so these // serve as a best effort. After removing the link decorations, the hover // widget is clean and will only show declarations per next request. - this.toUnhookForKeyboard.add( - this.editor.onDidChangeCursorPosition(() => { + this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(() => { + this.currentWordAtPosition = null; + this.removeLinkDecorations(); + this.toUnhookForKeyboard.clear(); + })); + this.toUnhookForKeyboard.add(this.editor.onKeyDown((e: IKeyboardEvent) => { + if (e) { this.currentWordAtPosition = null; - this.removeLinkDecorations(); - this.toUnhookForKeyboard.clear(); - }), - ); - - this.toUnhookForKeyboard.add( - this.editor.onKeyDown((e: IKeyboardEvent) => { - if (e) { - this.currentWordAtPosition = null; - - this.removeLinkDecorations(); - - this.toUnhookForKeyboard.clear(); - } - }), - ); + } + })); } - private startFindDefinitionFromMouse( - mouseEvent: ClickLinkMouseEvent, - withKey?: ClickLinkKeyboardEvent, - ): void { + private startFindDefinitionFromMouse(mouseEvent: ClickLinkMouseEvent, withKey?: ClickLinkKeyboardEvent): void { + // check if we are active and on a content widget - if ( - mouseEvent.target.type === MouseTargetType.CONTENT_WIDGET && - this.linkDecorations.length > 0 - ) { + if (mouseEvent.target.type === MouseTargetType.CONTENT_WIDGET && this.linkDecorations.length > 0) { return; } if (!this.editor.hasModel() || !this.isEnabled(mouseEvent, withKey)) { this.currentWordAtPosition = null; - this.removeLinkDecorations(); - return; } @@ -194,96 +127,66 @@ export class GotoDefinitionAtPositionEditorContribution } private async startFindDefinition(position: Position): Promise { + // Dispose listeners for updating decorations when using keyboard to show definition hover this.toUnhookForKeyboard.clear(); - // Find word at mouse position - const word = position - ? this.editor.getModel()?.getWordAtPosition(position) - : null; + // Find word at mouse position + const word = position ? this.editor.getModel()?.getWordAtPosition(position) : null; if (!word) { this.currentWordAtPosition = null; - this.removeLinkDecorations(); - return; } + // Return early if word at position is still the same - if ( - this.currentWordAtPosition && - this.currentWordAtPosition.startColumn === word.startColumn && - this.currentWordAtPosition.endColumn === word.endColumn && - this.currentWordAtPosition.word === word.word - ) { + if (this.currentWordAtPosition && this.currentWordAtPosition.startColumn === word.startColumn && this.currentWordAtPosition.endColumn === word.endColumn && this.currentWordAtPosition.word === word.word) { return; } this.currentWordAtPosition = word; + // Find definition and decorate word if found - const state = new EditorState( - this.editor, - CodeEditorStateFlag.Position | - CodeEditorStateFlag.Value | - CodeEditorStateFlag.Selection | - CodeEditorStateFlag.Scroll, - ); + const state = new EditorState(this.editor, CodeEditorStateFlag.Position | CodeEditorStateFlag.Value | CodeEditorStateFlag.Selection | CodeEditorStateFlag.Scroll); if (this.previousPromise) { this.previousPromise.cancel(); - this.previousPromise = null; } - this.previousPromise = createCancelablePromise((token) => - this.findDefinition(position, token), - ); + this.previousPromise = createCancelablePromise(token => this.findDefinition(position, token)); let results: LocationLink[] | null; - try { results = await this.previousPromise; + } catch (error) { onUnexpectedError(error); - return; } if (!results || !results.length || !state.validate(this.editor)) { this.removeLinkDecorations(); - return; } const linkRange = results[0].originSelectionRange ? Range.lift(results[0].originSelectionRange) - : new Range( - position.lineNumber, - word.startColumn, - position.lineNumber, - word.endColumn, - ); + : new Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn); + // Multiple results if (results.length > 1) { - let combinedRange = linkRange; + let combinedRange = linkRange; for (const { originSelectionRange } of results) { if (originSelectionRange) { - combinedRange = Range.plusRange( - combinedRange, - originSelectionRange, - ); + combinedRange = Range.plusRange(combinedRange, originSelectionRange); } } this.addDecoration( combinedRange, - new MarkdownString().appendText( - nls.localize( - "multipleResults", - "Click to show {0} definitions.", - results.length, - ), - ), + new MarkdownString().appendText(nls.localize('multipleResults', "Click to show {0} definitions.", results.length)) ); } else { // Single result @@ -293,135 +196,64 @@ export class GotoDefinitionAtPositionEditorContribution return; } - this.textModelResolverService - .createModelReference(result.uri) - .then((ref) => { - if (!ref.object || !ref.object.textEditorModel) { - ref.dispose(); - - return; - } - - const { - object: { textEditorModel }, - } = ref; - - const { startLineNumber } = result.range; - - if ( - startLineNumber < 1 || - startLineNumber > textEditorModel.getLineCount() - ) { - // invalid range - ref.dispose(); - - return; - } - - const previewValue = this.getPreviewValue( - textEditorModel, - startLineNumber, - result, - ); - - const languageId = - this.languageService.guessLanguageIdByFilepathOrFirstLine( - textEditorModel.uri, - ); - - this.addDecoration( - linkRange, - previewValue - ? new MarkdownString().appendCodeblock( - languageId ? languageId : "", - previewValue, - ) - : undefined, - ); + return this.textModelResolverService.createModelReference(result.uri).then(ref => { + if (!ref.object || !ref.object.textEditorModel) { ref.dispose(); - }); - } - } + return; + } - private getPreviewValue( - textEditorModel: ITextModel, - startLineNumber: number, - result: LocationLink, - ) { - let rangeToUse = result.range; + const { object: { textEditorModel } } = ref; + const { startLineNumber } = result.range; - const numberOfLinesInRange = - rangeToUse.endLineNumber - rangeToUse.startLineNumber; + if (startLineNumber < 1 || startLineNumber > textEditorModel.getLineCount()) { + // invalid range + ref.dispose(); + return; + } - if ( - numberOfLinesInRange >= - GotoDefinitionAtPositionEditorContribution.MAX_SOURCE_PREVIEW_LINES - ) { - rangeToUse = this.getPreviewRangeBasedOnIndentation( - textEditorModel, - startLineNumber, - ); + const previewValue = this.getPreviewValue(textEditorModel, startLineNumber, result); + const languageId = this.languageService.guessLanguageIdByFilepathOrFirstLine(textEditorModel.uri); + this.addDecoration( + linkRange, + previewValue ? new MarkdownString().appendCodeblock(languageId ? languageId : '', previewValue) : undefined + ); + ref.dispose(); + }); } + } - const previewValue = this.stripIndentationFromPreviewRange( - textEditorModel, - startLineNumber, - rangeToUse, - ); + private getPreviewValue(textEditorModel: ITextModel, startLineNumber: number, result: LocationLink) { + let rangeToUse = result.range; + const numberOfLinesInRange = rangeToUse.endLineNumber - rangeToUse.startLineNumber; + if (numberOfLinesInRange >= GotoDefinitionAtPositionEditorContribution.MAX_SOURCE_PREVIEW_LINES) { + rangeToUse = this.getPreviewRangeBasedOnIndentation(textEditorModel, startLineNumber); + } + const previewValue = this.stripIndentationFromPreviewRange(textEditorModel, startLineNumber, rangeToUse); return previewValue; } - private stripIndentationFromPreviewRange( - textEditorModel: ITextModel, - startLineNumber: number, - previewRange: IRange, - ) { - const startIndent = - textEditorModel.getLineFirstNonWhitespaceColumn(startLineNumber); - + private stripIndentationFromPreviewRange(textEditorModel: ITextModel, startLineNumber: number, previewRange: IRange) { + const startIndent = textEditorModel.getLineFirstNonWhitespaceColumn(startLineNumber); let minIndent = startIndent; - for ( - let endLineNumber = startLineNumber + 1; - - endLineNumber < previewRange.endLineNumber; - - endLineNumber++ - ) { - const endIndent = - textEditorModel.getLineFirstNonWhitespaceColumn(endLineNumber); - + for (let endLineNumber = startLineNumber + 1; endLineNumber < previewRange.endLineNumber; endLineNumber++) { + const endIndent = textEditorModel.getLineFirstNonWhitespaceColumn(endLineNumber); minIndent = Math.min(minIndent, endIndent); } - const previewValue = textEditorModel - .getValueInRange(previewRange) - .replace(new RegExp(`^\\s{${minIndent - 1}}`, "gm"), "") - .trim(); - + const previewValue = textEditorModel.getValueInRange(previewRange).replace(new RegExp(`^\\s{${minIndent - 1}}`, 'gm'), '').trim(); return previewValue; } - private getPreviewRangeBasedOnIndentation( - textEditorModel: ITextModel, - startLineNumber: number, - ) { - const startIndent = - textEditorModel.getLineFirstNonWhitespaceColumn(startLineNumber); - - const maxLineNumber = Math.min( - textEditorModel.getLineCount(), - startLineNumber + - GotoDefinitionAtPositionEditorContribution.MAX_SOURCE_PREVIEW_LINES, - ); - + private getPreviewRangeBasedOnIndentation(textEditorModel: ITextModel, startLineNumber: number) { + const startIndent = textEditorModel.getLineFirstNonWhitespaceColumn(startLineNumber); + const maxLineNumber = Math.min(textEditorModel.getLineCount(), startLineNumber + GotoDefinitionAtPositionEditorContribution.MAX_SOURCE_PREVIEW_LINES); let endLineNumber = startLineNumber + 1; for (; endLineNumber < maxLineNumber; endLineNumber++) { - const endIndent = - textEditorModel.getLineFirstNonWhitespaceColumn(endLineNumber); + const endIndent = textEditorModel.getLineFirstNonWhitespaceColumn(endLineNumber); if (startIndent === endIndent) { break; @@ -431,17 +263,15 @@ export class GotoDefinitionAtPositionEditorContribution return new Range(startLineNumber, 1, endLineNumber + 1, 1); } - private addDecoration( - range: Range, - hoverMessage: MarkdownString | undefined, - ): void { + private addDecoration(range: Range, hoverMessage: MarkdownString | undefined): void { + const newDecorations: IModelDeltaDecoration = { range: range, options: { - description: "goto-definition-link", - inlineClassName: "goto-definition-link", - hoverMessage, - }, + description: 'goto-definition-link', + inlineClassName: 'goto-definition-link', + hoverMessage + } }; this.linkDecorations.set([newDecorations]); @@ -451,85 +281,43 @@ export class GotoDefinitionAtPositionEditorContribution this.linkDecorations.clear(); } - private isEnabled( - mouseEvent: ClickLinkMouseEvent, - withKey?: ClickLinkKeyboardEvent, - ): boolean { - return ( - this.editor.hasModel() && - mouseEvent.isLeftClick && - mouseEvent.isNoneOrSingleMouseDown && - mouseEvent.target.type === MouseTargetType.CONTENT_TEXT && - !( - mouseEvent.target.detail.injectedText?.options instanceof - ModelDecorationInjectedTextOptions - ) && - (mouseEvent.hasTriggerModifier || - (withKey ? withKey.keyCodeIsTriggerKey : false)) && - this.languageFeaturesService.definitionProvider.has( - this.editor.getModel(), - ) - ); + private isEnabled(mouseEvent: ClickLinkMouseEvent, withKey?: ClickLinkKeyboardEvent): boolean { + return this.editor.hasModel() + && mouseEvent.isLeftClick + && mouseEvent.isNoneOrSingleMouseDown + && mouseEvent.target.type === MouseTargetType.CONTENT_TEXT + && !(mouseEvent.target.detail.injectedText?.options instanceof ModelDecorationInjectedTextOptions) + && (mouseEvent.hasTriggerModifier || (withKey ? withKey.keyCodeIsTriggerKey : false)) + && this.languageFeaturesService.definitionProvider.has(this.editor.getModel()); } - private findDefinition( - position: Position, - token: CancellationToken, - ): Promise { + private findDefinition(position: Position, token: CancellationToken): Promise { const model = this.editor.getModel(); - if (!model) { return Promise.resolve(null); } - return getDefinitionsAtPosition( - this.languageFeaturesService.definitionProvider, - model, - position, - false, - token, - ); + return getDefinitionsAtPosition(this.languageFeaturesService.definitionProvider, model, position, false, token); } - private gotoDefinition( - position: Position, - openToSide: boolean, - ): Promise { + private gotoDefinition(position: Position, openToSide: boolean): Promise { this.editor.setPosition(position); - return this.editor.invokeWithinContext((accessor) => { - const canPeek = - !openToSide && - this.editor.getOption(EditorOption.definitionLinkOpensInPeek) && - !this.isInPeekEditor(accessor); - - const action = new DefinitionAction( - { openToSide, openInPeek: canPeek, muteMessage: true }, - { - title: { value: "", original: "" }, - id: "", - precondition: undefined, - }, - ); - + const canPeek = !openToSide && this.editor.getOption(EditorOption.definitionLinkOpensInPeek) && !this.isInPeekEditor(accessor); + const action = new DefinitionAction({ openToSide, openInPeek: canPeek, muteMessage: true }, { title: { value: '', original: '' }, id: '', precondition: undefined }); return action.run(accessor); }); } private isInPeekEditor(accessor: ServicesAccessor): boolean | undefined { const contextKeyService = accessor.get(IContextKeyService); - return PeekContext.inPeekEditor.getValue(contextKeyService); } public dispose(): void { this.toUnhook.dispose(); - this.toUnhookForKeyboard.dispose(); } } -registerEditorContribution( - GotoDefinitionAtPositionEditorContribution.ID, - GotoDefinitionAtPositionEditorContribution, - EditorContributionInstantiation.BeforeFirstInteraction, -); + +registerEditorContribution(GotoDefinitionAtPositionEditorContribution.ID, GotoDefinitionAtPositionEditorContribution, EditorContributionInstantiation.BeforeFirstInteraction); diff --git a/Source/vs/editor/contrib/hover/browser/contentHoverController.ts b/Source/vs/editor/contrib/hover/browser/contentHoverController.ts index cae482381ad08..9b8252eec14cd 100644 --- a/Source/vs/editor/contrib/hover/browser/contentHoverController.ts +++ b/Source/vs/editor/contrib/hover/browser/contentHoverController.ts @@ -3,68 +3,44 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IKeyboardEvent } from "../../../../base/browser/keyboardEvent.js"; -import { RunOnceScheduler } from "../../../../base/common/async.js"; -import { KeyCode } from "../../../../base/common/keyCodes.js"; -import { - Disposable, - DisposableStore, -} from "../../../../base/common/lifecycle.js"; -import { IInstantiationService } from "../../../../platform/instantiation/common/instantiation.js"; -import { IKeybindingService } from "../../../../platform/keybinding/common/keybinding.js"; -import { ResultKind } from "../../../../platform/keybinding/common/keybindingResolver.js"; -import { - ICodeEditor, - IEditorMouseEvent, - IPartialEditorMouseEvent, -} from "../../../browser/editorBrowser.js"; -import { - ConfigurationChangedEvent, - EditorOption, -} from "../../../common/config/editorOptions.js"; -import { Range } from "../../../common/core/range.js"; -import { - IEditorContribution, - IScrollEvent, -} from "../../../common/editorCommon.js"; -import { HoverVerbosityAction } from "../../../common/languages.js"; -import { InlineSuggestionHintsContentWidget } from "../../inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js"; -import { ContentHoverWidgetWrapper } from "./contentHoverWidgetWrapper.js"; -import { - DECREASE_HOVER_VERBOSITY_ACTION_ID, - INCREASE_HOVER_VERBOSITY_ACTION_ID, - SHOW_OR_FOCUS_HOVER_ACTION_ID, -} from "./hoverActionIds.js"; -import { HoverStartMode, HoverStartSource } from "./hoverOperation.js"; -import { isMousePositionWithinElement } from "./hoverUtils.js"; - -import "./hover.css"; - -import { Emitter } from "../../../../base/common/event.js"; -import { isOnColorDecorator } from "../../colorPicker/browser/hoverColorPicker/hoverColorPickerContribution.js"; +import { DECREASE_HOVER_VERBOSITY_ACTION_ID, INCREASE_HOVER_VERBOSITY_ACTION_ID, SHOW_OR_FOCUS_HOVER_ACTION_ID } from './hoverActionIds.js'; +import { IKeyboardEvent } from '../../../../base/browser/keyboardEvent.js'; +import { KeyCode } from '../../../../base/common/keyCodes.js'; +import { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js'; +import { ICodeEditor, IEditorMouseEvent, IPartialEditorMouseEvent } from '../../../browser/editorBrowser.js'; +import { ConfigurationChangedEvent, EditorOption } from '../../../common/config/editorOptions.js'; +import { Range } from '../../../common/core/range.js'; +import { IEditorContribution, IScrollEvent } from '../../../common/editorCommon.js'; +import { HoverStartMode, HoverStartSource } from './hoverOperation.js'; +import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js'; +import { InlineSuggestionHintsContentWidget } from '../../inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js'; +import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js'; +import { ResultKind } from '../../../../platform/keybinding/common/keybindingResolver.js'; +import { HoverVerbosityAction } from '../../../common/languages.js'; +import { RunOnceScheduler } from '../../../../base/common/async.js'; +import { isMousePositionWithinElement } from './hoverUtils.js'; +import { ContentHoverWidgetWrapper } from './contentHoverWidgetWrapper.js'; +import './hover.css'; +import { Emitter } from '../../../../base/common/event.js'; +import { isOnColorDecorator } from '../../colorPicker/browser/hoverColorPicker/hoverColorPickerContribution.js'; // sticky hover widget which doesn't disappear on focus out and such -const _sticky = false; -// || Boolean("true") // done "weirdly" so that a lint warning prevents you from pushing this +const _sticky = false + // || Boolean("true") // done "weirdly" so that a lint warning prevents you from pushing this + ; + interface IHoverSettings { readonly enabled: boolean; - readonly sticky: boolean; - readonly hidingDelay: number; } -export class ContentHoverController - extends Disposable - implements IEditorContribution -{ - private readonly _onHoverContentsChanged = this._register( - new Emitter(), - ); +export class ContentHoverController extends Disposable implements IEditorContribution { + private readonly _onHoverContentsChanged = this._register(new Emitter()); public readonly onHoverContentsChanged = this._onHoverContentsChanged.event; - public static readonly ID = "editor.contrib.contentHover"; + public static readonly ID = 'editor.contrib.contentHover'; public shouldKeepOpenOnEditorMouseMoveOrLeave: boolean = false; @@ -73,103 +49,49 @@ export class ContentHoverController private _contentWidget: ContentHoverWidgetWrapper | undefined; private _mouseMoveEvent: IEditorMouseEvent | undefined; - private _reactToEditorMouseMoveRunner: RunOnceScheduler; private _hoverSettings!: IHoverSettings; - private _isMouseDown: boolean = false; constructor( private readonly _editor: ICodeEditor, - @IInstantiationService - private readonly _instantiationService: IInstantiationService, - @IKeybindingService - private readonly _keybindingService: IKeybindingService, + @IInstantiationService private readonly _instantiationService: IInstantiationService, + @IKeybindingService private readonly _keybindingService: IKeybindingService ) { super(); - - this._reactToEditorMouseMoveRunner = this._register( - new RunOnceScheduler( - () => this._reactToEditorMouseMove(this._mouseMoveEvent), - 0, - ), - ); - + this._reactToEditorMouseMoveRunner = this._register(new RunOnceScheduler( + () => this._reactToEditorMouseMove(this._mouseMoveEvent), 0 + )); this._hookListeners(); - - this._register( - this._editor.onDidChangeConfiguration( - (e: ConfigurationChangedEvent) => { - if (e.hasChanged(EditorOption.hover)) { - this._unhookListeners(); - - this._hookListeners(); - } - }, - ), - ); + this._register(this._editor.onDidChangeConfiguration((e: ConfigurationChangedEvent) => { + if (e.hasChanged(EditorOption.hover)) { + this._unhookListeners(); + this._hookListeners(); + } + })); } static get(editor: ICodeEditor): ContentHoverController | null { - return editor.getContribution( - ContentHoverController.ID, - ); + return editor.getContribution(ContentHoverController.ID); } private _hookListeners(): void { const hoverOpts = this._editor.getOption(EditorOption.hover); - this._hoverSettings = { enabled: hoverOpts.enabled, sticky: hoverOpts.sticky, - hidingDelay: hoverOpts.hidingDelay, + hidingDelay: hoverOpts.hidingDelay }; - if (hoverOpts.enabled) { - this._listenersStore.add( - this._editor.onMouseDown((e: IEditorMouseEvent) => - this._onEditorMouseDown(e), - ), - ); - - this._listenersStore.add( - this._editor.onMouseUp(() => this._onEditorMouseUp()), - ); - - this._listenersStore.add( - this._editor.onMouseMove((e: IEditorMouseEvent) => - this._onEditorMouseMove(e), - ), - ); - - this._listenersStore.add( - this._editor.onKeyDown((e: IKeyboardEvent) => - this._onKeyDown(e), - ), - ); - - this._listenersStore.add( - this._editor.onMouseLeave((e) => this._onEditorMouseLeave(e)), - ); - - this._listenersStore.add( - this._editor.onDidChangeModel(() => - this._cancelSchedulerAndHide(), - ), - ); - - this._listenersStore.add( - this._editor.onDidChangeModelContent(() => - this._cancelScheduler(), - ), - ); - - this._listenersStore.add( - this._editor.onDidScrollChange((e: IScrollEvent) => - this._onEditorScrollChanged(e), - ), - ); + this._listenersStore.add(this._editor.onMouseDown((e: IEditorMouseEvent) => this._onEditorMouseDown(e))); + this._listenersStore.add(this._editor.onMouseUp(() => this._onEditorMouseUp())); + this._listenersStore.add(this._editor.onMouseMove((e: IEditorMouseEvent) => this._onEditorMouseMove(e))); + this._listenersStore.add(this._editor.onKeyDown((e: IKeyboardEvent) => this._onKeyDown(e))); + this._listenersStore.add(this._editor.onMouseLeave((e) => this._onEditorMouseLeave(e))); + this._listenersStore.add(this._editor.onDidChangeModel(() => this._cancelSchedulerAndHide())); + this._listenersStore.add(this._editor.onDidChangeModelContent(() => this._cancelScheduler())); + this._listenersStore.add(this._editor.onDidScrollChange((e: IScrollEvent) => this._onEditorScrollChanged(e))); } else { this._cancelSchedulerAndHide(); } @@ -181,13 +103,11 @@ export class ContentHoverController private _cancelSchedulerAndHide(): void { this._cancelScheduler(); - this.hideContentHover(); } private _cancelScheduler() { this._mouseMoveEvent = undefined; - this._reactToEditorMouseMoveRunner.cancel(); } @@ -199,39 +119,22 @@ export class ContentHoverController private _onEditorMouseDown(mouseEvent: IEditorMouseEvent): void { this._isMouseDown = true; - - const shouldKeepHoverWidgetVisible = - this._shouldKeepHoverWidgetVisible(mouseEvent); - + const shouldKeepHoverWidgetVisible = this._shouldKeepHoverWidgetVisible(mouseEvent); if (shouldKeepHoverWidgetVisible) { return; } - this.hideContentHover(); } - private _shouldKeepHoverWidgetVisible( - mouseEvent: IPartialEditorMouseEvent, - ): boolean { - return ( - this._isMouseOnContentHoverWidget(mouseEvent) || - this._isContentWidgetResizing() || - isOnColorDecorator(mouseEvent) - ); + private _shouldKeepHoverWidgetVisible(mouseEvent: IPartialEditorMouseEvent): boolean { + return this._isMouseOnContentHoverWidget(mouseEvent) || this._isContentWidgetResizing() || isOnColorDecorator(mouseEvent); } - private _isMouseOnContentHoverWidget( - mouseEvent: IPartialEditorMouseEvent, - ): boolean { + private _isMouseOnContentHoverWidget(mouseEvent: IPartialEditorMouseEvent): boolean { if (!this._contentWidget) { return false; } - - return isMousePositionWithinElement( - this._contentWidget.getDomNode(), - mouseEvent.event.posx, - mouseEvent.event.posy, - ); + return isMousePositionWithinElement(this._contentWidget.getDomNode(), mouseEvent.event.posx, mouseEvent.event.posy); } private _onEditorMouseUp(): void { @@ -242,167 +145,97 @@ export class ContentHoverController if (this.shouldKeepOpenOnEditorMouseMoveOrLeave) { return; } - this._cancelScheduler(); - - const shouldKeepHoverWidgetVisible = - this._shouldKeepHoverWidgetVisible(mouseEvent); - + const shouldKeepHoverWidgetVisible = this._shouldKeepHoverWidgetVisible(mouseEvent); if (shouldKeepHoverWidgetVisible) { return; } - if (_sticky) { return; } - this.hideContentHover(); } - private _shouldNotRecomputeCurrentHoverWidget( - mouseEvent: IEditorMouseEvent, - ): boolean { - const isHoverSticky = this._hoverSettings.sticky; + private _shouldNotRecomputeCurrentHoverWidget(mouseEvent: IEditorMouseEvent): boolean { - const isMouseOnStickyContentHoverWidget = ( - mouseEvent: IEditorMouseEvent, - isHoverSticky: boolean, - ): boolean => { - const isMouseOnContentHoverWidget = - this._isMouseOnContentHoverWidget(mouseEvent); + const isHoverSticky = this._hoverSettings.sticky; + const isMouseOnStickyContentHoverWidget = (mouseEvent: IEditorMouseEvent, isHoverSticky: boolean): boolean => { + const isMouseOnContentHoverWidget = this._isMouseOnContentHoverWidget(mouseEvent); return isHoverSticky && isMouseOnContentHoverWidget; }; - - const isMouseOnColorPicker = ( - mouseEvent: IEditorMouseEvent, - ): boolean => { - const isMouseOnContentHoverWidget = - this._isMouseOnContentHoverWidget(mouseEvent); - - const isColorPickerVisible = - this._contentWidget?.isColorPickerVisible ?? false; - + const isMouseOnColorPicker = (mouseEvent: IEditorMouseEvent): boolean => { + const isMouseOnContentHoverWidget = this._isMouseOnContentHoverWidget(mouseEvent); + const isColorPickerVisible = this._contentWidget?.isColorPickerVisible ?? false; return isMouseOnContentHoverWidget && isColorPickerVisible; }; // TODO@aiday-mar verify if the following is necessary code - const isTextSelectedWithinContentHoverWidget = ( - mouseEvent: IEditorMouseEvent, - sticky: boolean, - ): boolean => { - return ( - (sticky && - this._contentWidget?.containsNode( - mouseEvent.event.browserEvent.view?.document - .activeElement, - ) && - !mouseEvent.event.browserEvent.view?.getSelection() - ?.isCollapsed) ?? - false - ); + const isTextSelectedWithinContentHoverWidget = (mouseEvent: IEditorMouseEvent, sticky: boolean): boolean => { + return (sticky + && this._contentWidget?.containsNode(mouseEvent.event.browserEvent.view?.document.activeElement) + && !mouseEvent.event.browserEvent.view?.getSelection()?.isCollapsed) ?? false; }; - - return ( - isMouseOnStickyContentHoverWidget(mouseEvent, isHoverSticky) || - isMouseOnColorPicker(mouseEvent) || - isTextSelectedWithinContentHoverWidget(mouseEvent, isHoverSticky) - ); + return isMouseOnStickyContentHoverWidget(mouseEvent, isHoverSticky) + || isMouseOnColorPicker(mouseEvent) + || isTextSelectedWithinContentHoverWidget(mouseEvent, isHoverSticky); } private _onEditorMouseMove(mouseEvent: IEditorMouseEvent): void { - const shouldReactToEditorMouseMove = - this._shouldReactToEditorMouseMove(mouseEvent); - + const shouldReactToEditorMouseMove = this._shouldReactToEditorMouseMove(mouseEvent); if (!shouldReactToEditorMouseMove) { return; } - - const shouldRescheduleHoverComputation = - this._shouldRescheduleHoverComputation(); - + const shouldRescheduleHoverComputation = this._shouldRescheduleHoverComputation(); if (shouldRescheduleHoverComputation) { if (!this._reactToEditorMouseMoveRunner.isScheduled()) { - this._reactToEditorMouseMoveRunner.schedule( - this._hoverSettings.hidingDelay, - ); + this._reactToEditorMouseMoveRunner.schedule(this._hoverSettings.hidingDelay); } - return; } - this._reactToEditorMouseMove(mouseEvent); } - private _shouldReactToEditorMouseMove( - mouseEvent: IEditorMouseEvent, - ): boolean { + private _shouldReactToEditorMouseMove(mouseEvent: IEditorMouseEvent): boolean { if (this.shouldKeepOpenOnEditorMouseMoveOrLeave) { return false; } - this._mouseMoveEvent = mouseEvent; - - if ( - this._contentWidget && - (this._contentWidget.isFocused || - this._contentWidget.isResizing || - (this._isMouseDown && this._contentWidget.isColorPickerVisible)) - ) { + if (this._contentWidget && (this._contentWidget.isFocused || this._contentWidget.isResizing || this._isMouseDown && this._contentWidget.isColorPickerVisible)) { return false; } - const sticky = this._hoverSettings.sticky; - if (sticky && this._contentWidget?.isVisibleFromKeyboard) { // Sticky mode is on and the hover has been shown via keyboard // so moving the mouse has no effect return false; } - - const shouldNotRecomputeCurrentHoverWidget = - this._shouldNotRecomputeCurrentHoverWidget(mouseEvent); - + const shouldNotRecomputeCurrentHoverWidget = this._shouldNotRecomputeCurrentHoverWidget(mouseEvent); if (shouldNotRecomputeCurrentHoverWidget) { this._reactToEditorMouseMoveRunner.cancel(); - return false; } - return true; } private _shouldRescheduleHoverComputation(): boolean { const hidingDelay = this._hoverSettings.hidingDelay; - - const isContentHoverWidgetVisible = - this._contentWidget?.isVisible ?? false; + const isContentHoverWidgetVisible = this._contentWidget?.isVisible ?? false; // If the mouse is not over the widget, and if sticky is on, // then give it a grace period before reacting to the mouse event - return ( - isContentHoverWidgetVisible && - this._hoverSettings.sticky && - hidingDelay > 0 - ); + return isContentHoverWidgetVisible && this._hoverSettings.sticky && hidingDelay > 0; } - private _reactToEditorMouseMove( - mouseEvent: IEditorMouseEvent | undefined, - ): void { + private _reactToEditorMouseMove(mouseEvent: IEditorMouseEvent | undefined): void { if (!mouseEvent) { return; } - - const contentWidget: ContentHoverWidgetWrapper = - this._getOrCreateContentWidget(); - + const contentWidget: ContentHoverWidgetWrapper = this._getOrCreateContentWidget(); if (contentWidget.showsOrWillShow(mouseEvent)) { return; } - if (_sticky) { return; } - this.hideContentHover(); } @@ -410,16 +243,17 @@ export class ContentHoverController if (!this._editor.hasModel()) { return; } - - const isPotentialKeyboardShortcut = - this._isPotentialKeyboardShortcut(e); - - const isModifierKeyPressed = this._isModifierKeyPressed(e); - - if (isPotentialKeyboardShortcut || isModifierKeyPressed) { + const isPotentialKeyboardShortcut = this._isPotentialKeyboardShortcut(e); + if (isPotentialKeyboardShortcut) { return; } - + const isModifierKeyPressed = this._isModifierKeyPressed(e); + if (isModifierKeyPressed && this._mouseMoveEvent) { + const contentWidget: ContentHoverWidgetWrapper = this._getOrCreateContentWidget(); + if (contentWidget.showsOrWillShow(this._mouseMoveEvent)) { + return; + } + } this.hideContentHover(); } @@ -427,63 +261,38 @@ export class ContentHoverController if (!this._editor.hasModel() || !this._contentWidget) { return false; } - - const resolvedKeyboardEvent = this._keybindingService.softDispatch( - e, - this._editor.getDomNode(), - ); - - const moreChordsAreNeeded = - resolvedKeyboardEvent.kind === ResultKind.MoreChordsNeeded; - - const isHoverAction = - resolvedKeyboardEvent.kind === ResultKind.KbFound && - (resolvedKeyboardEvent.commandId === - SHOW_OR_FOCUS_HOVER_ACTION_ID || - resolvedKeyboardEvent.commandId === - INCREASE_HOVER_VERBOSITY_ACTION_ID || - resolvedKeyboardEvent.commandId === - DECREASE_HOVER_VERBOSITY_ACTION_ID) && - this._contentWidget.isVisible; - + const resolvedKeyboardEvent = this._keybindingService.softDispatch(e, this._editor.getDomNode()); + const moreChordsAreNeeded = resolvedKeyboardEvent.kind === ResultKind.MoreChordsNeeded; + const isHoverAction = resolvedKeyboardEvent.kind === ResultKind.KbFound + && (resolvedKeyboardEvent.commandId === SHOW_OR_FOCUS_HOVER_ACTION_ID + || resolvedKeyboardEvent.commandId === INCREASE_HOVER_VERBOSITY_ACTION_ID + || resolvedKeyboardEvent.commandId === DECREASE_HOVER_VERBOSITY_ACTION_ID) + && this._contentWidget.isVisible; return moreChordsAreNeeded || isHoverAction; } private _isModifierKeyPressed(e: IKeyboardEvent): boolean { - return ( - e.keyCode === KeyCode.Ctrl || - e.keyCode === KeyCode.Alt || - e.keyCode === KeyCode.Meta || - e.keyCode === KeyCode.Shift - ); + return e.keyCode === KeyCode.Ctrl + || e.keyCode === KeyCode.Alt + || e.keyCode === KeyCode.Meta + || e.keyCode === KeyCode.Shift; } public hideContentHover(): void { if (_sticky) { return; } - if (InlineSuggestionHintsContentWidget.dropDownVisible) { return; } - this._contentWidget?.hide(); } private _getOrCreateContentWidget(): ContentHoverWidgetWrapper { if (!this._contentWidget) { - this._contentWidget = this._instantiationService.createInstance( - ContentHoverWidgetWrapper, - this._editor, - ); - - this._listenersStore.add( - this._contentWidget.onContentsChanged(() => - this._onHoverContentsChanged.fire(), - ), - ); + this._contentWidget = this._instantiationService.createInstance(ContentHoverWidgetWrapper, this._editor); + this._listenersStore.add(this._contentWidget.onContentsChanged(() => this._onHoverContentsChanged.fire())); } - return this._contentWidget; } @@ -491,14 +300,9 @@ export class ContentHoverController range: Range, mode: HoverStartMode, source: HoverStartSource, - focus: boolean, + focus: boolean ): void { - this._getOrCreateContentWidget().startShowingAtRange( - range, - mode, - source, - focus, - ); + this._getOrCreateContentWidget().startShowingAtRange(range, mode, source, focus); } private _isContentWidgetResizing(): boolean { @@ -509,26 +313,12 @@ export class ContentHoverController return this._getOrCreateContentWidget().focusedHoverPartIndex(); } - public doesHoverAtIndexSupportVerbosityAction( - index: number, - action: HoverVerbosityAction, - ): boolean { - return this._getOrCreateContentWidget().doesHoverAtIndexSupportVerbosityAction( - index, - action, - ); + public doesHoverAtIndexSupportVerbosityAction(index: number, action: HoverVerbosityAction): boolean { + return this._getOrCreateContentWidget().doesHoverAtIndexSupportVerbosityAction(index, action); } - public updateHoverVerbosityLevel( - action: HoverVerbosityAction, - index: number, - focus?: boolean, - ): void { - this._getOrCreateContentWidget().updateHoverVerbosityLevel( - action, - index, - focus, - ); + public updateHoverVerbosityLevel(action: HoverVerbosityAction, index: number, focus?: boolean): void { + this._getOrCreateContentWidget().updateHoverVerbosityLevel(action, index, focus); } public focus(): void { @@ -579,9 +369,7 @@ export class ContentHoverController return this._contentWidget?.getAccessibleWidgetContent(); } - public getAccessibleWidgetContentAtIndex( - index: number, - ): string | undefined { + public getAccessibleWidgetContentAtIndex(index: number): string | undefined { return this._contentWidget?.getAccessibleWidgetContentAtIndex(index); } @@ -595,11 +383,8 @@ export class ContentHoverController public override dispose(): void { super.dispose(); - this._unhookListeners(); - this._listenersStore.dispose(); - this._contentWidget?.dispose(); } } diff --git a/Source/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.ts b/Source/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.ts index e8a1cb34aa010..41499ed6f9f90 100644 --- a/Source/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.ts +++ b/Source/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.ts @@ -3,605 +3,254 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { createStyleSheetFromObservable } from "../../../../../base/browser/domObservable.js"; -import { alert } from "../../../../../base/browser/ui/aria/aria.js"; -import { timeout } from "../../../../../base/common/async.js"; -import { cancelOnDispose } from "../../../../../base/common/cancellation.js"; -import { - createHotClass, - readHotReloadableExport, -} from "../../../../../base/common/hotReloadHelpers.js"; -import { - Disposable, - toDisposable, -} from "../../../../../base/common/lifecycle.js"; -import { - autorun, - constObservable, - derived, - derivedDisposable, - derivedObservableWithCache, - ITransaction, - mapObservableArrayCached, - observableFromEvent, - observableSignal, - runOnChange, - runOnChangeWithStore, - transaction, - waitForState, -} from "../../../../../base/common/observable.js"; -import { isUndefined } from "../../../../../base/common/types.js"; -import { localize } from "../../../../../nls.js"; -import { IAccessibilityService } from "../../../../../platform/accessibility/common/accessibility.js"; -import { - AccessibilitySignal, - IAccessibilitySignalService, -} from "../../../../../platform/accessibilitySignal/browser/accessibilitySignalService.js"; -import { ICommandService } from "../../../../../platform/commands/common/commands.js"; -import { IConfigurationService } from "../../../../../platform/configuration/common/configuration.js"; -import { IContextKeyService } from "../../../../../platform/contextkey/common/contextkey.js"; -import { IInstantiationService } from "../../../../../platform/instantiation/common/instantiation.js"; -import { IKeybindingService } from "../../../../../platform/keybinding/common/keybinding.js"; -import { hotClassGetOriginalInstance } from "../../../../../platform/observable/common/wrapInHotClass.js"; -import { CoreEditingCommands } from "../../../../browser/coreCommands.js"; -import { ICodeEditor } from "../../../../browser/editorBrowser.js"; -import { observableCodeEditor } from "../../../../browser/observableCodeEditor.js"; -import { EditorOption } from "../../../../common/config/editorOptions.js"; -import { Position } from "../../../../common/core/position.js"; -import { Range } from "../../../../common/core/range.js"; -import { CursorChangeReason } from "../../../../common/cursorEvents.js"; -import { ILanguageFeatureDebounceService } from "../../../../common/services/languageFeatureDebounce.js"; -import { ILanguageFeaturesService } from "../../../../common/services/languageFeatures.js"; -import { - InlineCompletionsHintsWidget, - InlineSuggestionHintsContentWidget, -} from "../hintsWidget/inlineCompletionsHintsWidget.js"; -import { TextModelChangeRecorder } from "../model/changeRecorder.js"; -import { InlineCompletionsModel } from "../model/inlineCompletionsModel.js"; -import { SuggestWidgetAdaptor } from "../model/suggestWidgetAdapter.js"; -import { - convertItemsToStableObservables, - ObservableContextKeyService, -} from "../utils.js"; -import { GhostTextView } from "../view/ghostText/ghostTextView.js"; -import { InlineEditsViewAndDiffProducer } from "../view/inlineEdits/inlineEditsViewAndDiffProducer.js"; -import { inlineSuggestCommitId } from "./commandIds.js"; -import { InlineCompletionContextKeys } from "./inlineCompletionContextKeys.js"; +import { alert } from '../../../../../base/browser/ui/aria/aria.js'; +import { timeout } from '../../../../../base/common/async.js'; +import { cancelOnDispose } from '../../../../../base/common/cancellation.js'; +import { createHotClass } from '../../../../../base/common/hotReloadHelpers.js'; +import { Disposable, toDisposable } from '../../../../../base/common/lifecycle.js'; +import { ITransaction, autorun, derived, derivedDisposable, derivedObservableWithCache, observableFromEvent, observableSignal, runOnChange, runOnChangeWithStore, transaction, waitForState } from '../../../../../base/common/observable.js'; +import { isUndefined } from '../../../../../base/common/types.js'; +import { localize } from '../../../../../nls.js'; +import { IAccessibilityService } from '../../../../../platform/accessibility/common/accessibility.js'; +import { AccessibilitySignal, IAccessibilitySignalService } from '../../../../../platform/accessibilitySignal/browser/accessibilitySignalService.js'; +import { ICommandService } from '../../../../../platform/commands/common/commands.js'; +import { IConfigurationService } from '../../../../../platform/configuration/common/configuration.js'; +import { IContextKeyService } from '../../../../../platform/contextkey/common/contextkey.js'; +import { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js'; +import { IKeybindingService } from '../../../../../platform/keybinding/common/keybinding.js'; +import { hotClassGetOriginalInstance } from '../../../../../platform/observable/common/wrapInHotClass.js'; +import { CoreEditingCommands } from '../../../../browser/coreCommands.js'; +import { ICodeEditor } from '../../../../browser/editorBrowser.js'; +import { observableCodeEditor } from '../../../../browser/observableCodeEditor.js'; +import { EditorOption } from '../../../../common/config/editorOptions.js'; +import { Position } from '../../../../common/core/position.js'; +import { Range } from '../../../../common/core/range.js'; +import { CursorChangeReason } from '../../../../common/cursorEvents.js'; +import { ILanguageFeatureDebounceService } from '../../../../common/services/languageFeatureDebounce.js'; +import { ILanguageFeaturesService } from '../../../../common/services/languageFeatures.js'; +import { InlineSuggestionHintsContentWidget } from '../hintsWidget/inlineCompletionsHintsWidget.js'; +import { TextModelChangeRecorder } from '../model/changeRecorder.js'; +import { InlineCompletionsModel } from '../model/inlineCompletionsModel.js'; +import { ObservableSuggestWidgetAdapter } from '../model/suggestWidgetAdapter.js'; +import { ObservableContextKeyService } from '../utils.js'; +import { inlineSuggestCommitId } from './commandIds.js'; +import { InlineCompletionContextKeys } from './inlineCompletionContextKeys.js'; +import { InlineCompletionsView } from '../view/inlineCompletionsView.js'; export class InlineCompletionsController extends Disposable { public static hot = createHotClass(InlineCompletionsController); - - static ID = "editor.contrib.inlineCompletionsController"; + public static ID = 'editor.contrib.inlineCompletionsController'; public static get(editor: ICodeEditor): InlineCompletionsController | null { - return hotClassGetOriginalInstance( - editor.getContribution( - InlineCompletionsController.ID, - ), - ); + return hotClassGetOriginalInstance(editor.getContribution(InlineCompletionsController.ID)); } private readonly _editorObs = observableCodeEditor(this.editor); + private readonly _positions = derived(this, reader => this._editorObs.selections.read(reader)?.map(s => s.getEndPosition()) ?? [new Position(1, 1)]); - private readonly _positions = derived( - this, - (reader) => - this._editorObs.selections - .read(reader) - ?.map((s) => s.getEndPosition()) ?? [new Position(1, 1)], - ); - - private readonly _suggestWidgetAdaptor = this._register( - new SuggestWidgetAdaptor( - this.editor, - () => { - this._editorObs.forceUpdate(); - - return this.model - .get() - ?.selectedInlineCompletion.get() - ?.toSingleTextEdit(undefined); - }, - (item) => - this._editorObs.forceUpdate((_tx) => { - /** @description InlineCompletionsController.handleSuggestAccepted */ - this.model.get()?.handleSuggestAccepted(item); - }), - ), - ); - - private readonly _suggestWidgetSelectedItem = observableFromEvent( - this, - (cb) => - this._suggestWidgetAdaptor.onDidSelectedItemChange(() => { - this._editorObs.forceUpdate((_tx) => cb(undefined)); - }), - () => this._suggestWidgetAdaptor.selectedItem, - ); + private readonly _suggestWidgetAdapter = this._register(new ObservableSuggestWidgetAdapter( + this._editorObs, + item => this.model.get()?.handleSuggestAccepted(item), + () => this.model.get()?.selectedInlineCompletion.get()?.toSingleTextEdit(undefined), + )); - private readonly _enabledInConfig = observableFromEvent( - this, - this.editor.onDidChangeConfiguration, - () => this.editor.getOption(EditorOption.inlineSuggest).enabled, - ); - - private readonly _isScreenReaderEnabled = observableFromEvent( - this, - this._accessibilityService.onDidChangeScreenReaderOptimized, - () => this._accessibilityService.isScreenReaderOptimized(), - ); - - private readonly _editorDictationInProgress = observableFromEvent( - this, + private readonly _enabledInConfig = observableFromEvent(this, this.editor.onDidChangeConfiguration, () => this.editor.getOption(EditorOption.inlineSuggest).enabled); + private readonly _isScreenReaderEnabled = observableFromEvent(this, this._accessibilityService.onDidChangeScreenReaderOptimized, () => this._accessibilityService.isScreenReaderOptimized()); + private readonly _editorDictationInProgress = observableFromEvent(this, this._contextKeyService.onDidChangeContext, - () => - this._contextKeyService - .getContext(this.editor.getDomNode()) - .getValue("editorDictation.inProgress") === true, - ); - - private readonly _enabled = derived( - this, - (reader) => - this._enabledInConfig.read(reader) && - (!this._isScreenReaderEnabled.read(reader) || - !this._editorDictationInProgress.read(reader)), + () => this._contextKeyService.getContext(this.editor.getDomNode()).getValue('editorDictation.inProgress') === true ); + private readonly _enabled = derived(this, reader => this._enabledInConfig.read(reader) && (!this._isScreenReaderEnabled.read(reader) || !this._editorDictationInProgress.read(reader))); private readonly _debounceValue = this._debounceService.for( this._languageFeaturesService.inlineCompletionsProvider, - "InlineCompletionsDebounce", - { min: 50, max: 50 }, + 'InlineCompletionsDebounce', + { min: 50, max: 50 } ); - private readonly _cursorIsInIndentation = derived(this, (reader) => { + private readonly _cursorIsInIndentation = derived(this, reader => { const cursorPos = this._editorObs.cursorPosition.read(reader); - - if (cursorPos === null) { - return false; - } - + if (cursorPos === null) { return false; } const model = this._editorObs.model.read(reader); - - if (!model) { - return false; - } - + if (!model) { return false; } this._editorObs.versionId.read(reader); - const indentMaxColumn = model.getLineIndentColumn(cursorPos.lineNumber); - return cursorPos.column <= indentMaxColumn; }); - private readonly optionPreview = this._editorObs - .getOption(EditorOption.suggest) - .map((v) => v.preview); - - private readonly optionPreviewMode = this._editorObs - .getOption(EditorOption.suggest) - .map((v) => v.previewMode); - - private readonly optionMode = this._editorObs - .getOption(EditorOption.inlineSuggest) - .map((v) => v.mode); - - private readonly optionInlineEditsEnabled = this._editorObs - .getOption(EditorOption.inlineSuggest) - .map((v) => !!v.edits.experimental?.enabled); - - public readonly model = derivedDisposable< - InlineCompletionsModel | undefined - >(this, (reader) => { - if (this._editorObs.isReadonly.read(reader)) { - return undefined; - } - + public readonly model = derivedDisposable(this, reader => { + if (this._editorObs.isReadonly.read(reader)) { return undefined; } const textModel = this._editorObs.model.read(reader); - - if (!textModel) { - return undefined; - } - - const model: InlineCompletionsModel = - this._instantiationService.createInstance( - InlineCompletionsModel, - textModel, - this._suggestWidgetSelectedItem, - this._editorObs.versionId, - this._positions, - this._debounceValue, - this.optionPreview, - this.optionPreviewMode, - this.optionMode, - this._enabled, - this.optionInlineEditsEnabled, - this.editor, - ); - - return model; - }).recomputeInitiallyAndOnChange(this._store); - - private readonly _ghostTexts = derived(this, (reader) => { - const model = this.model.read(reader); - - return model?.ghostTexts.read(reader) ?? []; - }); - - private readonly _stablizedGhostTexts = convertItemsToStableObservables( - this._ghostTexts, - this._store, - ); - - private readonly _ghostTextWidgets = mapObservableArrayCached( - this, - this._stablizedGhostTexts, - (ghostText, store) => - derivedDisposable((reader) => - this._instantiationService.createInstance( - readHotReloadableExport(GhostTextView, reader), - this.editor, - { - ghostText: ghostText, - minReservedLineCount: constObservable(0), - targetTextModel: this.model.map((v) => v?.textModel), - }, - ), - ).recomputeInitiallyAndOnChange(store), - ).recomputeInitiallyAndOnChange(this._store); - - private readonly _inlineEdit = derived(this, (reader) => { - const s = this.model.read(reader)?.state.read(reader); - - if (s?.kind === "inlineEdit") { - return s.inlineEdit; - } - - return undefined; - }); - - private readonly _everHadInlineEdit = derivedObservableWithCache( - this, - (reader, last) => last || !!this._inlineEdit.read(reader), - ); - - protected readonly _inlineEditWidget = derivedDisposable((reader) => { - if (!this._everHadInlineEdit.read(reader)) { - return undefined; - } - - return this._instantiationService.createInstance( - InlineEditsViewAndDiffProducer.hot.read(reader), + if (!textModel) { return undefined; } + + const model: InlineCompletionsModel = this._instantiationService.createInstance( + InlineCompletionsModel, + textModel, + this._suggestWidgetAdapter.selectedItem, + this._editorObs.versionId, + this._positions, + this._debounceValue, + this._enabled, this.editor, - this._inlineEdit, - this.model, ); + return model; }).recomputeInitiallyAndOnChange(this._store); private readonly _playAccessibilitySignal = observableSignal(this); - private readonly _fontFamily = this._editorObs - .getOption(EditorOption.inlineSuggest) - .map((val) => val.fontFamily); + private readonly _hideInlineEditOnSelectionChange = this._editorObs.getOption(EditorOption.inlineSuggest).map(val => true); - private readonly _hideInlineEditOnSelectionChange = this._editorObs - .getOption(EditorOption.inlineSuggest) - .map((val) => true); + protected readonly _view = this._register(new InlineCompletionsView(this.editor, this.model, this._instantiationService)); constructor( public readonly editor: ICodeEditor, - @IInstantiationService - private readonly _instantiationService: IInstantiationService, - @IContextKeyService - private readonly _contextKeyService: IContextKeyService, - @IConfigurationService - private readonly _configurationService: IConfigurationService, + @IInstantiationService private readonly _instantiationService: IInstantiationService, + @IContextKeyService private readonly _contextKeyService: IContextKeyService, + @IConfigurationService private readonly _configurationService: IConfigurationService, @ICommandService private readonly _commandService: ICommandService, - @ILanguageFeatureDebounceService - private readonly _debounceService: ILanguageFeatureDebounceService, - @ILanguageFeaturesService - private readonly _languageFeaturesService: ILanguageFeaturesService, - @IAccessibilitySignalService - private readonly _accessibilitySignalService: IAccessibilitySignalService, - @IKeybindingService - private readonly _keybindingService: IKeybindingService, - @IAccessibilityService - private readonly _accessibilityService: IAccessibilityService, + @ILanguageFeatureDebounceService private readonly _debounceService: ILanguageFeatureDebounceService, + @ILanguageFeaturesService private readonly _languageFeaturesService: ILanguageFeaturesService, + @IAccessibilitySignalService private readonly _accessibilitySignalService: IAccessibilitySignalService, + @IKeybindingService private readonly _keybindingService: IKeybindingService, + @IAccessibilityService private readonly _accessibilityService: IAccessibilityService, ) { super(); - this._register( - new InlineCompletionContextKeys( - this._contextKeyService, - this.model, - ), - ); - - this._register( - runOnChange(this._editorObs.onDidType, (_value, _changes) => { - if (this._enabled.get()) { - this.model.get()?.trigger(); - } - }), - ); - - this._register( - this._commandService.onDidExecuteCommand((e) => { - // These commands don't trigger onDidType. - const commands = new Set([ - CoreEditingCommands.Tab.id, - CoreEditingCommands.DeleteLeft.id, - CoreEditingCommands.DeleteRight.id, - inlineSuggestCommitId, - "acceptSelectedSuggestion", - ]); - - if ( - commands.has(e.commandId) && - editor.hasTextFocus() && - this._enabled.get() - ) { - this._editorObs.forceUpdate((tx) => { - /** @description onDidExecuteCommand */ - this.model.get()?.trigger(tx); - }); - } - }), - ); - - this._register( - runOnChange(this._editorObs.selections, (_value, _, changes) => { - if ( - changes.some( - (e) => - e.reason === CursorChangeReason.Explicit || - e.source === "api", - ) - ) { - if ( - !this._hideInlineEditOnSelectionChange.get() && - this.model.get()?.state.get()?.kind === "inlineEdit" - ) { - return; - } - - const m = this.model.get(); - - if (!m) { - return; - } - - if (m.inlineCompletionState.get()?.primaryGhostText) { - this.model.get()?.stop(); - } else if (m.state.get()?.inlineCompletion) { - this.model.get()?.collapseInlineEdit(); - } - } - }), - ); + this._register(runOnChange(this._editorObs.onDidType, (_value, _changes) => { + if (this._enabled.get()) { + this.model.get()?.trigger(); + } + })); + + this._register(this._commandService.onDidExecuteCommand((e) => { + // These commands don't trigger onDidType. + const commands = new Set([ + CoreEditingCommands.Tab.id, + CoreEditingCommands.DeleteLeft.id, + CoreEditingCommands.DeleteRight.id, + inlineSuggestCommitId, + 'acceptSelectedSuggestion', + ]); + if (commands.has(e.commandId) && editor.hasTextFocus() && this._enabled.get()) { + this._editorObs.forceUpdate(tx => { + /** @description onDidExecuteCommand */ + this.model.get()?.trigger(tx); + }); + } + })); - this._register( - this.editor.onDidBlurEditorWidget(() => { - // This is a hidden setting very useful for debugging - if ( - this._contextKeyService.getContextKeyValue( - "accessibleViewIsShown", - ) || - this._configurationService.getValue( - "editor.inlineSuggest.keepOnBlur", - ) || - editor.getOption(EditorOption.inlineSuggest).keepOnBlur || - InlineSuggestionHintsContentWidget.dropDownVisible - ) { + this._register(runOnChange(this._editorObs.selections, (_value, _, changes) => { + if (changes.some(e => e.reason === CursorChangeReason.Explicit || e.source === 'api')) { + if (!this._hideInlineEditOnSelectionChange.get() && this.model.get()?.state.get()?.kind === 'inlineEdit') { return; } - - if (this.model.get()?.inlineEditAvailable.get()) { - // dont hide inline edits on blur - return; + const m = this.model.get(); + if (!m) { return; } + if (m.inlineCompletionState.get()?.primaryGhostText) { + this.model.get()?.stop(); + } else if (m.state.get()?.inlineCompletion) { + this.model.get()?.collapseInlineEdit(); } + } + })); + + this._register(this.editor.onDidBlurEditorWidget(() => { + // This is a hidden setting very useful for debugging + if (this._contextKeyService.getContextKeyValue('accessibleViewIsShown') + || this._configurationService.getValue('editor.inlineSuggest.keepOnBlur') + || editor.getOption(EditorOption.inlineSuggest).keepOnBlur + || InlineSuggestionHintsContentWidget.dropDownVisible) { + return; + } - transaction((tx) => { - /** @description InlineCompletionsController.onDidBlurEditorWidget */ - this.model.get()?.stop("automatic", tx); - }); - }), - ); + if (this.model.get()?.inlineEditAvailable.get()) { + // dont hide inline edits on blur + return; + } - this._register( - autorun((reader) => { - /** @description InlineCompletionsController.forceRenderingAbove */ - const state = this.model - .read(reader) - ?.inlineCompletionState.read(reader); - - if (state?.suggestItem) { - if (state.primaryGhostText.lineCount >= 2) { - this._suggestWidgetAdaptor.forceRenderingAbove(); - } - } else { - this._suggestWidgetAdaptor.stopForceRenderingAbove(); + transaction(tx => { + /** @description InlineCompletionsController.onDidBlurEditorWidget */ + this.model.get()?.stop('automatic', tx); + }); + })); + + this._register(autorun(reader => { + /** @description InlineCompletionsController.forceRenderingAbove */ + const state = this.model.read(reader)?.inlineCompletionState.read(reader); + if (state?.suggestItem) { + if (state.primaryGhostText.lineCount >= 2) { + this._suggestWidgetAdapter.forceRenderingAbove(); } - }), - ); - - this._register( - toDisposable(() => { - this._suggestWidgetAdaptor.stopForceRenderingAbove(); - }), - ); + } else { + this._suggestWidgetAdapter.stopForceRenderingAbove(); + } + })); + this._register(toDisposable(() => { + this._suggestWidgetAdapter.stopForceRenderingAbove(); + })); - const currentInlineCompletionBySemanticId = derivedObservableWithCache< - string | undefined - >(this, (reader, last) => { + const currentInlineCompletionBySemanticId = derivedObservableWithCache(this, (reader, last) => { const model = this.model.read(reader); - const state = model?.inlineCompletionState.read(reader); - - if (this._suggestWidgetSelectedItem.get()) { + if (this._suggestWidgetAdapter.selectedItem.get()) { return last; } - return state?.inlineCompletion?.semanticId; }); - - this._register( - runOnChangeWithStore( - derived((reader) => { - this._playAccessibilitySignal.read(reader); - - currentInlineCompletionBySemanticId.read(reader); - - return {}; - }), - async (_value, _, _deltas, store) => { - /** @description InlineCompletionsController.playAccessibilitySignalAndReadSuggestion */ - const model = this.model.get(); - - const state = model?.inlineCompletionState.get(); - - if (!state || !model) { - return; - } - - const lineText = model.textModel.getLineContent( - state.primaryGhostText.lineNumber, - ); - - await timeout(50, cancelOnDispose(store)); - - await waitForState( - this._suggestWidgetSelectedItem, - isUndefined, - () => false, - cancelOnDispose(store), - ); - - await this._accessibilitySignalService.playSignal( - AccessibilitySignal.inlineSuggestion, - ); - - if ( - this.editor.getOption( - EditorOption.screenReaderAnnounceInlineSuggestion, - ) - ) { - this._provideScreenReaderUpdate( - state.primaryGhostText.renderForScreenReader( - lineText, - ), - ); - } - }, - ), - ); - - this._register( - new InlineCompletionsHintsWidget( - this.editor, - this.model, - this._instantiationService, - ), - ); - - this._register( - createStyleSheetFromObservable( - derived((reader) => { - const fontFamily = this._fontFamily.read(reader); - - if (fontFamily === "" || fontFamily === "default") { - return ""; - } - - return ` -.monaco-editor .ghost-text-decoration, -.monaco-editor .ghost-text-decoration-preview, -.monaco-editor .ghost-text { - font-family: ${fontFamily}; -}`; - }), - ), - ); + this._register(runOnChangeWithStore(derived(reader => { + this._playAccessibilitySignal.read(reader); + currentInlineCompletionBySemanticId.read(reader); + return {}; + }), async (_value, _, _deltas, store) => { + /** @description InlineCompletionsController.playAccessibilitySignalAndReadSuggestion */ + const model = this.model.get(); + const state = model?.inlineCompletionState.get(); + if (!state || !model) { return; } + const lineText = model.textModel.getLineContent(state.primaryGhostText.lineNumber); + + await timeout(50, cancelOnDispose(store)); + await waitForState(this._suggestWidgetAdapter.selectedItem, isUndefined, () => false, cancelOnDispose(store)); + + await this._accessibilitySignalService.playSignal(AccessibilitySignal.inlineSuggestion); + if (this.editor.getOption(EditorOption.screenReaderAnnounceInlineSuggestion)) { + this._provideScreenReaderUpdate(state.primaryGhostText.renderForScreenReader(lineText)); + } + })); // TODO@hediet - this._register( - this._configurationService.onDidChangeConfiguration((e) => { - if ( - e.affectsConfiguration( - "accessibility.verbosity.inlineCompletions", - ) - ) { - this.editor.updateOptions({ - inlineCompletionsAccessibilityVerbose: - this._configurationService.getValue( - "accessibility.verbosity.inlineCompletions", - ), - }); - } - }), - ); - - this.editor.updateOptions({ - inlineCompletionsAccessibilityVerbose: - this._configurationService.getValue( - "accessibility.verbosity.inlineCompletions", - ), - }); - - const contextKeySvcObs = new ObservableContextKeyService( - this._contextKeyService, - ); - - this._register( - contextKeySvcObs.bind( - InlineCompletionContextKeys.cursorInIndentation, - this._cursorIsInIndentation, - ), - ); - - this._register( - contextKeySvcObs.bind( - InlineCompletionContextKeys.hasSelection, - (reader) => - !this._editorObs.cursorSelection.read(reader)?.isEmpty(), - ), - ); - - this._register( - contextKeySvcObs.bind( - InlineCompletionContextKeys.cursorAtInlineEdit, - this.model.map((m, reader) => { - const s = m?.state?.read(reader); - - return s?.kind === "inlineEdit" && s.cursorAtInlineEdit; - }), - ), - ); - - this._register( - contextKeySvcObs.bind( - InlineCompletionContextKeys.tabShouldAcceptInlineEdit, - this.model.map( - (m, r) => !!m?.tabShouldAcceptInlineEdit.read(r), - ), - ), - ); - - this._register( - contextKeySvcObs.bind( - InlineCompletionContextKeys.tabShouldJumpToInlineEdit, - this.model.map( - (m, r) => !!m?.tabShouldJumpToInlineEdit.read(r), - ), - ), - ); + this._register(this._configurationService.onDidChangeConfiguration(e => { + if (e.affectsConfiguration('accessibility.verbosity.inlineCompletions')) { + this.editor.updateOptions({ inlineCompletionsAccessibilityVerbose: this._configurationService.getValue('accessibility.verbosity.inlineCompletions') }); + } + })); + this.editor.updateOptions({ inlineCompletionsAccessibilityVerbose: this._configurationService.getValue('accessibility.verbosity.inlineCompletions') }); + + const contextKeySvcObs = new ObservableContextKeyService(this._contextKeyService); + + this._register(contextKeySvcObs.bind(InlineCompletionContextKeys.cursorInIndentation, this._cursorIsInIndentation)); + this._register(contextKeySvcObs.bind(InlineCompletionContextKeys.hasSelection, reader => !this._editorObs.cursorSelection.read(reader)?.isEmpty())); + this._register(contextKeySvcObs.bind(InlineCompletionContextKeys.cursorAtInlineEdit, this.model.map((m, reader) => m?.inlineEditState?.read(reader)?.cursorAtInlineEdit))); + this._register(contextKeySvcObs.bind(InlineCompletionContextKeys.tabShouldAcceptInlineEdit, this.model.map((m, r) => !!m?.tabShouldAcceptInlineEdit.read(r)))); + this._register(contextKeySvcObs.bind(InlineCompletionContextKeys.tabShouldJumpToInlineEdit, this.model.map((m, r) => !!m?.tabShouldJumpToInlineEdit.read(r)))); + this._register(contextKeySvcObs.bind(InlineCompletionContextKeys.inlineEditVisible, reader => this.model.read(reader)?.inlineEditState.read(reader) !== undefined)); + this._register(contextKeySvcObs.bind(InlineCompletionContextKeys.inlineSuggestionHasIndentation, + reader => this.model.read(reader)?.getIndentationInfo(reader)?.startsWithIndentation + )); + this._register(contextKeySvcObs.bind(InlineCompletionContextKeys.inlineSuggestionHasIndentationLessThanTabSize, + reader => this.model.read(reader)?.getIndentationInfo(reader)?.startsWithIndentationLessThanTabSize + )); + this._register(contextKeySvcObs.bind(InlineCompletionContextKeys.suppressSuggestions, reader => { + const model = this.model.read(reader); + const state = model?.inlineCompletionState.read(reader); + return state?.primaryGhostText && state?.inlineCompletion ? state.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions : undefined; + })); + this._register(contextKeySvcObs.bind(InlineCompletionContextKeys.inlineSuggestionVisible, reader => { + const model = this.model.read(reader); + const state = model?.inlineCompletionState.read(reader); + return !!state?.inlineCompletion && state?.primaryGhostText !== undefined && !state?.primaryGhostText.isEmpty(); + })); - this._register( - this._instantiationService.createInstance( - TextModelChangeRecorder, - this.editor, - ), - ); + this._register(this._instantiationService.createInstance(TextModelChangeRecorder, this.editor)); } public playAccessibilitySignal(tx: ITransaction) { @@ -609,65 +258,40 @@ export class InlineCompletionsController extends Disposable { } private _provideScreenReaderUpdate(content: string): void { - const accessibleViewShowing = - this._contextKeyService.getContextKeyValue( - "accessibleViewIsShown", - ); - - const accessibleViewKeybinding = - this._keybindingService.lookupKeybinding( - "editor.action.accessibleView", - ); - + const accessibleViewShowing = this._contextKeyService.getContextKeyValue('accessibleViewIsShown'); + const accessibleViewKeybinding = this._keybindingService.lookupKeybinding('editor.action.accessibleView'); let hint: string | undefined; - - if ( - !accessibleViewShowing && - accessibleViewKeybinding && - this.editor.getOption( - EditorOption.inlineCompletionsAccessibilityVerbose, - ) - ) { - hint = localize( - "showAccessibleViewHint", - "Inspect this in the accessible view ({0})", - accessibleViewKeybinding.getAriaLabel(), - ); + if (!accessibleViewShowing && accessibleViewKeybinding && this.editor.getOption(EditorOption.inlineCompletionsAccessibilityVerbose)) { + hint = localize('showAccessibleViewHint', "Inspect this in the accessible view ({0})", accessibleViewKeybinding.getAriaLabel()); } - - alert(hint ? content + ", " + hint : content); + alert(hint ? content + ', ' + hint : content); } public shouldShowHoverAt(range: Range) { const ghostText = this.model.get()?.primaryGhostText.get(); - - if (ghostText) { - return ghostText.parts.some((p) => - range.containsPosition( - new Position(ghostText.lineNumber, p.column), - ), - ); + if (!ghostText) { + return false; } - - return false; + return ghostText.parts.some(p => range.containsPosition(new Position(ghostText.lineNumber, p.column))); } public shouldShowHoverAtViewZone(viewZoneId: string): boolean { - return ( - this._ghostTextWidgets.get()[0]?.get().ownsViewZone(viewZoneId) ?? - false - ); + return this._view.shouldShowHoverAtViewZone(viewZoneId); } - public reject() { - transaction((tx) => { - this.model.get()?.stop("explicitCancel", tx); + public reject(): void { + transaction(tx => { + const m = this.model.get(); + if (m) { + m.stop('explicitCancel', tx); + } }); } public jump(): void { const m = this.model.get(); - - m?.jump(); + if (m) { + m.jump(); + } } } diff --git a/Source/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.ts b/Source/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.ts index 67f9e87b1196f..beff7f1b33261 100644 --- a/Source/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.ts +++ b/Source/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.ts @@ -3,312 +3,163 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { h } from "../../../../../base/browser/dom.js"; -import { ActionViewItem } from "../../../../../base/browser/ui/actionbar/actionViewItems.js"; -import { - KeybindingLabel, - unthemedKeybindingLabelOptions, -} from "../../../../../base/browser/ui/keybindingLabel/keybindingLabel.js"; -import { - Action, - IAction, - Separator, -} from "../../../../../base/common/actions.js"; -import { equals } from "../../../../../base/common/arrays.js"; -import { RunOnceScheduler } from "../../../../../base/common/async.js"; -import { Codicon } from "../../../../../base/common/codicons.js"; -import { - Disposable, - toDisposable, -} from "../../../../../base/common/lifecycle.js"; -import { - autorun, - autorunWithStore, - derived, - derivedObservableWithCache, - derivedWithStore, - IObservable, - observableFromEvent, -} from "../../../../../base/common/observable.js"; -import { OS } from "../../../../../base/common/platform.js"; -import { ThemeIcon } from "../../../../../base/common/themables.js"; -import { localize } from "../../../../../nls.js"; -import { - getActionBarActions, - MenuEntryActionViewItem, -} from "../../../../../platform/actions/browser/menuEntryActionViewItem.js"; -import { - IMenuWorkbenchToolBarOptions, - WorkbenchToolBar, -} from "../../../../../platform/actions/browser/toolbar.js"; -import { - IMenuService, - MenuId, - MenuItemAction, -} from "../../../../../platform/actions/common/actions.js"; -import { ICommandService } from "../../../../../platform/commands/common/commands.js"; -import { IContextKeyService } from "../../../../../platform/contextkey/common/contextkey.js"; -import { IContextMenuService } from "../../../../../platform/contextview/browser/contextView.js"; -import { IInstantiationService } from "../../../../../platform/instantiation/common/instantiation.js"; -import { IKeybindingService } from "../../../../../platform/keybinding/common/keybinding.js"; -import { ITelemetryService } from "../../../../../platform/telemetry/common/telemetry.js"; -import { registerIcon } from "../../../../../platform/theme/common/iconRegistry.js"; -import { - ContentWidgetPositionPreference, - ICodeEditor, - IContentWidget, - IContentWidgetPosition, -} from "../../../../browser/editorBrowser.js"; -import { EditorOption } from "../../../../common/config/editorOptions.js"; -import { Position } from "../../../../common/core/position.js"; -import { - Command, - InlineCompletionTriggerKind, -} from "../../../../common/languages.js"; -import { PositionAffinity } from "../../../../common/model.js"; -import { - showNextInlineSuggestionActionId, - showPreviousInlineSuggestionActionId, -} from "../controller/commandIds.js"; -import { InlineCompletionsModel } from "../model/inlineCompletionsModel.js"; - -import "./inlineCompletionsHintsWidget.css"; +import { h } from '../../../../../base/browser/dom.js'; +import { ActionViewItem } from '../../../../../base/browser/ui/actionbar/actionViewItems.js'; +import { KeybindingLabel, unthemedKeybindingLabelOptions } from '../../../../../base/browser/ui/keybindingLabel/keybindingLabel.js'; +import { Action, IAction, Separator } from '../../../../../base/common/actions.js'; +import { equals } from '../../../../../base/common/arrays.js'; +import { RunOnceScheduler } from '../../../../../base/common/async.js'; +import { Codicon } from '../../../../../base/common/codicons.js'; +import { Disposable, toDisposable } from '../../../../../base/common/lifecycle.js'; +import { IObservable, autorun, autorunWithStore, derived, derivedObservableWithCache, derivedWithStore, observableFromEvent } from '../../../../../base/common/observable.js'; +import { OS } from '../../../../../base/common/platform.js'; +import { ThemeIcon } from '../../../../../base/common/themables.js'; +import { localize } from '../../../../../nls.js'; +import { MenuEntryActionViewItem, getActionBarActions } from '../../../../../platform/actions/browser/menuEntryActionViewItem.js'; +import { IMenuWorkbenchToolBarOptions, WorkbenchToolBar } from '../../../../../platform/actions/browser/toolbar.js'; +import { IMenuService, MenuId, MenuItemAction } from '../../../../../platform/actions/common/actions.js'; +import { ICommandService } from '../../../../../platform/commands/common/commands.js'; +import { IContextKeyService } from '../../../../../platform/contextkey/common/contextkey.js'; +import { IContextMenuService } from '../../../../../platform/contextview/browser/contextView.js'; +import { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js'; +import { IKeybindingService } from '../../../../../platform/keybinding/common/keybinding.js'; +import { ITelemetryService } from '../../../../../platform/telemetry/common/telemetry.js'; +import { registerIcon } from '../../../../../platform/theme/common/iconRegistry.js'; +import { ContentWidgetPositionPreference, ICodeEditor, IContentWidget, IContentWidgetPosition } from '../../../../browser/editorBrowser.js'; +import { EditorOption } from '../../../../common/config/editorOptions.js'; +import { Position } from '../../../../common/core/position.js'; +import { Command, InlineCompletionTriggerKind } from '../../../../common/languages.js'; +import { PositionAffinity } from '../../../../common/model.js'; +import { showNextInlineSuggestionActionId, showPreviousInlineSuggestionActionId } from '../controller/commandIds.js'; +import { InlineCompletionsModel } from '../model/inlineCompletionsModel.js'; +import './inlineCompletionsHintsWidget.css'; export class InlineCompletionsHintsWidget extends Disposable { - private readonly alwaysShowToolbar = observableFromEvent( - this, - this.editor.onDidChangeConfiguration, - () => - this.editor.getOption(EditorOption.inlineSuggest).showToolbar === - "always", - ); + private readonly alwaysShowToolbar = observableFromEvent(this, this.editor.onDidChangeConfiguration, () => this.editor.getOption(EditorOption.inlineSuggest).showToolbar === 'always'); private sessionPosition: Position | undefined = undefined; - private readonly position = derived(this, (reader) => { - const ghostText = this.model - .read(reader) - ?.primaryGhostText.read(reader); + private readonly position = derived(this, reader => { + const ghostText = this.model.read(reader)?.primaryGhostText.read(reader); - if ( - !this.alwaysShowToolbar.read(reader) || - !ghostText || - ghostText.parts.length === 0 - ) { + if (!this.alwaysShowToolbar.read(reader) || !ghostText || ghostText.parts.length === 0) { this.sessionPosition = undefined; - return null; } const firstColumn = ghostText.parts[0].column; - - if ( - this.sessionPosition && - this.sessionPosition.lineNumber !== ghostText.lineNumber - ) { + if (this.sessionPosition && this.sessionPosition.lineNumber !== ghostText.lineNumber) { this.sessionPosition = undefined; } - const position = new Position( - ghostText.lineNumber, - Math.min( - firstColumn, - this.sessionPosition?.column ?? Number.MAX_SAFE_INTEGER, - ), - ); - + const position = new Position(ghostText.lineNumber, Math.min(firstColumn, this.sessionPosition?.column ?? Number.MAX_SAFE_INTEGER)); this.sessionPosition = position; - return position; }); constructor( private readonly editor: ICodeEditor, private readonly model: IObservable, - @IInstantiationService - private readonly instantiationService: IInstantiationService, + @IInstantiationService private readonly instantiationService: IInstantiationService, ) { super(); - this._register( - autorunWithStore((reader, store) => { - /** @description setup content widget */ - const model = this.model.read(reader); + this._register(autorunWithStore((reader, store) => { + /** @description setup content widget */ + const model = this.model.read(reader); + if (!model || !this.alwaysShowToolbar.read(reader)) { + return; + } + + const contentWidgetValue = derivedWithStore((reader, store) => { + const contentWidget = store.add(this.instantiationService.createInstance( + InlineSuggestionHintsContentWidget, + this.editor, + true, + this.position, + model.selectedInlineCompletionIndex, + model.inlineCompletionsCount, + model.activeCommands, + )); + editor.addContentWidget(contentWidget); + store.add(toDisposable(() => editor.removeContentWidget(contentWidget))); + + store.add(autorun(reader => { + /** @description request explicit */ + const position = this.position.read(reader); + if (!position) { + return; + } + if (model.lastTriggerKind.read(reader) !== InlineCompletionTriggerKind.Explicit) { + model.triggerExplicitly(); + } + })); + return contentWidget; + }); - if (!model || !this.alwaysShowToolbar.read(reader)) { - return; + const hadPosition = derivedObservableWithCache(this, (reader, lastValue) => !!this.position.read(reader) || !!lastValue); + store.add(autorun(reader => { + if (hadPosition.read(reader)) { + contentWidgetValue.read(reader); } - - const contentWidgetValue = derivedWithStore((reader, store) => { - const contentWidget = store.add( - this.instantiationService.createInstance( - InlineSuggestionHintsContentWidget, - this.editor, - true, - this.position, - model.selectedInlineCompletionIndex, - model.inlineCompletionsCount, - model.activeCommands, - ), - ); - - editor.addContentWidget(contentWidget); - - store.add( - toDisposable(() => - editor.removeContentWidget(contentWidget), - ), - ); - - store.add( - autorun((reader) => { - /** @description request explicit */ - const position = this.position.read(reader); - - if (!position) { - return; - } - - if ( - model.lastTriggerKind.read(reader) !== - InlineCompletionTriggerKind.Explicit - ) { - model.triggerExplicitly(); - } - }), - ); - - return contentWidget; - }); - - const hadPosition = derivedObservableWithCache( - this, - (reader, lastValue) => - !!this.position.read(reader) || !!lastValue, - ); - - store.add( - autorun((reader) => { - if (hadPosition.read(reader)) { - contentWidgetValue.read(reader); - } - }), - ); - }), - ); + })); + })); } } -const inlineSuggestionHintsNextIcon = registerIcon( - "inline-suggestion-hints-next", - Codicon.chevronRight, - localize("parameterHintsNextIcon", "Icon for show next parameter hint."), -); - -const inlineSuggestionHintsPreviousIcon = registerIcon( - "inline-suggestion-hints-previous", - Codicon.chevronLeft, - localize( - "parameterHintsPreviousIcon", - "Icon for show previous parameter hint.", - ), -); - -export class InlineSuggestionHintsContentWidget - extends Disposable - implements IContentWidget -{ - private static _dropDownVisible = false; +const inlineSuggestionHintsNextIcon = registerIcon('inline-suggestion-hints-next', Codicon.chevronRight, localize('parameterHintsNextIcon', 'Icon for show next parameter hint.')); +const inlineSuggestionHintsPreviousIcon = registerIcon('inline-suggestion-hints-previous', Codicon.chevronLeft, localize('parameterHintsPreviousIcon', 'Icon for show previous parameter hint.')); - public static get dropDownVisible() { - return this._dropDownVisible; - } +export class InlineSuggestionHintsContentWidget extends Disposable implements IContentWidget { + private static _dropDownVisible = false; + public static get dropDownVisible() { return this._dropDownVisible; } private static id = 0; private readonly id = `InlineSuggestionHintsContentWidget${InlineSuggestionHintsContentWidget.id++}`; - public readonly allowEditorOverflow = true; - public readonly suppressMouseDown = false; - private readonly nodes = h( - "div.inlineSuggestionsHints", - { className: this.withBorder ? ".withBorder" : "" }, - [h("div@toolBar")], - ); - - private createCommandAction( - commandId: string, - label: string, - iconClassName: string, - ): Action { - const action = new Action(commandId, label, iconClassName, true, () => - this._commandService.executeCommand(commandId), - ); + private readonly nodes = h('div.inlineSuggestionsHints', { className: this.withBorder ? '.withBorder' : '' }, [ + h('div@toolBar'), + ]); - const kb = this.keybindingService.lookupKeybinding( + private createCommandAction(commandId: string, label: string, iconClassName: string): Action { + const action = new Action( commandId, - this._contextKeyService, + label, + iconClassName, + true, + () => this._commandService.executeCommand(commandId), ); - + const kb = this.keybindingService.lookupKeybinding(commandId, this._contextKeyService); let tooltip = label; - if (kb) { - tooltip = localize( - { key: "content", comment: ["A label", "A keybinding"] }, - "{0} ({1})", - label, - kb.getLabel(), - ); + tooltip = localize({ key: 'content', comment: ['A label', 'A keybinding'] }, '{0} ({1})', label, kb.getLabel()); } - action.tooltip = tooltip; - return action; } - private readonly previousAction = this.createCommandAction( - showPreviousInlineSuggestionActionId, - localize("previous", "Previous"), - ThemeIcon.asClassName(inlineSuggestionHintsPreviousIcon), - ); - - private readonly availableSuggestionCountAction = new Action( - "inlineSuggestionHints.availableSuggestionCount", - "", - undefined, - false, - ); - - private readonly nextAction = this.createCommandAction( - showNextInlineSuggestionActionId, - localize("next", "Next"), - ThemeIcon.asClassName(inlineSuggestionHintsNextIcon), - ); + private readonly previousAction = this.createCommandAction(showPreviousInlineSuggestionActionId, localize('previous', 'Previous'), ThemeIcon.asClassName(inlineSuggestionHintsPreviousIcon)); + private readonly availableSuggestionCountAction = new Action('inlineSuggestionHints.availableSuggestionCount', '', undefined, false); + private readonly nextAction = this.createCommandAction(showNextInlineSuggestionActionId, localize('next', 'Next'), ThemeIcon.asClassName(inlineSuggestionHintsNextIcon)); private readonly toolBar: CustomizedMenuWorkbenchToolBar; // TODO@hediet: deprecate MenuId.InlineCompletionsActions - private readonly inlineCompletionsActionsMenus = this._register( - this._menuService.createMenu( - MenuId.InlineCompletionsActions, - this._contextKeyService, - ), - ); - - private readonly clearAvailableSuggestionCountLabelDebounced = - this._register( - new RunOnceScheduler(() => { - this.availableSuggestionCountAction.label = ""; - }, 100), - ); + private readonly inlineCompletionsActionsMenus = this._register(this._menuService.createMenu( + MenuId.InlineCompletionsActions, + this._contextKeyService + )); + + private readonly clearAvailableSuggestionCountLabelDebounced = this._register(new RunOnceScheduler(() => { + this.availableSuggestionCountAction.label = ''; + }, 100)); - private readonly disableButtonsDebounced = this._register( - new RunOnceScheduler(() => { - this.previousAction.enabled = this.nextAction.enabled = false; - }, 100), - ); + private readonly disableButtonsDebounced = this._register(new RunOnceScheduler(() => { + this.previousAction.enabled = this.nextAction.enabled = false; + }, 100)); constructor( private readonly editor: ICodeEditor, @@ -320,51 +171,28 @@ export class InlineSuggestionHintsContentWidget @ICommandService private readonly _commandService: ICommandService, @IInstantiationService instantiationService: IInstantiationService, - @IKeybindingService - private readonly keybindingService: IKeybindingService, - @IContextKeyService - private readonly _contextKeyService: IContextKeyService, + @IKeybindingService private readonly keybindingService: IKeybindingService, + @IContextKeyService private readonly _contextKeyService: IContextKeyService, @IMenuService private readonly _menuService: IMenuService, ) { super(); - this.toolBar = this._register( - instantiationService.createInstance( - CustomizedMenuWorkbenchToolBar, - this.nodes.toolBar, - MenuId.InlineSuggestionToolbar, - { - menuOptions: { renderShortTitle: true }, - toolbarOptions: { - primaryGroup: (g) => g.startsWith("primary"), - }, - actionViewItemProvider: (action, options) => { - if (action instanceof MenuItemAction) { - return instantiationService.createInstance( - StatusBarViewItem, - action, - undefined, - ); - } - - if (action === this.availableSuggestionCountAction) { - const a = new ActionViewItemWithClassName( - undefined, - action, - { label: true, icon: false }, - ); - - a.setClass("availableSuggestionCount"); - - return a; - } - - return undefined; - }, - telemetrySource: "InlineSuggestionToolbar", - }, - ), - ); + this.toolBar = this._register(instantiationService.createInstance(CustomizedMenuWorkbenchToolBar, this.nodes.toolBar, MenuId.InlineSuggestionToolbar, { + menuOptions: { renderShortTitle: true }, + toolbarOptions: { primaryGroup: g => g.startsWith('primary') }, + actionViewItemProvider: (action, options) => { + if (action instanceof MenuItemAction) { + return instantiationService.createInstance(StatusBarViewItem, action, undefined); + } + if (action === this.availableSuggestionCountAction) { + const a = new ActionViewItemWithClassName(undefined, action, { label: true, icon: false }); + a.setClass('availableSuggestionCount'); + return a; + } + return undefined; + }, + telemetrySource: 'InlineSuggestionToolbar', + })); this.toolBar.setPrependedPrimaryActions([ this.previousAction, @@ -372,87 +200,67 @@ export class InlineSuggestionHintsContentWidget this.nextAction, ]); - this._register( - this.toolBar.onDidChangeDropdownVisibility((e) => { - InlineSuggestionHintsContentWidget._dropDownVisible = e; - }), - ); - - this._register( - autorun((reader) => { - /** @description update position */ - this._position.read(reader); - - this.editor.layoutContentWidget(this); - }), - ); - - this._register( - autorun((reader) => { - /** @description counts */ - const suggestionCount = this._suggestionCount.read(reader); - - const currentSuggestionIdx = - this._currentSuggestionIdx.read(reader); - - if (suggestionCount !== undefined) { - this.clearAvailableSuggestionCountLabelDebounced.cancel(); - - this.availableSuggestionCountAction.label = `${currentSuggestionIdx + 1}/${suggestionCount}`; - } else { - this.clearAvailableSuggestionCountLabelDebounced.schedule(); - } - - if (suggestionCount !== undefined && suggestionCount > 1) { - this.disableButtonsDebounced.cancel(); - - this.previousAction.enabled = this.nextAction.enabled = - true; - } else { - this.disableButtonsDebounced.schedule(); - } - }), - ); - - this._register( - autorun((reader) => { - /** @description extra commands */ - const extraCommands = this._extraCommands.read(reader); - - const extraActions = extraCommands.map((c) => ({ - class: undefined, - id: c.id, - enabled: true, - tooltip: c.tooltip || "", - label: c.title, - run: (event) => { - return this._commandService.executeCommand(c.id); - }, - })); + this._register(this.toolBar.onDidChangeDropdownVisibility(e => { + InlineSuggestionHintsContentWidget._dropDownVisible = e; + })); + + this._register(autorun(reader => { + /** @description update position */ + this._position.read(reader); + this.editor.layoutContentWidget(this); + })); + + this._register(autorun(reader => { + /** @description counts */ + const suggestionCount = this._suggestionCount.read(reader); + const currentSuggestionIdx = this._currentSuggestionIdx.read(reader); + + if (suggestionCount !== undefined) { + this.clearAvailableSuggestionCountLabelDebounced.cancel(); + this.availableSuggestionCountAction.label = `${currentSuggestionIdx + 1}/${suggestionCount}`; + } else { + this.clearAvailableSuggestionCountLabelDebounced.schedule(); + } + + if (suggestionCount !== undefined && suggestionCount > 1) { + this.disableButtonsDebounced.cancel(); + this.previousAction.enabled = this.nextAction.enabled = true; + } else { + this.disableButtonsDebounced.schedule(); + } + })); + + this._register(autorun(reader => { + /** @description extra commands */ + const extraCommands = this._extraCommands.read(reader); + const extraActions = extraCommands.map(c => ({ + class: undefined, + id: c.id, + enabled: true, + tooltip: c.tooltip || '', + label: c.title, + run: (event) => { + return this._commandService.executeCommand(c.id); + }, + })); - for (const [ - _, - group, - ] of this.inlineCompletionsActionsMenus.getActions()) { - for (const action of group) { - if (action instanceof MenuItemAction) { - extraActions.push(action); - } + for (const [_, group] of this.inlineCompletionsActionsMenus.getActions()) { + for (const action of group) { + if (action instanceof MenuItemAction) { + extraActions.push(action); } } + } - if (extraActions.length > 0) { - extraActions.unshift(new Separator()); - } + if (extraActions.length > 0) { + extraActions.unshift(new Separator()); + } - this.toolBar.setAdditionalSecondaryActions(extraActions); - }), - ); + this.toolBar.setAdditionalSecondaryActions(extraActions); + })); } - getId(): string { - return this.id; - } + getId(): string { return this.id; } getDomNode(): HTMLElement { return this.nodes.root; @@ -461,10 +269,7 @@ export class InlineSuggestionHintsContentWidget getPosition(): IContentWidgetPosition | null { return { position: this._position.get(), - preference: [ - ContentWidgetPositionPreference.ABOVE, - ContentWidgetPositionPreference.BELOW, - ], + preference: [ContentWidgetPositionPreference.ABOVE, ContentWidgetPositionPreference.BELOW], positionAffinity: PositionAffinity.LeftOfInjectedText, }; } @@ -479,7 +284,6 @@ class ActionViewItemWithClassName extends ActionViewItem { override render(container: HTMLElement): void { super.render(container); - if (this._className) { container.classList.add(this._className); } @@ -492,32 +296,18 @@ class ActionViewItemWithClassName extends ActionViewItem { class StatusBarViewItem extends MenuEntryActionViewItem { protected override updateLabel() { - const kb = this._keybindingService.lookupKeybinding( - this._action.id, - this._contextKeyService, - ); - + const kb = this._keybindingService.lookupKeybinding(this._action.id, this._contextKeyService, true); if (!kb) { return super.updateLabel(); } - if (this.label) { - const div = h("div.keybinding").root; - - const k = this._register( - new KeybindingLabel(div, OS, { - disableTitle: true, - ...unthemedKeybindingLabelOptions, - }), - ); + const div = h('div.keybinding').root; + const k = this._register(new KeybindingLabel(div, OS, { disableTitle: true, ...unthemedKeybindingLabelOptions })); k.set(kb); - this.label.textContent = this._action.label; - this.label.appendChild(div); - - this.label.classList.add("inlineSuggestionStatusBarItemLabel"); + this.label.classList.add('inlineSuggestionStatusBarItemLabel'); } } @@ -527,16 +317,9 @@ class StatusBarViewItem extends MenuEntryActionViewItem { } export class CustomizedMenuWorkbenchToolBar extends WorkbenchToolBar { - private readonly menu = this._store.add( - this.menuService.createMenu(this.menuId, this.contextKeyService, { - emitEventsForSubmenuChanges: true, - }), - ); - + private readonly menu = this._store.add(this.menuService.createMenu(this.menuId, this.contextKeyService, { emitEventsForSubmenuChanges: true })); private additionalActions: IAction[] = []; - private prependedPrimaryActions: IAction[] = []; - private additionalPrimaryActions: IAction[] = []; constructor( @@ -544,43 +327,27 @@ export class CustomizedMenuWorkbenchToolBar extends WorkbenchToolBar { private readonly menuId: MenuId, private readonly options2: IMenuWorkbenchToolBarOptions | undefined, @IMenuService private readonly menuService: IMenuService, - @IContextKeyService - private readonly contextKeyService: IContextKeyService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, @IContextMenuService contextMenuService: IContextMenuService, @IKeybindingService keybindingService: IKeybindingService, @ICommandService commandService: ICommandService, @ITelemetryService telemetryService: ITelemetryService, ) { - super( - container, - { resetMenu: menuId, ...options2 }, - menuService, - contextKeyService, - contextMenuService, - keybindingService, - commandService, - telemetryService, - ); + super(container, { resetMenu: menuId, ...options2 }, menuService, contextKeyService, contextMenuService, keybindingService, commandService, telemetryService); this._store.add(this.menu.onDidChange(() => this.updateToolbar())); - this.updateToolbar(); } private updateToolbar(): void { const { primary, secondary } = getActionBarActions( this.menu.getActions(this.options2?.menuOptions), - this.options2?.toolbarOptions?.primaryGroup, - this.options2?.toolbarOptions?.shouldInlineSubmenu, - this.options2?.toolbarOptions?.useSeparatorsInPrimaryActions, + this.options2?.toolbarOptions?.primaryGroup, this.options2?.toolbarOptions?.shouldInlineSubmenu, this.options2?.toolbarOptions?.useSeparatorsInPrimaryActions ); secondary.push(...this.additionalActions); - primary.unshift(...this.prependedPrimaryActions); - primary.push(...this.additionalPrimaryActions); - this.setActions(primary, secondary); } @@ -590,7 +357,6 @@ export class CustomizedMenuWorkbenchToolBar extends WorkbenchToolBar { } this.prependedPrimaryActions = actions; - this.updateToolbar(); } @@ -600,7 +366,6 @@ export class CustomizedMenuWorkbenchToolBar extends WorkbenchToolBar { } this.additionalPrimaryActions = actions; - this.updateToolbar(); } @@ -610,7 +375,6 @@ export class CustomizedMenuWorkbenchToolBar extends WorkbenchToolBar { } this.additionalActions = actions; - this.updateToolbar(); } } diff --git a/Source/vs/editor/contrib/inlineCompletions/browser/model/suggestWidgetAdapter.ts b/Source/vs/editor/contrib/inlineCompletions/browser/model/suggestWidgetAdapter.ts index 4876f2e860634..88df0a98a528e 100644 --- a/Source/vs/editor/contrib/inlineCompletions/browser/model/suggestWidgetAdapter.ts +++ b/Source/vs/editor/contrib/inlineCompletions/browser/model/suggestWidgetAdapter.ts @@ -3,229 +3,140 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { - compareBy, - numberComparator, -} from "../../../../../base/common/arrays.js"; -import { findFirstMax } from "../../../../../base/common/arraysFind.js"; -import { Emitter, Event } from "../../../../../base/common/event.js"; -import { Disposable } from "../../../../../base/common/lifecycle.js"; -import { ICodeEditor } from "../../../../browser/editorBrowser.js"; -import { Position } from "../../../../common/core/position.js"; -import { Range } from "../../../../common/core/range.js"; -import { SingleTextEdit } from "../../../../common/core/textEdit.js"; -import { - CompletionItemInsertTextRule, - CompletionItemKind, - SelectedSuggestionInfo, -} from "../../../../common/languages.js"; -import { ITextModel } from "../../../../common/model.js"; -import { SnippetParser } from "../../../snippet/browser/snippetParser.js"; -import { SnippetSession } from "../../../snippet/browser/snippetSession.js"; -import { CompletionItem } from "../../../suggest/browser/suggest.js"; -import { SuggestController } from "../../../suggest/browser/suggestController.js"; -import { - singleTextEditAugments, - singleTextRemoveCommonPrefix, -} from "./singleTextEditHelpers.js"; +import { compareBy, numberComparator } from '../../../../../base/common/arrays.js'; +import { findFirstMax } from '../../../../../base/common/arraysFind.js'; +import { Emitter, Event } from '../../../../../base/common/event.js'; +import { Disposable } from '../../../../../base/common/lifecycle.js'; +import { ICodeEditor } from '../../../../browser/editorBrowser.js'; +import { Position } from '../../../../common/core/position.js'; +import { Range } from '../../../../common/core/range.js'; +import { SingleTextEdit } from '../../../../common/core/textEdit.js'; +import { CompletionItemInsertTextRule, CompletionItemKind, SelectedSuggestionInfo } from '../../../../common/languages.js'; +import { ITextModel } from '../../../../common/model.js'; +import { singleTextEditAugments, singleTextRemoveCommonPrefix } from './singleTextEditHelpers.js'; +import { SnippetParser } from '../../../snippet/browser/snippetParser.js'; +import { SnippetSession } from '../../../snippet/browser/snippetSession.js'; +import { CompletionItem } from '../../../suggest/browser/suggest.js'; +import { SuggestController } from '../../../suggest/browser/suggestController.js'; +import { ObservableCodeEditor } from '../../../../browser/observableCodeEditor.js'; +import { observableFromEvent } from '../../../../../base/common/observable.js'; export class SuggestWidgetAdaptor extends Disposable { private isSuggestWidgetVisible: boolean = false; - private isShiftKeyPressed = false; - private _isActive = false; - private _currentSuggestItemInfo: SuggestItemInfo | undefined = undefined; - public get selectedItem(): SuggestItemInfo | undefined { return this._currentSuggestItemInfo; } - private _onDidSelectedItemChange = this._register(new Emitter()); - - public readonly onDidSelectedItemChange: Event = - this._onDidSelectedItemChange.event; + public readonly onDidSelectedItemChange: Event = this._onDidSelectedItemChange.event; constructor( private readonly editor: ICodeEditor, - private readonly suggestControllerPreselector: () => - | SingleTextEdit - | undefined, + private readonly suggestControllerPreselector: () => SingleTextEdit | undefined, private readonly onWillAccept: (item: SuggestItemInfo) => void, ) { super(); // See the command acceptAlternativeSelectedSuggestion that is bound to shift+tab - this._register( - editor.onKeyDown((e) => { - if (e.shiftKey && !this.isShiftKeyPressed) { - this.isShiftKeyPressed = true; - - this.update(this._isActive); - } - }), - ); - - this._register( - editor.onKeyUp((e) => { - if (e.shiftKey && this.isShiftKeyPressed) { - this.isShiftKeyPressed = false; - - this.update(this._isActive); - } - }), - ); + this._register(editor.onKeyDown(e => { + if (e.shiftKey && !this.isShiftKeyPressed) { + this.isShiftKeyPressed = true; + this.update(this._isActive); + } + })); + this._register(editor.onKeyUp(e => { + if (e.shiftKey && this.isShiftKeyPressed) { + this.isShiftKeyPressed = false; + this.update(this._isActive); + } + })); const suggestController = SuggestController.get(this.editor); - if (suggestController) { - this._register( - suggestController.registerSelector({ - priority: 100, - select: (model, pos, suggestItems) => { - const textModel = this.editor.getModel(); - - if (!textModel) { - // Should not happen - return -1; - } - - const i = this.suggestControllerPreselector(); - - const itemToPreselect = i - ? singleTextRemoveCommonPrefix(i, textModel) - : undefined; - - if (!itemToPreselect) { - return -1; - } - - const position = Position.lift(pos); - - const candidates = suggestItems - .map((suggestItem, index) => { - const suggestItemInfo = - SuggestItemInfo.fromSuggestion( - suggestController, - textModel, - position, - suggestItem, - this.isShiftKeyPressed, - ); - - const suggestItemTextEdit = - singleTextRemoveCommonPrefix( - suggestItemInfo.toSingleTextEdit(), - textModel, - ); - - const valid = singleTextEditAugments( - itemToPreselect, - suggestItemTextEdit, - ); - - return { - index, - valid, - prefixLength: - suggestItemTextEdit.text.length, - suggestItem, - }; - }) - .filter( - (item) => - item && item.valid && item.prefixLength > 0, - ); - - const result = findFirstMax( - candidates, - compareBy((s) => s!.prefixLength, numberComparator), - ); - - return result ? result.index : -1; - }, - }), - ); + this._register(suggestController.registerSelector({ + priority: 100, + select: (model, pos, suggestItems) => { + const textModel = this.editor.getModel(); + if (!textModel) { + // Should not happen + return -1; + } - let isBoundToSuggestWidget = false; + const i = this.suggestControllerPreselector(); + const itemToPreselect = i ? singleTextRemoveCommonPrefix(i, textModel) : undefined; + if (!itemToPreselect) { + return -1; + } + const position = Position.lift(pos); + + const candidates = suggestItems + .map((suggestItem, index) => { + const suggestItemInfo = SuggestItemInfo.fromSuggestion(suggestController, textModel, position, suggestItem, this.isShiftKeyPressed); + const suggestItemTextEdit = singleTextRemoveCommonPrefix(suggestItemInfo.toSingleTextEdit(), textModel); + const valid = singleTextEditAugments(itemToPreselect, suggestItemTextEdit); + return { index, valid, prefixLength: suggestItemTextEdit.text.length, suggestItem }; + }) + .filter(item => item && item.valid && item.prefixLength > 0); + + const result = findFirstMax( + candidates, + compareBy(s => s!.prefixLength, numberComparator) + ); + return result ? result.index : - 1; + } + })); + let isBoundToSuggestWidget = false; const bindToSuggestWidget = () => { if (isBoundToSuggestWidget) { return; } - isBoundToSuggestWidget = true; - this._register( - suggestController.widget.value.onDidShow(() => { - this.isSuggestWidgetVisible = true; - - this.update(true); - }), - ); - - this._register( - suggestController.widget.value.onDidHide(() => { - this.isSuggestWidgetVisible = false; - - this.update(false); - }), - ); - - this._register( - suggestController.widget.value.onDidFocus(() => { - this.isSuggestWidgetVisible = true; - - this.update(true); - }), - ); + this._register(suggestController.widget.value.onDidShow(() => { + this.isSuggestWidgetVisible = true; + this.update(true); + })); + this._register(suggestController.widget.value.onDidHide(() => { + this.isSuggestWidgetVisible = false; + this.update(false); + })); + this._register(suggestController.widget.value.onDidFocus(() => { + this.isSuggestWidgetVisible = true; + this.update(true); + })); }; - this._register( - Event.once(suggestController.model.onDidTrigger)((e) => { - bindToSuggestWidget(); - }), - ); - - this._register( - suggestController.onWillInsertSuggestItem((e) => { - const position = this.editor.getPosition(); - - const model = this.editor.getModel(); - - if (!position || !model) { - return undefined; - } - - const suggestItemInfo = SuggestItemInfo.fromSuggestion( - suggestController, - model, - position, - e.item, - this.isShiftKeyPressed, - ); + this._register(Event.once(suggestController.model.onDidTrigger)(e => { + bindToSuggestWidget(); + })); + + this._register(suggestController.onWillInsertSuggestItem(e => { + const position = this.editor.getPosition(); + const model = this.editor.getModel(); + if (!position || !model) { return undefined; } + + const suggestItemInfo = SuggestItemInfo.fromSuggestion( + suggestController, + model, + position, + e.item, + this.isShiftKeyPressed + ); - this.onWillAccept(suggestItemInfo); - }), - ); + this.onWillAccept(suggestItemInfo); + })); } - this.update(this._isActive); } private update(newActive: boolean): void { const newInlineCompletion = this.getSuggestItemInfo(); - if ( - this._isActive !== newActive || - !suggestItemInfoEquals( - this._currentSuggestItemInfo, - newInlineCompletion, - ) - ) { + if (this._isActive !== newActive || !suggestItemInfoEquals(this._currentSuggestItemInfo, newInlineCompletion)) { this._isActive = newActive; - this._currentSuggestItemInfo = newInlineCompletion; this._onDidSelectedItemChange.fire(); @@ -234,15 +145,12 @@ export class SuggestWidgetAdaptor extends Disposable { private getSuggestItemInfo(): SuggestItemInfo | undefined { const suggestController = SuggestController.get(this.editor); - if (!suggestController || !this.isSuggestWidgetVisible) { return undefined; } const focusedItem = suggestController.widget.value.getFocusedItem(); - const position = this.editor.getPosition(); - const model = this.editor.getModel(); if (!focusedItem || !position || !model) { @@ -254,39 +162,26 @@ export class SuggestWidgetAdaptor extends Disposable { model, position, focusedItem.item, - this.isShiftKeyPressed, + this.isShiftKeyPressed ); } public stopForceRenderingAbove(): void { const suggestController = SuggestController.get(this.editor); - suggestController?.stopForceRenderingAbove(); } public forceRenderingAbove(): void { const suggestController = SuggestController.get(this.editor); - suggestController?.forceRenderingAbove(); } } export class SuggestItemInfo { - public static fromSuggestion( - suggestController: SuggestController, - model: ITextModel, - position: Position, - item: CompletionItem, - toggleMode: boolean, - ): SuggestItemInfo { + public static fromSuggestion(suggestController: SuggestController, model: ITextModel, position: Position, item: CompletionItem, toggleMode: boolean): SuggestItemInfo { let { insertText } = item.completion; - let isSnippetText = false; - - if ( - item.completion.insertTextRules! & - CompletionItemInsertTextRule.InsertAsSnippet - ) { + if (item.completion.insertTextRules! & CompletionItemInsertTextRule.InsertAsSnippet) { const snippet = new SnippetParser().parse(insertText); if (snippet.children.length < 100) { @@ -295,7 +190,6 @@ export class SuggestItemInfo { } insertText = snippet.toString(); - isSnippetText = true; } @@ -304,7 +198,7 @@ export class SuggestItemInfo { return new SuggestItemInfo( Range.fromPositions( position.delta(0, -info.overwriteBefore), - position.delta(0, Math.max(info.overwriteAfter, 0)), + position.delta(0, Math.max(info.overwriteAfter, 0)) ), insertText, item.completion.kind, @@ -317,24 +211,17 @@ export class SuggestItemInfo { public readonly insertText: string, public readonly completionItemKind: CompletionItemKind, public readonly isSnippetText: boolean, - ) {} + ) { } public equals(other: SuggestItemInfo): boolean { - return ( - this.range.equalsRange(other.range) && - this.insertText === other.insertText && - this.completionItemKind === other.completionItemKind && - this.isSnippetText === other.isSnippetText - ); + return this.range.equalsRange(other.range) + && this.insertText === other.insertText + && this.completionItemKind === other.completionItemKind + && this.isSnippetText === other.isSnippetText; } public toSelectedSuggestionInfo(): SelectedSuggestionInfo { - return new SelectedSuggestionInfo( - this.range, - this.insertText, - this.completionItemKind, - this.isSnippetText, - ); + return new SelectedSuggestionInfo(this.range, this.insertText, this.completionItemKind, this.isSnippetText); } public toSingleTextEdit(): SingleTextEdit { @@ -342,17 +229,47 @@ export class SuggestItemInfo { } } -function suggestItemInfoEquals( - a: SuggestItemInfo | undefined, - b: SuggestItemInfo | undefined, -): boolean { +function suggestItemInfoEquals(a: SuggestItemInfo | undefined, b: SuggestItemInfo | undefined): boolean { if (a === b) { return true; } - if (!a || !b) { return false; } - return a.equals(b); } + +export class ObservableSuggestWidgetAdapter extends Disposable { + private readonly _suggestWidgetAdaptor = this._register(new SuggestWidgetAdaptor( + this._editorObs.editor, + () => { + this._editorObs.forceUpdate(); + return this._suggestControllerPreselector(); + }, + (item) => this._editorObs.forceUpdate(_tx => { + /** @description InlineCompletionsController.handleSuggestAccepted */ + this._handleSuggestAccepted(item); + }) + )); + + public readonly selectedItem = observableFromEvent(this, cb => this._suggestWidgetAdaptor.onDidSelectedItemChange(() => { + this._editorObs.forceUpdate(_tx => cb(undefined)); + }), () => this._suggestWidgetAdaptor.selectedItem); + + constructor( + private readonly _editorObs: ObservableCodeEditor, + + private readonly _handleSuggestAccepted: (item: SuggestItemInfo) => void, + private readonly _suggestControllerPreselector: () => SingleTextEdit | undefined, + ) { + super(); + } + + public stopForceRenderingAbove(): void { + this._suggestWidgetAdaptor.stopForceRenderingAbove(); + } + + public forceRenderingAbove(): void { + this._suggestWidgetAdaptor.forceRenderingAbove(); + } +} diff --git a/Source/vs/workbench/api/browser/mainThreadDocumentsAndEditors.ts b/Source/vs/workbench/api/browser/mainThreadDocumentsAndEditors.ts index 41bf8a0c88cae..992229b91b760 100644 --- a/Source/vs/workbench/api/browser/mainThreadDocumentsAndEditors.ts +++ b/Source/vs/workbench/api/browser/mainThreadDocumentsAndEditors.ts @@ -3,71 +3,51 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { diffMaps, diffSets } from "../../../base/common/collections.js"; -import { Event } from "../../../base/common/event.js"; -import { - combinedDisposable, - DisposableMap, - DisposableStore, -} from "../../../base/common/lifecycle.js"; -import { - IActiveCodeEditor, - ICodeEditor, - isCodeEditor, - isDiffEditor, -} from "../../../editor/browser/editorBrowser.js"; -import { ICodeEditorService } from "../../../editor/browser/services/codeEditorService.js"; -import { IEditor } from "../../../editor/common/editorCommon.js"; -import { - ITextModel, - shouldSynchronizeModel, -} from "../../../editor/common/model.js"; -import { IModelService } from "../../../editor/common/services/model.js"; -import { ITextModelService } from "../../../editor/common/services/resolverService.js"; -import { IClipboardService } from "../../../platform/clipboard/common/clipboardService.js"; -import { IConfigurationService } from "../../../platform/configuration/common/configuration.js"; -import { IFileService } from "../../../platform/files/common/files.js"; -import { IUriIdentityService } from "../../../platform/uriIdentity/common/uriIdentity.js"; -import { AbstractTextEditor } from "../../browser/parts/editor/textEditor.js"; -import { IEditorPane } from "../../common/editor.js"; -import { ViewContainerLocation } from "../../common/views.js"; -import { IDirtyDiffModelService } from "../../contrib/scm/browser/diff.js"; -import { - EditorGroupColumn, - editorGroupToColumn, -} from "../../services/editor/common/editorGroupColumn.js"; -import { IEditorGroupsService } from "../../services/editor/common/editorGroupsService.js"; -import { IEditorService } from "../../services/editor/common/editorService.js"; -import { IWorkbenchEnvironmentService } from "../../services/environment/common/environmentService.js"; -import { - extHostCustomer, - IExtHostContext, -} from "../../services/extensions/common/extHostCustomers.js"; -import { IPaneCompositePartService } from "../../services/panecomposite/browser/panecomposite.js"; -import { IPathService } from "../../services/path/common/pathService.js"; -import { ITextFileService } from "../../services/textfile/common/textfiles.js"; -import { IWorkingCopyFileService } from "../../services/workingCopy/common/workingCopyFileService.js"; -import { - ExtHostContext, - ExtHostDocumentsAndEditorsShape, - IDocumentsAndEditorsDelta, - IModelAddedData, - ITextEditorAddData, - MainContext, -} from "../common/extHost.protocol.js"; -import { MainThreadDocuments } from "./mainThreadDocuments.js"; -import { MainThreadTextEditor } from "./mainThreadEditor.js"; -import { MainThreadTextEditors } from "./mainThreadEditors.js"; +import { Event } from '../../../base/common/event.js'; +import { combinedDisposable, DisposableStore, DisposableMap } from '../../../base/common/lifecycle.js'; +import { ICodeEditor, isCodeEditor, isDiffEditor, IActiveCodeEditor } from '../../../editor/browser/editorBrowser.js'; +import { ICodeEditorService } from '../../../editor/browser/services/codeEditorService.js'; +import { IEditor } from '../../../editor/common/editorCommon.js'; +import { ITextModel, shouldSynchronizeModel } from '../../../editor/common/model.js'; +import { IModelService } from '../../../editor/common/services/model.js'; +import { ITextModelService } from '../../../editor/common/services/resolverService.js'; +import { IFileService } from '../../../platform/files/common/files.js'; +import { extHostCustomer, IExtHostContext } from '../../services/extensions/common/extHostCustomers.js'; +import { MainThreadDocuments } from './mainThreadDocuments.js'; +import { MainThreadTextEditor } from './mainThreadEditor.js'; +import { MainThreadTextEditors } from './mainThreadEditors.js'; +import { ExtHostContext, ExtHostDocumentsAndEditorsShape, IDocumentsAndEditorsDelta, IModelAddedData, ITextEditorAddData, MainContext } from '../common/extHost.protocol.js'; +import { AbstractTextEditor } from '../../browser/parts/editor/textEditor.js'; +import { IEditorPane } from '../../common/editor.js'; +import { EditorGroupColumn, editorGroupToColumn } from '../../services/editor/common/editorGroupColumn.js'; +import { IEditorService } from '../../services/editor/common/editorService.js'; +import { IEditorGroupsService } from '../../services/editor/common/editorGroupsService.js'; +import { ITextFileService } from '../../services/textfile/common/textfiles.js'; +import { IWorkbenchEnvironmentService } from '../../services/environment/common/environmentService.js'; +import { IWorkingCopyFileService } from '../../services/workingCopy/common/workingCopyFileService.js'; +import { IUriIdentityService } from '../../../platform/uriIdentity/common/uriIdentity.js'; +import { IClipboardService } from '../../../platform/clipboard/common/clipboardService.js'; +import { IPathService } from '../../services/path/common/pathService.js'; +import { diffSets, diffMaps } from '../../../base/common/collections.js'; +import { IPaneCompositePartService } from '../../services/panecomposite/browser/panecomposite.js'; +import { ViewContainerLocation } from '../../common/views.js'; +import { IConfigurationService } from '../../../platform/configuration/common/configuration.js'; +import { IDirtyDiffModelService } from '../../contrib/scm/browser/dirtyDiffModel.js'; + class TextEditorSnapshot { + readonly id: string; - constructor(readonly editor: IActiveCodeEditor) { + constructor( + readonly editor: IActiveCodeEditor, + ) { this.id = `${editor.getId()},${editor.getModel().id}`; } } class DocumentAndEditorStateDelta { + readonly isEmpty: boolean; constructor( @@ -78,68 +58,43 @@ class DocumentAndEditorStateDelta { readonly oldActiveEditor: string | null | undefined, readonly newActiveEditor: string | null | undefined, ) { - this.isEmpty = - this.removedDocuments.length === 0 && - this.addedDocuments.length === 0 && - this.removedEditors.length === 0 && - this.addedEditors.length === 0 && - oldActiveEditor === newActiveEditor; + this.isEmpty = this.removedDocuments.length === 0 + && this.addedDocuments.length === 0 + && this.removedEditors.length === 0 + && this.addedEditors.length === 0 + && oldActiveEditor === newActiveEditor; } toString(): string { - let ret = "DocumentAndEditorStateDelta\n"; - - ret += `\tRemoved Documents: [${this.removedDocuments.map((d) => d.uri.toString(true)).join(", ")}]\n`; - - ret += `\tAdded Documents: [${this.addedDocuments.map((d) => d.uri.toString(true)).join(", ")}]\n`; - - ret += `\tRemoved Editors: [${this.removedEditors.map((e) => e.id).join(", ")}]\n`; - - ret += `\tAdded Editors: [${this.addedEditors.map((e) => e.id).join(", ")}]\n`; - + let ret = 'DocumentAndEditorStateDelta\n'; + ret += `\tRemoved Documents: [${this.removedDocuments.map(d => d.uri.toString(true)).join(', ')}]\n`; + ret += `\tAdded Documents: [${this.addedDocuments.map(d => d.uri.toString(true)).join(', ')}]\n`; + ret += `\tRemoved Editors: [${this.removedEditors.map(e => e.id).join(', ')}]\n`; + ret += `\tAdded Editors: [${this.addedEditors.map(e => e.id).join(', ')}]\n`; ret += `\tNew Active Editor: ${this.newActiveEditor}\n`; - return ret; } } class DocumentAndEditorState { - static compute( - before: DocumentAndEditorState | undefined, - after: DocumentAndEditorState, - ): DocumentAndEditorStateDelta { + + static compute(before: DocumentAndEditorState | undefined, after: DocumentAndEditorState): DocumentAndEditorStateDelta { if (!before) { return new DocumentAndEditorStateDelta( - [], - [...after.documents.values()], - [], - [...after.textEditors.values()], - undefined, - after.activeEditor, + [], [...after.documents.values()], + [], [...after.textEditors.values()], + undefined, after.activeEditor ); } - const documentDelta = diffSets(before.documents, after.documents); - const editorDelta = diffMaps(before.textEditors, after.textEditors); - - const oldActiveEditor = - before.activeEditor !== after.activeEditor - ? before.activeEditor - : undefined; - - const newActiveEditor = - before.activeEditor !== after.activeEditor - ? after.activeEditor - : undefined; + const oldActiveEditor = before.activeEditor !== after.activeEditor ? before.activeEditor : undefined; + const newActiveEditor = before.activeEditor !== after.activeEditor ? after.activeEditor : undefined; return new DocumentAndEditorStateDelta( - documentDelta.removed, - documentDelta.added, - editorDelta.removed, - editorDelta.added, - oldActiveEditor, - newActiveEditor, + documentDelta.removed, documentDelta.added, + editorDelta.removed, editorDelta.added, + oldActiveEditor, newActiveEditor ); } @@ -153,118 +108,56 @@ class DocumentAndEditorState { } const enum ActiveEditorOrder { - Editor, - Panel, + Editor, Panel } class MainThreadDocumentAndEditorStateComputer { - private readonly _toDispose = new DisposableStore(); + private readonly _toDispose = new DisposableStore(); private readonly _toDisposeOnEditorRemove = new DisposableMap(); - private _currentState?: DocumentAndEditorState; - private _activeEditorOrder: ActiveEditorOrder = ActiveEditorOrder.Editor; constructor( - private readonly _onDidChangeState: ( - delta: DocumentAndEditorStateDelta, - ) => void, + private readonly _onDidChangeState: (delta: DocumentAndEditorStateDelta) => void, @IModelService private readonly _modelService: IModelService, - @ICodeEditorService - private readonly _codeEditorService: ICodeEditorService, + @ICodeEditorService private readonly _codeEditorService: ICodeEditorService, @IEditorService private readonly _editorService: IEditorService, - @IPaneCompositePartService - private readonly _paneCompositeService: IPaneCompositePartService, + @IPaneCompositePartService private readonly _paneCompositeService: IPaneCompositePartService, ) { - this._modelService.onModelAdded( - this._updateStateOnModelAdd, - this, - this._toDispose, - ); - - this._modelService.onModelRemoved( - (_) => this._updateState(), - this, - this._toDispose, - ); + this._modelService.onModelAdded(this._updateStateOnModelAdd, this, this._toDispose); + this._modelService.onModelRemoved(_ => this._updateState(), this, this._toDispose); + this._editorService.onDidActiveEditorChange(_ => this._updateState(), this, this._toDispose); - this._editorService.onDidActiveEditorChange( - (_) => this._updateState(), - this, - this._toDispose, - ); + this._codeEditorService.onCodeEditorAdd(this._onDidAddEditor, this, this._toDispose); + this._codeEditorService.onCodeEditorRemove(this._onDidRemoveEditor, this, this._toDispose); + this._codeEditorService.listCodeEditors().forEach(this._onDidAddEditor, this); - this._codeEditorService.onCodeEditorAdd( - this._onDidAddEditor, - this, - this._toDispose, - ); - - this._codeEditorService.onCodeEditorRemove( - this._onDidRemoveEditor, - this, - this._toDispose, - ); - - this._codeEditorService - .listCodeEditors() - .forEach(this._onDidAddEditor, this); - - Event.filter( - this._paneCompositeService.onDidPaneCompositeOpen, - (event) => - event.viewContainerLocation === ViewContainerLocation.Panel, - )( - (_) => (this._activeEditorOrder = ActiveEditorOrder.Panel), - undefined, - this._toDispose, - ); - - Event.filter( - this._paneCompositeService.onDidPaneCompositeClose, - (event) => - event.viewContainerLocation === ViewContainerLocation.Panel, - )( - (_) => (this._activeEditorOrder = ActiveEditorOrder.Editor), - undefined, - this._toDispose, - ); - - this._editorService.onDidVisibleEditorsChange( - (_) => (this._activeEditorOrder = ActiveEditorOrder.Editor), - undefined, - this._toDispose, - ); + Event.filter(this._paneCompositeService.onDidPaneCompositeOpen, event => event.viewContainerLocation === ViewContainerLocation.Panel)(_ => this._activeEditorOrder = ActiveEditorOrder.Panel, undefined, this._toDispose); + Event.filter(this._paneCompositeService.onDidPaneCompositeClose, event => event.viewContainerLocation === ViewContainerLocation.Panel)(_ => this._activeEditorOrder = ActiveEditorOrder.Editor, undefined, this._toDispose); + this._editorService.onDidVisibleEditorsChange(_ => this._activeEditorOrder = ActiveEditorOrder.Editor, undefined, this._toDispose); this._updateState(); } dispose(): void { this._toDispose.dispose(); - this._toDisposeOnEditorRemove.dispose(); } private _onDidAddEditor(e: ICodeEditor): void { - this._toDisposeOnEditorRemove.set( - e.getId(), - combinedDisposable( - e.onDidChangeModel(() => this._updateState()), - e.onDidFocusEditorText(() => this._updateState()), - e.onDidFocusEditorWidget(() => this._updateState(e)), - ), - ); - + this._toDisposeOnEditorRemove.set(e.getId(), combinedDisposable( + e.onDidChangeModel(() => this._updateState()), + e.onDidFocusEditorText(() => this._updateState()), + e.onDidFocusEditorWidget(() => this._updateState(e)) + )); this._updateState(); } private _onDidRemoveEditor(e: ICodeEditor): void { const id = e.getId(); - if (this._toDisposeOnEditorRemove.has(id)) { this._toDisposeOnEditorRemove.deleteAndDispose(id); - this._updateState(); } } @@ -278,7 +171,6 @@ class MainThreadDocumentAndEditorStateComputer { if (!this._currentState) { // too early this._updateState(); - return; } @@ -286,25 +178,20 @@ class MainThreadDocumentAndEditorStateComputer { this._currentState = new DocumentAndEditorState( this._currentState.documents.add(model), this._currentState.textEditors, - this._currentState.activeEditor, + this._currentState.activeEditor ); - this._onDidChangeState( - new DocumentAndEditorStateDelta( - [], - [model], - [], - [], - undefined, - undefined, - ), - ); + this._onDidChangeState(new DocumentAndEditorStateDelta( + [], [model], + [], [], + undefined, undefined + )); } private _updateState(widgetFocusCandidate?: ICodeEditor): void { + // models: ignore too large models const models = new Set(); - for (const model of this._modelService.getModels()) { if (shouldSynchronizeModel(model)) { models.add(model); @@ -313,31 +200,20 @@ class MainThreadDocumentAndEditorStateComputer { // editor: only take those that have a not too large model const editors = new Map(); - let activeEditor: string | null = null; // Strict null work. This doesn't like being undefined! for (const editor of this._codeEditorService.listCodeEditors()) { if (editor.isSimpleWidget) { continue; } - const model = editor.getModel(); - - if ( - editor.hasModel() && - model && - shouldSynchronizeModel(model) && - !model.isDisposed() && // model disposed - Boolean(this._modelService.getModel(model.uri)) // model disposing, the flag didn't flip yet but the model service already removed it + if (editor.hasModel() && model && shouldSynchronizeModel(model) + && !model.isDisposed() // model disposed + && Boolean(this._modelService.getModel(model.uri)) // model disposing, the flag didn't flip yet but the model service already removed it ) { const apiEditor = new TextEditorSnapshot(editor); - editors.set(apiEditor.id, apiEditor); - - if ( - editor.hasTextFocus() || - (widgetFocusCandidate === editor && editor.hasWidgetFocus()) - ) { + if (editor.hasTextFocus() || (widgetFocusCandidate === editor && editor.hasWidgetFocus())) { // text focus has priority, widget focus is tricky because multiple // editors might claim widget focus at the same time. therefore we use a // candidate (which is the editor that has raised an widget focus event) @@ -352,15 +228,10 @@ class MainThreadDocumentAndEditorStateComputer { // one of editor we have just computed if (!activeEditor) { let candidate: IEditor | undefined; - if (this._activeEditorOrder === ActiveEditorOrder.Editor) { - candidate = - this._getActiveEditorFromEditorPart() || - this._getActiveEditorFromPanel(); + candidate = this._getActiveEditorFromEditorPart() || this._getActiveEditorFromPanel(); } else { - candidate = - this._getActiveEditorFromPanel() || - this._getActiveEditorFromEditorPart(); + candidate = this._getActiveEditorFromPanel() || this._getActiveEditorFromEditorPart(); } if (candidate) { @@ -373,32 +244,18 @@ class MainThreadDocumentAndEditorStateComputer { } // compute new state and compare against old - const newState = new DocumentAndEditorState( - models, - editors, - activeEditor, - ); - - const delta = DocumentAndEditorState.compute( - this._currentState, - newState, - ); - + const newState = new DocumentAndEditorState(models, editors, activeEditor); + const delta = DocumentAndEditorState.compute(this._currentState, newState); if (!delta.isEmpty) { this._currentState = newState; - this._onDidChangeState(delta); } } private _getActiveEditorFromPanel(): IEditor | undefined { - const panel = this._paneCompositeService.getActivePaneComposite( - ViewContainerLocation.Panel, - ); - + const panel = this._paneCompositeService.getActivePaneComposite(ViewContainerLocation.Panel); if (panel instanceof AbstractTextEditor) { const control = panel.getControl(); - if (isCodeEditor(control)) { return control; } @@ -408,28 +265,21 @@ class MainThreadDocumentAndEditorStateComputer { } private _getActiveEditorFromEditorPart(): IEditor | undefined { - let activeTextEditorControl = - this._editorService.activeTextEditorControl; - + let activeTextEditorControl = this._editorService.activeTextEditorControl; if (isDiffEditor(activeTextEditorControl)) { - activeTextEditorControl = - activeTextEditorControl.getModifiedEditor(); + activeTextEditorControl = activeTextEditorControl.getModifiedEditor(); } - return activeTextEditorControl; } } @extHostCustomer export class MainThreadDocumentsAndEditors { - private readonly _toDispose = new DisposableStore(); + private readonly _toDispose = new DisposableStore(); private readonly _proxy: ExtHostDocumentsAndEditorsShape; - private readonly _mainThreadDocuments: MainThreadDocuments; - private readonly _mainThreadEditors: MainThreadTextEditors; - private readonly _textEditors = new Map(); constructor( @@ -440,72 +290,26 @@ export class MainThreadDocumentsAndEditors { @ICodeEditorService codeEditorService: ICodeEditorService, @IFileService fileService: IFileService, @ITextModelService textModelResolverService: ITextModelService, - @IEditorGroupsService - private readonly _editorGroupService: IEditorGroupsService, - @IPaneCompositePartService - paneCompositeService: IPaneCompositePartService, - @IWorkbenchEnvironmentService - environmentService: IWorkbenchEnvironmentService, - @IWorkingCopyFileService - workingCopyFileService: IWorkingCopyFileService, + @IEditorGroupsService private readonly _editorGroupService: IEditorGroupsService, + @IPaneCompositePartService paneCompositeService: IPaneCompositePartService, + @IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService, + @IWorkingCopyFileService workingCopyFileService: IWorkingCopyFileService, @IUriIdentityService uriIdentityService: IUriIdentityService, - @IClipboardService - private readonly _clipboardService: IClipboardService, + @IClipboardService private readonly _clipboardService: IClipboardService, @IPathService pathService: IPathService, @IConfigurationService configurationService: IConfigurationService, - @IDirtyDiffModelService dirtyDiffModelService: IDirtyDiffModelService, + @IDirtyDiffModelService dirtyDiffModelService: IDirtyDiffModelService ) { - this._proxy = extHostContext.getProxy( - ExtHostContext.ExtHostDocumentsAndEditors, - ); + this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostDocumentsAndEditors); - this._mainThreadDocuments = this._toDispose.add( - new MainThreadDocuments( - extHostContext, - this._modelService, - this._textFileService, - fileService, - textModelResolverService, - environmentService, - uriIdentityService, - workingCopyFileService, - pathService, - ), - ); - - extHostContext.set( - MainContext.MainThreadDocuments, - this._mainThreadDocuments, - ); + this._mainThreadDocuments = this._toDispose.add(new MainThreadDocuments(extHostContext, this._modelService, this._textFileService, fileService, textModelResolverService, environmentService, uriIdentityService, workingCopyFileService, pathService)); + extHostContext.set(MainContext.MainThreadDocuments, this._mainThreadDocuments); - this._mainThreadEditors = this._toDispose.add( - new MainThreadTextEditors( - this, - extHostContext, - codeEditorService, - this._editorService, - this._editorGroupService, - configurationService, - dirtyDiffModelService, - uriIdentityService, - ), - ); - - extHostContext.set( - MainContext.MainThreadTextEditors, - this._mainThreadEditors, - ); + this._mainThreadEditors = this._toDispose.add(new MainThreadTextEditors(this, extHostContext, codeEditorService, this._editorService, this._editorGroupService, configurationService, dirtyDiffModelService, uriIdentityService)); + extHostContext.set(MainContext.MainThreadTextEditors, this._mainThreadEditors); // It is expected that the ctor of the state computer calls our `_onDelta`. - this._toDispose.add( - new MainThreadDocumentAndEditorStateComputer( - (delta) => this._onDelta(delta), - _modelService, - codeEditorService, - this._editorService, - paneCompositeService, - ), - ); + this._toDispose.add(new MainThreadDocumentAndEditorStateComputer(delta => this._onDelta(delta), _modelService, codeEditorService, this._editorService, paneCompositeService)); } dispose(): void { @@ -513,79 +317,53 @@ export class MainThreadDocumentsAndEditors { } private _onDelta(delta: DocumentAndEditorStateDelta): void { - const removedEditors: string[] = []; + const removedEditors: string[] = []; const addedEditors: MainThreadTextEditor[] = []; // removed models - const removedDocuments = delta.removedDocuments.map((m) => m.uri); + const removedDocuments = delta.removedDocuments.map(m => m.uri); // added editors for (const apiEditor of delta.addedEditors) { - const mainThreadEditor = new MainThreadTextEditor( - apiEditor.id, - apiEditor.editor.getModel(), - apiEditor.editor, - { onGainedFocus() {}, onLostFocus() {} }, - this._mainThreadDocuments, - this._modelService, - this._clipboardService, - ); + const mainThreadEditor = new MainThreadTextEditor(apiEditor.id, apiEditor.editor.getModel(), + apiEditor.editor, { onGainedFocus() { }, onLostFocus() { } }, this._mainThreadDocuments, this._modelService, this._clipboardService); this._textEditors.set(apiEditor.id, mainThreadEditor); - addedEditors.push(mainThreadEditor); } // removed editors for (const { id } of delta.removedEditors) { const mainThreadEditor = this._textEditors.get(id); - if (mainThreadEditor) { mainThreadEditor.dispose(); - this._textEditors.delete(id); - removedEditors.push(id); } } const extHostDelta: IDocumentsAndEditorsDelta = Object.create(null); - let empty = true; - if (delta.newActiveEditor !== undefined) { empty = false; - extHostDelta.newActiveEditor = delta.newActiveEditor; } - if (removedDocuments.length > 0) { empty = false; - extHostDelta.removedDocuments = removedDocuments; } - if (removedEditors.length > 0) { empty = false; - extHostDelta.removedEditors = removedEditors; } - if (delta.addedDocuments.length > 0) { empty = false; - - extHostDelta.addedDocuments = delta.addedDocuments.map((m) => - this._toModelAddData(m), - ); + extHostDelta.addedDocuments = delta.addedDocuments.map(m => this._toModelAddData(m)); } - if (delta.addedEditors.length > 0) { empty = false; - - extHostDelta.addedEditors = addedEditors.map((e) => - this._toTextEditorAddData(e), - ); + extHostDelta.addedEditors = addedEditors.map(e => this._toTextEditorAddData(e)); } if (!empty) { @@ -593,25 +371,11 @@ export class MainThreadDocumentsAndEditors { this._proxy.$acceptDocumentsAndEditorsDelta(extHostDelta); // second update dependent document/editor states - removedDocuments.forEach( - this._mainThreadDocuments.handleModelRemoved, - this._mainThreadDocuments, - ); - - delta.addedDocuments.forEach( - this._mainThreadDocuments.handleModelAdded, - this._mainThreadDocuments, - ); - - removedEditors.forEach( - this._mainThreadEditors.handleTextEditorRemoved, - this._mainThreadEditors, - ); + removedDocuments.forEach(this._mainThreadDocuments.handleModelRemoved, this._mainThreadDocuments); + delta.addedDocuments.forEach(this._mainThreadDocuments.handleModelAdded, this._mainThreadDocuments); - addedEditors.forEach( - this._mainThreadEditors.handleTextEditorAdded, - this._mainThreadEditors, - ); + removedEditors.forEach(this._mainThreadEditors.handleTextEditorRemoved, this._mainThreadEditors); + addedEditors.forEach(this._mainThreadEditors.handleTextEditorAdded, this._mainThreadEditors); } } @@ -622,37 +386,28 @@ export class MainThreadDocumentsAndEditors { lines: model.getLinesContent(), EOL: model.getEOL(), languageId: model.getLanguageId(), - isDirty: this._textFileService.isDirty(model.uri), + isDirty: this._textFileService.isDirty(model.uri) }; } - private _toTextEditorAddData( - textEditor: MainThreadTextEditor, - ): ITextEditorAddData { + private _toTextEditorAddData(textEditor: MainThreadTextEditor): ITextEditorAddData { const props = textEditor.getProperties(); - return { id: textEditor.getId(), documentUri: textEditor.getModel().uri, options: props.options, selections: props.selections, visibleRanges: props.visibleRanges, - editorPosition: this._findEditorPosition(textEditor), + editorPosition: this._findEditorPosition(textEditor) }; } - private _findEditorPosition( - editor: MainThreadTextEditor, - ): EditorGroupColumn | undefined { + private _findEditorPosition(editor: MainThreadTextEditor): EditorGroupColumn | undefined { for (const editorPane of this._editorService.visibleEditorPanes) { if (editor.matches(editorPane)) { - return editorGroupToColumn( - this._editorGroupService, - editorPane.group, - ); + return editorGroupToColumn(this._editorGroupService, editorPane.group); } } - return undefined; } @@ -662,7 +417,6 @@ export class MainThreadDocumentsAndEditors { return id; } } - return undefined; } @@ -672,7 +426,6 @@ export class MainThreadDocumentsAndEditors { return id; } } - return undefined; } diff --git a/Source/vs/workbench/browser/parts/titlebar/media/titlebarpart.css b/Source/vs/workbench/browser/parts/titlebar/media/titlebarpart.css index 0fa19c1c7d37d..0264e5460d4d3 100644 --- a/Source/vs/workbench/browser/parts/titlebar/media/titlebarpart.css +++ b/Source/vs/workbench/browser/parts/titlebar/media/titlebarpart.css @@ -30,7 +30,7 @@ /* Account for zooming */ .monaco-workbench .part.titlebar > .titlebar-container.counter-zoom { - zoom: calc(1 / var(--zoom-factor)); + zoom: calc(1.0 / var(--zoom-factor)); } /* Platform specific root element */ @@ -96,12 +96,10 @@ justify-content: flex-end; } + + /* Window title text */ -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-center - > .window-title { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title { flex: 0 1 auto; font-size: 12px; overflow: hidden; @@ -111,132 +109,46 @@ margin-right: auto; } -.monaco-workbench.web - .part.titlebar - > .titlebar-container - > .titlebar-center - > .window-title, -.monaco-workbench.windows - .part.titlebar - > .titlebar-container - > .titlebar-center - > .window-title, -.monaco-workbench.linux - .part.titlebar - > .titlebar-container - > .titlebar-center - > .window-title { +.monaco-workbench.web .part.titlebar > .titlebar-container > .titlebar-center > .window-title, +.monaco-workbench.windows .part.titlebar > .titlebar-container > .titlebar-center > .window-title, +.monaco-workbench.linux .part.titlebar > .titlebar-container > .titlebar-center > .window-title { cursor: default; } -.monaco-workbench.linux - .part.titlebar - > .titlebar-container - > .titlebar-center - > .window-title { +.monaco-workbench.linux .part.titlebar > .titlebar-container > .titlebar-center > .window-title { font-size: inherit; /* see #55435 */ } -.monaco-workbench - .part.titlebar - > .titlebar-container - .monaco-toolbar - .actions-container { +.monaco-workbench .part.titlebar > .titlebar-container .monaco-toolbar .actions-container { gap: 4px; } /* Window Title Menu */ -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-center - > .window-title - > .command-center { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center { z-index: 2500; -webkit-app-region: no-drag; } -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-center - > .window-title - > .command-center.hide { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center.hide { visibility: hidden; } -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-center - > .window-title - > .command-center - > .monaco-toolbar - > .monaco-action-bar - > .actions-container - > .action-item - > .action-label, -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-center - > .window-title - > .command-center - > .monaco-toolbar - > .monaco-action-bar - > .actions-container - > .action-item.monaco-dropdown-with-primary - .action-label { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center > .monaco-toolbar > .monaco-action-bar > .actions-container > .action-item > .action-label, +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center > .monaco-toolbar > .monaco-action-bar > .actions-container > .action-item.monaco-dropdown-with-primary .action-label { color: var(--vscode-titleBar-activeForeground); } -.monaco-workbench - .part.titlebar.inactive - > .titlebar-container - > .titlebar-center - > .window-title - > .command-center - > .monaco-toolbar - > .monaco-action-bar - > .actions-container - > .action-item - > .action-label, -.monaco-workbench - .part.titlebar.inactive - > .titlebar-container - > .titlebar-center - > .window-title - > .command-center - > .monaco-toolbar - > .monaco-action-bar - > .actions-container - > .action-item.monaco-dropdown-with-primary - .action-label { +.monaco-workbench .part.titlebar.inactive > .titlebar-container > .titlebar-center > .window-title > .command-center > .monaco-toolbar > .monaco-action-bar > .actions-container > .action-item > .action-label, +.monaco-workbench .part.titlebar.inactive > .titlebar-container > .titlebar-center > .window-title > .command-center > .monaco-toolbar > .monaco-action-bar > .actions-container > .action-item.monaco-dropdown-with-primary .action-label { color: var(--vscode-titleBar-inactiveForeground); } -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-center - > .window-title - > .command-center - > .monaco-toolbar - > .monaco-action-bar - > .actions-container - > .action-item - > .action-label { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center > .monaco-toolbar > .monaco-action-bar > .actions-container > .action-item > .action-label { color: inherit; } -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-center - > .window-title - > .command-center - .action-item.command-center-center { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center .action-item.command-center-center { display: flex; align-items: stretch; color: var(--vscode-commandCenter-foreground); @@ -253,14 +165,7 @@ max-width: 600px; } -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-center - > .window-title - > .command-center - .action-item.command-center-center - .action-item.command-center-quick-pick { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center .action-item.command-center-center .action-item.command-center-quick-pick { display: flex; justify-content: start; overflow: hidden; @@ -268,117 +173,48 @@ max-width: 600px; } -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-center - > .window-title - > .command-center - .action-item.command-center-center - .action-item.command-center-quick-pick - .search-icon { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center .action-item.command-center-center .action-item.command-center-quick-pick .search-icon { font-size: 14px; - opacity: 0.8; + opacity: .8; margin: auto 3px; color: var(--vscode-commandCenter-foreground); } -.monaco-workbench - .part.titlebar.inactive - > .titlebar-container - > .titlebar-center - > .window-title - > .command-center - .action-item.command-center-center - .action-item.command-center-quick-pick - .search-icon { +.monaco-workbench .part.titlebar.inactive > .titlebar-container > .titlebar-center > .window-title > .command-center .action-item.command-center-center .action-item.command-center-quick-pick .search-icon { color: var(--vscode-titleBar-inactiveForeground); } -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-center - > .window-title - > .command-center - .action-item.command-center-center - .action-item.command-center-quick-pick - .search-label { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center .action-item.command-center-center .action-item.command-center-quick-pick .search-label { overflow: hidden; text-overflow: ellipsis; } -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-center - > .window-title - > .command-center - .action-item.command-center-center.multiple { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center .action-item.command-center-center.multiple { justify-content: flex-start; padding: 0 12px; } -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-center - > .window-title - > .command-center - .action-item.command-center-center.multiple.active - .action-label { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center .action-item.command-center-center.multiple.active .action-label { background-color: inherit; } -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-center - > .window-title - > .command-center - .action-item.command-center-center:only-child { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center .action-item.command-center-center:only-child { margin-left: 0; /* no margin if there is only the command center, without nav buttons */ } -.monaco-workbench - .part.titlebar.inactive - > .titlebar-container - > .titlebar-center - > .window-title - > .command-center - .action-item.command-center-center { +.monaco-workbench .part.titlebar.inactive > .titlebar-container > .titlebar-center > .window-title > .command-center .action-item.command-center-center { color: var(--vscode-titleBar-inactiveForeground); border-color: var(--vscode-commandCenter-inactiveBorder) !important; } -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-center - > .window-title - > .command-center - .codicon-copilot { - font-size: 14px; -} - -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-center - > .window-title - > .command-center - .action-item.command-center-center:hover { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center .action-item.command-center-center:HOVER { color: var(--vscode-commandCenter-activeForeground); background-color: var(--vscode-commandCenter-activeBackground); border-color: var(--vscode-commandCenter-activeBorder); } /* Menubar */ -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-left - > .menubar { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-left > .menubar { /* move menubar above drag region as negative z-index on drag region cause greyscale AA */ z-index: 2500; min-width: 36px; @@ -386,28 +222,13 @@ order: 2; } -.monaco-workbench.web - .part.titlebar - > .titlebar-container - > .titlebar-left - > .menubar { +.monaco-workbench.web .part.titlebar > .titlebar-container > .titlebar-left > .menubar { margin-left: 4px; } -.monaco-workbench - .part.titlebar - > .titlebar-container.counter-zoom - .menubar - .menubar-menu-button - > .menubar-menu-items-holder.monaco-menu-container, -.monaco-workbench - .part.titlebar - > .titlebar-container.counter-zoom - .monaco-toolbar - .dropdown-action-container { - zoom: var( - --zoom-factor - ); /* helps to position the menu properly when counter zooming */ +.monaco-workbench .part.titlebar > .titlebar-container.counter-zoom .menubar .menubar-menu-button > .menubar-menu-items-holder.monaco-menu-container, +.monaco-workbench .part.titlebar > .titlebar-container.counter-zoom .monaco-toolbar .dropdown-action-container { + zoom: var(--zoom-factor); /* helps to position the menu properly when counter zooming */ } /* Resizer */ @@ -420,23 +241,13 @@ height: 4px; } -.monaco-workbench.windows.fullscreen - .part.titlebar - > .titlebar-container - > .resizer, -.monaco-workbench.linux.fullscreen - .part.titlebar - > .titlebar-container - > .resizer { +.monaco-workbench.windows.fullscreen .part.titlebar > .titlebar-container > .resizer, +.monaco-workbench.linux.fullscreen .part.titlebar > .titlebar-container > .resizer { display: none; } /* App Icon */ -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-left - > .window-appicon { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-left > .window-appicon { width: 35px; height: 100%; position: relative; @@ -445,38 +256,22 @@ order: 1; } -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-left - > .window-appicon:not(.codicon) { - background-image: url("../../../media/code-icon.svg"); +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-left > .window-appicon:not(.codicon) { + background-image: url('../../../media/code-icon.svg'); background-repeat: no-repeat; background-position: center center; background-size: 16px; } -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-left - > .window-appicon.codicon { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-left > .window-appicon.codicon { line-height: 30px; } -.monaco-workbench.fullscreen - .part.titlebar - > .titlebar-container - > .titlebar-left - > .window-appicon { +.monaco-workbench.fullscreen .part.titlebar > .titlebar-container > .titlebar-left > .window-appicon { display: none; } -.monaco-workbench - .part.titlebar - > .titlebar-container - .window-appicon - > .home-bar-icon-badge { +.monaco-workbench .part.titlebar > .titlebar-container .window-appicon > .home-bar-icon-badge { position: absolute; right: 9px; bottom: 6px; @@ -484,7 +279,7 @@ height: 8px; z-index: 1; /* on top of home indicator */ - background-image: url("../../../media/code-icon.svg"); + background-image: url('../../../media/code-icon.svg'); background-repeat: no-repeat; background-position: center center; background-size: 8px; @@ -511,13 +306,8 @@ } /* Window Controls Container Web: Apply WCO environment variables (https://developer.mozilla.org/en-US/docs/Web/CSS/env#titlebar-area-x) */ -.monaco-workbench.web - .part.titlebar - .titlebar-right - .window-controls-container { - width: calc( - 100vw - env(titlebar-area-width, 100vw) - env(titlebar-area-x, 0px) - ); +.monaco-workbench.web .part.titlebar .titlebar-right .window-controls-container { + width: calc(100vw - env(titlebar-area-width, 100vw) - env(titlebar-area-x, 0px)); height: env(titlebar-area-height, 35px); } @@ -526,56 +316,32 @@ height: env(titlebar-area-height, 35px); } -.monaco-workbench.web.mac - .part.titlebar - .titlebar-left - .window-controls-container { +.monaco-workbench.web.mac .part.titlebar .titlebar-left .window-controls-container { order: 0; } -.monaco-workbench.web.mac - .part.titlebar - .titlebar-right - .window-controls-container { +.monaco-workbench.web.mac .part.titlebar .titlebar-right .window-controls-container { order: 1; } /* Window Controls Container Desktop: apply zoom friendly size */ -.monaco-workbench:not(.web):not(.mac) - .part.titlebar - .window-controls-container { +.monaco-workbench:not(.web):not(.mac) .part.titlebar .window-controls-container { width: calc(138px / var(--zoom-factor, 1)); } -.monaco-workbench:not(.web):not(.mac) - .part.titlebar - .titlebar-container.counter-zoom - .window-controls-container { +.monaco-workbench:not(.web):not(.mac) .part.titlebar .titlebar-container.counter-zoom .window-controls-container { width: 138px; } -.monaco-workbench.linux:not(.web) - .part.titlebar - .window-controls-container.wco-enabled { - width: calc( - 100vw - env(titlebar-area-width, 100vw) - env(titlebar-area-x, 0px) - ); +.monaco-workbench.linux:not(.web) .part.titlebar .window-controls-container.wco-enabled { + width: calc(100vw - env(titlebar-area-width, 100vw) - env(titlebar-area-x, 0px)); } -.monaco-workbench.linux:not(.web) - .part.titlebar - .titlebar-container.counter-zoom - .window-controls-container.wco-enabled { - width: calc( - 100vw - env(titlebar-area-width, 100vw) - env(titlebar-area-x, 0px) - ); +.monaco-workbench.linux:not(.web) .part.titlebar .titlebar-container.counter-zoom .window-controls-container.wco-enabled { + width: calc(100vw - env(titlebar-area-width, 100vw) - env(titlebar-area-x, 0px)); } -.monaco-workbench:not(.web):not(.mac) - .part.titlebar - .titlebar-container:not(.counter-zoom) - .window-controls-container - * { +.monaco-workbench:not(.web):not(.mac) .part.titlebar .titlebar-container:not(.counter-zoom) .window-controls-container * { zoom: calc(1 / var(--zoom-factor, 1)); } @@ -594,55 +360,33 @@ color: var(--vscode-titleBar-activeForeground); } -.monaco-workbench - .part.titlebar.inactive - .window-controls-container - > .window-icon { +.monaco-workbench .part.titlebar.inactive .window-controls-container > .window-icon { color: var(--vscode-titleBar-inactiveForeground); } -.monaco-workbench - .part.titlebar - .window-controls-container - > .window-icon::before { +.monaco-workbench .part.titlebar .window-controls-container > .window-icon::before { height: 16px; line-height: 16px; } -.monaco-workbench - .part.titlebar - .window-controls-container - > .window-icon:hover { +.monaco-workbench .part.titlebar .window-controls-container > .window-icon:hover { background-color: rgba(255, 255, 255, 0.1); } -.monaco-workbench - .part.titlebar.light - .window-controls-container - > .window-icon:hover { +.monaco-workbench .part.titlebar.light .window-controls-container > .window-icon:hover { background-color: rgba(0, 0, 0, 0.1); } -.monaco-workbench - .part.titlebar - .window-controls-container - > .window-icon.window-close:hover { +.monaco-workbench .part.titlebar .window-controls-container > .window-icon.window-close:hover { background-color: rgba(232, 17, 35, 0.9); } -.monaco-workbench - .part.titlebar - .window-controls-container - .window-icon.window-close:hover { +.monaco-workbench .part.titlebar .window-controls-container .window-icon.window-close:hover { color: white; } /* Action Tool Bar Controls */ -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-right - > .action-toolbar-container { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container { display: none; padding-right: 4px; flex-grow: 0; @@ -654,81 +398,38 @@ height: 100%; } -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-right - > .action-toolbar-container { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container { margin-left: auto; } -.monaco-workbench.mac:not(.web) - .part.titlebar - > .titlebar-container - > .titlebar-right - > .action-toolbar-container { +.monaco-workbench.mac:not(.web) .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container { right: 8px; } -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-right - > .action-toolbar-container:not(.has-no-actions) { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container:not(.has-no-actions) { display: flex; justify-content: center; } -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-right - > .action-toolbar-container - .codicon { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container .codicon { color: inherit; } -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-right - > .action-toolbar-container - .monaco-action-bar - .action-item { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container .monaco-action-bar .action-item { display: flex; } -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-right - > .action-toolbar-container - .monaco-action-bar - .badge { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container .monaco-action-bar .badge { margin-left: 8px; display: flex; align-items: center; } -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-right - > .action-toolbar-container - .monaco-action-bar - .action-item.icon - .badge { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container .monaco-action-bar .action-item.icon .badge { margin-left: 0px; } -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-right - > .action-toolbar-container - .monaco-action-bar - .badge - .badge-content { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container .monaco-action-bar .badge .badge-content { padding: 3px 5px; border-radius: 11px; font-size: 9px; @@ -742,14 +443,7 @@ position: relative; } -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-right - > .action-toolbar-container - .monaco-action-bar - .action-item.icon - .badge.compact { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container .monaco-action-bar .action-item.icon .badge.compact { position: absolute; top: 0; bottom: 0; @@ -761,29 +455,13 @@ z-index: 2; } -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-right - > .action-toolbar-container - .monaco-action-bar - .action-item.icon - .badge.compact - .badge-content::before { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container .monaco-action-bar .action-item.icon .badge.compact .badge-content::before { mask-size: 12px; -webkit-mask-size: 12px; top: 2px; } -.monaco-workbench - .part.titlebar - > .titlebar-container - > .titlebar-right - > .action-toolbar-container - .monaco-action-bar - .action-item.icon - .badge.compact - .badge-content { +.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container .monaco-action-bar .action-item.icon .badge.compact .badge-content { position: absolute; top: 10px; right: 0px; diff --git a/Source/vs/workbench/contrib/chat/browser/chatContentParts/chatTaskContentPart.ts b/Source/vs/workbench/contrib/chat/browser/chatContentParts/chatTaskContentPart.ts index f2b31bf47d404..8510cb1350790 100644 --- a/Source/vs/workbench/contrib/chat/browser/chatContentParts/chatTaskContentPart.ts +++ b/Source/vs/workbench/contrib/chat/browser/chatContentParts/chatTaskContentPart.ts @@ -3,32 +3,19 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as dom from "../../../../../base/browser/dom.js"; -import { Event } from "../../../../../base/common/event.js"; -import { - Disposable, - IDisposable, -} from "../../../../../base/common/lifecycle.js"; -import { MarkdownRenderer } from "../../../../../editor/browser/widget/markdownRenderer/browser/markdownRenderer.js"; -import { IInstantiationService } from "../../../../../platform/instantiation/common/instantiation.js"; -import { IChatProgressRenderableResponseContent } from "../../common/chatModel.js"; -import { IChatTask } from "../../common/chatService.js"; -import { - IChatContentPart, - IChatContentPartRenderContext, -} from "./chatContentParts.js"; -import { ChatProgressContentPart } from "./chatProgressContentPart.js"; -import { - ChatCollapsibleListContentPart, - CollapsibleListPool, -} from "./chatReferencesContentPart.js"; - -export class ChatTaskContentPart - extends Disposable - implements IChatContentPart -{ +import * as dom from '../../../../../base/browser/dom.js'; +import { Event } from '../../../../../base/common/event.js'; +import { Disposable, IDisposable } from '../../../../../base/common/lifecycle.js'; +import { MarkdownRenderer } from '../../../../../editor/browser/widget/markdownRenderer/browser/markdownRenderer.js'; +import { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js'; +import { IChatProgressRenderableResponseContent } from '../../common/chatModel.js'; +import { IChatTask } from '../../common/chatService.js'; +import { IChatContentPart, IChatContentPartRenderContext } from './chatContentParts.js'; +import { ChatProgressContentPart } from './chatProgressContentPart.js'; +import { ChatCollapsibleListContentPart, CollapsibleListPool } from './chatReferencesContentPart.js'; + +export class ChatTaskContentPart extends Disposable implements IChatContentPart { public readonly domNode: HTMLElement; - public readonly onDidChangeHeight: Event; constructor( @@ -41,48 +28,24 @@ export class ChatTaskContentPart super(); if (task.progress.length) { - const refsPart = this._register( - instantiationService.createInstance( - ChatCollapsibleListContentPart, - task.progress, - task.content.value, - context, - contentReferencesListPool, - ), - ); - - this.domNode = dom.$(".chat-progress-task"); - + const refsPart = this._register(instantiationService.createInstance(ChatCollapsibleListContentPart, task.progress, task.content.value, context, contentReferencesListPool)); + this.domNode = dom.$('.chat-progress-task'); this.domNode.appendChild(refsPart.domNode); - this.onDidChangeHeight = refsPart.onDidChangeHeight; } else { // #217645 const isSettled = task.isSettled?.() ?? true; - - const progressPart = this._register( - instantiationService.createInstance( - ChatProgressContentPart, - task, - renderer, - context, - !isSettled, - true, - ), - ); - + const showSpinner = !isSettled && !context.element.isComplete; + const progressPart = this._register(instantiationService.createInstance(ChatProgressContentPart, task, renderer, context, showSpinner, true)); this.domNode = progressPart.domNode; - this.onDidChangeHeight = Event.None; } } hasSameContent(other: IChatProgressRenderableResponseContent): boolean { - return ( - other.kind === "progressTask" && - other.progress.length === this.task.progress.length && - other.isSettled() === this.task.isSettled() - ); + return other.kind === 'progressTask' + && other.progress.length === this.task.progress.length + && other.isSettled() === this.task.isSettled(); } addDisposable(disposable: IDisposable): void { diff --git a/Source/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions.ts b/Source/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions.ts index dc08fa92e5f50..20d034033706c 100644 --- a/Source/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions.ts +++ b/Source/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions.ts @@ -3,65 +3,52 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IDisposable } from "../../../../base/common/lifecycle.js"; -import { EditorExtensionsRegistry } from "../../../../editor/browser/editorExtensions.js"; -import { ICodeEditorWidgetOptions } from "../../../../editor/browser/widget/codeEditor/codeEditorWidget.js"; -import { IEditorOptions } from "../../../../editor/common/config/editorOptions.js"; -import { ContextMenuController } from "../../../../editor/contrib/contextmenu/browser/contextmenu.js"; -import { SnippetController2 } from "../../../../editor/contrib/snippet/browser/snippetController2.js"; -import { SuggestController } from "../../../../editor/contrib/suggest/browser/suggestController.js"; -import { IConfigurationService } from "../../../../platform/configuration/common/configuration.js"; -import { - editorSelectionBackground, - inputBackground, - inputForeground, - selectionBackground, -} from "../../../../platform/theme/common/colorRegistry.js"; -import { registerThemingParticipant } from "../../../../platform/theme/common/themeService.js"; -import { TabCompletionController } from "../../snippets/browser/tabCompletion.js"; -import { MenuPreventer } from "./menuPreventer.js"; -import { SelectionClipboardContributionID } from "./selectionClipboard.js"; +import { IEditorOptions } from '../../../../editor/common/config/editorOptions.js'; +import { ICodeEditorWidgetOptions } from '../../../../editor/browser/widget/codeEditor/codeEditorWidget.js'; +import { ContextMenuController } from '../../../../editor/contrib/contextmenu/browser/contextmenu.js'; +import { SnippetController2 } from '../../../../editor/contrib/snippet/browser/snippetController2.js'; +import { SuggestController } from '../../../../editor/contrib/suggest/browser/suggestController.js'; +import { MenuPreventer } from './menuPreventer.js'; +import { SelectionClipboardContributionID } from './selectionClipboard.js'; +import { TabCompletionController } from '../../snippets/browser/tabCompletion.js'; +import { EditorExtensionsRegistry } from '../../../../editor/browser/editorExtensions.js'; +import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js'; +import { registerThemingParticipant } from '../../../../platform/theme/common/themeService.js'; +import { IDisposable } from '../../../../base/common/lifecycle.js'; +import { selectionBackground, inputBackground, inputForeground, editorSelectionBackground } from '../../../../platform/theme/common/colorRegistry.js'; -export function getSimpleEditorOptions( - configurationService: IConfigurationService, -): IEditorOptions { +export function getSimpleEditorOptions(configurationService: IConfigurationService): IEditorOptions { return { - wordWrap: "on", + wordWrap: 'on', overviewRulerLanes: 0, glyphMargin: false, - lineNumbers: "off", + lineNumbers: 'off', folding: false, selectOnLineNumbers: false, hideCursorInOverviewRuler: true, selectionHighlight: false, scrollbar: { - horizontal: "hidden", - alwaysConsumeMouseWheel: false, + horizontal: 'hidden', + alwaysConsumeMouseWheel: false }, lineDecorationsWidth: 0, overviewRulerBorder: false, scrollBeyondLastLine: false, - renderLineHighlight: "none", + renderLineHighlight: 'none', fixedOverflowWidgets: true, - acceptSuggestionOnEnter: "smart", + acceptSuggestionOnEnter: 'smart', dragAndDrop: false, revealHorizontalRightPadding: 5, minimap: { - enabled: false, + enabled: false }, guides: { - indentation: false, + indentation: false }, - accessibilitySupport: configurationService.getValue< - "auto" | "off" | "on" - >("editor.accessibilitySupport"), - cursorBlinking: configurationService.getValue< - "blink" | "smooth" | "phase" | "expand" | "solid" - >("editor.cursorBlinking"), - experimentalEditContextEnabled: configurationService.getValue( - "editor.experimentalEditContextEnabled", - ), - defaultColorDecorators: false, + accessibilitySupport: configurationService.getValue<'auto' | 'off' | 'on'>('editor.accessibilitySupport'), + cursorBlinking: configurationService.getValue<'blink' | 'smooth' | 'phase' | 'expand' | 'solid'>('editor.cursorBlinking'), + experimentalEditContextEnabled: configurationService.getValue('editor.experimentalEditContextEnabled'), + defaultColorDecorators: 'never', }; } @@ -75,7 +62,7 @@ export function getSimpleCodeEditorWidgetOptions(): ICodeEditorWidgetOptions { SuggestController.ID, SnippetController2.ID, TabCompletionController.ID, - ]), + ]) }; } @@ -83,9 +70,7 @@ export function getSimpleCodeEditorWidgetOptions(): ICodeEditorWidgetOptions { * Should be called to set the styling on editors that are appearing as just input boxes * @param editorContainerSelector An element selector that will match the container of the editor */ -export function setupSimpleEditorSelectionStyling( - editorContainerSelector: string, -): IDisposable { +export function setupSimpleEditorSelectionStyling(editorContainerSelector: string): IDisposable { // Override styles in selections.ts return registerThemingParticipant((theme, collector) => { const selectionBackgroundColor = theme.getColor(selectionBackground); @@ -93,34 +78,22 @@ export function setupSimpleEditorSelectionStyling( if (selectionBackgroundColor) { // Override inactive selection bg const inputBackgroundColor = theme.getColor(inputBackground); - if (inputBackgroundColor) { - collector.addRule( - `${editorContainerSelector} .monaco-editor-background { background-color: ${inputBackgroundColor}; } `, - ); - - collector.addRule( - `${editorContainerSelector} .monaco-editor .selected-text { background-color: ${inputBackgroundColor.transparent(0.4)}; }`, - ); + collector.addRule(`${editorContainerSelector} .monaco-editor-background { background-color: ${inputBackgroundColor}; } `); + collector.addRule(`${editorContainerSelector} .monaco-editor .selected-text { background-color: ${inputBackgroundColor.transparent(0.4)}; }`); } // Override selected fg const inputForegroundColor = theme.getColor(inputForeground); - if (inputForegroundColor) { - collector.addRule( - `${editorContainerSelector} .monaco-editor .view-line span.inline-selected-text { color: ${inputForegroundColor}; }`, - ); + collector.addRule(`${editorContainerSelector} .monaco-editor .view-line span.inline-selected-text { color: ${inputForegroundColor}; }`); } - collector.addRule( - `${editorContainerSelector} .monaco-editor .focused .selected-text { background-color: ${selectionBackgroundColor}; }`, - ); + collector.addRule(`${editorContainerSelector} .monaco-editor .focused .selected-text { background-color: ${selectionBackgroundColor}; }`); } else { // Use editor selection color if theme has not set a selection background color - collector.addRule( - `${editorContainerSelector} .monaco-editor .focused .selected-text { background-color: ${theme.getColor(editorSelectionBackground)}; }`, - ); + collector.addRule(`${editorContainerSelector} .monaco-editor .focused .selected-text { background-color: ${theme.getColor(editorSelectionBackground)}; }`); } }); + } diff --git a/Source/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.ts b/Source/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.ts index 107f0b1f661de..c8706e4aeb5a8 100644 --- a/Source/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.ts +++ b/Source/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.ts @@ -3,119 +3,55 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Emitter, Event } from "../../../../../../base/common/event.js"; -import { KeyCode, KeyMod } from "../../../../../../base/common/keyCodes.js"; -import { - Disposable, - DisposableStore, -} from "../../../../../../base/common/lifecycle.js"; -import { ResourceMap } from "../../../../../../base/common/map.js"; -import { URI } from "../../../../../../base/common/uri.js"; -import { EditorConfiguration } from "../../../../../../editor/browser/config/editorConfiguration.js"; -import { CoreEditingCommands } from "../../../../../../editor/browser/coreCommands.js"; -import { - ICodeEditor, - PastePayload, -} from "../../../../../../editor/browser/editorBrowser.js"; -import { - RedoCommand, - UndoCommand, -} from "../../../../../../editor/browser/editorExtensions.js"; -import { CodeEditorWidget } from "../../../../../../editor/browser/widget/codeEditor/codeEditorWidget.js"; -import { IEditorConfiguration } from "../../../../../../editor/common/config/editorConfiguration.js"; -import { - cursorBlinkingStyleFromString, - cursorStyleFromString, - TextEditorCursorBlinkingStyle, - TextEditorCursorStyle, -} from "../../../../../../editor/common/config/editorOptions.js"; -import { Position } from "../../../../../../editor/common/core/position.js"; -import { Range } from "../../../../../../editor/common/core/range.js"; -import { - Selection, - SelectionDirection, -} from "../../../../../../editor/common/core/selection.js"; -import { - IWordAtPosition, - USUAL_WORD_SEPARATORS, -} from "../../../../../../editor/common/core/wordHelper.js"; -import { - CommandExecutor, - CursorsController, -} from "../../../../../../editor/common/cursor/cursor.js"; -import { DeleteOperations } from "../../../../../../editor/common/cursor/cursorDeleteOperations.js"; -import { - CursorConfiguration, - ICursorSimpleModel, -} from "../../../../../../editor/common/cursorCommon.js"; -import { CursorChangeReason } from "../../../../../../editor/common/cursorEvents.js"; -import { - CompositionTypePayload, - Handler, - ReplacePreviousCharPayload, -} from "../../../../../../editor/common/editorCommon.js"; -import { ILanguageConfigurationService } from "../../../../../../editor/common/languages/languageConfigurationRegistry.js"; -import { - IModelDeltaDecoration, - ITextModel, - PositionAffinity, -} from "../../../../../../editor/common/model.js"; -import { indentOfLine } from "../../../../../../editor/common/model/textModel.js"; -import { ITextModelService } from "../../../../../../editor/common/services/resolverService.js"; -import { ICoordinatesConverter } from "../../../../../../editor/common/viewModel.js"; -import { ViewModelEventsCollector } from "../../../../../../editor/common/viewModelEventDispatcher.js"; -import { WordHighlighterContribution } from "../../../../../../editor/contrib/wordHighlighter/browser/wordHighlighter.js"; -import { localize } from "../../../../../../nls.js"; -import { IAccessibilityService } from "../../../../../../platform/accessibility/common/accessibility.js"; -import { - MenuId, - registerAction2, -} from "../../../../../../platform/actions/common/actions.js"; -import { IConfigurationService } from "../../../../../../platform/configuration/common/configuration.js"; -import { - ContextKeyExpr, - IContextKeyService, - RawContextKey, -} from "../../../../../../platform/contextkey/common/contextkey.js"; -import { ServicesAccessor } from "../../../../../../platform/instantiation/common/instantiation.js"; -import { KeybindingWeight } from "../../../../../../platform/keybinding/common/keybindingsRegistry.js"; -import { - IPastFutureElements, - IUndoRedoElement, - IUndoRedoService, - UndoRedoElementType, -} from "../../../../../../platform/undoRedo/common/undoRedo.js"; -import { - registerWorkbenchContribution2, - WorkbenchPhase, -} from "../../../../../common/contributions.js"; -import { IEditorService } from "../../../../../services/editor/common/editorService.js"; -import { NotebookCellTextModel } from "../../../common/model/notebookCellTextModel.js"; -import { NotebookTextModel } from "../../../common/model/notebookTextModel.js"; -import { - KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED, - NOTEBOOK_CELL_EDITOR_FOCUSED, - NOTEBOOK_IS_ACTIVE_EDITOR, -} from "../../../common/notebookContextKeys.js"; -import { - INotebookActionContext, - NotebookAction, -} from "../../controller/coreActions.js"; -import { - CellFindMatchWithIndex, - getNotebookEditorFromEditorPane, - ICellViewModel, - INotebookEditor, - INotebookEditorContribution, -} from "../../notebookBrowser.js"; -import { registerNotebookContribution } from "../../notebookEditorExtensions.js"; -import { CellEditorOptions } from "../../view/cellParts/cellEditorOptions.js"; -import { NotebookFindContrib } from "../find/notebookFindWidget.js"; - -const NOTEBOOK_ADD_FIND_MATCH_TO_SELECTION_ID = - "notebook.addFindMatchToSelection"; - -const NOTEBOOK_SELECT_ALL_FIND_MATCHES_ID = "notebook.selectAllFindMatches"; +import { localize } from '../../../../../../nls.js'; +import { Emitter, Event } from '../../../../../../base/common/event.js'; +import { KeyCode, KeyMod } from '../../../../../../base/common/keyCodes.js'; +import { Disposable, DisposableStore } from '../../../../../../base/common/lifecycle.js'; +import { ResourceMap } from '../../../../../../base/common/map.js'; +import { URI } from '../../../../../../base/common/uri.js'; +import { EditorConfiguration } from '../../../../../../editor/browser/config/editorConfiguration.js'; +import { CoreEditingCommands } from '../../../../../../editor/browser/coreCommands.js'; +import { ICodeEditor, PastePayload } from '../../../../../../editor/browser/editorBrowser.js'; +import { RedoCommand, UndoCommand } from '../../../../../../editor/browser/editorExtensions.js'; +import { CodeEditorWidget } from '../../../../../../editor/browser/widget/codeEditor/codeEditorWidget.js'; +import { IEditorConfiguration } from '../../../../../../editor/common/config/editorConfiguration.js'; +import { cursorBlinkingStyleFromString, cursorStyleFromString, TextEditorCursorBlinkingStyle, TextEditorCursorStyle } from '../../../../../../editor/common/config/editorOptions.js'; +import { Position } from '../../../../../../editor/common/core/position.js'; +import { Range } from '../../../../../../editor/common/core/range.js'; +import { Selection, SelectionDirection } from '../../../../../../editor/common/core/selection.js'; +import { IWordAtPosition, USUAL_WORD_SEPARATORS } from '../../../../../../editor/common/core/wordHelper.js'; +import { CommandExecutor, CursorsController } from '../../../../../../editor/common/cursor/cursor.js'; +import { DeleteOperations } from '../../../../../../editor/common/cursor/cursorDeleteOperations.js'; +import { CursorConfiguration, ICursorSimpleModel } from '../../../../../../editor/common/cursorCommon.js'; +import { CursorChangeReason } from '../../../../../../editor/common/cursorEvents.js'; +import { CompositionTypePayload, Handler, ReplacePreviousCharPayload } from '../../../../../../editor/common/editorCommon.js'; +import { ILanguageConfigurationService } from '../../../../../../editor/common/languages/languageConfigurationRegistry.js'; +import { IModelDeltaDecoration, ITextModel, PositionAffinity } from '../../../../../../editor/common/model.js'; +import { indentOfLine } from '../../../../../../editor/common/model/textModel.js'; +import { ITextModelService } from '../../../../../../editor/common/services/resolverService.js'; +import { ICoordinatesConverter } from '../../../../../../editor/common/viewModel.js'; +import { ViewModelEventsCollector } from '../../../../../../editor/common/viewModelEventDispatcher.js'; +import { WordHighlighterContribution } from '../../../../../../editor/contrib/wordHighlighter/browser/wordHighlighter.js'; +import { IAccessibilityService } from '../../../../../../platform/accessibility/common/accessibility.js'; +import { MenuId, registerAction2 } from '../../../../../../platform/actions/common/actions.js'; +import { IConfigurationService } from '../../../../../../platform/configuration/common/configuration.js'; +import { ContextKeyExpr, IContextKeyService, RawContextKey } from '../../../../../../platform/contextkey/common/contextkey.js'; +import { ServicesAccessor } from '../../../../../../platform/instantiation/common/instantiation.js'; +import { KeybindingWeight } from '../../../../../../platform/keybinding/common/keybindingsRegistry.js'; +import { IPastFutureElements, IUndoRedoElement, IUndoRedoService, UndoRedoElementType } from '../../../../../../platform/undoRedo/common/undoRedo.js'; +import { registerWorkbenchContribution2, WorkbenchPhase } from '../../../../../common/contributions.js'; +import { IEditorService } from '../../../../../services/editor/common/editorService.js'; +import { KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED, NOTEBOOK_CELL_EDITOR_FOCUSED, NOTEBOOK_IS_ACTIVE_EDITOR } from '../../../common/notebookContextKeys.js'; +import { INotebookActionContext, NotebookAction } from '../../controller/coreActions.js'; +import { CellFindMatchWithIndex, getNotebookEditorFromEditorPane, ICellViewModel, INotebookEditor, INotebookEditorContribution } from '../../notebookBrowser.js'; +import { registerNotebookContribution } from '../../notebookEditorExtensions.js'; +import { CellEditorOptions } from '../../view/cellParts/cellEditorOptions.js'; +import { NotebookFindContrib } from '../find/notebookFindWidget.js'; +import { NotebookTextModel } from '../../../common/model/notebookTextModel.js'; +import { NotebookCellTextModel } from '../../../common/model/notebookCellTextModel.js'; + +const NOTEBOOK_ADD_FIND_MATCH_TO_SELECTION_ID = 'notebook.addFindMatchToSelection'; +const NOTEBOOK_SELECT_ALL_FIND_MATCHES_ID = 'notebook.selectAllFindMatches'; export enum NotebookMultiCursorState { Idle, @@ -125,110 +61,66 @@ export enum NotebookMultiCursorState { interface NotebookCursorConfig { cursorStyle: TextEditorCursorStyle; - cursorBlinking: TextEditorCursorBlinkingStyle; - - cursorSmoothCaretAnimation: "off" | "explicit" | "on"; + cursorSmoothCaretAnimation: 'off' | 'explicit' | 'on'; } interface SelectionTranslation { deltaStartCol: number; - deltaStartLine: number; - deltaEndCol: number; - deltaEndLine: number; } interface TrackedCell { cellViewModel: ICellViewModel; - initialSelection: Selection; - matchSelections: Selection[]; - editorConfig: IEditorConfiguration; - cursorConfig: NotebookCursorConfig; - decorationIds: string[]; - undoRedoHistory: IPastFutureElements; } export const NOTEBOOK_MULTI_CURSOR_CONTEXT = { - IsNotebookMultiCursor: new RawContextKey( - "isNotebookMultiSelect", - false, - ), - NotebookMultiSelectCursorState: new RawContextKey( - "notebookMultiSelectCursorState", - NotebookMultiCursorState.Idle, - ), + IsNotebookMultiCursor: new RawContextKey('isNotebookMultiSelect', false), + NotebookMultiSelectCursorState: new RawContextKey('notebookMultiSelectCursorState', NotebookMultiCursorState.Idle), }; -export class NotebookMultiCursorController - extends Disposable - implements INotebookEditorContribution -{ - static readonly id: string = "notebook.multiCursorController"; - - private word: string = ""; +export class NotebookMultiCursorController extends Disposable implements INotebookEditorContribution { - private startPosition: - | { - cellIndex: number; - - position: Position; - } - | undefined; + static readonly id: string = 'notebook.multiCursorController'; + private word: string = ''; + private startPosition: { + cellIndex: number; + position: Position; + } | undefined; private trackedCells: TrackedCell[] = []; - private readonly _onDidChangeAnchorCell = this._register( - new Emitter(), - ); - - readonly onDidChangeAnchorCell: Event = - this._onDidChangeAnchorCell.event; - + private readonly _onDidChangeAnchorCell = this._register(new Emitter()); + readonly onDidChangeAnchorCell: Event = this._onDidChangeAnchorCell.event; private anchorCell: [ICellViewModel, ICodeEditor] | undefined; private readonly anchorDisposables = this._register(new DisposableStore()); - private readonly cursorsDisposables = this._register(new DisposableStore()); - - private cursorsControllers: ResourceMap = - new ResourceMap(); + private cursorsControllers: ResourceMap = new ResourceMap(); private state: NotebookMultiCursorState = NotebookMultiCursorState.Idle; - public getState(): NotebookMultiCursorState { return this.state; } - private _nbIsMultiSelectSession = - NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor.bindTo( - this.contextKeyService, - ); - - private _nbMultiSelectState = - NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.bindTo( - this.contextKeyService, - ); + private _nbIsMultiSelectSession = NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor.bindTo(this.contextKeyService); + private _nbMultiSelectState = NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.bindTo(this.contextKeyService); constructor( private readonly notebookEditor: INotebookEditor, - @IContextKeyService - private readonly contextKeyService: IContextKeyService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, @ITextModelService private readonly textModelService: ITextModelService, - @ILanguageConfigurationService - private readonly languageConfigurationService: ILanguageConfigurationService, - @IAccessibilityService - private readonly accessibilityService: IAccessibilityService, - @IConfigurationService - private readonly configurationService: IConfigurationService, + @ILanguageConfigurationService private readonly languageConfigurationService: ILanguageConfigurationService, + @IAccessibilityService private readonly accessibilityService: IAccessibilityService, + @IConfigurationService private readonly configurationService: IConfigurationService, @IUndoRedoService private readonly undoRedoService: IUndoRedoService, ) { super(); @@ -238,302 +130,174 @@ export class NotebookMultiCursorController // anchor cell will catch and relay all type, cut, paste events to the cursors controllers // need to create new controllers when the anchor cell changes, then update their listeners // ** cursor controllers need to happen first, because anchor listeners relay to them - this._register( - this.onDidChangeAnchorCell(async () => { - await this.syncCursorsControllers(); - - this.syncAnchorListeners(); - }), - ); + this._register(this.onDidChangeAnchorCell(async () => { + await this.syncCursorsControllers(); + this.syncAnchorListeners(); + })); } private syncAnchorListeners() { this.anchorDisposables.clear(); if (!this.anchorCell) { - throw new Error("Anchor cell is undefined"); + throw new Error('Anchor cell is undefined'); } // typing - this.anchorDisposables.add( - this.anchorCell[1].onWillType((input) => { - const collector = new ViewModelEventsCollector(); - - this.trackedCells.forEach((cell) => { - const controller = this.cursorsControllers.get( - cell.cellViewModel.uri, - ); - - if (!controller) { - // should not happen - return; - } - - if ( - cell.cellViewModel.handle !== - this.anchorCell?.[0].handle - ) { - // don't relay to active cell, already has a controller for typing - controller.type(collector, input, "keyboard"); - } - }); - }), - ); - - this.anchorDisposables.add( - this.anchorCell[1].onDidType(() => { - this.state = NotebookMultiCursorState.Editing; // typing will continue to work as normal across ranges, just preps for another cmd+d - this._nbMultiSelectState.set(NotebookMultiCursorState.Editing); - - const anchorController = this.cursorsControllers.get( - this.anchorCell![0].uri, - ); - - if (!anchorController) { + this.anchorDisposables.add(this.anchorCell[1].onWillType((input) => { + const collector = new ViewModelEventsCollector(); + this.trackedCells.forEach(cell => { + const controller = this.cursorsControllers.get(cell.cellViewModel.uri); + if (!controller) { + // should not happen return; } + if (cell.cellViewModel.handle !== this.anchorCell?.[0].handle) { // don't relay to active cell, already has a controller for typing + controller.type(collector, input, 'keyboard'); + } + }); + })); - const activeSelections = - this.notebookEditor.activeCodeEditor?.getSelections(); + this.anchorDisposables.add(this.anchorCell[1].onDidType(() => { + this.state = NotebookMultiCursorState.Editing; // typing will continue to work as normal across ranges, just preps for another cmd+d + this._nbMultiSelectState.set(NotebookMultiCursorState.Editing); - if (!activeSelections) { + const anchorController = this.cursorsControllers.get(this.anchorCell![0].uri); + if (!anchorController) { + return; + } + const activeSelections = this.notebookEditor.activeCodeEditor?.getSelections(); + if (!activeSelections) { + return; + } + + // need to keep anchor cursor controller in sync manually (for delete usage), since we don't relay type event to it + anchorController.setSelections(new ViewModelEventsCollector(), 'keyboard', activeSelections, CursorChangeReason.Explicit); + + this.trackedCells.forEach(cell => { + const controller = this.cursorsControllers.get(cell.cellViewModel.uri); + if (!controller) { return; } - // need to keep anchor cursor controller in sync manually (for delete usage), since we don't relay type event to it - anchorController.setSelections( - new ViewModelEventsCollector(), - "keyboard", - activeSelections, - CursorChangeReason.Explicit, - ); - - this.trackedCells.forEach((cell) => { - const controller = this.cursorsControllers.get( - cell.cellViewModel.uri, - ); - - if (!controller) { - return; - } + // this is used upon exiting the multicursor session to set the selections back to the correct cursor state + cell.initialSelection = controller.getSelection(); + // clear tracked selection data as it is invalid once typing begins + cell.matchSelections = []; + }); - // this is used upon exiting the multicursor session to set the selections back to the correct cursor state - cell.initialSelection = controller.getSelection(); - // clear tracked selection data as it is invalid once typing begins - cell.matchSelections = []; - }); - - this.updateLazyDecorations(); - }), - ); + this.updateLazyDecorations(); + })); // arrow key navigation - this.anchorDisposables.add( - this.anchorCell[1].onDidChangeCursorSelection((e) => { - if (e.source === "mouse") { - this.resetToIdleState(); + this.anchorDisposables.add(this.anchorCell[1].onDidChangeCursorSelection((e) => { + if (e.source === 'mouse') { + this.resetToIdleState(); + return; + } - return; - } + // ignore this event if it was caused by a typing event or a delete (NotSet and RecoverFromMarkers respectively) + if (!e.oldSelections || e.reason === CursorChangeReason.NotSet || e.reason === CursorChangeReason.RecoverFromMarkers) { + return; + } + + const translation: SelectionTranslation = { + deltaStartCol: e.selection.startColumn - e.oldSelections[0].startColumn, + deltaStartLine: e.selection.startLineNumber - e.oldSelections[0].startLineNumber, + deltaEndCol: e.selection.endColumn - e.oldSelections[0].endColumn, + deltaEndLine: e.selection.endLineNumber - e.oldSelections[0].endLineNumber, + }; + const translationDir = e.selection.getDirection(); - // ignore this event if it was caused by a typing event or a delete (NotSet and RecoverFromMarkers respectively) - if ( - !e.oldSelections || - e.reason === CursorChangeReason.NotSet || - e.reason === CursorChangeReason.RecoverFromMarkers - ) { + this.trackedCells.forEach(cell => { + const controller = this.cursorsControllers.get(cell.cellViewModel.uri); + if (!controller) { return; } - const translation: SelectionTranslation = { - deltaStartCol: - e.selection.startColumn - - e.oldSelections[0].startColumn, - deltaStartLine: - e.selection.startLineNumber - - e.oldSelections[0].startLineNumber, - deltaEndCol: - e.selection.endColumn - e.oldSelections[0].endColumn, - deltaEndLine: - e.selection.endLineNumber - - e.oldSelections[0].endLineNumber, - }; - - const translationDir = e.selection.getDirection(); - - this.trackedCells.forEach((cell) => { - const controller = this.cursorsControllers.get( - cell.cellViewModel.uri, - ); - - if (!controller) { - return; - } - - const newSelections = controller - .getSelections() - .map((selection) => { - const newStartCol = - selection.startColumn + - translation.deltaStartCol; - - const newStartLine = - selection.startLineNumber + - translation.deltaStartLine; - - const newEndCol = - selection.endColumn + translation.deltaEndCol; - - const newEndLine = - selection.endLineNumber + - translation.deltaEndLine; - - return Selection.createWithDirection( - newStartLine, - newStartCol, - newEndLine, - newEndCol, - translationDir, - ); - }); - - controller.setSelections( - new ViewModelEventsCollector(), - e.source, - newSelections, - CursorChangeReason.Explicit, - ); + const newSelections = controller.getSelections().map(selection => { + const newStartCol = selection.startColumn + translation.deltaStartCol; + const newStartLine = selection.startLineNumber + translation.deltaStartLine; + const newEndCol = selection.endColumn + translation.deltaEndCol; + const newEndLine = selection.endLineNumber + translation.deltaEndLine; + return Selection.createWithDirection(newStartLine, newStartCol, newEndLine, newEndCol, translationDir); }); - this.updateLazyDecorations(); - }), - ); + controller.setSelections(new ViewModelEventsCollector(), e.source, newSelections, CursorChangeReason.Explicit); + }); + + this.updateLazyDecorations(); + })); // core actions - this.anchorDisposables.add( - this.anchorCell[1].onWillTriggerEditorOperationEvent((e) => { - this.handleEditorOperationEvent(e); - }), - ); + this.anchorDisposables.add(this.anchorCell[1].onWillTriggerEditorOperationEvent((e) => { + this.handleEditorOperationEvent(e); + })); // exit mode - this.anchorDisposables.add( - this.anchorCell[1].onDidBlurEditorWidget(() => { - if ( - this.state === NotebookMultiCursorState.Selecting || - this.state === NotebookMultiCursorState.Editing - ) { - this.resetToIdleState(); - } - }), - ); + this.anchorDisposables.add(this.anchorCell[1].onDidBlurEditorWidget(() => { + if (this.state === NotebookMultiCursorState.Selecting || this.state === NotebookMultiCursorState.Editing) { + this.resetToIdleState(); + } + })); } private async syncCursorsControllers() { this.cursorsDisposables.clear(); // TODO: dial this back for perf and just update the relevant controllers - await Promise.all( - this.trackedCells.map(async (cell) => { - const controller = await this.createCursorController(cell); - - if (!controller) { - return; - } - - this.cursorsControllers.set(cell.cellViewModel.uri, controller); - - const selections = cell.matchSelections; + await Promise.all(this.trackedCells.map(async cell => { + const controller = await this.createCursorController(cell); + if (!controller) { + return; + } + this.cursorsControllers.set(cell.cellViewModel.uri, controller); - controller.setSelections( - new ViewModelEventsCollector(), - undefined, - selections, - CursorChangeReason.Explicit, - ); - }), - ); + const selections = cell.matchSelections; + controller.setSelections(new ViewModelEventsCollector(), undefined, selections, CursorChangeReason.Explicit); + })); this.updateLazyDecorations(); } - private async createCursorController( - cell: TrackedCell, - ): Promise { - const textModelRef = await this.textModelService.createModelReference( - cell.cellViewModel.uri, - ); - + private async createCursorController(cell: TrackedCell): Promise { + const textModelRef = await this.textModelService.createModelReference(cell.cellViewModel.uri); const textModel = textModelRef.object.textEditorModel; - if (!textModel) { return undefined; } - const cursorSimpleModel = this.constructCursorSimpleModel( - cell.cellViewModel, - ); - + const cursorSimpleModel = this.constructCursorSimpleModel(cell.cellViewModel); const converter = this.constructCoordinatesConverter(); - const editorConfig = cell.editorConfig; - const controller = this.cursorsDisposables.add( - new CursorsController( - textModel, - cursorSimpleModel, - converter, - new CursorConfiguration( - textModel.getLanguageId(), - textModel.getOptions(), - editorConfig, - this.languageConfigurationService, - ), - ), - ); - - controller.setSelections( - new ViewModelEventsCollector(), - undefined, - cell.matchSelections, - CursorChangeReason.Explicit, - ); + const controller = this.cursorsDisposables.add(new CursorsController( + textModel, + cursorSimpleModel, + converter, + new CursorConfiguration(textModel.getLanguageId(), textModel.getOptions(), editorConfig, this.languageConfigurationService) + )); + controller.setSelections(new ViewModelEventsCollector(), undefined, cell.matchSelections, CursorChangeReason.Explicit); return controller; } private constructCoordinatesConverter(): ICoordinatesConverter { return { - convertViewPositionToModelPosition( - viewPosition: Position, - ): Position { + convertViewPositionToModelPosition(viewPosition: Position): Position { return viewPosition; }, convertViewRangeToModelRange(viewRange: Range): Range { return viewRange; }, - validateViewPosition( - viewPosition: Position, - expectedModelPosition: Position, - ): Position { + validateViewPosition(viewPosition: Position, expectedModelPosition: Position): Position { return viewPosition; }, - validateViewRange( - viewRange: Range, - expectedModelRange: Range, - ): Range { + validateViewRange(viewRange: Range, expectedModelRange: Range): Range { return viewRange; }, - convertModelPositionToViewPosition( - modelPosition: Position, - affinity?: PositionAffinity, - allowZeroLineNumber?: boolean, - belowHiddenRanges?: boolean, - ): Position { + convertModelPositionToViewPosition(modelPosition: Position, affinity?: PositionAffinity, allowZeroLineNumber?: boolean, belowHiddenRanges?: boolean): Position { return modelPosition; }, - convertModelRangeToViewRange( - modelRange: Range, - affinity?: PositionAffinity, - ): Range { + convertModelRangeToViewRange(modelRange: Range, affinity?: PositionAffinity): Range { return modelRange; }, modelPositionIsVisible(modelPosition: Position): boolean { @@ -542,18 +306,13 @@ export class NotebookMultiCursorController getModelLineViewLineCount(modelLineNumber: number): number { return 1; }, - getViewLineNumberOfModelPosition( - modelLineNumber: number, - modelColumn: number, - ): number { + getViewLineNumberOfModelPosition(modelLineNumber: number, modelColumn: number): number { return modelLineNumber; - }, + } }; } - private constructCursorSimpleModel( - cell: ICellViewModel, - ): ICursorSimpleModel { + private constructCursorSimpleModel(cell: ICellViewModel): ICursorSimpleModel { return { getLineCount(): number { return cell.textBuffer.getLineCount(); @@ -568,149 +327,97 @@ export class NotebookMultiCursorController return cell.textBuffer.getLineMaxColumn(lineNumber); }, getLineFirstNonWhitespaceColumn(lineNumber: number): number { - return cell.textBuffer.getLineFirstNonWhitespaceColumn( - lineNumber, - ); + return cell.textBuffer.getLineFirstNonWhitespaceColumn(lineNumber); }, getLineLastNonWhitespaceColumn(lineNumber: number): number { - return cell.textBuffer.getLineLastNonWhitespaceColumn( - lineNumber, - ); + return cell.textBuffer.getLineLastNonWhitespaceColumn(lineNumber); }, - normalizePosition( - position: Position, - affinity: PositionAffinity, - ): Position { + normalizePosition(position: Position, affinity: PositionAffinity): Position { return position; }, getLineIndentColumn(lineNumber: number): number { - return ( - indentOfLine(cell.textBuffer.getLineContent(lineNumber)) + 1 - ); - }, + return indentOfLine(cell.textBuffer.getLineContent(lineNumber)) + 1; + } }; } private async handleEditorOperationEvent(e: any) { - this.trackedCells.forEach((cell) => { + this.trackedCells.forEach(cell => { if (cell.cellViewModel.handle === this.anchorCell?.[0].handle) { return; } const eventsCollector = new ViewModelEventsCollector(); - - const controller = this.cursorsControllers.get( - cell.cellViewModel.uri, - ); - + const controller = this.cursorsControllers.get(cell.cellViewModel.uri); if (!controller) { return; } - this.executeEditorOperation(controller, eventsCollector, e); }); } - private executeEditorOperation( - controller: CursorsController, - eventsCollector: ViewModelEventsCollector, - e: any, - ) { + private executeEditorOperation(controller: CursorsController, eventsCollector: ViewModelEventsCollector, e: any) { switch (e.handlerId) { case Handler.CompositionStart: controller.startComposition(eventsCollector); - break; - case Handler.CompositionEnd: controller.endComposition(eventsCollector, e.source); - break; - case Handler.ReplacePreviousChar: { const args = >e.payload; - - controller.compositionType( - eventsCollector, - args.text || "", - args.replaceCharCnt || 0, - 0, - 0, - e.source, - ); - + controller.compositionType(eventsCollector, args.text || '', args.replaceCharCnt || 0, 0, 0, e.source); break; } - case Handler.CompositionType: { const args = >e.payload; - - controller.compositionType( - eventsCollector, - args.text || "", - args.replacePrevCharCnt || 0, - args.replaceNextCharCnt || 0, - args.positionDelta || 0, - e.source, - ); - + controller.compositionType(eventsCollector, args.text || '', args.replacePrevCharCnt || 0, args.replaceNextCharCnt || 0, args.positionDelta || 0, e.source); break; } - case Handler.Paste: { const args = >e.payload; - - controller.paste( - eventsCollector, - args.text || "", - args.pasteOnNewLine || false, - args.multicursorText || null, - e.source, - ); - + controller.paste(eventsCollector, args.text || '', args.pasteOnNewLine || false, args.multicursorText || null, e.source); break; } - case Handler.Cut: controller.cut(eventsCollector, e.source); - break; } } + private updateViewModelSelections() { + for (const cell of this.trackedCells) { + const controller = this.cursorsControllers.get(cell.cellViewModel.uri); + if (!controller) { + // should not happen + return; + } + + cell.cellViewModel.setSelections(controller.getSelections()); + } + } + private updateFinalUndoRedo() { const anchorCellModel = this.anchorCell?.[1].getModel(); - if (!anchorCellModel) { // should not happen return; } - const newElementsMap: ResourceMap = new ResourceMap< - IUndoRedoElement[] - >(); - + const newElementsMap: ResourceMap = new ResourceMap(); const resources: URI[] = []; - this.trackedCells.forEach((trackedMatch) => { + this.trackedCells.forEach(trackedMatch => { const undoRedoState = trackedMatch.undoRedoHistory; - if (!undoRedoState) { return; } resources.push(trackedMatch.cellViewModel.uri); - const currentPastElements = this.undoRedoService - .getElements(trackedMatch.cellViewModel.uri) - .past.slice(); - + const currentPastElements = this.undoRedoService.getElements(trackedMatch.cellViewModel.uri).past.slice(); const oldPastElements = trackedMatch.undoRedoHistory.past.slice(); - - const newElements = currentPastElements.slice( - oldPastElements.length, - ); - + const newElements = currentPastElements.slice(oldPastElements.length); if (newElements.length === 0) { return; } @@ -718,8 +425,7 @@ export class NotebookMultiCursorController newElementsMap.set(trackedMatch.cellViewModel.uri, newElements); this.undoRedoService.removeElements(trackedMatch.cellViewModel.uri); - - oldPastElements.forEach((element) => { + oldPastElements.forEach(element => { this.undoRedoService.pushElement(element); }); }); @@ -727,136 +433,101 @@ export class NotebookMultiCursorController this.undoRedoService.pushElement({ type: UndoRedoElementType.Workspace, resources: resources, - label: "Multi Cursor Edit", - code: "multiCursorEdit", + label: 'Multi Cursor Edit', + code: 'multiCursorEdit', confirmBeforeUndo: false, undo: async () => { - newElementsMap.forEach(async (value) => { - value.reverse().forEach(async (element) => { + newElementsMap.forEach(async value => { + value.reverse().forEach(async element => { await element.undo(); }); }); }, redo: async () => { - newElementsMap.forEach(async (value) => { - value.forEach(async (element) => { + newElementsMap.forEach(async value => { + value.forEach(async element => { await element.redo(); }); }); - }, + } }); } public resetToIdleState() { this.state = NotebookMultiCursorState.Idle; - this._nbMultiSelectState.set(NotebookMultiCursorState.Idle); - this._nbIsMultiSelectSession.set(false); - this.updateFinalUndoRedo(); - this.trackedCells.forEach((cell) => { + this.trackedCells.forEach(cell => { this.clearDecorations(cell); - cell.cellViewModel.setSelections([cell.initialSelection]); // correct cursor placement upon exiting cmd-d session }); this.anchorDisposables.clear(); - this.anchorCell = undefined; - this.cursorsDisposables.clear(); - this.cursorsControllers.clear(); - this.trackedCells = []; - this.startPosition = undefined; - - this.word = ""; + this.word = ''; } - public async findAndTrackNextSelection( - focusedCell: ICellViewModel, - ): Promise { - if (this.state === NotebookMultiCursorState.Idle) { - // move cursor to end of the symbol + track it, transition to selecting state + public async findAndTrackNextSelection(focusedCell: ICellViewModel): Promise { + if (this.state === NotebookMultiCursorState.Idle) { // move cursor to end of the symbol + track it, transition to selecting state const textModel = focusedCell.textModel; - if (!textModel) { return; } const inputSelection = focusedCell.getSelections()[0]; - const word = this.getWord(inputSelection, textModel); - if (!word) { return; } - this.word = word.word; const index = this.notebookEditor.getCellIndex(focusedCell); - if (index === undefined) { return; } this.startPosition = { cellIndex: index, - position: new Position( - inputSelection.startLineNumber, - word.startColumn, - ), + position: new Position(inputSelection.startLineNumber, word.startColumn), }; const newSelection = new Selection( inputSelection.startLineNumber, word.startColumn, inputSelection.startLineNumber, - word.endColumn, + word.endColumn ); - focusedCell.setSelections([newSelection]); this.anchorCell = this.notebookEditor.activeCellAndCodeEditor; - - if ( - !this.anchorCell || - this.anchorCell[0].handle !== focusedCell.handle - ) { - throw new Error( - "Active cell is not the same as the cell passed as context", - ); + if (!this.anchorCell || this.anchorCell[0].handle !== focusedCell.handle) { + throw new Error('Active cell is not the same as the cell passed as context'); } - if (!(this.anchorCell[1] instanceof CodeEditorWidget)) { - throw new Error( - "Active cell is not an instance of CodeEditorWidget", - ); + throw new Error('Active cell is not an instance of CodeEditorWidget'); } await this.updateTrackedCell(focusedCell, [newSelection]); this._nbIsMultiSelectSession.set(true); - this.state = NotebookMultiCursorState.Selecting; - this._nbMultiSelectState.set(NotebookMultiCursorState.Selecting); this._onDidChangeAnchorCell.fire(); - } else if (this.state === NotebookMultiCursorState.Selecting) { - // use the word we stored from idle state transition to find next match, track it - const notebookTextModel = this.notebookEditor.textModel; + } else if (this.state === NotebookMultiCursorState.Selecting) { // use the word we stored from idle state transition to find next match, track it + const notebookTextModel = this.notebookEditor.textModel; if (!notebookTextModel) { return; // should not happen } const index = this.notebookEditor.getCellIndex(focusedCell); - if (index === undefined) { return; // should not happen } @@ -867,108 +538,50 @@ export class NotebookMultiCursorController const findResult = notebookTextModel.findNextMatch( this.word, - { - cellIndex: index, - position: focusedCell - .getSelections() - [ - focusedCell.getSelections().length - 1 - ].getEndPosition(), - }, + { cellIndex: index, position: focusedCell.getSelections()[focusedCell.getSelections().length - 1].getEndPosition() }, false, true, USUAL_WORD_SEPARATORS, this.startPosition, ); - if (!findResult) { return; } - const findResultCellViewModel = this.notebookEditor.getCellByHandle( - findResult.cell.handle, - ); - + const findResultCellViewModel = this.notebookEditor.getCellByHandle(findResult.cell.handle); if (!findResultCellViewModel) { return; } - if (findResult.cell.handle === focusedCell.handle) { - // match is in the same cell, find tracked entry, update and set selections in viewmodel and cursorController - const selections = [ - ...focusedCell.getSelections(), - Selection.fromRange( - findResult.match.range, - SelectionDirection.LTR, - ), - ]; - - const trackedCell = await this.updateTrackedCell( - focusedCell, - selections, - ); - - findResultCellViewModel.setSelections( - trackedCell.matchSelections, - ); - } else if (findResult.cell.handle !== focusedCell.handle) { - // result is in a different cell, move focus there and apply selection, then update anchor - await this.notebookEditor.revealRangeInViewAsync( - findResultCellViewModel, - findResult.match.range, - ); - - await this.notebookEditor.focusNotebookCell( - findResultCellViewModel, - "editor", - ); - - const trackedCell = await this.updateTrackedCell( - findResultCellViewModel, - [ - Selection.fromRange( - findResult.match.range, - SelectionDirection.LTR, - ), - ], - ); - - findResultCellViewModel.setSelections( - trackedCell.matchSelections, - ); + if (findResult.cell.handle === focusedCell.handle) { // match is in the same cell, find tracked entry, update and set selections in viewmodel and cursorController + const selections = [...focusedCell.getSelections(), Selection.fromRange(findResult.match.range, SelectionDirection.LTR)]; + const trackedCell = await this.updateTrackedCell(focusedCell, selections); + findResultCellViewModel.setSelections(trackedCell.matchSelections); - this.anchorCell = this.notebookEditor.activeCellAndCodeEditor; - if ( - !this.anchorCell || - !(this.anchorCell[1] instanceof CodeEditorWidget) - ) { - throw new Error( - "Active cell is not an instance of CodeEditorWidget", - ); + } else if (findResult.cell.handle !== focusedCell.handle) { // result is in a different cell, move focus there and apply selection, then update anchor + await this.notebookEditor.revealRangeInViewAsync(findResultCellViewModel, findResult.match.range); + await this.notebookEditor.focusNotebookCell(findResultCellViewModel, 'editor'); + + const trackedCell = await this.updateTrackedCell(findResultCellViewModel, [Selection.fromRange(findResult.match.range, SelectionDirection.LTR)]); + findResultCellViewModel.setSelections(trackedCell.matchSelections); + + this.anchorCell = this.notebookEditor.activeCellAndCodeEditor; + if (!this.anchorCell || !(this.anchorCell[1] instanceof CodeEditorWidget)) { + throw new Error('Active cell is not an instance of CodeEditorWidget'); } this._onDidChangeAnchorCell.fire(); // we set the decorations manually for the cell we have just departed, since it blurs // we can find the match with the handle that the find and track request originated - this.initializeMultiSelectDecorations( - this.trackedCells.find( - (trackedCell) => - trackedCell.cellViewModel.handle === - focusedCell.handle, - ), - ); + this.initializeMultiSelectDecorations(this.trackedCells.find(trackedCell => trackedCell.cellViewModel.handle === focusedCell.handle)); } } } - public async selectAllMatches( - focusedCell: ICellViewModel, - matches?: CellFindMatchWithIndex[], - ): Promise { + public async selectAllMatches(focusedCell: ICellViewModel, matches?: CellFindMatchWithIndex[]): Promise { const notebookTextModel = this.notebookEditor.textModel; - if (!notebookTextModel) { return; // should not happen } @@ -976,22 +589,15 @@ export class NotebookMultiCursorController if (matches) { await this.handleFindWidgetSelectAllMatches(matches); } else { - await this.handleCellEditorSelectAllMatches( - notebookTextModel, - focusedCell, - ); + await this.handleCellEditorSelectAllMatches(notebookTextModel, focusedCell); } await this.syncCursorsControllers(); - this.syncAnchorListeners(); - this.updateLazyDecorations(); } - private async handleFindWidgetSelectAllMatches( - matches: CellFindMatchWithIndex[], - ) { + private async handleFindWidgetSelectAllMatches(matches: CellFindMatchWithIndex[]) { // TODO: support selecting state maybe. UX could get confusing since selecting state could be hit via ctrl+d which would have different filters (case sensetive + whole word) if (this.state !== NotebookMultiCursorState.Idle) { return; @@ -1001,207 +607,108 @@ export class NotebookMultiCursorController return; } - await this.notebookEditor.focusNotebookCell(matches[0].cell, "editor"); - + await this.notebookEditor.focusNotebookCell(matches[0].cell, 'editor'); this.anchorCell = this.notebookEditor.activeCellAndCodeEditor; this.trackedCells = []; - for (const match of matches) { - this.updateTrackedCell( - match.cell, - match.contentMatches.map((match) => - Selection.fromRange(match.range, SelectionDirection.LTR), - ), - ); + this.updateTrackedCell(match.cell, match.contentMatches.map(match => Selection.fromRange(match.range, SelectionDirection.LTR))); - if ( - this.anchorCell && - match.cell.handle === this.anchorCell[0].handle - ) { + if (this.anchorCell && match.cell.handle === this.anchorCell[0].handle) { // only explicitly set the focused cell's selections, the rest are handled by cursor controllers + decorations - match.cell.setSelections( - match.contentMatches.map((match) => - Selection.fromRange( - match.range, - SelectionDirection.LTR, - ), - ), - ); + match.cell.setSelections(match.contentMatches.map(match => Selection.fromRange(match.range, SelectionDirection.LTR))); } } this._nbIsMultiSelectSession.set(true); - this.state = NotebookMultiCursorState.Selecting; - this._nbMultiSelectState.set(NotebookMultiCursorState.Selecting); } - private async handleCellEditorSelectAllMatches( - notebookTextModel: NotebookTextModel, - focusedCell: ICellViewModel, - ) { + private async handleCellEditorSelectAllMatches(notebookTextModel: NotebookTextModel, focusedCell: ICellViewModel) { // can be triggered mid multiselect session, or from idle state if (this.state === NotebookMultiCursorState.Idle) { // get word from current selection + rest of notebook objects const textModel = focusedCell.textModel; - if (!textModel) { return; } - const inputSelection = focusedCell.getSelections()[0]; - const word = this.getWord(inputSelection, textModel); - if (!word) { return; } - this.word = word.word; - const index = this.notebookEditor.getCellIndex(focusedCell); - if (index === undefined) { return; } - this.startPosition = { cellIndex: index, - position: new Position( - inputSelection.startLineNumber, - word.startColumn, - ), + position: new Position(inputSelection.startLineNumber, word.startColumn), }; this.anchorCell = this.notebookEditor.activeCellAndCodeEditor; - - if ( - !this.anchorCell || - this.anchorCell[0].handle !== focusedCell.handle - ) { - throw new Error( - "Active cell is not the same as the cell passed as context", - ); + if (!this.anchorCell || this.anchorCell[0].handle !== focusedCell.handle) { + throw new Error('Active cell is not the same as the cell passed as context'); } - if (!(this.anchorCell[1] instanceof CodeEditorWidget)) { - throw new Error( - "Active cell is not an instance of CodeEditorWidget", - ); + throw new Error('Active cell is not an instance of CodeEditorWidget'); } // get all matches in the notebook - const findResults = notebookTextModel.findMatches( - this.word, - false, - true, - USUAL_WORD_SEPARATORS, - ); + const findResults = notebookTextModel.findMatches(this.word, false, true, USUAL_WORD_SEPARATORS); // create the tracked matches for every result, needed for cursor controllers this.trackedCells = []; - for (const res of findResults) { - await this.updateTrackedCell( - res.cell, - res.matches.map((match) => - Selection.fromRange( - match.range, - SelectionDirection.LTR, - ), - ), - ); + await this.updateTrackedCell(res.cell, res.matches.map(match => Selection.fromRange(match.range, SelectionDirection.LTR))); if (res.cell.handle === focusedCell.handle) { - const cellViewModel = this.notebookEditor.getCellByHandle( - res.cell.handle, - ); - + const cellViewModel = this.notebookEditor.getCellByHandle(res.cell.handle); if (cellViewModel) { - cellViewModel.setSelections( - res.matches.map((match) => - Selection.fromRange( - match.range, - SelectionDirection.LTR, - ), - ), - ); + cellViewModel.setSelections(res.matches.map(match => Selection.fromRange(match.range, SelectionDirection.LTR))); } } } this._nbIsMultiSelectSession.set(true); - this.state = NotebookMultiCursorState.Selecting; - this._nbMultiSelectState.set(NotebookMultiCursorState.Selecting); + } else if (this.state === NotebookMultiCursorState.Selecting) { // we will already have a word + some number of tracked matches, need to update them with the rest given findAllMatches result - const findResults = notebookTextModel.findMatches( - this.word, - false, - true, - USUAL_WORD_SEPARATORS, - ); + const findResults = notebookTextModel.findMatches(this.word, false, true, USUAL_WORD_SEPARATORS); // update existing tracked matches with new selections and create new tracked matches for cells that aren't tracked yet for (const res of findResults) { - await this.updateTrackedCell( - res.cell, - res.matches.map((match) => - Selection.fromRange( - match.range, - SelectionDirection.LTR, - ), - ), - ); + await this.updateTrackedCell(res.cell, res.matches.map(match => Selection.fromRange(match.range, SelectionDirection.LTR))); } } } - private async updateTrackedCell( - cell: ICellViewModel | NotebookCellTextModel, - selections: Selection[], - ) { - const cellViewModel = - cell instanceof NotebookCellTextModel - ? this.notebookEditor.getCellByHandle(cell.handle) - : cell; - + private async updateTrackedCell(cell: ICellViewModel | NotebookCellTextModel, selections: Selection[]) { + const cellViewModel = cell instanceof NotebookCellTextModel ? this.notebookEditor.getCellByHandle(cell.handle) : cell; if (!cellViewModel) { - throw new Error("Cell not found"); + throw new Error('Cell not found'); } - let trackedMatch = this.trackedCells.find( - (trackedCell) => - trackedCell.cellViewModel.handle === cellViewModel.handle, - ); + let trackedMatch = this.trackedCells.find(trackedCell => trackedCell.cellViewModel.handle === cellViewModel.handle); if (trackedMatch) { this.clearDecorations(trackedMatch); // need this to avoid leaking decorations -- TODO: just optimize the lazy decorations fn trackedMatch.matchSelections = selections; } else { const initialSelection = cellViewModel.getSelections()[0]; - const textModel = await cellViewModel.resolveTextModel(); - textModel.pushStackElement(); const editorConfig = this.constructCellEditorOptions(cellViewModel); - const rawEditorOptions = editorConfig.getRawOptions(); - const cursorConfig: NotebookCursorConfig = { - cursorStyle: cursorStyleFromString( - rawEditorOptions.cursorStyle!, - ), - cursorBlinking: cursorBlinkingStyleFromString( - rawEditorOptions.cursorBlinking!, - ), - cursorSmoothCaretAnimation: - rawEditorOptions.cursorSmoothCaretAnimation!, + cursorStyle: cursorStyleFromString(rawEditorOptions.cursorStyle!), + cursorBlinking: cursorBlinkingStyleFromString(rawEditorOptions.cursorBlinking!), + cursorSmoothCaretAnimation: rawEditorOptions.cursorSmoothCaretAnimation! }; trackedMatch = { @@ -1211,23 +718,16 @@ export class NotebookMultiCursorController editorConfig: editorConfig, cursorConfig: cursorConfig, decorationIds: [], - undoRedoHistory: this.undoRedoService.getElements( - cellViewModel.uri, - ), + undoRedoHistory: this.undoRedoService.getElements(cellViewModel.uri) }; - this.trackedCells.push(trackedMatch); } - return trackedMatch; } public async deleteLeft(): Promise { - this.trackedCells.forEach((cell) => { - const controller = this.cursorsControllers.get( - cell.cellViewModel.uri, - ); - + this.trackedCells.forEach(cell => { + const controller = this.cursorsControllers.get(cell.cellViewModel.uri); if (!controller) { // should not happen return; @@ -1241,33 +741,18 @@ export class NotebookMultiCursorController controller.getAutoClosedCharacters(), ); - const delSelections = CommandExecutor.executeCommands( - controller.context.model, - controller.getSelections(), - commands, - ); - + const delSelections = CommandExecutor.executeCommands(controller.context.model, controller.getSelections(), commands); if (!delSelections) { return; } - - controller.setSelections( - new ViewModelEventsCollector(), - undefined, - delSelections, - CursorChangeReason.Explicit, - ); + controller.setSelections(new ViewModelEventsCollector(), undefined, delSelections, CursorChangeReason.Explicit); }); - this.updateLazyDecorations(); } public async deleteRight(): Promise { - this.trackedCells.forEach((cell) => { - const controller = this.cursorsControllers.get( - cell.cellViewModel.uri, - ); - + this.trackedCells.forEach(cell => { + const controller = this.cursorsControllers.get(cell.cellViewModel.uri); if (!controller) { // should not happen return; @@ -1281,121 +766,52 @@ export class NotebookMultiCursorController ); if (cell.cellViewModel.handle !== this.anchorCell?.[0].handle) { - const delSelections = CommandExecutor.executeCommands( - controller.context.model, - controller.getSelections(), - commands, - ); - + const delSelections = CommandExecutor.executeCommands(controller.context.model, controller.getSelections(), commands); if (!delSelections) { return; } - - controller.setSelections( - new ViewModelEventsCollector(), - undefined, - delSelections, - CursorChangeReason.Explicit, - ); + controller.setSelections(new ViewModelEventsCollector(), undefined, delSelections, CursorChangeReason.Explicit); } else { // get the selections from the viewmodel since we run the command manually (for cursor decoration reasons) - controller.setSelections( - new ViewModelEventsCollector(), - undefined, - cell.cellViewModel.getSelections(), - CursorChangeReason.Explicit, - ); + controller.setSelections(new ViewModelEventsCollector(), undefined, cell.cellViewModel.getSelections(), CursorChangeReason.Explicit); } - }); + }); this.updateLazyDecorations(); } async undo() { const models: ITextModel[] = []; - for (const cell of this.trackedCells) { const model = await cell.cellViewModel.resolveTextModel(); - if (model) { models.push(model); } - - const controller = this.cursorsControllers.get( - cell.cellViewModel.uri, - ); - - if (!controller) { - // should not happen - return; - } - - controller.setSelections( - new ViewModelEventsCollector(), - undefined, - cell.cellViewModel.getSelections(), - CursorChangeReason.Explicit, - ); } - await Promise.all(models.map((model) => model.undo())); - + await Promise.all(models.map(model => model.undo())); + this.updateViewModelSelections(); this.updateLazyDecorations(); } async redo() { const models: ITextModel[] = []; - for (const cell of this.trackedCells) { const model = await cell.cellViewModel.resolveTextModel(); - if (model) { models.push(model); } - - const controller = this.cursorsControllers.get( - cell.cellViewModel.uri, - ); - - if (!controller) { - // should not happen - return; - } - - controller.setSelections( - new ViewModelEventsCollector(), - undefined, - cell.cellViewModel.getSelections(), - CursorChangeReason.Explicit, - ); } - await Promise.all(models.map((model) => model.redo())); - + await Promise.all(models.map(model => model.redo())); + this.updateViewModelSelections(); this.updateLazyDecorations(); } - private constructCellEditorOptions( - cell: ICellViewModel, - ): EditorConfiguration { - const cellEditorOptions = new CellEditorOptions( - this.notebookEditor.getBaseCellEditorOptions(cell.language), - this.notebookEditor.notebookOptions, - this.configurationService, - ); - - const options = cellEditorOptions.getUpdatedValue( - cell.internalMetadata, - cell.uri, - ); - - return new EditorConfiguration( - false, - MenuId.EditorContent, - options, - null, - this.accessibilityService, - ); + private constructCellEditorOptions(cell: ICellViewModel): EditorConfiguration { + const cellEditorOptions = new CellEditorOptions(this.notebookEditor.getBaseCellEditorOptions(cell.language), this.notebookEditor.notebookOptions, this.configurationService); + const options = cellEditorOptions.getUpdatedValue(cell.internalMetadata, cell.uri); + return new EditorConfiguration(false, MenuId.EditorContent, options, null, this.accessibilityService); } /** @@ -1409,44 +825,38 @@ export class NotebookMultiCursorController } const decorations: IModelDeltaDecoration[] = []; - - cell.matchSelections.forEach((selection) => { + cell.matchSelections.forEach(selection => { // mock cursor at the end of the selection decorations.push({ range: Selection.fromPositions(selection.getEndPosition()), options: { - description: "", + description: '', className: this.getClassName(cell.cursorConfig, true), - }, + } }); }); cell.decorationIds = cell.cellViewModel.deltaModelDecorations( cell.decorationIds, - decorations, + decorations ); } private updateLazyDecorations() { - this.trackedCells.forEach((cell) => { + this.trackedCells.forEach(cell => { if (cell.cellViewModel.handle === this.anchorCell?.[0].handle) { return; } - const controller = this.cursorsControllers.get( - cell.cellViewModel.uri, - ); - + const controller = this.cursorsControllers.get(cell.cellViewModel.uri); if (!controller) { // should not happen return; } - const selections = controller.getSelections(); const newDecorations: IModelDeltaDecoration[] = []; - - selections?.map((selection) => { + selections?.map(selection => { const isEmpty = selection.isEmpty(); if (!isEmpty) { @@ -1454,12 +864,9 @@ export class NotebookMultiCursorController newDecorations.push({ range: selection, options: { - description: "", - className: this.getClassName( - cell.cursorConfig, - false, - ), - }, + description: '', + className: this.getClassName(cell.cursorConfig, false), + } }); } @@ -1467,16 +874,16 @@ export class NotebookMultiCursorController newDecorations.push({ range: Selection.fromPositions(selection.getPosition()), options: { - description: "", + description: '', zIndex: 10000, className: this.getClassName(cell.cursorConfig, true), - }, + } }); }); cell.decorationIds = cell.cellViewModel.deltaModelDecorations( cell.decorationIds, - newDecorations, + newDecorations ); /** @@ -1489,14 +896,9 @@ export class NotebookMultiCursorController * -> end = Date() * -> delay = x - ((end - start) % x) */ - const matchingEditor = this.notebookEditor.codeEditors.find( - (cellEditor) => cellEditor[0] === cell.cellViewModel, - ); - + const matchingEditor = this.notebookEditor.codeEditors.find(cellEditor => cellEditor[0] === cell.cellViewModel); if (matchingEditor) { - WordHighlighterContribution.get( - matchingEditor[1], - )?.wordHighlighter?.trigger(); + WordHighlighterContribution.get(matchingEditor[1])?.wordHighlighter?.trigger(); } }); } @@ -1504,16 +906,12 @@ export class NotebookMultiCursorController private clearDecorations(cell: TrackedCell) { cell.decorationIds = cell.cellViewModel.deltaModelDecorations( cell.decorationIds, - [], + [] ); } - private getWord( - selection: Selection, - model: ITextModel, - ): IWordAtPosition | null { + private getWord(selection: Selection, model: ITextModel): IWordAtPosition | null { const lineNumber = selection.startLineNumber; - const startColumn = selection.startColumn; if (model.isDisposed()) { @@ -1522,17 +920,12 @@ export class NotebookMultiCursorController return model.getWordAtPosition({ lineNumber: lineNumber, - column: startColumn, + column: startColumn }); } - private getClassName( - cursorConfig: NotebookCursorConfig, - isCursor?: boolean, - ): string { - let result = isCursor - ? ".nb-multicursor-cursor" - : ".nb-multicursor-selection"; + private getClassName(cursorConfig: NotebookCursorConfig, isCursor?: boolean): string { + let result = isCursor ? '.nb-multicursor-cursor' : '.nb-multicursor-selection'; if (isCursor) { // handle base style @@ -1540,30 +933,20 @@ export class NotebookMultiCursorController case TextEditorCursorStyle.Line: break; // default style, no additional class needed (handled by base css style) case TextEditorCursorStyle.Block: - result += ".nb-cursor-block-style"; - + result += '.nb-cursor-block-style'; break; - case TextEditorCursorStyle.Underline: - result += ".nb-cursor-underline-style"; - + result += '.nb-cursor-underline-style'; break; - case TextEditorCursorStyle.LineThin: - result += ".nb-cursor-line-thin-style"; - + result += '.nb-cursor-line-thin-style'; break; - case TextEditorCursorStyle.BlockOutline: - result += ".nb-cursor-block-outline-style"; - + result += '.nb-cursor-block-outline-style'; break; - case TextEditorCursorStyle.UnderlineThin: - result += ".nb-cursor-underline-thin-style"; - + result += '.nb-cursor-underline-thin-style'; break; - default: break; } @@ -1571,111 +954,77 @@ export class NotebookMultiCursorController // handle animation style switch (cursorConfig.cursorBlinking) { case TextEditorCursorBlinkingStyle.Blink: - result += ".nb-blink"; - + result += '.nb-blink'; break; - case TextEditorCursorBlinkingStyle.Smooth: - result += ".nb-smooth"; - + result += '.nb-smooth'; break; - case TextEditorCursorBlinkingStyle.Phase: - result += ".nb-phase"; - + result += '.nb-phase'; break; - case TextEditorCursorBlinkingStyle.Expand: - result += ".nb-expand"; - + result += '.nb-expand'; break; - case TextEditorCursorBlinkingStyle.Solid: - result += ".nb-solid"; - + result += '.nb-solid'; break; - default: - result += ".nb-solid"; - + result += '.nb-solid'; break; } // handle caret animation style - if ( - cursorConfig.cursorSmoothCaretAnimation === "on" || - cursorConfig.cursorSmoothCaretAnimation === "explicit" - ) { - result += ".nb-smooth-caret-animation"; + if (cursorConfig.cursorSmoothCaretAnimation === 'on' || cursorConfig.cursorSmoothCaretAnimation === 'explicit') { + result += '.nb-smooth-caret-animation'; } - } + } return result; } override dispose(): void { super.dispose(); - this.anchorDisposables.dispose(); - this.cursorsDisposables.dispose(); - this.trackedCells.forEach((cell) => { + this.trackedCells.forEach(cell => { this.clearDecorations(cell); }); - this.trackedCells = []; } + } class NotebookSelectAllFindMatches extends NotebookAction { constructor() { super({ id: NOTEBOOK_SELECT_ALL_FIND_MATCHES_ID, - title: localize( - "selectAllFindMatches", - "Select All Occurrences of Find Match", - ), + title: localize('selectAllFindMatches', "Select All Occurrences of Find Match"), precondition: ContextKeyExpr.and( - ContextKeyExpr.equals( - "config.notebook.multiCursor.enabled", - true, - ), + ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), ), keybinding: { when: ContextKeyExpr.or( ContextKeyExpr.and( - ContextKeyExpr.equals( - "config.notebook.multiCursor.enabled", - true, - ), + ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_CELL_EDITOR_FOCUSED, ), ContextKeyExpr.and( - ContextKeyExpr.equals( - "config.notebook.multiCursor.enabled", - true, - ), - KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED, + ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), + KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED ), ), primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyL, - weight: KeybindingWeight.WorkbenchContrib, - }, + weight: KeybindingWeight.WorkbenchContrib + } }); } - override async runWithContext( - accessor: ServicesAccessor, - context: INotebookActionContext, - ): Promise { + override async runWithContext(accessor: ServicesAccessor, context: INotebookActionContext): Promise { const editorService = accessor.get(IEditorService); - const editor = getNotebookEditorFromEditorPane( - editorService.activeEditorPane, - ); - + const editor = getNotebookEditorFromEditorPane(editorService.activeEditorPane); if (!editor) { return; } @@ -1684,25 +1033,16 @@ class NotebookSelectAllFindMatches extends NotebookAction { return; } - const cursorController = - editor.getContribution( - NotebookMultiCursorController.id, - ); - - const findController = editor.getContribution( - NotebookFindContrib.id, - ); + const cursorController = editor.getContribution(NotebookMultiCursorController.id); + const findController = editor.getContribution(NotebookFindContrib.id); if (findController.widget.isFocused) { const findModel = findController.widget.findModel; - - cursorController.selectAllMatches( - context.cell, - findModel.findMatches, - ); + cursorController.selectAllMatches(context.cell, findModel.findMatches); } else { cursorController.selectAllMatches(context.cell); } + } } @@ -1710,42 +1050,27 @@ class NotebookAddMatchToMultiSelectionAction extends NotebookAction { constructor() { super({ id: NOTEBOOK_ADD_FIND_MATCH_TO_SELECTION_ID, - title: localize( - "addFindMatchToSelection", - "Add Selection To Next Find Match", - ), + title: localize('addFindMatchToSelection', "Add Selection To Next Find Match"), precondition: ContextKeyExpr.and( - ContextKeyExpr.equals( - "config.notebook.multiCursor.enabled", - true, - ), + ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_CELL_EDITOR_FOCUSED, ), keybinding: { when: ContextKeyExpr.and( - ContextKeyExpr.equals( - "config.notebook.multiCursor.enabled", - true, - ), + ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_CELL_EDITOR_FOCUSED, ), primary: KeyMod.CtrlCmd | KeyCode.KeyD, - weight: KeybindingWeight.WorkbenchContrib, - }, + weight: KeybindingWeight.WorkbenchContrib + } }); } - override async runWithContext( - accessor: ServicesAccessor, - context: INotebookActionContext, - ): Promise { + override async runWithContext(accessor: ServicesAccessor, context: INotebookActionContext): Promise { const editorService = accessor.get(IEditorService); - - const editor = getNotebookEditorFromEditorPane( - editorService.activeEditorPane, - ); + const editor = getNotebookEditorFromEditorPane(editorService.activeEditorPane); if (!editor) { return; @@ -1755,11 +1080,7 @@ class NotebookAddMatchToMultiSelectionAction extends NotebookAction { return; } - const controller = - editor.getContribution( - NotebookMultiCursorController.id, - ); - + const controller = editor.getContribution(NotebookMultiCursorController.id); controller.findAndTrackNextSelection(context.cell); } } @@ -1767,50 +1088,34 @@ class NotebookAddMatchToMultiSelectionAction extends NotebookAction { class NotebookExitMultiSelectionAction extends NotebookAction { constructor() { super({ - id: "noteMultiCursor.exit", - title: localize("exitMultiSelection", "Exit Multi Cursor Mode"), + id: 'noteMultiCursor.exit', + title: localize('exitMultiSelection', "Exit Multi Cursor Mode"), precondition: ContextKeyExpr.and( - ContextKeyExpr.equals( - "config.notebook.multiCursor.enabled", - true, - ), + ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor, ), keybinding: { when: ContextKeyExpr.and( - ContextKeyExpr.equals( - "config.notebook.multiCursor.enabled", - true, - ), + ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor, ), primary: KeyCode.Escape, - weight: KeybindingWeight.WorkbenchContrib, - }, + weight: KeybindingWeight.WorkbenchContrib + } }); } - override async runWithContext( - accessor: ServicesAccessor, - context: INotebookActionContext, - ): Promise { + override async runWithContext(accessor: ServicesAccessor, context: INotebookActionContext): Promise { const editorService = accessor.get(IEditorService); - - const editor = getNotebookEditorFromEditorPane( - editorService.activeEditorPane, - ); + const editor = getNotebookEditorFromEditorPane(editorService.activeEditorPane); if (!editor) { return; } - const controller = - editor.getContribution( - NotebookMultiCursorController.id, - ); - + const controller = editor.getContribution(NotebookMultiCursorController.id); controller.resetToIdleState(); } } @@ -1818,66 +1123,42 @@ class NotebookExitMultiSelectionAction extends NotebookAction { class NotebookDeleteLeftMultiSelectionAction extends NotebookAction { constructor() { super({ - id: "noteMultiCursor.deleteLeft", - title: localize("deleteLeftMultiSelection", "Delete Left"), + id: 'noteMultiCursor.deleteLeft', + title: localize('deleteLeftMultiSelection', "Delete Left"), precondition: ContextKeyExpr.and( - ContextKeyExpr.equals( - "config.notebook.multiCursor.enabled", - true, - ), + ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor, ContextKeyExpr.or( - NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo( - NotebookMultiCursorState.Selecting, - ), - NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo( - NotebookMultiCursorState.Editing, - ), - ), + NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Selecting), + NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Editing) + ) ), keybinding: { when: ContextKeyExpr.and( - ContextKeyExpr.equals( - "config.notebook.multiCursor.enabled", - true, - ), + ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor, ContextKeyExpr.or( - NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo( - NotebookMultiCursorState.Selecting, - ), - NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo( - NotebookMultiCursorState.Editing, - ), - ), + NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Selecting), + NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Editing) + ) ), primary: KeyCode.Backspace, - weight: KeybindingWeight.WorkbenchContrib, - }, + weight: KeybindingWeight.WorkbenchContrib + } }); } - override async runWithContext( - accessor: ServicesAccessor, - context: INotebookActionContext, - ): Promise { + override async runWithContext(accessor: ServicesAccessor, context: INotebookActionContext): Promise { const editorService = accessor.get(IEditorService); - - const editor = getNotebookEditorFromEditorPane( - editorService.activeEditorPane, - ); + const editor = getNotebookEditorFromEditorPane(editorService.activeEditorPane); if (!editor) { return; } - const controller = - editor.getContribution( - NotebookMultiCursorController.id, - ); - + const controller = editor.getContribution(NotebookMultiCursorController.id); controller.deleteLeft(); } } @@ -1885,184 +1166,105 @@ class NotebookDeleteLeftMultiSelectionAction extends NotebookAction { class NotebookDeleteRightMultiSelectionAction extends NotebookAction { constructor() { super({ - id: "noteMultiCursor.deleteRight", - title: localize("deleteRightMultiSelection", "Delete Right"), + id: 'noteMultiCursor.deleteRight', + title: localize('deleteRightMultiSelection', "Delete Right"), precondition: ContextKeyExpr.and( - ContextKeyExpr.equals( - "config.notebook.multiCursor.enabled", - true, - ), + ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor, ContextKeyExpr.or( - NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo( - NotebookMultiCursorState.Selecting, - ), - NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo( - NotebookMultiCursorState.Editing, - ), - ), + NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Selecting), + NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Editing) + ) ), keybinding: { when: ContextKeyExpr.and( - ContextKeyExpr.equals( - "config.notebook.multiCursor.enabled", - true, - ), + ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), NOTEBOOK_IS_ACTIVE_EDITOR, NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor, ContextKeyExpr.or( - NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo( - NotebookMultiCursorState.Selecting, - ), - NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo( - NotebookMultiCursorState.Editing, - ), - ), + NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Selecting), + NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Editing) + ) ), primary: KeyCode.Delete, - weight: KeybindingWeight.WorkbenchContrib, - }, + weight: KeybindingWeight.WorkbenchContrib + } }); } - override async runWithContext( - accessor: ServicesAccessor, - context: INotebookActionContext, - ): Promise { + override async runWithContext(accessor: ServicesAccessor, context: INotebookActionContext): Promise { const editorService = accessor.get(IEditorService); - - const nbEditor = getNotebookEditorFromEditorPane( - editorService.activeEditorPane, - ); - + const nbEditor = getNotebookEditorFromEditorPane(editorService.activeEditorPane); if (!nbEditor) { return; } - const cellEditor = nbEditor.activeCodeEditor; - if (!cellEditor) { return; } // need to run the command manually since we are overriding the command, this ensures proper cursor animation behavior - CoreEditingCommands.DeleteRight.runEditorCommand( - accessor, - cellEditor, - null, - ); - - const controller = - nbEditor.getContribution( - NotebookMultiCursorController.id, - ); + CoreEditingCommands.DeleteRight.runEditorCommand(accessor, cellEditor, null); + const controller = nbEditor.getContribution(NotebookMultiCursorController.id); controller.deleteRight(); } } class NotebookMultiCursorUndoRedoContribution extends Disposable { - static readonly ID = "workbench.contrib.notebook.multiCursorUndoRedo"; - constructor( - @IEditorService private readonly _editorService: IEditorService, - @IConfigurationService - private readonly configurationService: IConfigurationService, - ) { + static readonly ID = 'workbench.contrib.notebook.multiCursorUndoRedo'; + + constructor(@IEditorService private readonly _editorService: IEditorService, @IConfigurationService private readonly configurationService: IConfigurationService) { super(); - if ( - !this.configurationService.getValue( - "notebook.multiCursor.enabled", - ) - ) { + if (!this.configurationService.getValue('notebook.multiCursor.enabled')) { return; } const PRIORITY = 10005; + this._register(UndoCommand.addImplementation(PRIORITY, 'notebook-multicursor-undo-redo', () => { + const editor = getNotebookEditorFromEditorPane(this._editorService.activeEditorPane); + if (!editor) { + return false; + } - this._register( - UndoCommand.addImplementation( - PRIORITY, - "notebook-multicursor-undo-redo", - () => { - const editor = getNotebookEditorFromEditorPane( - this._editorService.activeEditorPane, - ); - - if (!editor) { - return false; - } + if (!editor.hasModel()) { + return false; + } - if (!editor.hasModel()) { - return false; - } + const controller = editor.getContribution(NotebookMultiCursorController.id); - const controller = - editor.getContribution( - NotebookMultiCursorController.id, - ); - - return controller.undo(); - }, - ContextKeyExpr.and( - ContextKeyExpr.equals( - "config.notebook.multiCursor.enabled", - true, - ), - NOTEBOOK_IS_ACTIVE_EDITOR, - NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor, - ), - ), - ); + return controller.undo(); + }, ContextKeyExpr.and( + ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), + NOTEBOOK_IS_ACTIVE_EDITOR, + NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor, + ))); - this._register( - RedoCommand.addImplementation( - PRIORITY, - "notebook-multicursor-undo-redo", - () => { - const editor = getNotebookEditorFromEditorPane( - this._editorService.activeEditorPane, - ); - - if (!editor) { - return false; - } + this._register(RedoCommand.addImplementation(PRIORITY, 'notebook-multicursor-undo-redo', () => { + const editor = getNotebookEditorFromEditorPane(this._editorService.activeEditorPane); + if (!editor) { + return false; + } - if (!editor.hasModel()) { - return false; - } + if (!editor.hasModel()) { + return false; + } - const controller = - editor.getContribution( - NotebookMultiCursorController.id, - ); - - return controller.redo(); - }, - ContextKeyExpr.and( - ContextKeyExpr.equals( - "config.notebook.multiCursor.enabled", - true, - ), - NOTEBOOK_IS_ACTIVE_EDITOR, - NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor, - ), - ), - ); + const controller = editor.getContribution(NotebookMultiCursorController.id); + return controller.redo(); + }, ContextKeyExpr.and( + ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), + NOTEBOOK_IS_ACTIVE_EDITOR, + NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor, + ))); } } -registerNotebookContribution( - NotebookMultiCursorController.id, - NotebookMultiCursorController, -); -registerWorkbenchContribution2( - NotebookMultiCursorUndoRedoContribution.ID, - NotebookMultiCursorUndoRedoContribution, - WorkbenchPhase.BlockRestore, -); +registerNotebookContribution(NotebookMultiCursorController.id, NotebookMultiCursorController); +registerWorkbenchContribution2(NotebookMultiCursorUndoRedoContribution.ID, NotebookMultiCursorUndoRedoContribution, WorkbenchPhase.BlockRestore); registerAction2(NotebookSelectAllFindMatches); registerAction2(NotebookAddMatchToMultiSelectionAction); diff --git a/Source/vs/workbench/contrib/notebook/browser/controller/foldingController.ts b/Source/vs/workbench/contrib/notebook/browser/controller/foldingController.ts index 55bc312b7cc3f..113649657b247 100644 --- a/Source/vs/workbench/contrib/notebook/browser/controller/foldingController.ts +++ b/Source/vs/workbench/contrib/notebook/browser/controller/foldingController.ts @@ -2,95 +2,58 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { KeyCode, KeyMod } from "../../../../../base/common/keyCodes.js"; -import { - Disposable, - DisposableStore, -} from "../../../../../base/common/lifecycle.js"; -import { FoldingRegion } from "../../../../../editor/contrib/folding/browser/foldingRanges.js"; -import { localize, localize2 } from "../../../../../nls.js"; -import { - Action2, - registerAction2, -} from "../../../../../platform/actions/common/actions.js"; -import { ICommandMetadata } from "../../../../../platform/commands/common/commands.js"; -import { ContextKeyExpr } from "../../../../../platform/contextkey/common/contextkey.js"; -import { InputFocusedContextKey } from "../../../../../platform/contextkey/common/contextkeys.js"; -import { ServicesAccessor } from "../../../../../platform/instantiation/common/instantiation.js"; -import { KeybindingWeight } from "../../../../../platform/keybinding/common/keybindingsRegistry.js"; -import { IEditorService } from "../../../../services/editor/common/editorService.js"; -import { CellKind } from "../../common/notebookCommon.js"; -import { - NOTEBOOK_EDITOR_FOCUSED, - NOTEBOOK_IS_ACTIVE_EDITOR, -} from "../../common/notebookContextKeys.js"; -import { ICellRange } from "../../common/notebookRange.js"; -import { - CellFoldingState, - getNotebookEditorFromEditorPane, - INotebookEditor, - INotebookEditorContribution, - INotebookEditorMouseEvent, -} from "../notebookBrowser.js"; -import { registerNotebookContribution } from "../notebookEditorExtensions.js"; -import { FoldingModel } from "../viewModel/foldingModel.js"; -import { NotebookViewModel } from "../viewModel/notebookViewModelImpl.js"; -import { NOTEBOOK_ACTIONS_CATEGORY } from "./coreActions.js"; - -export class FoldingController - extends Disposable - implements INotebookEditorContribution -{ - static id: string = "workbench.notebook.foldingController"; - private _foldingModel: FoldingModel | null = null; +import { Disposable, DisposableStore } from '../../../../../base/common/lifecycle.js'; +import { NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_IS_ACTIVE_EDITOR } from '../../common/notebookContextKeys.js'; +import { INotebookEditor, INotebookEditorMouseEvent, INotebookEditorContribution, getNotebookEditorFromEditorPane, CellFoldingState } from '../notebookBrowser.js'; +import { FoldingModel } from '../viewModel/foldingModel.js'; import { CellKind } from '../../common/notebookCommon.js'; +import { ICellRange } from '../../common/notebookRange.js'; +import { registerNotebookContribution } from '../notebookEditorExtensions.js'; +import { registerAction2, Action2 } from '../../../../../platform/actions/common/actions.js'; +import { ContextKeyExpr } from '../../../../../platform/contextkey/common/contextkey.js'; +import { InputFocusedContextKey } from '../../../../../platform/contextkey/common/contextkeys.js'; +import { KeyCode, KeyMod } from '../../../../../base/common/keyCodes.js'; +import { KeybindingWeight } from '../../../../../platform/keybinding/common/keybindingsRegistry.js'; +import { ServicesAccessor } from '../../../../../platform/instantiation/common/instantiation.js'; +import { IEditorService } from '../../../../services/editor/common/editorService.js'; +import { NOTEBOOK_ACTIONS_CATEGORY } from './coreActions.js'; +import { localize, localize2 } from '../../../../../nls.js'; +import { FoldingRegion } from '../../../../../editor/contrib/folding/browser/foldingRanges.js'; +import { ICommandMetadata } from '../../../../../platform/commands/common/commands.js'; +import { NotebookViewModel } from '../viewModel/notebookViewModelImpl.js'; + +export class FoldingController extends Disposable implements INotebookEditorContribution { + static id: string = 'workbench.notebook.foldingController'; + private _foldingModel: FoldingModel | null = null; private readonly _localStore = this._register(new DisposableStore()); constructor(private readonly _notebookEditor: INotebookEditor) { super(); - this._register( - this._notebookEditor.onMouseUp((e) => { - this.onMouseUp(e); - }), - ); + this._register(this._notebookEditor.onMouseUp(e => { this.onMouseUp(e); })); + + this._register(this._notebookEditor.onDidChangeModel(() => { + this._localStore.clear(); - this._register( - this._notebookEditor.onDidChangeModel(() => { - this._localStore.clear(); + if (!this._notebookEditor.hasModel()) { + return; + } - if (!this._notebookEditor.hasModel()) { - return; + this._localStore.add(this._notebookEditor.onDidChangeCellState(e => { + if (e.source.editStateChanged && e.cell.cellKind === CellKind.Markup) { + this._foldingModel?.recompute(); } + })); - this._localStore.add( - this._notebookEditor.onDidChangeCellState((e) => { - if ( - e.source.editStateChanged && - e.cell.cellKind === CellKind.Markup - ) { - this._foldingModel?.recompute(); - // this._updateEditorFoldingRanges(); - } - }), - ); - - this._foldingModel = new FoldingModel(); - - this._localStore.add(this._foldingModel); - - this._foldingModel.attachViewModel( - this._notebookEditor.getViewModel(), - ); - - this._localStore.add( - this._foldingModel.onDidFoldingRegionChanged(() => { - this._updateEditorFoldingRanges(); - }), - ); - }), - ); + this._foldingModel = new FoldingModel(); + this._localStore.add(this._foldingModel); + this._foldingModel.attachViewModel(this._notebookEditor.getViewModel()); + + this._localStore.add(this._foldingModel.onDidFoldingRegionChanged(() => { + this._updateEditorFoldingRanges(); + })); + })); } saveViewState(): ICellRange[] { @@ -99,44 +62,24 @@ export class FoldingController restoreViewState(state: ICellRange[] | undefined) { this._foldingModel?.applyMemento(state || []); - this._updateEditorFoldingRanges(); } - setFoldingStateDown( - index: number, - state: CellFoldingState, - levels: number, - ) { + setFoldingStateDown(index: number, state: CellFoldingState, levels: number) { const doCollapse = state === CellFoldingState.Collapsed; - const region = this._foldingModel!.getRegionAtLine(index + 1); - const regions: FoldingRegion[] = []; - if (region) { if (region.isCollapsed !== doCollapse) { regions.push(region); } - if (levels > 1) { - const regionsInside = this._foldingModel!.getRegionsInside( - region, - (r, level: number) => - r.isCollapsed !== doCollapse && level < levels, - ); - + const regionsInside = this._foldingModel!.getRegionsInside(region, (r, level: number) => r.isCollapsed !== doCollapse && level < levels); regions.push(...regionsInside); } } - regions.forEach((r) => - this._foldingModel!.setCollapsed( - r.regionIndex, - state === CellFoldingState.Collapsed, - ), - ); - + regions.forEach(r => this._foldingModel!.setCollapsed(r.regionIndex, state === CellFoldingState.Collapsed)); this._updateEditorFoldingRanges(); } @@ -145,20 +88,8 @@ export class FoldingController return; } - const regions = this._foldingModel.getAllRegionsAtLine( - index + 1, - (region, level) => - region.isCollapsed !== (state === CellFoldingState.Collapsed) && - level <= levels, - ); - - regions.forEach((r) => - this._foldingModel!.setCollapsed( - r.regionIndex, - state === CellFoldingState.Collapsed, - ), - ); - + const regions = this._foldingModel.getAllRegionsAtLine(index + 1, (region, level) => region.isCollapsed !== (state === CellFoldingState.Collapsed) && level <= levels); + regions.forEach(r => this._foldingModel!.setCollapsed(r.regionIndex, state === CellFoldingState.Collapsed)); this._updateEditorFoldingRanges(); } @@ -174,9 +105,7 @@ export class FoldingController const vm = this._notebookEditor.getViewModel() as NotebookViewModel; vm.updateFoldingRanges(this._foldingModel.regions); - const hiddenRanges = vm.getHiddenRanges(); - this._notebookEditor.setHiddenAreas(hiddenRanges); } @@ -189,279 +118,194 @@ export class FoldingController return; } - const viewModel = - this._notebookEditor.getViewModel() as NotebookViewModel; - + const viewModel = this._notebookEditor.getViewModel() as NotebookViewModel; const target = e.event.target as HTMLElement; - if ( - target.classList.contains("codicon-notebook-collapsed") || - target.classList.contains("codicon-notebook-expanded") - ) { + if (target.classList.contains('codicon-notebook-collapsed') || target.classList.contains('codicon-notebook-expanded')) { const parent = target.parentElement as HTMLElement; - if (!parent.classList.contains("notebook-folding-indicator")) { + if (!parent.classList.contains('notebook-folding-indicator')) { return; } + // folding icon - const cellViewModel = e.target; + const cellViewModel = e.target; const modelIndex = viewModel.getCellIndex(cellViewModel); - const state = viewModel.getFoldingState(modelIndex); if (state === CellFoldingState.None) { return; } - this.setFoldingStateUp( - modelIndex, - state === CellFoldingState.Collapsed - ? CellFoldingState.Expanded - : CellFoldingState.Collapsed, - 1, - ); - + this.setFoldingStateUp(modelIndex, state === CellFoldingState.Collapsed ? CellFoldingState.Expanded : CellFoldingState.Collapsed, 1); this._notebookEditor.focusElement(cellViewModel); } return; } + + recompute() { + this._foldingModel?.recompute(); + } } + registerNotebookContribution(FoldingController.id, FoldingController); -const NOTEBOOK_FOLD_COMMAND_LABEL = localize("fold.cell", "Fold Cell"); - -const NOTEBOOK_UNFOLD_COMMAND_LABEL = localize2("unfold.cell", "Unfold Cell"); - -const FOLDING_COMMAND_ARGS: Pick = { - args: [ - { - isOptional: true, - name: "index", - description: "The cell index", - schema: { - "type": "object", - "required": ["index", "direction"], - "properties": { - "index": { - "type": "number", - }, - "direction": { - "type": "string", - "enum": ["up", "down"], - "default": "down", - }, - "levels": { - "type": "number", - "default": 1, - }, + +const NOTEBOOK_FOLD_COMMAND_LABEL = localize('fold.cell', "Fold Cell"); +const NOTEBOOK_UNFOLD_COMMAND_LABEL = localize2('unfold.cell', "Unfold Cell"); + +const FOLDING_COMMAND_ARGS: Pick = { + args: [{ + isOptional: true, + name: 'index', + description: 'The cell index', + schema: { + 'type': 'object', + 'required': ['index', 'direction'], + 'properties': { + 'index': { + 'type': 'number' }, - }, - }, - ], -}; -registerAction2( - class extends Action2 { - constructor() { - super({ - id: "notebook.fold", - title: localize2("fold.cell", "Fold Cell"), - category: NOTEBOOK_ACTIONS_CATEGORY, - keybinding: { - when: ContextKeyExpr.and( - NOTEBOOK_EDITOR_FOCUSED, - ContextKeyExpr.not(InputFocusedContextKey), - ), - primary: - KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.BracketLeft, - mac: { - primary: - KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.BracketLeft, - secondary: [KeyCode.LeftArrow], - }, - secondary: [KeyCode.LeftArrow], - weight: KeybindingWeight.WorkbenchContrib, + 'direction': { + 'type': 'string', + 'enum': ['up', 'down'], + 'default': 'down' }, - metadata: { - description: NOTEBOOK_FOLD_COMMAND_LABEL, - args: FOLDING_COMMAND_ARGS.args, + 'levels': { + 'type': 'number', + 'default': 1 }, - precondition: NOTEBOOK_IS_ACTIVE_EDITOR, - f1: true, - }); + } } + }] +}; - async run( - accessor: ServicesAccessor, - args?: { - index: number; +registerAction2(class extends Action2 { + constructor() { + super({ + id: 'notebook.fold', + title: localize2('fold.cell', "Fold Cell"), + category: NOTEBOOK_ACTIONS_CATEGORY, + keybinding: { + when: ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)), + primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.BracketLeft, + mac: { + primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.BracketLeft, + secondary: [KeyCode.LeftArrow], + }, + secondary: [KeyCode.LeftArrow], + weight: KeybindingWeight.WorkbenchContrib + }, + metadata: { + description: NOTEBOOK_FOLD_COMMAND_LABEL, + args: FOLDING_COMMAND_ARGS.args + }, + precondition: NOTEBOOK_IS_ACTIVE_EDITOR, + f1: true + }); + } - levels: number; + async run(accessor: ServicesAccessor, args?: { index: number; levels: number; direction: 'up' | 'down' }): Promise { + const editorService = accessor.get(IEditorService); - direction: "up" | "down"; - }, - ): Promise { - const editorService = accessor.get(IEditorService); + const editor = getNotebookEditorFromEditorPane(editorService.activeEditorPane); + if (!editor) { + return; + } - const editor = getNotebookEditorFromEditorPane( - editorService.activeEditorPane, - ); + if (!editor.hasModel()) { + return; + } - if (!editor) { + const levels = args && args.levels || 1; + const direction = args && args.direction === 'up' ? 'up' : 'down'; + let index: number | undefined = undefined; + + if (args) { + index = args.index; + } else { + const activeCell = editor.getActiveCell(); + if (!activeCell) { return; } + index = editor.getCellIndex(activeCell); + } - if (!editor.hasModel()) { + const controller = editor.getContribution(FoldingController.id); + if (index !== undefined) { + const targetCell = (index < 0 || index >= editor.getLength()) ? undefined : editor.cellAt(index); + if (targetCell?.cellKind === CellKind.Code && direction === 'down') { return; } - const levels = (args && args.levels) || 1; - - const direction = args && args.direction === "up" ? "up" : "down"; - - let index: number | undefined = undefined; - - if (args) { - index = args.index; + if (direction === 'up') { + controller.setFoldingStateUp(index, CellFoldingState.Collapsed, levels); } else { - const activeCell = editor.getActiveCell(); - - if (!activeCell) { - return; - } - - index = editor.getCellIndex(activeCell); + controller.setFoldingStateDown(index, CellFoldingState.Collapsed, levels); } - const controller = editor.getContribution( - FoldingController.id, - ); - - if (index !== undefined) { - const targetCell = - index < 0 || index >= editor.getLength() - ? undefined - : editor.cellAt(index); - - if ( - targetCell?.cellKind === CellKind.Code && - direction === "down" - ) { - return; - } - - if (direction === "up") { - controller.setFoldingStateUp( - index, - CellFoldingState.Collapsed, - levels, - ); - } else { - controller.setFoldingStateDown( - index, - CellFoldingState.Collapsed, - levels, - ); - } - - const viewIndex = editor - .getViewModel() - .getNearestVisibleCellIndexUpwards(index); - - editor.focusElement(editor.cellAt(viewIndex)); - } + const viewIndex = editor.getViewModel().getNearestVisibleCellIndexUpwards(index); + editor.focusElement(editor.cellAt(viewIndex)); } - }, -); -registerAction2( - class extends Action2 { - constructor() { - super({ - id: "notebook.unfold", - title: NOTEBOOK_UNFOLD_COMMAND_LABEL, - category: NOTEBOOK_ACTIONS_CATEGORY, - keybinding: { - when: ContextKeyExpr.and( - NOTEBOOK_EDITOR_FOCUSED, - ContextKeyExpr.not(InputFocusedContextKey), - ), - primary: - KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.BracketRight, - mac: { - primary: - KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.BracketRight, - secondary: [KeyCode.RightArrow], - }, + } +}); + +registerAction2(class extends Action2 { + constructor() { + super({ + id: 'notebook.unfold', + title: NOTEBOOK_UNFOLD_COMMAND_LABEL, + category: NOTEBOOK_ACTIONS_CATEGORY, + keybinding: { + when: ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)), + primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.BracketRight, + mac: { + primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.BracketRight, secondary: [KeyCode.RightArrow], - weight: KeybindingWeight.WorkbenchContrib, - }, - metadata: { - description: NOTEBOOK_UNFOLD_COMMAND_LABEL, - args: FOLDING_COMMAND_ARGS.args, }, - precondition: NOTEBOOK_IS_ACTIVE_EDITOR, - f1: true, - }); - } - - async run( - accessor: ServicesAccessor, - args?: { - index: number; + secondary: [KeyCode.RightArrow], + weight: KeybindingWeight.WorkbenchContrib + }, + metadata: { + description: NOTEBOOK_UNFOLD_COMMAND_LABEL, + args: FOLDING_COMMAND_ARGS.args + }, + precondition: NOTEBOOK_IS_ACTIVE_EDITOR, + f1: true + }); + } - levels: number; + async run(accessor: ServicesAccessor, args?: { index: number; levels: number; direction: 'up' | 'down' }): Promise { + const editorService = accessor.get(IEditorService); - direction: "up" | "down"; - }, - ): Promise { - const editorService = accessor.get(IEditorService); + const editor = getNotebookEditorFromEditorPane(editorService.activeEditorPane); + if (!editor) { + return; + } - const editor = getNotebookEditorFromEditorPane( - editorService.activeEditorPane, - ); + const levels = args && args.levels || 1; + const direction = args && args.direction === 'up' ? 'up' : 'down'; + let index: number | undefined = undefined; - if (!editor) { + if (args) { + index = args.index; + } else { + const activeCell = editor.getActiveCell(); + if (!activeCell) { return; } + index = editor.getCellIndex(activeCell); + } - const levels = (args && args.levels) || 1; - - const direction = args && args.direction === "up" ? "up" : "down"; - - let index: number | undefined = undefined; - - if (args) { - index = args.index; + const controller = editor.getContribution(FoldingController.id); + if (index !== undefined) { + if (direction === 'up') { + controller.setFoldingStateUp(index, CellFoldingState.Expanded, levels); } else { - const activeCell = editor.getActiveCell(); - - if (!activeCell) { - return; - } - - index = editor.getCellIndex(activeCell); - } - - const controller = editor.getContribution( - FoldingController.id, - ); - - if (index !== undefined) { - if (direction === "up") { - controller.setFoldingStateUp( - index, - CellFoldingState.Expanded, - levels, - ); - } else { - controller.setFoldingStateDown( - index, - CellFoldingState.Expanded, - levels, - ); - } + controller.setFoldingStateDown(index, CellFoldingState.Expanded, levels); } } - }, -); + } +}); diff --git a/Source/vs/workbench/contrib/notebook/browser/controller/sectionActions.ts b/Source/vs/workbench/contrib/notebook/browser/controller/sectionActions.ts index 3f1923579d5c8..b532e04ebe696 100644 --- a/Source/vs/workbench/contrib/notebook/browser/controller/sectionActions.ts +++ b/Source/vs/workbench/contrib/notebook/browser/controller/sectionActions.ts @@ -3,140 +3,104 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { localize, localize2 } from "../../../../../nls.js"; -import { - Action2, - MenuId, - registerAction2, -} from "../../../../../platform/actions/common/actions.js"; -import { ContextKeyExpr } from "../../../../../platform/contextkey/common/contextkey.js"; -import { ServicesAccessor } from "../../../../../platform/instantiation/common/instantiation.js"; -import { OutlineTarget } from "../../../../services/outline/browser/outline.js"; -import { CellKind } from "../../common/notebookCommon.js"; -import { NotebookOutlineContext } from "../contrib/outline/notebookOutline.js"; -import { - CellFoldingState, - ICellViewModel, - INotebookEditor, -} from "../notebookBrowser.js"; -import * as icons from "../notebookIcons.js"; -import { OutlineEntry } from "../viewModel/OutlineEntry.js"; -import { CELL_TITLE_CELL_GROUP_ID, CellToolbarOrder } from "./coreActions.js"; -import { executeSectionCondition } from "./executeActions.js"; -import { FoldingController } from "./foldingController.js"; +import { localize, localize2 } from '../../../../../nls.js'; +import { Action2, MenuId, registerAction2 } from '../../../../../platform/actions/common/actions.js'; +import { ContextKeyExpr } from '../../../../../platform/contextkey/common/contextkey.js'; +import { ServicesAccessor } from '../../../../../platform/instantiation/common/instantiation.js'; +import { NotebookOutlineContext } from '../contrib/outline/notebookOutline.js'; +import { FoldingController } from './foldingController.js'; +import { CellEditState, CellFoldingState, ICellViewModel, INotebookEditor } from '../notebookBrowser.js'; +import * as icons from '../notebookIcons.js'; +import { OutlineEntry } from '../viewModel/OutlineEntry.js'; +import { CellKind } from '../../common/notebookCommon.js'; +import { OutlineTarget } from '../../../../services/outline/browser/outline.js'; +import { CELL_TITLE_CELL_GROUP_ID, CellToolbarOrder } from './coreActions.js'; +import { executeSectionCondition } from './executeActions.js'; export type NotebookOutlineEntryArgs = { notebookEditor: INotebookEditor; - outlineEntry: OutlineEntry; }; export type NotebookCellArgs = { notebookEditor: INotebookEditor; - cell: ICellViewModel; }; export class NotebookRunSingleCellInSection extends Action2 { constructor() { super({ - id: "notebook.section.runSingleCell", + id: 'notebook.section.runSingleCell', title: { - ...localize2("runCell", "Run Cell"), - mnemonicTitle: localize( - { key: "mirunCell", comment: ["&& denotes a mnemonic"] }, - "&&Run Cell", - ), + ...localize2('runCell', "Run Cell"), + mnemonicTitle: localize({ key: 'mirunCell', comment: ['&& denotes a mnemonic'] }, "&&Run Cell"), }, - shortTitle: localize("runCell", "Run Cell"), + shortTitle: localize('runCell', "Run Cell"), icon: icons.executeIcon, menu: [ { id: MenuId.NotebookOutlineActionMenu, - group: "inline", + group: 'inline', order: 1, when: ContextKeyExpr.and( - NotebookOutlineContext.CellKind.isEqualTo( - CellKind.Code, - ), - NotebookOutlineContext.OutlineElementTarget.isEqualTo( - OutlineTarget.OutlinePane, - ), + NotebookOutlineContext.CellKind.isEqualTo(CellKind.Code), + NotebookOutlineContext.OutlineElementTarget.isEqualTo(OutlineTarget.OutlinePane), NotebookOutlineContext.CellHasChildren.toNegated(), NotebookOutlineContext.CellHasHeader.toNegated(), - ), - }, - ], + ) + } + ] }); } - override async run( - _accessor: ServicesAccessor, - context: any, - ): Promise { + override async run(_accessor: ServicesAccessor, context: any): Promise { if (!checkOutlineEntryContext(context)) { return; } - context.notebookEditor.executeNotebookCells([ - context.outlineEntry.cell, - ]); + context.notebookEditor.executeNotebookCells([context.outlineEntry.cell]); } } export class NotebookRunCellsInSection extends Action2 { constructor() { super({ - id: "notebook.section.runCells", + id: 'notebook.section.runCells', title: { - ...localize2("runCellsInSection", "Run Cells In Section"), - mnemonicTitle: localize( - { - key: "mirunCellsInSection", - comment: ["&& denotes a mnemonic"], - }, - "&&Run Cells In Section", - ), + ...localize2('runCellsInSection', "Run Cells In Section"), + mnemonicTitle: localize({ key: 'mirunCellsInSection', comment: ['&& denotes a mnemonic'] }, "&&Run Cells In Section"), }, - shortTitle: localize("runCellsInSection", "Run Cells In Section"), + shortTitle: localize('runCellsInSection', "Run Cells In Section"), icon: icons.executeIcon, // TODO @Yoyokrazy replace this with new icon later menu: [ { id: MenuId.NotebookStickyScrollContext, - group: "notebookExecution", - order: 1, + group: 'notebookExecution', + order: 1 }, { id: MenuId.NotebookOutlineActionMenu, - group: "inline", + group: 'inline', order: 1, when: ContextKeyExpr.and( - NotebookOutlineContext.CellKind.isEqualTo( - CellKind.Markup, - ), - NotebookOutlineContext.OutlineElementTarget.isEqualTo( - OutlineTarget.OutlinePane, - ), + NotebookOutlineContext.CellKind.isEqualTo(CellKind.Markup), + NotebookOutlineContext.OutlineElementTarget.isEqualTo(OutlineTarget.OutlinePane), NotebookOutlineContext.CellHasChildren, NotebookOutlineContext.CellHasHeader, - ), + ) }, { id: MenuId.NotebookCellTitle, order: CellToolbarOrder.RunSection, group: CELL_TITLE_CELL_GROUP_ID, - when: executeSectionCondition, - }, - ], + when: executeSectionCondition + } + ] }); } - override async run( - _accessor: ServicesAccessor, - context: any, - ): Promise { + override async run(_accessor: ServicesAccessor, context: any): Promise { let cell: ICellViewModel; - if (checkOutlineEntryContext(context)) { cell = context.outlineEntry.cell; } else if (checkNotebookCellContext(context)) { @@ -145,25 +109,25 @@ export class NotebookRunCellsInSection extends Action2 { return; } - const idx = context.notebookEditor.getViewModel()?.getCellIndex(cell); + if (cell.getEditState() === CellEditState.Editing) { + const foldingController = context.notebookEditor.getContribution(FoldingController.id); + foldingController.recompute(); + } - if (idx === undefined) { + const cellIdx = context.notebookEditor.getViewModel()?.getCellIndex(cell); + if (cellIdx === undefined) { return; } - - const length = context.notebookEditor - .getViewModel() - ?.getFoldedLength(idx); - + const sectionIdx = context.notebookEditor.getViewModel()?.getFoldingStartIndex(cellIdx); + if (sectionIdx === undefined) { + return; + } + const length = context.notebookEditor.getViewModel()?.getFoldedLength(sectionIdx); if (length === undefined) { return; } - const cells = context.notebookEditor.getCellsInRange({ - start: idx, - end: idx + length + 1, - }); - + const cells = context.notebookEditor.getCellsInRange({ start: sectionIdx, end: sectionIdx + length + 1 }); context.notebookEditor.executeNotebookCells(cells); } } @@ -171,45 +135,30 @@ export class NotebookRunCellsInSection extends Action2 { export class NotebookFoldSection extends Action2 { constructor() { super({ - id: "notebook.section.foldSection", + id: 'notebook.section.foldSection', title: { - ...localize2("foldSection", "Fold Section"), - mnemonicTitle: localize( - { - key: "mifoldSection", - comment: ["&& denotes a mnemonic"], - }, - "&&Fold Section", - ), + ...localize2('foldSection', "Fold Section"), + mnemonicTitle: localize({ key: 'mifoldSection', comment: ['&& denotes a mnemonic'] }, "&&Fold Section"), }, - shortTitle: localize("foldSection", "Fold Section"), + shortTitle: localize('foldSection', "Fold Section"), menu: [ { id: MenuId.NotebookOutlineActionMenu, - group: "notebookFolding", + group: 'notebookFolding', order: 2, when: ContextKeyExpr.and( - NotebookOutlineContext.CellKind.isEqualTo( - CellKind.Markup, - ), - NotebookOutlineContext.OutlineElementTarget.isEqualTo( - OutlineTarget.OutlinePane, - ), + NotebookOutlineContext.CellKind.isEqualTo(CellKind.Markup), + NotebookOutlineContext.OutlineElementTarget.isEqualTo(OutlineTarget.OutlinePane), NotebookOutlineContext.CellHasChildren, NotebookOutlineContext.CellHasHeader, - NotebookOutlineContext.CellFoldingState.isEqualTo( - CellFoldingState.Expanded, - ), - ), - }, - ], + NotebookOutlineContext.CellFoldingState.isEqualTo(CellFoldingState.Expanded) + ) + } + ] }); } - override async run( - _accessor: ServicesAccessor, - context: any, - ): Promise { + override async run(_accessor: ServicesAccessor, context: any): Promise { if (!checkOutlineEntryContext(context)) { return; } @@ -217,71 +166,43 @@ export class NotebookFoldSection extends Action2 { this.toggleFoldRange(context.outlineEntry, context.notebookEditor); } - private toggleFoldRange( - entry: OutlineEntry, - notebookEditor: INotebookEditor, - ) { - const foldingController = - notebookEditor.getContribution( - FoldingController.id, - ); - + private toggleFoldRange(entry: OutlineEntry, notebookEditor: INotebookEditor) { + const foldingController = notebookEditor.getContribution(FoldingController.id); const index = entry.index; - const headerLevel = entry.level; - const newFoldingState = CellFoldingState.Collapsed; - foldingController.setFoldingStateDown( - index, - newFoldingState, - headerLevel, - ); + foldingController.setFoldingStateDown(index, newFoldingState, headerLevel); } } export class NotebookExpandSection extends Action2 { constructor() { super({ - id: "notebook.section.expandSection", + id: 'notebook.section.expandSection', title: { - ...localize2("expandSection", "Expand Section"), - mnemonicTitle: localize( - { - key: "miexpandSection", - comment: ["&& denotes a mnemonic"], - }, - "&&Expand Section", - ), + ...localize2('expandSection', "Expand Section"), + mnemonicTitle: localize({ key: 'miexpandSection', comment: ['&& denotes a mnemonic'] }, "&&Expand Section"), }, - shortTitle: localize("expandSection", "Expand Section"), + shortTitle: localize('expandSection', "Expand Section"), menu: [ { id: MenuId.NotebookOutlineActionMenu, - group: "notebookFolding", + group: 'notebookFolding', order: 2, when: ContextKeyExpr.and( - NotebookOutlineContext.CellKind.isEqualTo( - CellKind.Markup, - ), - NotebookOutlineContext.OutlineElementTarget.isEqualTo( - OutlineTarget.OutlinePane, - ), + NotebookOutlineContext.CellKind.isEqualTo(CellKind.Markup), + NotebookOutlineContext.OutlineElementTarget.isEqualTo(OutlineTarget.OutlinePane), NotebookOutlineContext.CellHasChildren, NotebookOutlineContext.CellHasHeader, - NotebookOutlineContext.CellFoldingState.isEqualTo( - CellFoldingState.Collapsed, - ), - ), - }, - ], + NotebookOutlineContext.CellFoldingState.isEqualTo(CellFoldingState.Collapsed) + ) + } + ] }); } - override async run( - _accessor: ServicesAccessor, - context: any, - ): Promise { + override async run(_accessor: ServicesAccessor, context: any): Promise { if (!checkOutlineEntryContext(context)) { return; } @@ -289,26 +210,13 @@ export class NotebookExpandSection extends Action2 { this.toggleFoldRange(context.outlineEntry, context.notebookEditor); } - private toggleFoldRange( - entry: OutlineEntry, - notebookEditor: INotebookEditor, - ) { - const foldingController = - notebookEditor.getContribution( - FoldingController.id, - ); - + private toggleFoldRange(entry: OutlineEntry, notebookEditor: INotebookEditor) { + const foldingController = notebookEditor.getContribution(FoldingController.id); const index = entry.index; - const headerLevel = entry.level; - const newFoldingState = CellFoldingState.Expanded; - foldingController.setFoldingStateDown( - index, - newFoldingState, - headerLevel, - ); + foldingController.setFoldingStateDown(index, newFoldingState, headerLevel); } } @@ -319,9 +227,7 @@ export class NotebookExpandSection extends Action2 { * @param context - Notebook Outline Context containing a notebook editor and outline entry * @returns true if context is valid, false otherwise */ -function checkOutlineEntryContext( - context: any, -): context is NotebookOutlineEntryArgs { +function checkOutlineEntryContext(context: any): context is NotebookOutlineEntryArgs { return !!(context && context.notebookEditor && context.outlineEntry); } diff --git a/Source/vs/workbench/contrib/remote/browser/remoteExplorer.ts b/Source/vs/workbench/contrib/remote/browser/remoteExplorer.ts index 9846132305939..ef741a340d307 100644 --- a/Source/vs/workbench/contrib/remote/browser/remoteExplorer.ts +++ b/Source/vs/workbench/contrib/remote/browser/remoteExplorer.ts @@ -2,282 +2,119 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Action } from "../../../../base/common/actions.js"; -import { Event } from "../../../../base/common/event.js"; -import { - Disposable, - IDisposable, - MutableDisposable, -} from "../../../../base/common/lifecycle.js"; -import { isWeb, OperatingSystem } from "../../../../base/common/platform.js"; -import Severity from "../../../../base/common/severity.js"; -import * as nls from "../../../../nls.js"; -import { - ConfigurationTarget, - IConfigurationService, -} from "../../../../platform/configuration/common/configuration.js"; -import { - Extensions as ConfigurationExtensions, - IConfigurationRegistry, -} from "../../../../platform/configuration/common/configurationRegistry.js"; -import { IContextKeyService } from "../../../../platform/contextkey/common/contextkey.js"; -import { SyncDescriptor } from "../../../../platform/instantiation/common/descriptors.js"; -import { ILogService } from "../../../../platform/log/common/log.js"; -import { - INotificationHandle, - INotificationService, - IPromptChoice, -} from "../../../../platform/notification/common/notification.js"; -import { IOpenerService } from "../../../../platform/opener/common/opener.js"; -import { Registry } from "../../../../platform/registry/common/platform.js"; -import { IRemoteAgentEnvironment } from "../../../../platform/remote/common/remoteAgentEnvironment.js"; -import { - IStorageService, - StorageScope, -} from "../../../../platform/storage/common/storage.js"; -import { - ITunnelService, - RemoteTunnel, - TunnelPrivacyId, -} from "../../../../platform/tunnel/common/tunnel.js"; -import { ViewPaneContainer } from "../../../browser/parts/views/viewPaneContainer.js"; -import { IWorkbenchContribution } from "../../../common/contributions.js"; -import { - Extensions, - IViewContainersRegistry, - IViewsRegistry, - ViewContainer, - ViewContainerLocation, -} from "../../../common/views.js"; -import { - IActivityService, - NumberBadge, -} from "../../../services/activity/common/activity.js"; -import { IWorkbenchConfigurationService } from "../../../services/configuration/common/configuration.js"; -import { IWorkbenchEnvironmentService } from "../../../services/environment/common/environmentService.js"; -import { IHostService } from "../../../services/host/browser/host.js"; -import { IPreferencesService } from "../../../services/preferences/common/preferences.js"; -import { IRemoteAgentService } from "../../../services/remote/common/remoteAgentService.js"; -import { - IRemoteExplorerService, - PORT_AUTO_FALLBACK_SETTING, - PORT_AUTO_FORWARD_SETTING, - PORT_AUTO_SOURCE_SETTING, - PORT_AUTO_SOURCE_SETTING_HYBRID, - PORT_AUTO_SOURCE_SETTING_OUTPUT, - PORT_AUTO_SOURCE_SETTING_PROCESS, - PortsEnablement, - TUNNEL_VIEW_CONTAINER_ID, - TUNNEL_VIEW_ID, -} from "../../../services/remote/common/remoteExplorerService.js"; -import { - Attributes, - AutoTunnelSource, - forwardedPortsFeaturesEnabled, - forwardedPortsViewEnabled, - makeAddress, - mapHasAddressLocalhostOrAllInterfaces, - OnPortForward, - Tunnel, - TunnelCloseReason, - TunnelSource, -} from "../../../services/remote/common/tunnelModel.js"; -import { - IStatusbarEntry, - IStatusbarEntryAccessor, - IStatusbarService, - StatusbarAlignment, -} from "../../../services/statusbar/browser/statusbar.js"; -import { IDebugService } from "../../debug/common/debug.js"; -import { IExternalUriOpenerService } from "../../externalUriOpener/common/externalUriOpenerService.js"; -import { ITerminalService } from "../../terminal/browser/terminal.js"; -import { portsViewIcon } from "./remoteIcons.js"; -import { - ForwardPortAction, - OpenPortInBrowserAction, - OpenPortInPreviewAction, - openPreviewEnabledContext, - TunnelPanel, - TunnelPanelDescriptor, - TunnelViewModel, -} from "./tunnelView.js"; -import { UrlFinder } from "./urlFinder.js"; - -export const VIEWLET_ID = "workbench.view.remote"; - -export class ForwardedPortsView - extends Disposable - implements IWorkbenchContribution -{ - private readonly contextKeyListener = this._register( - new MutableDisposable(), - ); - - private readonly activityBadge = this._register( - new MutableDisposable(), - ); - +import * as nls from '../../../../nls.js'; +import { Disposable, IDisposable, MutableDisposable } from '../../../../base/common/lifecycle.js'; +import { IWorkbenchContribution } from '../../../common/contributions.js'; +import { Extensions, IViewContainersRegistry, IViewsRegistry, ViewContainer, ViewContainerLocation } from '../../../common/views.js'; +import { IRemoteExplorerService, PORT_AUTO_FALLBACK_SETTING, PORT_AUTO_FORWARD_SETTING, PORT_AUTO_SOURCE_SETTING, PORT_AUTO_SOURCE_SETTING_HYBRID, PORT_AUTO_SOURCE_SETTING_OUTPUT, PORT_AUTO_SOURCE_SETTING_PROCESS, PortsEnablement, TUNNEL_VIEW_CONTAINER_ID, TUNNEL_VIEW_ID } from '../../../services/remote/common/remoteExplorerService.js'; +import { Attributes, AutoTunnelSource, forwardedPortsFeaturesEnabled, forwardedPortsViewEnabled, makeAddress, mapHasAddressLocalhostOrAllInterfaces, OnPortForward, Tunnel, TunnelCloseReason, TunnelSource } from '../../../services/remote/common/tunnelModel.js'; +import { ForwardPortAction, OpenPortInBrowserAction, TunnelPanel, TunnelPanelDescriptor, TunnelViewModel, OpenPortInPreviewAction, openPreviewEnabledContext } from './tunnelView.js'; +import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js'; +import { IWorkbenchEnvironmentService } from '../../../services/environment/common/environmentService.js'; +import { Registry } from '../../../../platform/registry/common/platform.js'; +import { IStatusbarEntry, IStatusbarEntryAccessor, IStatusbarService, StatusbarAlignment } from '../../../services/statusbar/browser/statusbar.js'; +import { UrlFinder } from './urlFinder.js'; +import Severity from '../../../../base/common/severity.js'; +import { ConfigurationTarget, IConfigurationService } from '../../../../platform/configuration/common/configuration.js'; +import { INotificationHandle, INotificationService, IPromptChoice } from '../../../../platform/notification/common/notification.js'; +import { IOpenerService } from '../../../../platform/opener/common/opener.js'; +import { ITerminalService } from '../../terminal/browser/terminal.js'; +import { IDebugService } from '../../debug/common/debug.js'; +import { IRemoteAgentService } from '../../../services/remote/common/remoteAgentService.js'; +import { isWeb, OperatingSystem } from '../../../../base/common/platform.js'; +import { ITunnelService, RemoteTunnel, TunnelPrivacyId } from '../../../../platform/tunnel/common/tunnel.js'; +import { SyncDescriptor } from '../../../../platform/instantiation/common/descriptors.js'; +import { ViewPaneContainer } from '../../../browser/parts/views/viewPaneContainer.js'; +import { IActivityService, NumberBadge } from '../../../services/activity/common/activity.js'; +import { portsViewIcon } from './remoteIcons.js'; +import { Event } from '../../../../base/common/event.js'; +import { IExternalUriOpenerService } from '../../externalUriOpener/common/externalUriOpenerService.js'; +import { IHostService } from '../../../services/host/browser/host.js'; +import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from '../../../../platform/configuration/common/configurationRegistry.js'; +import { ILogService } from '../../../../platform/log/common/log.js'; +import { IWorkbenchConfigurationService } from '../../../services/configuration/common/configuration.js'; +import { IRemoteAgentEnvironment } from '../../../../platform/remote/common/remoteAgentEnvironment.js'; +import { Action } from '../../../../base/common/actions.js'; +import { IPreferencesService } from '../../../services/preferences/common/preferences.js'; +import { IStorageService, StorageScope } from '../../../../platform/storage/common/storage.js'; + +export const VIEWLET_ID = 'workbench.view.remote'; + +export class ForwardedPortsView extends Disposable implements IWorkbenchContribution { + private readonly contextKeyListener = this._register(new MutableDisposable()); + private readonly activityBadge = this._register(new MutableDisposable()); private entryAccessor: IStatusbarEntryAccessor | undefined; constructor( - @IContextKeyService - private readonly contextKeyService: IContextKeyService, - @IWorkbenchEnvironmentService - private readonly environmentService: IWorkbenchEnvironmentService, - @IRemoteExplorerService - private readonly remoteExplorerService: IRemoteExplorerService, - @ITunnelService - private readonly tunnelService: ITunnelService, - @IActivityService - private readonly activityService: IActivityService, - @IStatusbarService - private readonly statusbarService: IStatusbarService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, + @IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService, + @IRemoteExplorerService private readonly remoteExplorerService: IRemoteExplorerService, + @ITunnelService private readonly tunnelService: ITunnelService, + @IActivityService private readonly activityService: IActivityService, + @IStatusbarService private readonly statusbarService: IStatusbarService, ) { super(); - - this._register( - Registry.as( - Extensions.ViewsRegistry, - ).registerViewWelcomeContent(TUNNEL_VIEW_ID, { - content: this.environmentService.remoteAuthority - ? nls.localize( - "remoteNoPorts", - "No forwarded ports. Forward a port to access your running services locally.\n[Forward a Port]({0})", - `command:${ForwardPortAction.INLINE_ID}`, - ) - : nls.localize( - "noRemoteNoPorts", - "No forwarded ports. Forward a port to access your locally running services over the internet.\n[Forward a Port]({0})", - `command:${ForwardPortAction.INLINE_ID}`, - ), - }), - ); - + this._register(Registry.as(Extensions.ViewsRegistry).registerViewWelcomeContent(TUNNEL_VIEW_ID, { + content: this.environmentService.remoteAuthority ? nls.localize('remoteNoPorts', "No forwarded ports. Forward a port to access your running services locally.\n[Forward a Port]({0})", `command:${ForwardPortAction.INLINE_ID}`) + : nls.localize('noRemoteNoPorts', "No forwarded ports. Forward a port to access your locally running services over the internet.\n[Forward a Port]({0})", `command:${ForwardPortAction.INLINE_ID}`), + })); this.enableBadgeAndStatusBar(); - this.enableForwardedPortsFeatures(); } private async getViewContainer(): Promise { - return Registry.as( - Extensions.ViewContainersRegistry, - ).registerViewContainer( - { - id: TUNNEL_VIEW_CONTAINER_ID, - title: nls.localize2("ports", "Ports"), - icon: portsViewIcon, - ctorDescriptor: new SyncDescriptor(ViewPaneContainer, [ - TUNNEL_VIEW_CONTAINER_ID, - { mergeViewWithContainerWhenSingleView: true }, - ]), - storageId: TUNNEL_VIEW_CONTAINER_ID, - hideIfEmpty: true, - order: 5, - }, - ViewContainerLocation.Panel, - ); + return Registry.as(Extensions.ViewContainersRegistry).registerViewContainer({ + id: TUNNEL_VIEW_CONTAINER_ID, + title: nls.localize2('ports', "Ports"), + icon: portsViewIcon, + ctorDescriptor: new SyncDescriptor(ViewPaneContainer, [TUNNEL_VIEW_CONTAINER_ID, { mergeViewWithContainerWhenSingleView: true }]), + storageId: TUNNEL_VIEW_CONTAINER_ID, + hideIfEmpty: true, + order: 5 + }, ViewContainerLocation.Panel); } private async enableForwardedPortsFeatures() { this.contextKeyListener.clear(); - const featuresEnabled: boolean = - !!forwardedPortsFeaturesEnabled.getValue(this.contextKeyService); - - const viewEnabled: boolean = !!forwardedPortsViewEnabled.getValue( - this.contextKeyService, - ); + const featuresEnabled: boolean = !!forwardedPortsFeaturesEnabled.getValue(this.contextKeyService); + const viewEnabled: boolean = !!forwardedPortsViewEnabled.getValue(this.contextKeyService); if (featuresEnabled || viewEnabled) { // Also enable the view if it isn't already. if (!viewEnabled) { - this.contextKeyService.createKey( - forwardedPortsViewEnabled.key, - true, - ); + this.contextKeyService.createKey(forwardedPortsViewEnabled.key, true); } - const viewContainer = await this.getViewContainer(); - - const tunnelPanelDescriptor = new TunnelPanelDescriptor( - new TunnelViewModel( - this.remoteExplorerService, - this.tunnelService, - ), - this.environmentService, - ); - - const viewsRegistry = Registry.as( - Extensions.ViewsRegistry, - ); - + const tunnelPanelDescriptor = new TunnelPanelDescriptor(new TunnelViewModel(this.remoteExplorerService, this.tunnelService), this.environmentService); + const viewsRegistry = Registry.as(Extensions.ViewsRegistry); if (viewContainer) { - this.remoteExplorerService.enablePortsFeatures( - !featuresEnabled, - ); - - viewsRegistry.registerViews( - [tunnelPanelDescriptor], - viewContainer, - ); + this.remoteExplorerService.enablePortsFeatures(!featuresEnabled); + viewsRegistry.registerViews([tunnelPanelDescriptor], viewContainer); } } else { - this.contextKeyListener.value = - this.contextKeyService.onDidChangeContext((e) => { - if ( - e.affectsSome( - new Set([ - ...forwardedPortsFeaturesEnabled.keys(), - ...forwardedPortsViewEnabled.keys(), - ]), - ) - ) { - this.enableForwardedPortsFeatures(); - } - }); + this.contextKeyListener.value = this.contextKeyService.onDidChangeContext(e => { + if (e.affectsSome(new Set([...forwardedPortsFeaturesEnabled.keys(), ...forwardedPortsViewEnabled.keys()]))) { + this.enableForwardedPortsFeatures(); + } + }); } } private enableBadgeAndStatusBar() { - const disposable = Registry.as( - Extensions.ViewsRegistry, - ).onViewsRegistered((e) => { - if ( - e.find((view) => - view.views.find( - (viewDescriptor) => - viewDescriptor.id === TUNNEL_VIEW_ID, - ), - ) - ) { - this._register( - Event.debounce( - this.remoteExplorerService.tunnelModel.onForwardPort, - (_last, e) => e, - 50, - )(() => { - this.updateActivityBadge(); - - this.updateStatusBar(); - }), - ); - - this._register( - Event.debounce( - this.remoteExplorerService.tunnelModel.onClosePort, - (_last, e) => e, - 50, - )(() => { - this.updateActivityBadge(); - - this.updateStatusBar(); - }), - ); + const disposable = Registry.as(Extensions.ViewsRegistry).onViewsRegistered(e => { + if (e.find(view => view.views.find(viewDescriptor => viewDescriptor.id === TUNNEL_VIEW_ID))) { + this._register(Event.debounce(this.remoteExplorerService.tunnelModel.onForwardPort, (_last, e) => e, 50)(() => { + this.updateActivityBadge(); + this.updateStatusBar(); + })); + this._register(Event.debounce(this.remoteExplorerService.tunnelModel.onClosePort, (_last, e) => e, 50)(() => { + this.updateActivityBadge(); + this.updateStatusBar(); + })); this.updateActivityBadge(); - this.updateStatusBar(); - disposable.dispose(); } }); @@ -285,38 +122,17 @@ export class ForwardedPortsView private async updateActivityBadge() { if (this.remoteExplorerService.tunnelModel.forwarded.size > 0) { - this.activityBadge.value = this.activityService.showViewActivity( - TUNNEL_VIEW_ID, - { - badge: new NumberBadge( - this.remoteExplorerService.tunnelModel.forwarded.size, - (n) => - n === 1 - ? nls.localize( - "1forwardedPort", - "1 forwarded port", - ) - : nls.localize( - "nForwardedPorts", - "{0} forwarded ports", - n, - ), - ), - }, - ); + this.activityBadge.value = this.activityService.showViewActivity(TUNNEL_VIEW_ID, { + badge: new NumberBadge(this.remoteExplorerService.tunnelModel.forwarded.size, n => n === 1 ? nls.localize('1forwardedPort', "1 forwarded port") : nls.localize('nForwardedPorts', "{0} forwarded ports", n)) + }); + } else { + this.activityBadge.clear(); } } private updateStatusBar() { if (!this.entryAccessor) { - this._register( - (this.entryAccessor = this.statusbarService.addEntry( - this.entry, - "status.forwardedPorts", - StatusbarAlignment.LEFT, - 40, - )), - ); + this._register(this.entryAccessor = this.statusbarService.addEntry(this.entry, 'status.forwardedPorts', StatusbarAlignment.LEFT, 40)); } else { this.entryAccessor.update(this.entry); } @@ -324,56 +140,33 @@ export class ForwardedPortsView private get entry(): IStatusbarEntry { let tooltip: string; - - const count = - this.remoteExplorerService.tunnelModel.forwarded.size + - this.remoteExplorerService.tunnelModel.detected.size; - + const count = this.remoteExplorerService.tunnelModel.forwarded.size + this.remoteExplorerService.tunnelModel.detected.size; const text = `${count}`; - if (count === 0) { - tooltip = nls.localize( - "remote.forwardedPorts.statusbarTextNone", - "No Ports Forwarded", - ); + tooltip = nls.localize('remote.forwardedPorts.statusbarTextNone', "No Ports Forwarded"); } else { - const allTunnels = Array.from( - this.remoteExplorerService.tunnelModel.forwarded.values(), - ); - - allTunnels.push( - ...Array.from( - this.remoteExplorerService.tunnelModel.detected.values(), - ), - ); - - tooltip = nls.localize( - "remote.forwardedPorts.statusbarTooltip", - "Forwarded Ports: {0}", - allTunnels.map((forwarded) => forwarded.remotePort).join(", "), - ); + const allTunnels = Array.from(this.remoteExplorerService.tunnelModel.forwarded.values()); + allTunnels.push(...Array.from(this.remoteExplorerService.tunnelModel.detected.values())); + tooltip = nls.localize('remote.forwardedPorts.statusbarTooltip', "Forwarded Ports: {0}", + allTunnels.map(forwarded => forwarded.remotePort).join(', ')); } - return { - name: nls.localize("status.forwardedPorts", "Forwarded Ports"), + name: nls.localize('status.forwardedPorts', "Forwarded Ports"), text: `$(radio-tower) ${text}`, ariaLabel: tooltip, tooltip, - command: `${TUNNEL_VIEW_ID}.focus`, + command: `${TUNNEL_VIEW_ID}.focus` }; } } + export class PortRestore implements IWorkbenchContribution { constructor( - @IRemoteExplorerService - private readonly remoteExplorerService: IRemoteExplorerService, - @ILogService - private readonly logService: ILogService, + @IRemoteExplorerService private readonly remoteExplorerService: IRemoteExplorerService, + @ILogService private readonly logService: ILogService ) { if (!this.remoteExplorerService.tunnelModel.environmentTunnelsSet) { - Event.once( - this.remoteExplorerService.tunnelModel.onEnvironmentTunnelsSet, - )(async () => { + Event.once(this.remoteExplorerService.tunnelModel.onEnvironmentTunnelsSet)(async () => { await this.restore(); }); } else { @@ -382,455 +175,198 @@ export class PortRestore implements IWorkbenchContribution { } private async restore() { - this.logService.trace("ForwardedPorts: Doing first restore."); - + this.logService.trace('ForwardedPorts: Doing first restore.'); return this.remoteExplorerService.restore(); } } -export class AutomaticPortForwarding - extends Disposable - implements IWorkbenchContribution -{ - private procForwarder: ProcAutomaticPortForwarding | undefined; - private outputForwarder: OutputAutomaticPortForwarding | undefined; +export class AutomaticPortForwarding extends Disposable implements IWorkbenchContribution { + private procForwarder: ProcAutomaticPortForwarding | undefined; + private outputForwarder: OutputAutomaticPortForwarding | undefined; private portListener: IDisposable | undefined; constructor( - @ITerminalService - private readonly terminalService: ITerminalService, - @INotificationService - private readonly notificationService: INotificationService, - @IOpenerService - private readonly openerService: IOpenerService, - @IExternalUriOpenerService - private readonly externalOpenerService: IExternalUriOpenerService, - @IRemoteExplorerService - private readonly remoteExplorerService: IRemoteExplorerService, - @IWorkbenchEnvironmentService - environmentService: IWorkbenchEnvironmentService, - @IContextKeyService - private readonly contextKeyService: IContextKeyService, - @IWorkbenchConfigurationService - private readonly configurationService: IWorkbenchConfigurationService, - @IDebugService - private readonly debugService: IDebugService, - @IRemoteAgentService - remoteAgentService: IRemoteAgentService, - @ITunnelService - private readonly tunnelService: ITunnelService, - @IHostService - private readonly hostService: IHostService, - @ILogService - private readonly logService: ILogService, - @IStorageService - private readonly storageService: IStorageService, - @IPreferencesService - private readonly preferencesService: IPreferencesService, + @ITerminalService private readonly terminalService: ITerminalService, + @INotificationService private readonly notificationService: INotificationService, + @IOpenerService private readonly openerService: IOpenerService, + @IExternalUriOpenerService private readonly externalOpenerService: IExternalUriOpenerService, + @IRemoteExplorerService private readonly remoteExplorerService: IRemoteExplorerService, + @IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService, + @IContextKeyService private readonly contextKeyService: IContextKeyService, + @IWorkbenchConfigurationService private readonly configurationService: IWorkbenchConfigurationService, + @IDebugService private readonly debugService: IDebugService, + @IRemoteAgentService remoteAgentService: IRemoteAgentService, + @ITunnelService private readonly tunnelService: ITunnelService, + @IHostService private readonly hostService: IHostService, + @ILogService private readonly logService: ILogService, + @IStorageService private readonly storageService: IStorageService, + @IPreferencesService private readonly preferencesService: IPreferencesService, ) { super(); - if (!environmentService.remoteAuthority) { return; } - configurationService - .whenRemoteConfigurationLoaded() - .then(() => remoteAgentService.getEnvironment()) - .then((environment) => { - this.setup(environment); - - this._register( - configurationService.onDidChangeConfiguration((e) => { - if (e.affectsConfiguration(PORT_AUTO_SOURCE_SETTING)) { - this.setup(environment); - } else if ( - e.affectsConfiguration( - PORT_AUTO_FALLBACK_SETTING, - ) && - !this.portListener - ) { - this.listenForPorts(); - } - }), - ); - }); + configurationService.whenRemoteConfigurationLoaded().then(() => remoteAgentService.getEnvironment()).then(environment => { + this.setup(environment); + this._register(configurationService.onDidChangeConfiguration(e => { + if (e.affectsConfiguration(PORT_AUTO_SOURCE_SETTING)) { + this.setup(environment); + } else if (e.affectsConfiguration(PORT_AUTO_FALLBACK_SETTING) && !this.portListener) { + this.listenForPorts(); + } + })); + }); - if ( - !this.storageService.getBoolean( - "processPortForwardingFallback", - StorageScope.WORKSPACE, - true, - ) - ) { - this.configurationService.updateValue( - PORT_AUTO_FALLBACK_SETTING, - 0, - ConfigurationTarget.WORKSPACE, - ); + if (!this.storageService.getBoolean('processPortForwardingFallback', StorageScope.WORKSPACE, true)) { + this.configurationService.updateValue(PORT_AUTO_FALLBACK_SETTING, 0, ConfigurationTarget.WORKSPACE); } } private getPortAutoFallbackNumber(): number { - const fallbackAt = this.configurationService.inspect( - PORT_AUTO_FALLBACK_SETTING, - ); - - if ( - fallbackAt.value !== undefined && - (fallbackAt.value === 0 || - fallbackAt.value !== fallbackAt.defaultValue) - ) { + const fallbackAt = this.configurationService.inspect(PORT_AUTO_FALLBACK_SETTING); + if ((fallbackAt.value !== undefined) && (fallbackAt.value === 0 || (fallbackAt.value !== fallbackAt.defaultValue))) { return fallbackAt.value; } - - const inspectSource = this.configurationService.inspect( - PORT_AUTO_SOURCE_SETTING, - ); - - if ( - inspectSource.applicationValue === - PORT_AUTO_SOURCE_SETTING_PROCESS || + const inspectSource = this.configurationService.inspect(PORT_AUTO_SOURCE_SETTING); + if (inspectSource.applicationValue === PORT_AUTO_SOURCE_SETTING_PROCESS || inspectSource.userValue === PORT_AUTO_SOURCE_SETTING_PROCESS || inspectSource.userLocalValue === PORT_AUTO_SOURCE_SETTING_PROCESS || - inspectSource.userRemoteValue === - PORT_AUTO_SOURCE_SETTING_PROCESS || - inspectSource.workspaceFolderValue === - PORT_AUTO_SOURCE_SETTING_PROCESS || - inspectSource.workspaceValue === PORT_AUTO_SOURCE_SETTING_PROCESS - ) { + inspectSource.userRemoteValue === PORT_AUTO_SOURCE_SETTING_PROCESS || + inspectSource.workspaceFolderValue === PORT_AUTO_SOURCE_SETTING_PROCESS || + inspectSource.workspaceValue === PORT_AUTO_SOURCE_SETTING_PROCESS) { return 0; } - return fallbackAt.value ?? 20; } private listenForPorts() { let fallbackAt = this.getPortAutoFallbackNumber(); - if (fallbackAt === 0) { this.portListener?.dispose(); - return; } - if ( - this.procForwarder && - !this.portListener && - this.configurationService.getValue(PORT_AUTO_SOURCE_SETTING) === - PORT_AUTO_SOURCE_SETTING_PROCESS - ) { - this.portListener = this._register( - this.remoteExplorerService.tunnelModel.onForwardPort( - async () => { - fallbackAt = this.getPortAutoFallbackNumber(); - - if (fallbackAt === 0) { - this.portListener?.dispose(); - - return; - } - - if ( - Array.from( - this.remoteExplorerService.tunnelModel.forwarded.values(), - ).filter( - (tunnel) => - tunnel.source.source === TunnelSource.Auto, - ).length > fallbackAt - ) { - await this.configurationService.updateValue( - PORT_AUTO_SOURCE_SETTING, - PORT_AUTO_SOURCE_SETTING_HYBRID, - ); - - this.notificationService.notify({ - message: nls.localize( - "remote.autoForwardPortsSource.fallback", - "Over 20 ports have been automatically forwarded. The `process` based automatic port forwarding has been switched to `hybrid` in settings. Some ports may no longer be detected.", - ), - severity: Severity.Warning, - actions: { - primary: [ - new Action( - "switchBack", - nls.localize( - "remote.autoForwardPortsSource.fallback.switchBack", - "Undo", - ), - undefined, - true, - async () => { - await this.configurationService.updateValue( - PORT_AUTO_SOURCE_SETTING, - PORT_AUTO_SOURCE_SETTING_PROCESS, - ); - - await this.configurationService.updateValue( - PORT_AUTO_FALLBACK_SETTING, - 0, - ConfigurationTarget.WORKSPACE, - ); - - this.portListener?.dispose(); - - this.portListener = undefined; - }, - ), - new Action( - "showPortSourceSetting", - nls.localize( - "remote.autoForwardPortsSource.fallback.showPortSourceSetting", - "Show Setting", - ), - undefined, - true, - async () => { - await this.preferencesService.openSettings( - { - query: "remote.autoForwardPortsSource", - }, - ); - }, - ), - ], - }, - }); + if (this.procForwarder && !this.portListener && (this.configurationService.getValue(PORT_AUTO_SOURCE_SETTING) === PORT_AUTO_SOURCE_SETTING_PROCESS)) { + this.portListener = this._register(this.remoteExplorerService.tunnelModel.onForwardPort(async () => { + fallbackAt = this.getPortAutoFallbackNumber(); + if (fallbackAt === 0) { + this.portListener?.dispose(); + return; + } + if (Array.from(this.remoteExplorerService.tunnelModel.forwarded.values()).filter(tunnel => tunnel.source.source === TunnelSource.Auto).length > fallbackAt) { + await this.configurationService.updateValue(PORT_AUTO_SOURCE_SETTING, PORT_AUTO_SOURCE_SETTING_HYBRID); + this.notificationService.notify({ + message: nls.localize('remote.autoForwardPortsSource.fallback', "Over 20 ports have been automatically forwarded. The `process` based automatic port forwarding has been switched to `hybrid` in settings. Some ports may no longer be detected."), + severity: Severity.Warning, + actions: { + primary: [ + new Action('switchBack', nls.localize('remote.autoForwardPortsSource.fallback.switchBack', "Undo"), undefined, true, async () => { + await this.configurationService.updateValue(PORT_AUTO_SOURCE_SETTING, PORT_AUTO_SOURCE_SETTING_PROCESS); + await this.configurationService.updateValue(PORT_AUTO_FALLBACK_SETTING, 0, ConfigurationTarget.WORKSPACE); + this.portListener?.dispose(); + this.portListener = undefined; + }), + new Action('showPortSourceSetting', nls.localize('remote.autoForwardPortsSource.fallback.showPortSourceSetting', "Show Setting"), undefined, true, async () => { + await this.preferencesService.openSettings({ + query: 'remote.autoForwardPortsSource' + }); + }) + ] } - }, - ), - ); + }); + } + })); } else { this.portListener?.dispose(); - this.portListener = undefined; } } + private setup(environment: IRemoteAgentEnvironment | null) { const alreadyForwarded = this.procForwarder?.forwarded; - const isSwitch = this.outputForwarder || this.procForwarder; - this.procForwarder?.dispose(); - this.procForwarder = undefined; - this.outputForwarder?.dispose(); - this.outputForwarder = undefined; - if (environment?.os !== OperatingSystem.Linux) { - if ( - this.configurationService.inspect( - PORT_AUTO_SOURCE_SETTING, - ).default?.value !== PORT_AUTO_SOURCE_SETTING_OUTPUT - ) { - Registry.as( - ConfigurationExtensions.Configuration, - ).registerDefaultConfigurations([ - { - overrides: { - "remote.autoForwardPortsSource": - PORT_AUTO_SOURCE_SETTING_OUTPUT, - }, - }, - ]); + if (this.configurationService.inspect(PORT_AUTO_SOURCE_SETTING).default?.value !== PORT_AUTO_SOURCE_SETTING_OUTPUT) { + Registry.as(ConfigurationExtensions.Configuration) + .registerDefaultConfigurations([{ overrides: { 'remote.autoForwardPortsSource': PORT_AUTO_SOURCE_SETTING_OUTPUT } }]); } - - this.outputForwarder = this._register( - new OutputAutomaticPortForwarding( - this.terminalService, - this.notificationService, - this.openerService, - this.externalOpenerService, - this.remoteExplorerService, - this.configurationService, - this.debugService, - this.tunnelService, - this.hostService, - this.logService, - this.contextKeyService, - () => false, - ), - ); + this.outputForwarder = this._register(new OutputAutomaticPortForwarding(this.terminalService, this.notificationService, this.openerService, this.externalOpenerService, + this.remoteExplorerService, this.configurationService, this.debugService, this.tunnelService, this.hostService, this.logService, this.contextKeyService, () => false)); } else { - const useProc = () => - this.configurationService.getValue(PORT_AUTO_SOURCE_SETTING) === - PORT_AUTO_SOURCE_SETTING_PROCESS; - + const useProc = () => (this.configurationService.getValue(PORT_AUTO_SOURCE_SETTING) === PORT_AUTO_SOURCE_SETTING_PROCESS); if (useProc()) { - this.procForwarder = this._register( - new ProcAutomaticPortForwarding( - false, - alreadyForwarded, - !isSwitch, - this.configurationService, - this.remoteExplorerService, - this.notificationService, - this.openerService, - this.externalOpenerService, - this.tunnelService, - this.hostService, - this.logService, - this.contextKeyService, - ), - ); - } else if ( - this.configurationService.getValue(PORT_AUTO_SOURCE_SETTING) === - PORT_AUTO_SOURCE_SETTING_HYBRID - ) { - this.procForwarder = this._register( - new ProcAutomaticPortForwarding( - true, - alreadyForwarded, - !isSwitch, - this.configurationService, - this.remoteExplorerService, - this.notificationService, - this.openerService, - this.externalOpenerService, - this.tunnelService, - this.hostService, - this.logService, - this.contextKeyService, - ), - ); + this.procForwarder = this._register(new ProcAutomaticPortForwarding(false, alreadyForwarded, !isSwitch, this.configurationService, this.remoteExplorerService, this.notificationService, + this.openerService, this.externalOpenerService, this.tunnelService, this.hostService, this.logService, this.contextKeyService)); + } else if (this.configurationService.getValue(PORT_AUTO_SOURCE_SETTING) === PORT_AUTO_SOURCE_SETTING_HYBRID) { + this.procForwarder = this._register(new ProcAutomaticPortForwarding(true, alreadyForwarded, !isSwitch, this.configurationService, this.remoteExplorerService, this.notificationService, + this.openerService, this.externalOpenerService, this.tunnelService, this.hostService, this.logService, this.contextKeyService)); } - - this.outputForwarder = this._register( - new OutputAutomaticPortForwarding( - this.terminalService, - this.notificationService, - this.openerService, - this.externalOpenerService, - this.remoteExplorerService, - this.configurationService, - this.debugService, - this.tunnelService, - this.hostService, - this.logService, - this.contextKeyService, - useProc, - ), - ); + this.outputForwarder = this._register(new OutputAutomaticPortForwarding(this.terminalService, this.notificationService, this.openerService, this.externalOpenerService, + this.remoteExplorerService, this.configurationService, this.debugService, this.tunnelService, this.hostService, this.logService, this.contextKeyService, useProc)); } - this.listenForPorts(); } } + class OnAutoForwardedAction extends Disposable { private lastNotifyTime: Date; - private static NOTIFY_COOL_DOWN = 5000; // milliseconds private lastNotification: INotificationHandle | undefined; - private lastShownPort: number | undefined; - private doActionTunnels: RemoteTunnel[] | undefined; - private alreadyOpenedOnce: Set = new Set(); - constructor( - private readonly notificationService: INotificationService, + constructor(private readonly notificationService: INotificationService, private readonly remoteExplorerService: IRemoteExplorerService, private readonly openerService: IOpenerService, private readonly externalOpenerService: IExternalUriOpenerService, private readonly tunnelService: ITunnelService, private readonly hostService: IHostService, private readonly logService: ILogService, - private readonly contextKeyService: IContextKeyService, - ) { + private readonly contextKeyService: IContextKeyService) { super(); - this.lastNotifyTime = new Date(); - this.lastNotifyTime.setFullYear(this.lastNotifyTime.getFullYear() - 1); } public async doAction(tunnels: RemoteTunnel[]): Promise { - this.logService.trace( - `ForwardedPorts: (OnAutoForwardedAction) Starting action for ${tunnels[0]?.tunnelRemotePort}`, - ); - + this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) Starting action for ${tunnels[0]?.tunnelRemotePort}`); this.doActionTunnels = tunnels; - const tunnel = await this.portNumberHeuristicDelay(); - - this.logService.trace( - `ForwardedPorts: (OnAutoForwardedAction) Heuristic chose ${tunnel?.tunnelRemotePort}`, - ); - + this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) Heuristic chose ${tunnel?.tunnelRemotePort}`); if (tunnel) { - const allAttributes = - await this.remoteExplorerService.tunnelModel.getAttributes([ - { - port: tunnel.tunnelRemotePort, - host: tunnel.tunnelRemoteHost, - }, - ]); - - const attributes = allAttributes?.get( - tunnel.tunnelRemotePort, - )?.onAutoForward; - - this.logService.trace( - `ForwardedPorts: (OnAutoForwardedAction) onAutoForward action is ${attributes}`, - ); - + const allAttributes = await this.remoteExplorerService.tunnelModel.getAttributes([{ port: tunnel.tunnelRemotePort, host: tunnel.tunnelRemoteHost }]); + const attributes = allAttributes?.get(tunnel.tunnelRemotePort)?.onAutoForward; + this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) onAutoForward action is ${attributes}`); switch (attributes) { case OnPortForward.OpenBrowserOnce: { if (this.alreadyOpenedOnce.has(tunnel.localAddress)) { break; } - this.alreadyOpenedOnce.add(tunnel.localAddress); // Intentionally do not break so that the open browser path can be run. } - case OnPortForward.OpenBrowser: { - const address = makeAddress( - tunnel.tunnelRemoteHost, - tunnel.tunnelRemotePort, - ); - - await OpenPortInBrowserAction.run( - this.remoteExplorerService.tunnelModel, - this.openerService, - address, - ); - + const address = makeAddress(tunnel.tunnelRemoteHost, tunnel.tunnelRemotePort); + await OpenPortInBrowserAction.run(this.remoteExplorerService.tunnelModel, this.openerService, address); break; } - case OnPortForward.OpenPreview: { - const address = makeAddress( - tunnel.tunnelRemoteHost, - tunnel.tunnelRemotePort, - ); - - await OpenPortInPreviewAction.run( - this.remoteExplorerService.tunnelModel, - this.openerService, - this.externalOpenerService, - address, - ); - + const address = makeAddress(tunnel.tunnelRemoteHost, tunnel.tunnelRemotePort); + await OpenPortInPreviewAction.run(this.remoteExplorerService.tunnelModel, this.openerService, this.externalOpenerService, address); break; } - - case OnPortForward.Silent: - break; - + case OnPortForward.Silent: break; default: { - const elapsed = - new Date().getTime() - this.lastNotifyTime.getTime(); - - this.logService.trace( - `ForwardedPorts: (OnAutoForwardedAction) time elapsed since last notification ${elapsed} ms`, - ); - + const elapsed = new Date().getTime() - this.lastNotifyTime.getTime(); + this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) time elapsed since last notification ${elapsed} ms`); if (elapsed > OnAutoForwardedAction.NOTIFY_COOL_DOWN) { await this.showNotification(tunnel); } @@ -841,67 +377,36 @@ class OnAutoForwardedAction extends Disposable { public hide(removedPorts: number[]) { if (this.doActionTunnels) { - this.doActionTunnels = this.doActionTunnels.filter( - (value) => !removedPorts.includes(value.tunnelRemotePort), - ); + this.doActionTunnels = this.doActionTunnels.filter(value => !removedPorts.includes(value.tunnelRemotePort)); } - - if ( - this.lastShownPort && - removedPorts.indexOf(this.lastShownPort) >= 0 - ) { + if (this.lastShownPort && removedPorts.indexOf(this.lastShownPort) >= 0) { this.lastNotification?.close(); } } private newerTunnel: RemoteTunnel | undefined; - - private async portNumberHeuristicDelay(): Promise< - RemoteTunnel | undefined - > { - this.logService.trace( - `ForwardedPorts: (OnAutoForwardedAction) Starting heuristic delay`, - ); - + private async portNumberHeuristicDelay(): Promise { + this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) Starting heuristic delay`); if (!this.doActionTunnels || this.doActionTunnels.length === 0) { return; } - - this.doActionTunnels = this.doActionTunnels.sort( - (a, b) => a.tunnelRemotePort - b.tunnelRemotePort, - ); - + this.doActionTunnels = this.doActionTunnels.sort((a, b) => a.tunnelRemotePort - b.tunnelRemotePort); const firstTunnel = this.doActionTunnels.shift()!; // Heuristic. if (firstTunnel.tunnelRemotePort % 1000 === 0) { - this.logService.trace( - `ForwardedPorts: (OnAutoForwardedAction) Heuristic chose tunnel because % 1000: ${firstTunnel.tunnelRemotePort}`, - ); - + this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) Heuristic chose tunnel because % 1000: ${firstTunnel.tunnelRemotePort}`); this.newerTunnel = firstTunnel; - return firstTunnel; // 9229 is the node inspect port - } else if ( - firstTunnel.tunnelRemotePort < 10000 && - firstTunnel.tunnelRemotePort !== 9229 - ) { - this.logService.trace( - `ForwardedPorts: (OnAutoForwardedAction) Heuristic chose tunnel because < 10000: ${firstTunnel.tunnelRemotePort}`, - ); - + } else if (firstTunnel.tunnelRemotePort < 10000 && firstTunnel.tunnelRemotePort !== 9229) { + this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) Heuristic chose tunnel because < 10000: ${firstTunnel.tunnelRemotePort}`); this.newerTunnel = firstTunnel; - return firstTunnel; } - this.logService.trace( - `ForwardedPorts: (OnAutoForwardedAction) Waiting for "better" tunnel than ${firstTunnel.tunnelRemotePort}`, - ); - + this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) Waiting for "better" tunnel than ${firstTunnel.tunnelRemotePort}`); this.newerTunnel = undefined; - - return new Promise((resolve) => { + return new Promise(resolve => { setTimeout(() => { if (this.newerTunnel) { resolve(undefined); @@ -915,238 +420,119 @@ class OnAutoForwardedAction extends Disposable { } private async basicMessage(tunnel: RemoteTunnel) { - const properties = - await this.remoteExplorerService.tunnelModel.getAttributes( - [ - { - host: tunnel.tunnelRemoteHost, - port: tunnel.tunnelRemotePort, - }, - ], - false, - ); - + const properties = await this.remoteExplorerService.tunnelModel.getAttributes([{ host: tunnel.tunnelRemoteHost, port: tunnel.tunnelRemotePort }], false); const label = properties?.get(tunnel.tunnelRemotePort)?.label; - - return nls.localize( - "remote.tunnelsView.automaticForward", - "Your application{0} running on port {1} is available. ", - label ? ` (${label})` : "", - tunnel.tunnelRemotePort, - ); + return nls.localize('remote.tunnelsView.automaticForward', "Your application{0} running on port {1} is available. ", + label ? ` (${label})` : '', + tunnel.tunnelRemotePort); } private linkMessage() { return nls.localize( - { - key: "remote.tunnelsView.notificationLink2", - comment: [ - "[See all forwarded ports]({0}) is a link. Only translate `See all forwarded ports`. Do not change brackets and parentheses or {0}", - ], - }, - "[See all forwarded ports]({0})", - `command:${TunnelPanel.ID}.focus`, - ); + { key: 'remote.tunnelsView.notificationLink2', comment: ['[See all forwarded ports]({0}) is a link. Only translate `See all forwarded ports`. Do not change brackets and parentheses or {0}'] }, + "[See all forwarded ports]({0})", `command:${TunnelPanel.ID}.focus`); } private async showNotification(tunnel: RemoteTunnel) { - if (!(await this.hostService.hadLastFocus())) { + if (!await this.hostService.hadLastFocus()) { return; } this.lastNotification?.close(); - let message = await this.basicMessage(tunnel); - const choices = [this.openBrowserChoice(tunnel)]; - - if ( - !isWeb || - openPreviewEnabledContext.getValue(this.contextKeyService) - ) { + if (!isWeb || openPreviewEnabledContext.getValue(this.contextKeyService)) { choices.push(this.openPreviewChoice(tunnel)); } - if ( - tunnel.tunnelLocalPort !== tunnel.tunnelRemotePort && - this.tunnelService.canElevate && - this.tunnelService.isPortPrivileged(tunnel.tunnelRemotePort) - ) { + if ((tunnel.tunnelLocalPort !== tunnel.tunnelRemotePort) && this.tunnelService.canElevate && this.tunnelService.isPortPrivileged(tunnel.tunnelRemotePort)) { // Privileged ports are not on Windows, so it's safe to use "superuser" - message += nls.localize( - "remote.tunnelsView.elevationMessage", - "You'll need to run as superuser to use port {0} locally. ", - tunnel.tunnelRemotePort, - ); - + message += nls.localize('remote.tunnelsView.elevationMessage', "You'll need to run as superuser to use port {0} locally. ", tunnel.tunnelRemotePort); choices.unshift(this.elevateChoice(tunnel)); } - if ( - tunnel.privacy === TunnelPrivacyId.Private && - isWeb && - this.tunnelService.canChangePrivacy - ) { + if (tunnel.privacy === TunnelPrivacyId.Private && isWeb && this.tunnelService.canChangePrivacy) { choices.push(this.makePublicChoice(tunnel)); } message += this.linkMessage(); - this.lastNotification = this.notificationService.prompt( - Severity.Info, - message, - choices, - { - neverShowAgain: { - id: "remote.tunnelsView.autoForwardNeverShow", - isSecondary: true, - }, - }, - ); - + this.lastNotification = this.notificationService.prompt(Severity.Info, message, choices, { neverShowAgain: { id: 'remote.tunnelsView.autoForwardNeverShow', isSecondary: true } }); this.lastShownPort = tunnel.tunnelRemotePort; - this.lastNotifyTime = new Date(); - this.lastNotification.onDidClose(() => { this.lastNotification = undefined; - this.lastShownPort = undefined; }); } private makePublicChoice(tunnel: RemoteTunnel): IPromptChoice { return { - label: nls.localize("remote.tunnelsView.makePublic", "Make Public"), + label: nls.localize('remote.tunnelsView.makePublic', "Make Public"), run: async () => { - const oldTunnelDetails = mapHasAddressLocalhostOrAllInterfaces( - this.remoteExplorerService.tunnelModel.forwarded, - tunnel.tunnelRemoteHost, - tunnel.tunnelRemotePort, - ); - - await this.remoteExplorerService.close( - { - host: tunnel.tunnelRemoteHost, - port: tunnel.tunnelRemotePort, - }, - TunnelCloseReason.Other, - ); - + const oldTunnelDetails = mapHasAddressLocalhostOrAllInterfaces(this.remoteExplorerService.tunnelModel.forwarded, tunnel.tunnelRemoteHost, tunnel.tunnelRemotePort); + await this.remoteExplorerService.close({ host: tunnel.tunnelRemoteHost, port: tunnel.tunnelRemotePort }, TunnelCloseReason.Other); return this.remoteExplorerService.forward({ - remote: { - host: tunnel.tunnelRemoteHost, - port: tunnel.tunnelRemotePort, - }, + remote: { host: tunnel.tunnelRemoteHost, port: tunnel.tunnelRemotePort }, local: tunnel.tunnelLocalPort, name: oldTunnelDetails?.name, elevateIfNeeded: true, privacy: TunnelPrivacyId.Public, - source: oldTunnelDetails?.source, + source: oldTunnelDetails?.source }); - }, + } }; } private openBrowserChoice(tunnel: RemoteTunnel): IPromptChoice { - const address = makeAddress( - tunnel.tunnelRemoteHost, - tunnel.tunnelRemotePort, - ); - + const address = makeAddress(tunnel.tunnelRemoteHost, tunnel.tunnelRemotePort); return { label: OpenPortInBrowserAction.LABEL, - run: () => - OpenPortInBrowserAction.run( - this.remoteExplorerService.tunnelModel, - this.openerService, - address, - ), + run: () => OpenPortInBrowserAction.run(this.remoteExplorerService.tunnelModel, this.openerService, address) }; } private openPreviewChoice(tunnel: RemoteTunnel): IPromptChoice { - const address = makeAddress( - tunnel.tunnelRemoteHost, - tunnel.tunnelRemotePort, - ); - + const address = makeAddress(tunnel.tunnelRemoteHost, tunnel.tunnelRemotePort); return { label: OpenPortInPreviewAction.LABEL, - run: () => - OpenPortInPreviewAction.run( - this.remoteExplorerService.tunnelModel, - this.openerService, - this.externalOpenerService, - address, - ), + run: () => OpenPortInPreviewAction.run(this.remoteExplorerService.tunnelModel, this.openerService, this.externalOpenerService, address) }; } private elevateChoice(tunnel: RemoteTunnel): IPromptChoice { return { // Privileged ports are not on Windows, so it's ok to stick to just "sudo". - label: nls.localize( - "remote.tunnelsView.elevationButton", - "Use Port {0} as Sudo...", - tunnel.tunnelRemotePort, - ), + label: nls.localize('remote.tunnelsView.elevationButton', "Use Port {0} as Sudo...", tunnel.tunnelRemotePort), run: async () => { - await this.remoteExplorerService.close( - { - host: tunnel.tunnelRemoteHost, - port: tunnel.tunnelRemotePort, - }, - TunnelCloseReason.Other, - ); - + await this.remoteExplorerService.close({ host: tunnel.tunnelRemoteHost, port: tunnel.tunnelRemotePort }, TunnelCloseReason.Other); const newTunnel = await this.remoteExplorerService.forward({ - remote: { - host: tunnel.tunnelRemoteHost, - port: tunnel.tunnelRemotePort, - }, + remote: { host: tunnel.tunnelRemoteHost, port: tunnel.tunnelRemotePort }, local: tunnel.tunnelRemotePort, elevateIfNeeded: true, - source: AutoTunnelSource, + source: AutoTunnelSource }); - - if (!newTunnel || typeof newTunnel === "string") { + if (!newTunnel || (typeof newTunnel === 'string')) { return; } - this.lastNotification?.close(); - this.lastShownPort = newTunnel.tunnelRemotePort; - - this.lastNotification = this.notificationService.prompt( - Severity.Info, - (await this.basicMessage(newTunnel)) + this.linkMessage(), - [ - this.openBrowserChoice(newTunnel), - this.openPreviewChoice(tunnel), - ], - { - neverShowAgain: { - id: "remote.tunnelsView.autoForwardNeverShow", - isSecondary: true, - }, - }, - ); - + this.lastNotification = this.notificationService.prompt(Severity.Info, + await this.basicMessage(newTunnel) + this.linkMessage(), + [this.openBrowserChoice(newTunnel), this.openPreviewChoice(tunnel)], + { neverShowAgain: { id: 'remote.tunnelsView.autoForwardNeverShow', isSecondary: true } }); this.lastNotification.onDidClose(() => { this.lastNotification = undefined; - this.lastShownPort = undefined; }); - }, + } }; } } + class OutputAutomaticPortForwarding extends Disposable { private portsFeatures?: IDisposable; - private urlFinder?: UrlFinder; - private notifier: OnAutoForwardedAction; constructor( @@ -1161,46 +547,23 @@ class OutputAutomaticPortForwarding extends Disposable { readonly hostService: IHostService, readonly logService: ILogService, readonly contextKeyService: IContextKeyService, - readonly privilegedOnly: () => boolean, + readonly privilegedOnly: () => boolean ) { super(); - - this.notifier = new OnAutoForwardedAction( - notificationService, - remoteExplorerService, - openerService, - externalOpenerService, - tunnelService, - hostService, - logService, - contextKeyService, - ); - - this._register( - configurationService.onDidChangeConfiguration((e) => { - if (e.affectsConfiguration(PORT_AUTO_FORWARD_SETTING)) { - this.tryStartStopUrlFinder(); - } - }), - ); - - this.portsFeatures = this._register( - this.remoteExplorerService.onEnabledPortsFeatures(() => { + this.notifier = new OnAutoForwardedAction(notificationService, remoteExplorerService, openerService, externalOpenerService, tunnelService, hostService, logService, contextKeyService); + this._register(configurationService.onDidChangeConfiguration((e) => { + if (e.affectsConfiguration(PORT_AUTO_FORWARD_SETTING)) { this.tryStartStopUrlFinder(); - }), - ); + } + })); + this.portsFeatures = this._register(this.remoteExplorerService.onEnabledPortsFeatures(() => { + this.tryStartStopUrlFinder(); + })); this.tryStartStopUrlFinder(); - if ( - configurationService.getValue(PORT_AUTO_SOURCE_SETTING) === - PORT_AUTO_SOURCE_SETTING_HYBRID - ) { - this._register( - this.tunnelService.onTunnelClosed((tunnel) => - this.notifier.hide([tunnel.port]), - ), - ); + if (configurationService.getValue(PORT_AUTO_SOURCE_SETTING) === PORT_AUTO_SOURCE_SETTING_HYBRID) { + this._register(this.tunnelService.onTunnelClosed(tunnel => this.notifier.hide([tunnel.port]))); } } @@ -1213,80 +576,43 @@ class OutputAutomaticPortForwarding extends Disposable { } private startUrlFinder() { - if ( - !this.urlFinder && - this.remoteExplorerService.portsFeaturesEnabled !== - PortsEnablement.AdditionalFeatures - ) { + if (!this.urlFinder && (this.remoteExplorerService.portsFeaturesEnabled !== PortsEnablement.AdditionalFeatures)) { return; } - this.portsFeatures?.dispose(); - - this.urlFinder = this._register( - new UrlFinder(this.terminalService, this.debugService), - ); - - this._register( - this.urlFinder.onDidMatchLocalUrl(async (localUrl) => { - if ( - mapHasAddressLocalhostOrAllInterfaces( - this.remoteExplorerService.tunnelModel.detected, - localUrl.host, - localUrl.port, - ) - ) { - return; - } - - const attributes = ( - await this.remoteExplorerService.tunnelModel.getAttributes([ - localUrl, - ]) - )?.get(localUrl.port); - - if (attributes?.onAutoForward === OnPortForward.Ignore) { - return; - } - - if ( - this.privilegedOnly() && - !this.tunnelService.isPortPrivileged(localUrl.port) - ) { - return; - } - - const forwarded = await this.remoteExplorerService.forward( - { remote: localUrl, source: AutoTunnelSource }, - attributes ?? null, - ); - - if (forwarded && typeof forwarded !== "string") { - this.notifier.doAction([forwarded]); - } - }), - ); + this.urlFinder = this._register(new UrlFinder(this.terminalService, this.debugService)); + this._register(this.urlFinder.onDidMatchLocalUrl(async (localUrl) => { + if (mapHasAddressLocalhostOrAllInterfaces(this.remoteExplorerService.tunnelModel.detected, localUrl.host, localUrl.port)) { + return; + } + const attributes = (await this.remoteExplorerService.tunnelModel.getAttributes([localUrl]))?.get(localUrl.port); + if (attributes?.onAutoForward === OnPortForward.Ignore) { + return; + } + if (this.privilegedOnly() && !this.tunnelService.isPortPrivileged(localUrl.port)) { + return; + } + const forwarded = await this.remoteExplorerService.forward({ remote: localUrl, source: AutoTunnelSource }, attributes ?? null); + if (forwarded && (typeof forwarded !== 'string')) { + this.notifier.doAction([forwarded]); + } + })); } private stopUrlFinder() { if (this.urlFinder) { this.urlFinder.dispose(); - this.urlFinder = undefined; } } } + class ProcAutomaticPortForwarding extends Disposable { private candidateListener: IDisposable | undefined; - private autoForwarded: Set = new Set(); - private notifiedOnly: Set = new Set(); - private notifier: OnAutoForwardedAction; - private initialCandidates: Set = new Set(); - private portsFeatures: IDisposable | undefined; constructor( @@ -1304,20 +630,8 @@ class ProcAutomaticPortForwarding extends Disposable { readonly contextKeyService: IContextKeyService, ) { super(); - - this.notifier = new OnAutoForwardedAction( - notificationService, - remoteExplorerService, - openerService, - externalOpenerService, - tunnelService, - hostService, - logService, - contextKeyService, - ); - - alreadyAutoForwarded?.forEach((port) => this.autoForwarded.add(port)); - + this.notifier = new OnAutoForwardedAction(notificationService, remoteExplorerService, openerService, externalOpenerService, tunnelService, hostService, logService, contextKeyService); + alreadyAutoForwarded?.forEach(port => this.autoForwarded.add(port)); this.initialize(); } @@ -1327,26 +641,18 @@ class ProcAutomaticPortForwarding extends Disposable { private async initialize() { if (!this.remoteExplorerService.tunnelModel.environmentTunnelsSet) { - await new Promise((resolve) => - this.remoteExplorerService.tunnelModel.onEnvironmentTunnelsSet( - () => resolve(), - ), - ); + await new Promise(resolve => this.remoteExplorerService.tunnelModel.onEnvironmentTunnelsSet(() => resolve())); } - this._register( - this.configurationService.onDidChangeConfiguration(async (e) => { - if (e.affectsConfiguration(PORT_AUTO_FORWARD_SETTING)) { - await this.startStopCandidateListener(); - } - }), - ); - - this.portsFeatures = this._register( - this.remoteExplorerService.onEnabledPortsFeatures(async () => { + this._register(this.configurationService.onDidChangeConfiguration(async (e) => { + if (e.affectsConfiguration(PORT_AUTO_FORWARD_SETTING)) { await this.startStopCandidateListener(); - }), - ); + } + })); + + this.portsFeatures = this._register(this.remoteExplorerService.onEnabledPortsFeatures(async () => { + await this.startStopCandidateListener(); + })); this.startStopCandidateListener(); } @@ -1362,185 +668,98 @@ class ProcAutomaticPortForwarding extends Disposable { private stopCandidateListener() { if (this.candidateListener) { this.candidateListener.dispose(); - this.candidateListener = undefined; } } private async startCandidateListener() { - if ( - this.candidateListener || - this.remoteExplorerService.portsFeaturesEnabled !== - PortsEnablement.AdditionalFeatures - ) { + if (this.candidateListener || (this.remoteExplorerService.portsFeaturesEnabled !== PortsEnablement.AdditionalFeatures)) { return; } - this.portsFeatures?.dispose(); + // Capture list of starting candidates so we don't auto forward them later. await this.setInitialCandidates(); + // Need to check the setting again, since it may have changed while we waited for the initial candidates to be set. if (this.configurationService.getValue(PORT_AUTO_FORWARD_SETTING)) { - this.candidateListener = this._register( - this.remoteExplorerService.tunnelModel.onCandidatesChanged( - this.handleCandidateUpdate, - this, - ), - ); + this.candidateListener = this._register(this.remoteExplorerService.tunnelModel.onCandidatesChanged(this.handleCandidateUpdate, this)); } } private async setInitialCandidates() { if (!this.needsInitialCandidates) { - this.logService.debug( - `ForwardedPorts: (ProcForwarding) Not setting initial candidates`, - ); - + this.logService.debug(`ForwardedPorts: (ProcForwarding) Not setting initial candidates`); return; } - - let startingCandidates = - this.remoteExplorerService.tunnelModel.candidatesOrUndefined; - + let startingCandidates = this.remoteExplorerService.tunnelModel.candidatesOrUndefined; if (!startingCandidates) { - await new Promise((resolve) => - this.remoteExplorerService.tunnelModel.onCandidatesChanged(() => - resolve(), - ), - ); - - startingCandidates = - this.remoteExplorerService.tunnelModel.candidates; + await new Promise(resolve => this.remoteExplorerService.tunnelModel.onCandidatesChanged(() => resolve())); + startingCandidates = this.remoteExplorerService.tunnelModel.candidates; } for (const value of startingCandidates) { this.initialCandidates.add(makeAddress(value.host, value.port)); } - - this.logService.debug( - `ForwardedPorts: (ProcForwarding) Initial candidates set to ${startingCandidates.map((candidate) => candidate.port).join(", ")}`, - ); + this.logService.debug(`ForwardedPorts: (ProcForwarding) Initial candidates set to ${startingCandidates.map(candidate => candidate.port).join(', ')}`); } private async forwardCandidates(): Promise { let attributes: Map | undefined; - const allTunnels: RemoteTunnel[] = []; - - this.logService.trace( - `ForwardedPorts: (ProcForwarding) Attempting to forward ${this.remoteExplorerService.tunnelModel.candidates.length} candidates`, - ); - + this.logService.trace(`ForwardedPorts: (ProcForwarding) Attempting to forward ${this.remoteExplorerService.tunnelModel.candidates.length} candidates`); for (const value of this.remoteExplorerService.tunnelModel.candidates) { if (!value.detail) { - this.logService.trace( - `ForwardedPorts: (ProcForwarding) Port ${value.port} missing detail`, - ); - + this.logService.trace(`ForwardedPorts: (ProcForwarding) Port ${value.port} missing detail`); continue; } if (!attributes) { - attributes = - await this.remoteExplorerService.tunnelModel.getAttributes( - this.remoteExplorerService.tunnelModel.candidates, - ); + attributes = await this.remoteExplorerService.tunnelModel.getAttributes(this.remoteExplorerService.tunnelModel.candidates); } const portAttributes = attributes?.get(value.port); const address = makeAddress(value.host, value.port); - - if ( - this.initialCandidates.has(address) && - portAttributes?.onAutoForward === undefined - ) { + if (this.initialCandidates.has(address) && (portAttributes?.onAutoForward === undefined)) { continue; } - - if ( - this.notifiedOnly.has(address) || - this.autoForwarded.has(address) - ) { + if (this.notifiedOnly.has(address) || this.autoForwarded.has(address)) { continue; } - - const alreadyForwarded = mapHasAddressLocalhostOrAllInterfaces( - this.remoteExplorerService.tunnelModel.forwarded, - value.host, - value.port, - ); - - if ( - mapHasAddressLocalhostOrAllInterfaces( - this.remoteExplorerService.tunnelModel.detected, - value.host, - value.port, - ) - ) { + const alreadyForwarded = mapHasAddressLocalhostOrAllInterfaces(this.remoteExplorerService.tunnelModel.forwarded, value.host, value.port); + if (mapHasAddressLocalhostOrAllInterfaces(this.remoteExplorerService.tunnelModel.detected, value.host, value.port)) { continue; } if (portAttributes?.onAutoForward === OnPortForward.Ignore) { - this.logService.trace( - `ForwardedPorts: (ProcForwarding) Port ${value.port} is ignored`, - ); - + this.logService.trace(`ForwardedPorts: (ProcForwarding) Port ${value.port} is ignored`); continue; } - - const forwarded = await this.remoteExplorerService.forward( - { remote: value, source: AutoTunnelSource }, - portAttributes ?? null, - ); - + const forwarded = await this.remoteExplorerService.forward({ remote: value, source: AutoTunnelSource }, portAttributes ?? null); if (!alreadyForwarded && forwarded) { - this.logService.trace( - `ForwardedPorts: (ProcForwarding) Port ${value.port} has been forwarded`, - ); - + this.logService.trace(`ForwardedPorts: (ProcForwarding) Port ${value.port} has been forwarded`); this.autoForwarded.add(address); } else if (forwarded) { - this.logService.trace( - `ForwardedPorts: (ProcForwarding) Port ${value.port} has been notified`, - ); - + this.logService.trace(`ForwardedPorts: (ProcForwarding) Port ${value.port} has been notified`); this.notifiedOnly.add(address); } - - if (forwarded && typeof forwarded !== "string") { + if (forwarded && (typeof forwarded !== 'string')) { allTunnels.push(forwarded); } } - - this.logService.trace( - `ForwardedPorts: (ProcForwarding) Forwarded ${allTunnels.length} candidates`, - ); - + this.logService.trace(`ForwardedPorts: (ProcForwarding) Forwarded ${allTunnels.length} candidates`); if (allTunnels.length === 0) { return undefined; } - return allTunnels; } - private async handleCandidateUpdate( - removed: Map< - string, - { - host: string; - - port: number; - } - >, - ) { + private async handleCandidateUpdate(removed: Map) { const removedPorts: number[] = []; - let autoForwarded: Map; - if (this.unforwardOnly) { autoForwarded = new Map(); - for (const entry of this.remoteExplorerService.tunnelModel.forwarded.entries()) { if (entry[1].source.source === TunnelSource.Auto) { autoForwarded.set(entry[0], entry[1]); @@ -1552,34 +771,18 @@ class ProcAutomaticPortForwarding extends Disposable { for (const removedPort of removed) { const key = removedPort[0]; - let value = removedPort[1]; - - const forwardedValue = mapHasAddressLocalhostOrAllInterfaces( - autoForwarded, - value.host, - value.port, - ); - + const forwardedValue = mapHasAddressLocalhostOrAllInterfaces(autoForwarded, value.host, value.port); if (forwardedValue) { - if (typeof forwardedValue === "string") { + if (typeof forwardedValue === 'string') { this.autoForwarded.delete(key); } else { - value = { - host: forwardedValue.remoteHost, - port: forwardedValue.remotePort, - }; + value = { host: forwardedValue.remoteHost, port: forwardedValue.remotePort }; } - - await this.remoteExplorerService.close( - value, - TunnelCloseReason.AutoForwardEnd, - ); - + await this.remoteExplorerService.close(value, TunnelCloseReason.AutoForwardEnd); removedPorts.push(value.port); } else if (this.notifiedOnly.has(key)) { this.notifiedOnly.delete(key); - removedPorts.push(value.port); } else if (this.initialCandidates.has(key)) { this.initialCandidates.delete(key); @@ -1595,7 +798,6 @@ class ProcAutomaticPortForwarding extends Disposable { } const tunnels = await this.forwardCandidates(); - if (tunnels) { await this.notifier.doAction(tunnels); } diff --git a/Source/vs/workbench/contrib/scm/browser/scm.contribution.ts b/Source/vs/workbench/contrib/scm/browser/scm.contribution.ts index 32d620a81e4f4..d7e997d29ff5c 100644 --- a/Source/vs/workbench/contrib/scm/browser/scm.contribution.ts +++ b/Source/vs/workbench/contrib/scm/browser/scm.contribution.ts @@ -2,698 +2,405 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { - getActiveElement, - isActiveElement, -} from "../../../../base/browser/dom.js"; -import { Codicon } from "../../../../base/common/codicons.js"; -import { KeyCode, KeyMod } from "../../../../base/common/keyCodes.js"; -import { ModesRegistry } from "../../../../editor/common/languages/modesRegistry.js"; -import { Context as SuggestContext } from "../../../../editor/contrib/suggest/browser/suggest.js"; -import { localize, localize2 } from "../../../../nls.js"; -import { - MenuId, - MenuRegistry, -} from "../../../../platform/actions/common/actions.js"; -import { - CommandsRegistry, - ICommandService, -} from "../../../../platform/commands/common/commands.js"; -import { - Extensions as ConfigurationExtensions, - ConfigurationScope, - IConfigurationRegistry, -} from "../../../../platform/configuration/common/configurationRegistry.js"; -import { - ContextKeyExpr, - IContextKeyService, -} from "../../../../platform/contextkey/common/contextkey.js"; -import { IsWebContext } from "../../../../platform/contextkey/common/contextkeys.js"; -import { SyncDescriptor } from "../../../../platform/instantiation/common/descriptors.js"; -import { - InstantiationType, - registerSingleton, -} from "../../../../platform/instantiation/common/extensions.js"; -import { ServicesAccessor } from "../../../../platform/instantiation/common/instantiation.js"; -import { - KeybindingsRegistry, - KeybindingWeight, -} from "../../../../platform/keybinding/common/keybindingsRegistry.js"; -import { - IListService, - WorkbenchList, -} from "../../../../platform/list/browser/listService.js"; -import { Registry } from "../../../../platform/registry/common/platform.js"; -import { registerIcon } from "../../../../platform/theme/common/iconRegistry.js"; -import { RemoteNameContext } from "../../../common/contextkeys.js"; -import { - IWorkbenchContributionsRegistry, - registerWorkbenchContribution2, - Extensions as WorkbenchExtensions, - WorkbenchPhase, -} from "../../../common/contributions.js"; -import { - IViewContainersRegistry, - IViewsRegistry, - Extensions as ViewContainerExtensions, - ViewContainerLocation, -} from "../../../common/views.js"; -import { LifecyclePhase } from "../../../services/lifecycle/common/lifecycle.js"; -import { IViewsService } from "../../../services/views/common/viewsService.js"; -import { - MANAGE_TRUST_COMMAND_ID, - WorkspaceTrustContext, -} from "../../workspace/common/workspace.js"; -import { IQuickDiffService } from "../common/quickDiff.js"; -import { QuickDiffService } from "../common/quickDiffService.js"; -import { - HISTORY_VIEW_PANE_ID, - ISCMProvider, - ISCMService, - ISCMViewService, - REPOSITORIES_VIEW_PANE_ID, - VIEW_PANE_ID, - VIEWLET_ID, -} from "../common/scm.js"; -import { SCMService } from "../common/scmService.js"; -import { - SCMActiveRepositoryController, - SCMActiveResourceContextKeyController, -} from "./activity.js"; -import { DirtyDiffWorkbenchController } from "./dirtydiffDecorator.js"; -import { SCMHistoryViewPane } from "./scmHistoryViewPane.js"; -import { SCMRepositoriesViewPane } from "./scmRepositoriesViewPane.js"; -import { ContextKeys, SCMViewPane } from "./scmViewPane.js"; -import { SCMViewPaneContainer } from "./scmViewPaneContainer.js"; -import { SCMViewService } from "./scmViewService.js"; -import { isSCMRepository } from "./util.js"; -import { SCMWorkingSetController } from "./workingSet.js"; + +import { localize, localize2 } from '../../../../nls.js'; +import { Registry } from '../../../../platform/registry/common/platform.js'; +import { IWorkbenchContributionsRegistry, registerWorkbenchContribution2, Extensions as WorkbenchExtensions, WorkbenchPhase } from '../../../common/contributions.js'; +import { DirtyDiffWorkbenchController } from './dirtydiffDecorator.js'; +import { VIEWLET_ID, ISCMService, VIEW_PANE_ID, ISCMProvider, ISCMViewService, REPOSITORIES_VIEW_PANE_ID, HISTORY_VIEW_PANE_ID } from '../common/scm.js'; +import { KeyMod, KeyCode } from '../../../../base/common/keyCodes.js'; +import { MenuRegistry, MenuId } from '../../../../platform/actions/common/actions.js'; +import { SCMActiveResourceContextKeyController, SCMActiveRepositoryController } from './activity.js'; +import { LifecyclePhase } from '../../../services/lifecycle/common/lifecycle.js'; +import { IConfigurationRegistry, Extensions as ConfigurationExtensions, ConfigurationScope } from '../../../../platform/configuration/common/configurationRegistry.js'; +import { IContextKeyService, ContextKeyExpr } from '../../../../platform/contextkey/common/contextkey.js'; +import { CommandsRegistry, ICommandService } from '../../../../platform/commands/common/commands.js'; +import { KeybindingsRegistry, KeybindingWeight } from '../../../../platform/keybinding/common/keybindingsRegistry.js'; +import { InstantiationType, registerSingleton } from '../../../../platform/instantiation/common/extensions.js'; +import { SCMService } from '../common/scmService.js'; +import { IViewContainersRegistry, ViewContainerLocation, Extensions as ViewContainerExtensions, IViewsRegistry } from '../../../common/views.js'; +import { SCMViewPaneContainer } from './scmViewPaneContainer.js'; +import { SyncDescriptor } from '../../../../platform/instantiation/common/descriptors.js'; +import { ModesRegistry } from '../../../../editor/common/languages/modesRegistry.js'; +import { Codicon } from '../../../../base/common/codicons.js'; +import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js'; +import { ContextKeys, SCMViewPane } from './scmViewPane.js'; +import { SCMViewService } from './scmViewService.js'; +import { SCMRepositoriesViewPane } from './scmRepositoriesViewPane.js'; +import { ServicesAccessor } from '../../../../platform/instantiation/common/instantiation.js'; +import { Context as SuggestContext } from '../../../../editor/contrib/suggest/browser/suggest.js'; +import { MANAGE_TRUST_COMMAND_ID, WorkspaceTrustContext } from '../../workspace/common/workspace.js'; +import { IQuickDiffService } from '../common/quickDiff.js'; +import { QuickDiffService } from '../common/quickDiffService.js'; +import { getActiveElement, isActiveElement } from '../../../../base/browser/dom.js'; +import { SCMWorkingSetController } from './workingSet.js'; +import { IViewsService } from '../../../services/views/common/viewsService.js'; +import { IListService, WorkbenchList } from '../../../../platform/list/browser/listService.js'; +import { isSCMRepository } from './util.js'; +import { SCMHistoryViewPane } from './scmHistoryViewPane.js'; +import { IsWebContext } from '../../../../platform/contextkey/common/contextkeys.js'; +import { RemoteNameContext } from '../../../common/contextkeys.js'; +import { DirtyDiffModelService, IDirtyDiffModelService } from './dirtyDiffModel.js'; ModesRegistry.registerLanguage({ - id: "scminput", + id: 'scminput', extensions: [], aliases: [], // hide from language selector - mimetypes: ["text/x-scm-input"], + mimetypes: ['text/x-scm-input'] }); -Registry.as( - WorkbenchExtensions.Workbench, -).registerWorkbenchContribution( - DirtyDiffWorkbenchController, - LifecyclePhase.Restored, -); -const sourceControlViewIcon = registerIcon( - "source-control-view-icon", - Codicon.sourceControl, - localize("sourceControlViewIcon", "View icon of the Source Control view."), -); +Registry.as(WorkbenchExtensions.Workbench) + .registerWorkbenchContribution(DirtyDiffWorkbenchController, LifecyclePhase.Restored); -const viewContainer = Registry.as( - ViewContainerExtensions.ViewContainersRegistry, -).registerViewContainer( - { - id: VIEWLET_ID, - title: localize2("source control", "Source Control"), - ctorDescriptor: new SyncDescriptor(SCMViewPaneContainer), - storageId: "workbench.scm.views.state", - icon: sourceControlViewIcon, - alwaysUseContainerInfo: true, - order: 2, - hideIfEmpty: true, - }, - ViewContainerLocation.Sidebar, - { doNotRegisterOpenCommand: true }, -); +const sourceControlViewIcon = registerIcon('source-control-view-icon', Codicon.sourceControl, localize('sourceControlViewIcon', 'View icon of the Source Control view.')); + +const viewContainer = Registry.as(ViewContainerExtensions.ViewContainersRegistry).registerViewContainer({ + id: VIEWLET_ID, + title: localize2('source control', 'Source Control'), + ctorDescriptor: new SyncDescriptor(SCMViewPaneContainer), + storageId: 'workbench.scm.views.state', + icon: sourceControlViewIcon, + alwaysUseContainerInfo: true, + order: 2, + hideIfEmpty: true, +}, ViewContainerLocation.Sidebar, { doNotRegisterOpenCommand: true }); + +const viewsRegistry = Registry.as(ViewContainerExtensions.ViewsRegistry); -const viewsRegistry = Registry.as( - ViewContainerExtensions.ViewsRegistry, -); viewsRegistry.registerViewWelcomeContent(VIEW_PANE_ID, { - content: localize( - "no open repo", - "No source control providers registered.", - ), - when: "default", + content: localize('no open repo', "No source control providers registered."), + when: 'default' }); + viewsRegistry.registerViewWelcomeContent(VIEW_PANE_ID, { - content: localize( - "no open repo in an untrusted workspace", - "None of the registered source control providers work in Restricted Mode.", - ), - when: ContextKeyExpr.and( - ContextKeyExpr.equals("scm.providerCount", 0), - WorkspaceTrustContext.IsEnabled, - WorkspaceTrustContext.IsTrusted.toNegated(), - ), + content: localize('no open repo in an untrusted workspace', "None of the registered source control providers work in Restricted Mode."), + when: ContextKeyExpr.and(ContextKeyExpr.equals('scm.providerCount', 0), WorkspaceTrustContext.IsEnabled, WorkspaceTrustContext.IsTrusted.toNegated()) }); + viewsRegistry.registerViewWelcomeContent(VIEW_PANE_ID, { - content: `[${localize("manageWorkspaceTrustAction", "Manage Workspace Trust")}](command:${MANAGE_TRUST_COMMAND_ID})`, - when: ContextKeyExpr.and( - ContextKeyExpr.equals("scm.providerCount", 0), - WorkspaceTrustContext.IsEnabled, - WorkspaceTrustContext.IsTrusted.toNegated(), - ), + content: `[${localize('manageWorkspaceTrustAction', "Manage Workspace Trust")}](command:${MANAGE_TRUST_COMMAND_ID})`, + when: ContextKeyExpr.and(ContextKeyExpr.equals('scm.providerCount', 0), WorkspaceTrustContext.IsEnabled, WorkspaceTrustContext.IsTrusted.toNegated()) }); + viewsRegistry.registerViewWelcomeContent(HISTORY_VIEW_PANE_ID, { - content: localize( - "no history items", - "The selected source control provider does not have any source control history items.", - ), - when: ContextKeys.SCMHistoryItemCount.isEqualTo(0), + content: localize('no history items', "The selected source control provider does not have any source control history items."), + when: ContextKeys.SCMHistoryItemCount.isEqualTo(0) }); -viewsRegistry.registerViews( - [ - { - id: REPOSITORIES_VIEW_PANE_ID, - name: localize2( - "source control repositories", - "Source Control Repositories", - ), - ctorDescriptor: new SyncDescriptor(SCMRepositoriesViewPane), - canToggleVisibility: true, - hideByDefault: true, - canMoveView: true, - weight: 20, - order: 0, - when: ContextKeyExpr.and( - ContextKeyExpr.has("scm.providerCount"), - ContextKeyExpr.notEquals("scm.providerCount", 0), - ), - // readonly when = ContextKeyExpr.or(ContextKeyExpr.equals('config.scm.alwaysShowProviders', true), ContextKeyExpr.and(ContextKeyExpr.notEquals('scm.providerCount', 0), ContextKeyExpr.notEquals('scm.providerCount', 1))); - - containerIcon: sourceControlViewIcon, - }, - ], - viewContainer, -); -viewsRegistry.registerViews( - [ - { - id: VIEW_PANE_ID, - name: localize2("source control", "Source Control"), - ctorDescriptor: new SyncDescriptor(SCMViewPane), - canToggleVisibility: true, - canMoveView: true, - weight: 40, - order: 1, - containerIcon: sourceControlViewIcon, - openCommandActionDescriptor: { - id: viewContainer.id, - mnemonicTitle: localize( - { key: "miViewSCM", comment: ["&& denotes a mnemonic"] }, - "Source &&Control", - ), - keybindings: { - primary: 0, - win: { - primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyG, - }, - linux: { - primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyG, - }, - mac: { - primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KeyG, - }, - }, - order: 2, - }, - }, - ], - viewContainer, -); -viewsRegistry.registerViews( - [ - { - id: HISTORY_VIEW_PANE_ID, - name: localize2("source control history", "Source Control Graph"), - ctorDescriptor: new SyncDescriptor(SCMHistoryViewPane), - canToggleVisibility: true, - canMoveView: true, - weight: 40, - order: 2, - when: ContextKeyExpr.and( - // Repository Count - ContextKeyExpr.and( - ContextKeyExpr.has("scm.providerCount"), - ContextKeyExpr.notEquals("scm.providerCount", 0), - ), - // Not Serverless - ContextKeyExpr.and( - IsWebContext, - RemoteNameContext.isEqualTo(""), - )?.negate(), - ), - containerIcon: sourceControlViewIcon, + +viewsRegistry.registerViews([{ + id: REPOSITORIES_VIEW_PANE_ID, + name: localize2('source control repositories', "Source Control Repositories"), + ctorDescriptor: new SyncDescriptor(SCMRepositoriesViewPane), + canToggleVisibility: true, + hideByDefault: true, + canMoveView: true, + weight: 20, + order: 0, + when: ContextKeyExpr.and(ContextKeyExpr.has('scm.providerCount'), ContextKeyExpr.notEquals('scm.providerCount', 0)), + // readonly when = ContextKeyExpr.or(ContextKeyExpr.equals('config.scm.alwaysShowProviders', true), ContextKeyExpr.and(ContextKeyExpr.notEquals('scm.providerCount', 0), ContextKeyExpr.notEquals('scm.providerCount', 1))); + containerIcon: sourceControlViewIcon +}], viewContainer); + +viewsRegistry.registerViews([{ + id: VIEW_PANE_ID, + name: localize2('source control', 'Source Control'), + ctorDescriptor: new SyncDescriptor(SCMViewPane), + canToggleVisibility: true, + canMoveView: true, + weight: 40, + order: 1, + containerIcon: sourceControlViewIcon, + openCommandActionDescriptor: { + id: viewContainer.id, + mnemonicTitle: localize({ key: 'miViewSCM', comment: ['&& denotes a mnemonic'] }, "Source &&Control"), + keybindings: { + primary: 0, + win: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyG }, + linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyG }, + mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KeyG }, }, - ], - viewContainer, -); -Registry.as( - WorkbenchExtensions.Workbench, -).registerWorkbenchContribution( - SCMActiveRepositoryController, - LifecyclePhase.Restored, -); -Registry.as( - WorkbenchExtensions.Workbench, -).registerWorkbenchContribution( - SCMActiveResourceContextKeyController, - LifecyclePhase.Restored, -); + order: 2, + } +}], viewContainer); + +viewsRegistry.registerViews([{ + id: HISTORY_VIEW_PANE_ID, + name: localize2('source control history', "Source Control Graph"), + ctorDescriptor: new SyncDescriptor(SCMHistoryViewPane), + canToggleVisibility: true, + canMoveView: true, + weight: 40, + order: 2, + when: ContextKeyExpr.and( + // Repository Count + ContextKeyExpr.and( + ContextKeyExpr.has('scm.providerCount'), + ContextKeyExpr.notEquals('scm.providerCount', 0)), + // Not Serverless + ContextKeyExpr.and( + IsWebContext, + RemoteNameContext.isEqualTo(''))?.negate() + ), + containerIcon: sourceControlViewIcon +}], viewContainer); + +Registry.as(WorkbenchExtensions.Workbench) + .registerWorkbenchContribution(SCMActiveRepositoryController, LifecyclePhase.Restored); + +Registry.as(WorkbenchExtensions.Workbench) + .registerWorkbenchContribution(SCMActiveResourceContextKeyController, LifecyclePhase.Restored); + registerWorkbenchContribution2( SCMWorkingSetController.ID, SCMWorkingSetController, - WorkbenchPhase.AfterRestored, + WorkbenchPhase.AfterRestored ); -Registry.as( - ConfigurationExtensions.Configuration, -).registerConfiguration({ - id: "scm", + +Registry.as(ConfigurationExtensions.Configuration).registerConfiguration({ + id: 'scm', order: 5, - title: localize("scmConfigurationTitle", "Source Control"), - type: "object", + title: localize('scmConfigurationTitle', "Source Control"), + type: 'object', scope: ConfigurationScope.RESOURCE, properties: { - "scm.diffDecorations": { - type: "string", - enum: ["all", "gutter", "overview", "minimap", "none"], + 'scm.diffDecorations': { + type: 'string', + enum: ['all', 'gutter', 'overview', 'minimap', 'none'], enumDescriptions: [ - localize( - "scm.diffDecorations.all", - "Show the diff decorations in all available locations.", - ), - localize( - "scm.diffDecorations.gutter", - "Show the diff decorations only in the editor gutter.", - ), - localize( - "scm.diffDecorations.overviewRuler", - "Show the diff decorations only in the overview ruler.", - ), - localize( - "scm.diffDecorations.minimap", - "Show the diff decorations only in the minimap.", - ), - localize( - "scm.diffDecorations.none", - "Do not show the diff decorations.", - ), + localize('scm.diffDecorations.all', "Show the diff decorations in all available locations."), + localize('scm.diffDecorations.gutter', "Show the diff decorations only in the editor gutter."), + localize('scm.diffDecorations.overviewRuler', "Show the diff decorations only in the overview ruler."), + localize('scm.diffDecorations.minimap', "Show the diff decorations only in the minimap."), + localize('scm.diffDecorations.none', "Do not show the diff decorations.") ], - default: "all", - description: localize( - "diffDecorations", - "Controls diff decorations in the editor.", - ), + default: 'all', + description: localize('diffDecorations', "Controls diff decorations in the editor.") }, - "scm.diffDecorationsGutterWidth": { - type: "number", + 'scm.diffDecorationsGutterWidth': { + type: 'number', enum: [1, 2, 3, 4, 5], default: 3, - description: localize( - "diffGutterWidth", - "Controls the width(px) of diff decorations in gutter (added & modified).", - ), + description: localize('diffGutterWidth', "Controls the width(px) of diff decorations in gutter (added & modified).") }, - "scm.diffDecorationsGutterVisibility": { - type: "string", - enum: ["always", "hover"], + 'scm.diffDecorationsGutterVisibility': { + type: 'string', + enum: ['always', 'hover'], enumDescriptions: [ - localize( - "scm.diffDecorationsGutterVisibility.always", - "Show the diff decorator in the gutter at all times.", - ), - localize( - "scm.diffDecorationsGutterVisibility.hover", - "Show the diff decorator in the gutter only on hover.", - ), + localize('scm.diffDecorationsGutterVisibility.always', "Show the diff decorator in the gutter at all times."), + localize('scm.diffDecorationsGutterVisibility.hover', "Show the diff decorator in the gutter only on hover.") ], - description: localize( - "scm.diffDecorationsGutterVisibility", - "Controls the visibility of the Source Control diff decorator in the gutter.", - ), - default: "always", + description: localize('scm.diffDecorationsGutterVisibility', "Controls the visibility of the Source Control diff decorator in the gutter."), + default: 'always' }, - "scm.diffDecorationsGutterAction": { - type: "string", - enum: ["diff", "none"], + 'scm.diffDecorationsGutterAction': { + type: 'string', + enum: ['diff', 'none'], enumDescriptions: [ - localize( - "scm.diffDecorationsGutterAction.diff", - "Show the inline diff Peek view on click.", - ), - localize("scm.diffDecorationsGutterAction.none", "Do nothing."), + localize('scm.diffDecorationsGutterAction.diff', "Show the inline diff Peek view on click."), + localize('scm.diffDecorationsGutterAction.none', "Do nothing.") ], - description: localize( - "scm.diffDecorationsGutterAction", - "Controls the behavior of Source Control diff gutter decorations.", - ), - default: "diff", + description: localize('scm.diffDecorationsGutterAction', "Controls the behavior of Source Control diff gutter decorations."), + default: 'diff' }, - "scm.diffDecorationsGutterPattern": { - type: "object", - description: localize( - "diffGutterPattern", - "Controls whether a pattern is used for the diff decorations in gutter.", - ), + 'scm.diffDecorationsGutterPattern': { + type: 'object', + description: localize('diffGutterPattern', "Controls whether a pattern is used for the diff decorations in gutter."), additionalProperties: false, properties: { - "added": { - type: "boolean", - description: localize( - "diffGutterPatternAdded", - "Use pattern for the diff decorations in gutter for added lines.", - ), + 'added': { + type: 'boolean', + description: localize('diffGutterPatternAdded', "Use pattern for the diff decorations in gutter for added lines."), }, - "modified": { - type: "boolean", - description: localize( - "diffGutterPatternModifed", - "Use pattern for the diff decorations in gutter for modified lines.", - ), + 'modified': { + type: 'boolean', + description: localize('diffGutterPatternModifed', "Use pattern for the diff decorations in gutter for modified lines."), }, }, default: { - "added": false, - "modified": true, - }, + 'added': false, + 'modified': true + } }, - "scm.diffDecorationsIgnoreTrimWhitespace": { - type: "string", - enum: ["true", "false", "inherit"], + 'scm.diffDecorationsIgnoreTrimWhitespace': { + type: 'string', + enum: ['true', 'false', 'inherit'], enumDescriptions: [ - localize( - "scm.diffDecorationsIgnoreTrimWhitespace.true", - "Ignore leading and trailing whitespace.", - ), - localize( - "scm.diffDecorationsIgnoreTrimWhitespace.false", - "Do not ignore leading and trailing whitespace.", - ), - localize( - "scm.diffDecorationsIgnoreTrimWhitespace.inherit", - "Inherit from `diffEditor.ignoreTrimWhitespace`.", - ), + localize('scm.diffDecorationsIgnoreTrimWhitespace.true', "Ignore leading and trailing whitespace."), + localize('scm.diffDecorationsIgnoreTrimWhitespace.false', "Do not ignore leading and trailing whitespace."), + localize('scm.diffDecorationsIgnoreTrimWhitespace.inherit', "Inherit from `diffEditor.ignoreTrimWhitespace`.") ], - description: localize( - "diffDecorationsIgnoreTrimWhitespace", - "Controls whether leading and trailing whitespace is ignored in Source Control diff gutter decorations.", - ), - default: "false", + description: localize('diffDecorationsIgnoreTrimWhitespace', "Controls whether leading and trailing whitespace is ignored in Source Control diff gutter decorations."), + default: 'false' }, - "scm.alwaysShowActions": { - type: "boolean", - description: localize( - "alwaysShowActions", - "Controls whether inline actions are always visible in the Source Control view.", - ), - default: false, + 'scm.alwaysShowActions': { + type: 'boolean', + description: localize('alwaysShowActions', "Controls whether inline actions are always visible in the Source Control view."), + default: false }, - "scm.countBadge": { - type: "string", - enum: ["all", "focused", "off"], + 'scm.countBadge': { + type: 'string', + enum: ['all', 'focused', 'off'], enumDescriptions: [ - localize( - "scm.countBadge.all", - "Show the sum of all Source Control Provider count badges.", - ), - localize( - "scm.countBadge.focused", - "Show the count badge of the focused Source Control Provider.", - ), - localize( - "scm.countBadge.off", - "Disable the Source Control count badge.", - ), + localize('scm.countBadge.all', "Show the sum of all Source Control Provider count badges."), + localize('scm.countBadge.focused', "Show the count badge of the focused Source Control Provider."), + localize('scm.countBadge.off', "Disable the Source Control count badge.") ], - description: localize( - "scm.countBadge", - "Controls the count badge on the Source Control icon on the Activity Bar.", - ), - default: "all", + description: localize('scm.countBadge', "Controls the count badge on the Source Control icon on the Activity Bar."), + default: 'all' }, - "scm.providerCountBadge": { - type: "string", - enum: ["hidden", "auto", "visible"], + 'scm.providerCountBadge': { + type: 'string', + enum: ['hidden', 'auto', 'visible'], enumDescriptions: [ - localize( - "scm.providerCountBadge.hidden", - "Hide Source Control Provider count badges.", - ), - localize( - "scm.providerCountBadge.auto", - "Only show count badge for Source Control Provider when non-zero.", - ), - localize( - "scm.providerCountBadge.visible", - "Show Source Control Provider count badges.", - ), + localize('scm.providerCountBadge.hidden', "Hide Source Control Provider count badges."), + localize('scm.providerCountBadge.auto', "Only show count badge for Source Control Provider when non-zero."), + localize('scm.providerCountBadge.visible', "Show Source Control Provider count badges.") ], - markdownDescription: localize( - "scm.providerCountBadge", - "Controls the count badges on Source Control Provider headers. These headers appear in the Source Control view when there is more than one provider or when the {0} setting is enabled, and in the Source Control Repositories view.", - "`#scm.alwaysShowRepositories#`", - ), - default: "hidden", + markdownDescription: localize('scm.providerCountBadge', "Controls the count badges on Source Control Provider headers. These headers appear in the Source Control view when there is more than one provider or when the {0} setting is enabled, and in the Source Control Repositories view.", '\`#scm.alwaysShowRepositories#\`'), + default: 'hidden' }, - "scm.defaultViewMode": { - type: "string", - enum: ["tree", "list"], + 'scm.defaultViewMode': { + type: 'string', + enum: ['tree', 'list'], enumDescriptions: [ - localize( - "scm.defaultViewMode.tree", - "Show the repository changes as a tree.", - ), - localize( - "scm.defaultViewMode.list", - "Show the repository changes as a list.", - ), + localize('scm.defaultViewMode.tree', "Show the repository changes as a tree."), + localize('scm.defaultViewMode.list', "Show the repository changes as a list.") ], - description: localize( - "scm.defaultViewMode", - "Controls the default Source Control repository view mode.", - ), - default: "list", + description: localize('scm.defaultViewMode', "Controls the default Source Control repository view mode."), + default: 'list' }, - "scm.defaultViewSortKey": { - type: "string", - enum: ["name", "path", "status"], + 'scm.defaultViewSortKey': { + type: 'string', + enum: ['name', 'path', 'status'], enumDescriptions: [ - localize( - "scm.defaultViewSortKey.name", - "Sort the repository changes by file name.", - ), - localize( - "scm.defaultViewSortKey.path", - "Sort the repository changes by path.", - ), - localize( - "scm.defaultViewSortKey.status", - "Sort the repository changes by Source Control status.", - ), + localize('scm.defaultViewSortKey.name', "Sort the repository changes by file name."), + localize('scm.defaultViewSortKey.path', "Sort the repository changes by path."), + localize('scm.defaultViewSortKey.status', "Sort the repository changes by Source Control status.") ], - description: localize( - "scm.defaultViewSortKey", - "Controls the default Source Control repository changes sort order when viewed as a list.", - ), - default: "path", + description: localize('scm.defaultViewSortKey', "Controls the default Source Control repository changes sort order when viewed as a list."), + default: 'path' }, - "scm.autoReveal": { - type: "boolean", - description: localize( - "autoReveal", - "Controls whether the Source Control view should automatically reveal and select files when opening them.", - ), - default: true, + 'scm.autoReveal': { + type: 'boolean', + description: localize('autoReveal', "Controls whether the Source Control view should automatically reveal and select files when opening them."), + default: true }, - "scm.inputFontFamily": { - type: "string", - markdownDescription: localize( - "inputFontFamily", - "Controls the font for the input message. Use `default` for the workbench user interface font family, `editor` for the `#editor.fontFamily#`'s value, or a custom font family.", - ), - default: "default", + 'scm.inputFontFamily': { + type: 'string', + markdownDescription: localize('inputFontFamily', "Controls the font for the input message. Use `default` for the workbench user interface font family, `editor` for the `#editor.fontFamily#`'s value, or a custom font family."), + default: 'default' }, - "scm.inputFontSize": { - type: "number", - markdownDescription: localize( - "inputFontSize", - "Controls the font size for the input message in pixels.", - ), - default: 13, + 'scm.inputFontSize': { + type: 'number', + markdownDescription: localize('inputFontSize', "Controls the font size for the input message in pixels."), + default: 13 }, - "scm.inputMaxLineCount": { - type: "number", - markdownDescription: localize( - "inputMaxLines", - "Controls the maximum number of lines that the input will auto-grow to.", - ), + 'scm.inputMaxLineCount': { + type: 'number', + markdownDescription: localize('inputMaxLines', "Controls the maximum number of lines that the input will auto-grow to."), minimum: 1, maximum: 50, - default: 10, + default: 10 }, - "scm.inputMinLineCount": { - type: "number", - markdownDescription: localize( - "inputMinLines", - "Controls the minimum number of lines that the input will auto-grow from.", - ), + 'scm.inputMinLineCount': { + type: 'number', + markdownDescription: localize('inputMinLines', "Controls the minimum number of lines that the input will auto-grow from."), minimum: 1, maximum: 50, - default: 1, + default: 1 }, - "scm.alwaysShowRepositories": { - type: "boolean", - markdownDescription: localize( - "alwaysShowRepository", - "Controls whether repositories should always be visible in the Source Control view.", - ), - default: false, + 'scm.alwaysShowRepositories': { + type: 'boolean', + markdownDescription: localize('alwaysShowRepository', "Controls whether repositories should always be visible in the Source Control view."), + default: false }, - "scm.repositories.sortOrder": { - type: "string", - enum: ["discovery time", "name", "path"], + 'scm.repositories.sortOrder': { + type: 'string', + enum: ['discovery time', 'name', 'path'], enumDescriptions: [ - localize( - "scm.repositoriesSortOrder.discoveryTime", - "Repositories in the Source Control Repositories view are sorted by discovery time. Repositories in the Source Control view are sorted in the order that they were selected.", - ), - localize( - "scm.repositoriesSortOrder.name", - "Repositories in the Source Control Repositories and Source Control views are sorted by repository name.", - ), - localize( - "scm.repositoriesSortOrder.path", - "Repositories in the Source Control Repositories and Source Control views are sorted by repository path.", - ), + localize('scm.repositoriesSortOrder.discoveryTime', "Repositories in the Source Control Repositories view are sorted by discovery time. Repositories in the Source Control view are sorted in the order that they were selected."), + localize('scm.repositoriesSortOrder.name', "Repositories in the Source Control Repositories and Source Control views are sorted by repository name."), + localize('scm.repositoriesSortOrder.path', "Repositories in the Source Control Repositories and Source Control views are sorted by repository path.") ], - description: localize( - "repositoriesSortOrder", - "Controls the sort order of the repositories in the source control repositories view.", - ), - default: "discovery time", + description: localize('repositoriesSortOrder', "Controls the sort order of the repositories in the source control repositories view."), + default: 'discovery time' }, - "scm.repositories.visible": { - type: "number", - description: localize( - "providersVisible", - "Controls how many repositories are visible in the Source Control Repositories section. Set to 0, to be able to manually resize the view.", - ), - default: 10, + 'scm.repositories.visible': { + type: 'number', + description: localize('providersVisible', "Controls how many repositories are visible in the Source Control Repositories section. Set to 0, to be able to manually resize the view."), + default: 10 }, - "scm.showActionButton": { - type: "boolean", - markdownDescription: localize( - "showActionButton", - "Controls whether an action button can be shown in the Source Control view.", - ), - default: true, + 'scm.showActionButton': { + type: 'boolean', + markdownDescription: localize('showActionButton', "Controls whether an action button can be shown in the Source Control view."), + default: true }, - "scm.showInputActionButton": { - type: "boolean", - markdownDescription: localize( - "showInputActionButton", - "Controls whether an action button can be shown in the Source Control input.", - ), - default: true, + 'scm.showInputActionButton': { + type: 'boolean', + markdownDescription: localize('showInputActionButton', "Controls whether an action button can be shown in the Source Control input."), + default: true }, - "scm.workingSets.enabled": { - type: "boolean", - description: localize( - "scm.workingSets.enabled", - "Controls whether to store editor working sets when switching between source control history item groups.", - ), - default: false, + 'scm.workingSets.enabled': { + type: 'boolean', + description: localize('scm.workingSets.enabled', "Controls whether to store editor working sets when switching between source control history item groups."), + default: false }, - "scm.workingSets.default": { - type: "string", - enum: ["empty", "current"], + 'scm.workingSets.default': { + type: 'string', + enum: ['empty', 'current'], enumDescriptions: [ - localize( - "scm.workingSets.default.empty", - "Use an empty working set when switching to a source control history item group that does not have a working set.", - ), - localize( - "scm.workingSets.default.current", - "Use the current working set when switching to a source control history item group that does not have a working set.", - ), + localize('scm.workingSets.default.empty', "Use an empty working set when switching to a source control history item group that does not have a working set."), + localize('scm.workingSets.default.current', "Use the current working set when switching to a source control history item group that does not have a working set.") ], - description: localize( - "scm.workingSets.default", - "Controls the default working set to use when switching to a source control history item group that does not have a working set.", - ), - default: "current", + description: localize('scm.workingSets.default', "Controls the default working set to use when switching to a source control history item group that does not have a working set."), + default: 'current' }, - "scm.compactFolders": { - type: "boolean", - description: localize( - "scm.compactFolders", - "Controls whether the Source Control view should render folders in a compact form. In such a form, single child folders will be compressed in a combined tree element.", - ), - default: true, + 'scm.compactFolders': { + type: 'boolean', + description: localize('scm.compactFolders', "Controls whether the Source Control view should render folders in a compact form. In such a form, single child folders will be compressed in a combined tree element."), + default: true }, - "scm.graph.pageOnScroll": { - type: "boolean", - description: localize( - "scm.graph.pageOnScroll", - "Controls whether the Source Control Graph view will load the next page of items when you scroll to the end of the list.", - ), - default: true, + 'scm.graph.pageOnScroll': { + type: 'boolean', + description: localize('scm.graph.pageOnScroll', "Controls whether the Source Control Graph view will load the next page of items when you scroll to the end of the list."), + default: true }, - "scm.graph.pageSize": { - type: "number", - description: localize( - "scm.graph.pageSize", - "The number of items to show in the Source Control Graph view by default and when loading more items.", - ), + 'scm.graph.pageSize': { + type: 'number', + description: localize('scm.graph.pageSize', "The number of items to show in the Source Control Graph view by default and when loading more items."), minimum: 1, maximum: 1000, - default: 50, + default: 50 }, - "scm.graph.badges": { - type: "string", - enum: ["all", "filter"], + 'scm.graph.badges': { + type: 'string', + enum: ['all', 'filter'], enumDescriptions: [ - localize( - "scm.graph.badges.all", - "Show badges of all history item groups in the Source Control Graph view.", - ), - localize( - "scm.graph.badges.filter", - "Show only the badges of history item groups used as a filter in the Source Control Graph view.", - ), + localize('scm.graph.badges.all', "Show badges of all history item groups in the Source Control Graph view."), + localize('scm.graph.badges.filter', "Show only the badges of history item groups used as a filter in the Source Control Graph view.") ], - description: localize( - "scm.graph.badges", - "Controls which badges are shown in the Source Control Graph view. The badges are shown on the right side of the graph indicating the names of history item groups.", - ), - default: "filter", - }, - }, + description: localize('scm.graph.badges', "Controls which badges are shown in the Source Control Graph view. The badges are shown on the right side of the graph indicating the names of history item groups."), + default: 'filter' + } + } }); + KeybindingsRegistry.registerCommandAndKeybindingRule({ - id: "scm.acceptInput", - metadata: { - description: localize("scm accept", "Source Control: Accept Input"), - args: [], - }, + id: 'scm.acceptInput', + metadata: { description: localize('scm accept', "Source Control: Accept Input"), args: [] }, weight: KeybindingWeight.WorkbenchContrib, - when: ContextKeyExpr.has("scmRepository"), + when: ContextKeyExpr.has('scmRepository'), primary: KeyMod.CtrlCmd | KeyCode.Enter, - handler: (accessor) => { + handler: accessor => { const contextKeyService = accessor.get(IContextKeyService); - const context = contextKeyService.getContext(getActiveElement()); - - const repositoryId = context.getValue( - "scmRepository", - ); + const repositoryId = context.getValue('scmRepository'); if (!repositoryId) { return Promise.resolve(null); } const scmService = accessor.get(ISCMService); - const repository = scmService.getRepository(repositoryId); if (!repository?.provider.acceptInputCommand) { @@ -701,287 +408,193 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({ } const id = repository.provider.acceptInputCommand.id; - const args = repository.provider.acceptInputCommand.arguments; - const commandService = accessor.get(ICommandService); return commandService.executeCommand(id, ...(args || [])); - }, + } }); + KeybindingsRegistry.registerCommandAndKeybindingRule({ - id: "scm.clearInput", + id: 'scm.clearInput', weight: KeybindingWeight.WorkbenchContrib, - when: ContextKeyExpr.and( - ContextKeyExpr.has("scmRepository"), - SuggestContext.Visible.toNegated(), - ), + when: ContextKeyExpr.and(ContextKeyExpr.has('scmRepository'), SuggestContext.Visible.toNegated()), primary: KeyCode.Escape, handler: async (accessor) => { const scmService = accessor.get(ISCMService); - const contextKeyService = accessor.get(IContextKeyService); const context = contextKeyService.getContext(getActiveElement()); - - const repositoryId = context.getValue( - "scmRepository", - ); - - const repository = repositoryId - ? scmService.getRepository(repositoryId) - : undefined; - - repository?.input.setValue("", true); - }, + const repositoryId = context.getValue('scmRepository'); + const repository = repositoryId ? scmService.getRepository(repositoryId) : undefined; + repository?.input.setValue('', true); + } }); const viewNextCommitCommand = { - description: { - description: localize( - "scm view next commit", - "Source Control: View Next Commit", - ), - args: [], - }, + description: { description: localize('scm view next commit', "Source Control: View Next Commit"), args: [] }, weight: KeybindingWeight.WorkbenchContrib, handler: (accessor: ServicesAccessor) => { const contextKeyService = accessor.get(IContextKeyService); - const scmService = accessor.get(ISCMService); - const context = contextKeyService.getContext(getActiveElement()); - - const repositoryId = context.getValue( - "scmRepository", - ); - - const repository = repositoryId - ? scmService.getRepository(repositoryId) - : undefined; - + const repositoryId = context.getValue('scmRepository'); + const repository = repositoryId ? scmService.getRepository(repositoryId) : undefined; repository?.input.showNextHistoryValue(); - }, + } }; const viewPreviousCommitCommand = { - description: { - description: localize( - "scm view previous commit", - "Source Control: View Previous Commit", - ), - args: [], - }, + description: { description: localize('scm view previous commit', "Source Control: View Previous Commit"), args: [] }, weight: KeybindingWeight.WorkbenchContrib, handler: (accessor: ServicesAccessor) => { const contextKeyService = accessor.get(IContextKeyService); - const scmService = accessor.get(ISCMService); - const context = contextKeyService.getContext(getActiveElement()); - - const repositoryId = context.getValue( - "scmRepository", - ); - - const repository = repositoryId - ? scmService.getRepository(repositoryId) - : undefined; - + const repositoryId = context.getValue('scmRepository'); + const repository = repositoryId ? scmService.getRepository(repositoryId) : undefined; repository?.input.showPreviousHistoryValue(); - }, + } }; + KeybindingsRegistry.registerCommandAndKeybindingRule({ ...viewNextCommitCommand, - id: "scm.viewNextCommit", - when: ContextKeyExpr.and( - ContextKeyExpr.has("scmRepository"), - ContextKeyExpr.has("scmInputIsInLastPosition"), - SuggestContext.Visible.toNegated(), - ), - primary: KeyCode.DownArrow, + id: 'scm.viewNextCommit', + when: ContextKeyExpr.and(ContextKeyExpr.has('scmRepository'), ContextKeyExpr.has('scmInputIsInLastPosition'), SuggestContext.Visible.toNegated()), + primary: KeyCode.DownArrow }); + KeybindingsRegistry.registerCommandAndKeybindingRule({ ...viewPreviousCommitCommand, - id: "scm.viewPreviousCommit", - when: ContextKeyExpr.and( - ContextKeyExpr.has("scmRepository"), - ContextKeyExpr.has("scmInputIsInFirstPosition"), - SuggestContext.Visible.toNegated(), - ), - primary: KeyCode.UpArrow, + id: 'scm.viewPreviousCommit', + when: ContextKeyExpr.and(ContextKeyExpr.has('scmRepository'), ContextKeyExpr.has('scmInputIsInFirstPosition'), SuggestContext.Visible.toNegated()), + primary: KeyCode.UpArrow }); + KeybindingsRegistry.registerCommandAndKeybindingRule({ ...viewNextCommitCommand, - id: "scm.forceViewNextCommit", - when: ContextKeyExpr.has("scmRepository"), - primary: KeyMod.Alt | KeyCode.DownArrow, + id: 'scm.forceViewNextCommit', + when: ContextKeyExpr.has('scmRepository'), + primary: KeyMod.Alt | KeyCode.DownArrow }); + KeybindingsRegistry.registerCommandAndKeybindingRule({ ...viewPreviousCommitCommand, - id: "scm.forceViewPreviousCommit", - when: ContextKeyExpr.has("scmRepository"), - primary: KeyMod.Alt | KeyCode.UpArrow, + id: 'scm.forceViewPreviousCommit', + when: ContextKeyExpr.has('scmRepository'), + primary: KeyMod.Alt | KeyCode.UpArrow }); -CommandsRegistry.registerCommand( - "scm.openInIntegratedTerminal", - async (accessor, ...providers: ISCMProvider[]) => { - if (!providers || providers.length === 0) { - return; - } - - const commandService = accessor.get(ICommandService); - const listService = accessor.get(IListService); +CommandsRegistry.registerCommand('scm.openInIntegratedTerminal', async (accessor, ...providers: ISCMProvider[]) => { + if (!providers || providers.length === 0) { + return; + } - let provider = providers.length === 1 ? providers[0] : undefined; + const commandService = accessor.get(ICommandService); + const listService = accessor.get(IListService); - if (!provider) { - const list = listService.lastFocusedList; + let provider = providers.length === 1 ? providers[0] : undefined; - const element = list?.getHTMLElement(); + if (!provider) { + const list = listService.lastFocusedList; + const element = list?.getHTMLElement(); - if ( - list instanceof WorkbenchList && - element && - isActiveElement(element) - ) { - const [index] = list.getFocus(); + if (list instanceof WorkbenchList && element && isActiveElement(element)) { + const [index] = list.getFocus(); + const focusedElement = list.element(index); - const focusedElement = list.element(index); - // Source Control Repositories - if (isSCMRepository(focusedElement)) { - provider = focusedElement.provider; - } + // Source Control Repositories + if (isSCMRepository(focusedElement)) { + provider = focusedElement.provider; } } + } - if (!provider?.rootUri) { - return; - } + if (!provider?.rootUri) { + return; + } - await commandService.executeCommand( - "openInIntegratedTerminal", - provider.rootUri, - ); - }, -); -CommandsRegistry.registerCommand( - "scm.openInTerminal", - async (accessor, provider: ISCMProvider) => { - if (!provider || !provider.rootUri) { - return; - } + await commandService.executeCommand('openInIntegratedTerminal', provider.rootUri); +}); - const commandService = accessor.get(ICommandService); +CommandsRegistry.registerCommand('scm.openInTerminal', async (accessor, provider: ISCMProvider) => { + if (!provider || !provider.rootUri) { + return; + } + + const commandService = accessor.get(ICommandService); + await commandService.executeCommand('openInTerminal', provider.rootUri); +}); - await commandService.executeCommand("openInTerminal", provider.rootUri); - }, -); MenuRegistry.appendMenuItem(MenuId.SCMSourceControl, { - group: "100_end", + group: '100_end', command: { - id: "scm.openInTerminal", - title: localize( - "open in external terminal", - "Open in External Terminal", - ), + id: 'scm.openInTerminal', + title: localize('open in external terminal', "Open in External Terminal") }, - when: ContextKeyExpr.and( - ContextKeyExpr.equals("scmProviderHasRootUri", true), - ContextKeyExpr.or( - ContextKeyExpr.equals( - "config.terminal.sourceControlRepositoriesKind", - "external", - ), - ContextKeyExpr.equals( - "config.terminal.sourceControlRepositoriesKind", - "both", - ), - ), - ), + when: ContextKeyExpr.and(ContextKeyExpr.equals('scmProviderHasRootUri', true), ContextKeyExpr.or(ContextKeyExpr.equals('config.terminal.sourceControlRepositoriesKind', 'external'), ContextKeyExpr.equals('config.terminal.sourceControlRepositoriesKind', 'both'))) }); + MenuRegistry.appendMenuItem(MenuId.SCMSourceControl, { - group: "100_end", + group: '100_end', command: { - id: "scm.openInIntegratedTerminal", - title: localize( - "open in integrated terminal", - "Open in Integrated Terminal", - ), + id: 'scm.openInIntegratedTerminal', + title: localize('open in integrated terminal', "Open in Integrated Terminal") }, - when: ContextKeyExpr.and( - ContextKeyExpr.equals("scmProviderHasRootUri", true), - ContextKeyExpr.or( - ContextKeyExpr.equals( - "config.terminal.sourceControlRepositoriesKind", - "integrated", - ), - ContextKeyExpr.equals( - "config.terminal.sourceControlRepositoriesKind", - "both", - ), - ), - ), + when: ContextKeyExpr.and(ContextKeyExpr.equals('scmProviderHasRootUri', true), ContextKeyExpr.or(ContextKeyExpr.equals('config.terminal.sourceControlRepositoriesKind', 'integrated'), ContextKeyExpr.equals('config.terminal.sourceControlRepositoriesKind', 'both'))) }); + KeybindingsRegistry.registerCommandAndKeybindingRule({ - id: "workbench.scm.action.focusPreviousInput", + id: 'workbench.scm.action.focusPreviousInput', weight: KeybindingWeight.WorkbenchContrib, when: ContextKeys.RepositoryVisibilityCount.notEqualsTo(0), - handler: async (accessor) => { + handler: async accessor => { const viewsService = accessor.get(IViewsService); - const scmView = await viewsService.openView(VIEW_PANE_ID); - if (scmView) { scmView.focusPreviousInput(); } - }, + } }); + KeybindingsRegistry.registerCommandAndKeybindingRule({ - id: "workbench.scm.action.focusNextInput", + id: 'workbench.scm.action.focusNextInput', weight: KeybindingWeight.WorkbenchContrib, when: ContextKeys.RepositoryVisibilityCount.notEqualsTo(0), - handler: async (accessor) => { + handler: async accessor => { const viewsService = accessor.get(IViewsService); - const scmView = await viewsService.openView(VIEW_PANE_ID); - if (scmView) { scmView.focusNextInput(); } - }, + } }); + KeybindingsRegistry.registerCommandAndKeybindingRule({ - id: "workbench.scm.action.focusPreviousResourceGroup", + id: 'workbench.scm.action.focusPreviousResourceGroup', weight: KeybindingWeight.WorkbenchContrib, - handler: async (accessor) => { + handler: async accessor => { const viewsService = accessor.get(IViewsService); - const scmView = await viewsService.openView(VIEW_PANE_ID); - if (scmView) { scmView.focusPreviousResourceGroup(); } - }, + } }); + KeybindingsRegistry.registerCommandAndKeybindingRule({ - id: "workbench.scm.action.focusNextResourceGroup", + id: 'workbench.scm.action.focusNextResourceGroup', weight: KeybindingWeight.WorkbenchContrib, - handler: async (accessor) => { + handler: async accessor => { const viewsService = accessor.get(IViewsService); - const scmView = await viewsService.openView(VIEW_PANE_ID); - if (scmView) { scmView.focusNextResourceGroup(); } - }, + } }); + registerSingleton(ISCMService, SCMService, InstantiationType.Delayed); registerSingleton(ISCMViewService, SCMViewService, InstantiationType.Delayed); -registerSingleton( - IQuickDiffService, - QuickDiffService, - InstantiationType.Delayed, -); +registerSingleton(IQuickDiffService, QuickDiffService, InstantiationType.Delayed); +registerSingleton(IDirtyDiffModelService, DirtyDiffModelService, InstantiationType.Delayed); diff --git a/Source/vs/workbench/workbench.desktop.main.ts b/Source/vs/workbench/workbench.desktop.main.ts index 58a17050000b8..57bf9f0167c4f 100644 --- a/Source/vs/workbench/workbench.desktop.main.ts +++ b/Source/vs/workbench/workbench.desktop.main.ts @@ -2,142 +2,183 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ + + // ####################################################################### // ### ### // ### !!! PLEASE ADD COMMON IMPORTS INTO WORKBENCH.COMMON.MAIN.TS !!! ### // ### ### // ####################################################################### + //#region --- workbench common -import "./workbench.common.main.js"; + +import './workbench.common.main.js'; + //#endregion + + //#region --- workbench (desktop main) -import "./electron-sandbox/desktop.main.js"; -import "./electron-sandbox/desktop.contribution.js"; + +import './electron-sandbox/desktop.main.js'; +import './electron-sandbox/desktop.contribution.js'; + //#endregion + + //#region --- workbench parts -import "./electron-sandbox/parts/dialogs/dialog.contribution.js"; + +import './electron-sandbox/parts/dialogs/dialog.contribution.js'; + //#endregion + + //#region --- workbench services -import "./services/textfile/electron-sandbox/nativeTextFileService.js"; -import "./services/dialogs/electron-sandbox/fileDialogService.js"; -import "./services/workspaces/electron-sandbox/workspacesService.js"; -import "./services/menubar/electron-sandbox/menubarService.js"; -import "./services/update/electron-sandbox/updateService.js"; -import "./services/url/electron-sandbox/urlService.js"; -import "./services/lifecycle/electron-sandbox/lifecycleService.js"; -import "./services/title/electron-sandbox/titleService.js"; -import "./services/host/electron-sandbox/nativeHostService.js"; -import "./services/request/electron-sandbox/requestService.js"; -import "./services/clipboard/electron-sandbox/clipboardService.js"; -import "./services/contextmenu/electron-sandbox/contextmenuService.js"; -import "./services/workspaces/electron-sandbox/workspaceEditingService.js"; -import "./services/configurationResolver/electron-sandbox/configurationResolverService.js"; -import "./services/accessibility/electron-sandbox/accessibilityService.js"; -import "./services/keybinding/electron-sandbox/nativeKeyboardLayout.js"; -import "./services/path/electron-sandbox/pathService.js"; -import "./services/themes/electron-sandbox/nativeHostColorSchemeService.js"; -import "./services/extensionManagement/electron-sandbox/extensionManagementService.js"; -import "./services/encryption/electron-sandbox/encryptionService.js"; -import "./services/secrets/electron-sandbox/secretStorageService.js"; -import "./services/localization/electron-sandbox/languagePackService.js"; -import "./services/telemetry/electron-sandbox/telemetryService.js"; -import "./services/extensions/electron-sandbox/extensionHostStarter.js"; -import "../platform/extensionResourceLoader/common/extensionResourceLoaderService.js"; -import "./services/localization/electron-sandbox/localeService.js"; -import "./services/extensions/electron-sandbox/extensionsScannerService.js"; -import "./services/extensionManagement/electron-sandbox/extensionManagementServerService.js"; -import "./services/extensionManagement/electron-sandbox/extensionTipsService.js"; -import "./services/userDataSync/electron-sandbox/userDataSyncService.js"; -import "./services/userDataSync/electron-sandbox/userDataAutoSyncService.js"; -import "./services/timer/electron-sandbox/timerService.js"; -import "./services/environment/electron-sandbox/shellEnvironmentService.js"; -import "./services/integrity/electron-sandbox/integrityService.js"; -import "./services/workingCopy/electron-sandbox/workingCopyBackupService.js"; -import "./services/checksum/electron-sandbox/checksumService.js"; -import "../platform/remote/electron-sandbox/sharedProcessTunnelService.js"; -import "./services/tunnel/electron-sandbox/tunnelService.js"; -import "../platform/diagnostics/electron-sandbox/diagnosticsService.js"; -import "../platform/profiling/electron-sandbox/profilingService.js"; -import "../platform/telemetry/electron-sandbox/customEndpointTelemetryService.js"; -import "../platform/remoteTunnel/electron-sandbox/remoteTunnelService.js"; -import "./services/files/electron-sandbox/elevatedFileService.js"; -import "./services/search/electron-sandbox/searchService.js"; -import "./services/workingCopy/electron-sandbox/workingCopyHistoryService.js"; -import "./services/userDataSync/browser/userDataSyncEnablementService.js"; -import "./services/extensions/electron-sandbox/nativeExtensionService.js"; -import "../platform/userDataProfile/electron-sandbox/userDataProfileStorageService.js"; -import "./services/auxiliaryWindow/electron-sandbox/auxiliaryWindowService.js"; -import "../platform/extensionManagement/electron-sandbox/extensionsProfileScannerService.js"; - -import { SyncDescriptor } from "../platform/instantiation/common/descriptors.js"; -import { registerSingleton } from "../platform/instantiation/common/extensions.js"; -import { - IUserDataInitializationService, - UserDataInitializationService, -} from "./services/userData/browser/userDataInit.js"; + +import './services/textfile/electron-sandbox/nativeTextFileService.js'; +import './services/dialogs/electron-sandbox/fileDialogService.js'; +import './services/workspaces/electron-sandbox/workspacesService.js'; +import './services/menubar/electron-sandbox/menubarService.js'; +import './services/update/electron-sandbox/updateService.js'; +import './services/url/electron-sandbox/urlService.js'; +import './services/lifecycle/electron-sandbox/lifecycleService.js'; +import './services/title/electron-sandbox/titleService.js'; +import './services/host/electron-sandbox/nativeHostService.js'; +import './services/request/electron-sandbox/requestService.js'; +import './services/clipboard/electron-sandbox/clipboardService.js'; +import './services/contextmenu/electron-sandbox/contextmenuService.js'; +import './services/workspaces/electron-sandbox/workspaceEditingService.js'; +import './services/configurationResolver/electron-sandbox/configurationResolverService.js'; +import './services/accessibility/electron-sandbox/accessibilityService.js'; +import './services/keybinding/electron-sandbox/nativeKeyboardLayout.js'; +import './services/path/electron-sandbox/pathService.js'; +import './services/themes/electron-sandbox/nativeHostColorSchemeService.js'; +import './services/extensionManagement/electron-sandbox/extensionManagementService.js'; +import './services/encryption/electron-sandbox/encryptionService.js'; +import './services/secrets/electron-sandbox/secretStorageService.js'; +import './services/localization/electron-sandbox/languagePackService.js'; +import './services/telemetry/electron-sandbox/telemetryService.js'; +import './services/extensions/electron-sandbox/extensionHostStarter.js'; +import '../platform/extensionResourceLoader/common/extensionResourceLoaderService.js'; +import './services/localization/electron-sandbox/localeService.js'; +import './services/extensions/electron-sandbox/extensionsScannerService.js'; +import './services/extensionManagement/electron-sandbox/extensionManagementServerService.js'; +import './services/extensionManagement/electron-sandbox/extensionTipsService.js'; +import './services/userDataSync/electron-sandbox/userDataSyncService.js'; +import './services/userDataSync/electron-sandbox/userDataAutoSyncService.js'; +import './services/timer/electron-sandbox/timerService.js'; +import './services/environment/electron-sandbox/shellEnvironmentService.js'; +import './services/integrity/electron-sandbox/integrityService.js'; +import './services/workingCopy/electron-sandbox/workingCopyBackupService.js'; +import './services/checksum/electron-sandbox/checksumService.js'; +import '../platform/remote/electron-sandbox/sharedProcessTunnelService.js'; +import './services/tunnel/electron-sandbox/tunnelService.js'; +import '../platform/diagnostics/electron-sandbox/diagnosticsService.js'; +import '../platform/profiling/electron-sandbox/profilingService.js'; +import '../platform/telemetry/electron-sandbox/customEndpointTelemetryService.js'; +import '../platform/remoteTunnel/electron-sandbox/remoteTunnelService.js'; +import './services/files/electron-sandbox/elevatedFileService.js'; +import './services/search/electron-sandbox/searchService.js'; +import './services/workingCopy/electron-sandbox/workingCopyHistoryService.js'; +import './services/userDataSync/browser/userDataSyncEnablementService.js'; +import './services/extensions/electron-sandbox/nativeExtensionService.js'; +import '../platform/userDataProfile/electron-sandbox/userDataProfileStorageService.js'; +import './services/auxiliaryWindow/electron-sandbox/auxiliaryWindowService.js'; +import '../platform/extensionManagement/electron-sandbox/extensionsProfileScannerService.js'; + +import { registerSingleton } from '../platform/instantiation/common/extensions.js'; +import { IUserDataInitializationService, UserDataInitializationService } from './services/userData/browser/userDataInit.js'; +import { SyncDescriptor } from '../platform/instantiation/common/descriptors.js'; + +registerSingleton(IUserDataInitializationService, new SyncDescriptor(UserDataInitializationService, [[]], true)); + + //#endregion + + //#region --- workbench contributions + // Logs -import "./contrib/logs/electron-sandbox/logs.contribution.js"; +import './contrib/logs/electron-sandbox/logs.contribution.js'; + // Localizations -import "./contrib/localization/electron-sandbox/localization.contribution.js"; +import './contrib/localization/electron-sandbox/localization.contribution.js'; + // Explorer -import "./contrib/files/electron-sandbox/fileActions.contribution.js"; +import './contrib/files/electron-sandbox/fileActions.contribution.js'; + // CodeEditor Contributions -import "./contrib/codeEditor/electron-sandbox/codeEditor.contribution.js"; +import './contrib/codeEditor/electron-sandbox/codeEditor.contribution.js'; + // Debug -import "./contrib/debug/electron-sandbox/extensionHostDebugService.js"; +import './contrib/debug/electron-sandbox/extensionHostDebugService.js'; + // Extensions Management -import "./contrib/extensions/electron-sandbox/extensions.contribution.js"; +import './contrib/extensions/electron-sandbox/extensions.contribution.js'; + // Issues -import "./contrib/issue/electron-sandbox/issue.contribution.js"; +import './contrib/issue/electron-sandbox/issue.contribution.js'; + // Process -import "./contrib/issue/electron-sandbox/process.contribution.js"; +import './contrib/issue/electron-sandbox/process.contribution.js'; + // Remote -import "./contrib/remote/electron-sandbox/remote.contribution.js"; +import './contrib/remote/electron-sandbox/remote.contribution.js'; + // Configuration Exporter -import "./contrib/configExporter/electron-sandbox/configurationExportHelper.contribution.js"; +import './contrib/configExporter/electron-sandbox/configurationExportHelper.contribution.js'; + // Terminal -import "./contrib/terminal/electron-sandbox/terminal.contribution.js"; +import './contrib/terminal/electron-sandbox/terminal.contribution.js'; + // Themes -import "./contrib/themes/browser/themes.test.contribution.js"; -import "./services/themes/electron-sandbox/themes.contribution.js"; +import './contrib/themes/browser/themes.test.contribution.js'; +import './services/themes/electron-sandbox/themes.contribution.js'; + // User Data Sync -import "./contrib/userDataSync/electron-sandbox/userDataSync.contribution.js"; +import './contrib/userDataSync/electron-sandbox/userDataSync.contribution.js'; + // Tags -import "./contrib/tags/electron-sandbox/workspaceTagsService.js"; -import "./contrib/tags/electron-sandbox/tags.contribution.js"; +import './contrib/tags/electron-sandbox/workspaceTagsService.js'; +import './contrib/tags/electron-sandbox/tags.contribution.js'; + // Performance -import "./contrib/performance/electron-sandbox/performance.contribution.js"; +import './contrib/performance/electron-sandbox/performance.contribution.js'; + // Tasks -import "./contrib/tasks/electron-sandbox/taskService.js"; +import './contrib/tasks/electron-sandbox/taskService.js'; + // External terminal -import "./contrib/externalTerminal/electron-sandbox/externalTerminal.contribution.js"; +import './contrib/externalTerminal/electron-sandbox/externalTerminal.contribution.js'; + // Webview -import "./contrib/webview/electron-sandbox/webview.contribution.js"; +import './contrib/webview/electron-sandbox/webview.contribution.js'; + // Splash -import "./contrib/splash/electron-sandbox/splash.contribution.js"; +import './contrib/splash/electron-sandbox/splash.contribution.js'; + // Local History -import "./contrib/localHistory/electron-sandbox/localHistory.contribution.js"; +import './contrib/localHistory/electron-sandbox/localHistory.contribution.js'; + // Merge Editor -import "./contrib/mergeEditor/electron-sandbox/mergeEditor.contribution.js"; +import './contrib/mergeEditor/electron-sandbox/mergeEditor.contribution.js'; + // Multi Diff Editor -import "./contrib/multiDiffEditor/browser/multiDiffEditor.contribution.js"; +import './contrib/multiDiffEditor/browser/multiDiffEditor.contribution.js'; + // Remote Tunnel -import "./contrib/remoteTunnel/electron-sandbox/remoteTunnel.contribution.js"; +import './contrib/remoteTunnel/electron-sandbox/remoteTunnel.contribution.js'; + // Chat -import "./contrib/chat/electron-sandbox/chat.contribution.js"; -import "./contrib/inlineChat/electron-sandbox/inlineChat.contribution.js"; -import "./contrib/chat/browser/chatSetup.contribution.js"; +import './contrib/chat/electron-sandbox/chat.contribution.js'; +import './contrib/inlineChat/electron-sandbox/inlineChat.contribution.js'; + // Encryption -import "./contrib/encryption/electron-sandbox/encryption.contribution.js"; -// Emergency Alert -import "./contrib/emergencyAlert/electron-sandbox/emergencyAlert.contribution.js"; +import './contrib/encryption/electron-sandbox/encryption.contribution.js'; -registerSingleton( - IUserDataInitializationService, - new SyncDescriptor(UserDataInitializationService, [[]], true), -); +// Emergency Alert +import './contrib/emergencyAlert/electron-sandbox/emergencyAlert.contribution.js'; //#endregion -export { main } from "./electron-sandbox/desktop.main.js"; + + +export { main } from './electron-sandbox/desktop.main.js'; diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index a16b3ecf06f5e..0000000000000 --- a/package-lock.json +++ /dev/null @@ -1,18604 +0,0 @@ -{ - "name": "code-oss-dev", - "version": "1.97.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "code-oss-dev", - "version": "1.97.0", - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "@microsoft/1ds-core-js": "^3.2.13", - "@microsoft/1ds-post-js": "^3.2.13", - "@parcel/watcher": "2.1.0", - "@types/semver": "^7.5.8", - "@vscode/deviceid": "^0.1.1", - "@vscode/iconv-lite-umd": "0.7.0", - "@vscode/policy-watcher": "^1.1.8", - "@vscode/proxy-agent": "^0.27.0", - "@vscode/ripgrep": "^1.15.9", - "@vscode/spdlog": "^0.15.0", - "@vscode/sqlite3": "5.1.8-vscode", - "@vscode/sudo-prompt": "9.3.1", - "@vscode/tree-sitter-wasm": "^0.0.4", - "@vscode/vscode-languagedetection": "1.0.21", - "@vscode/windows-mutex": "^0.5.0", - "@vscode/windows-process-tree": "^0.6.0", - "@vscode/windows-registry": "^1.1.0", - "@xterm/addon-clipboard": "^0.2.0-beta.53", - "@xterm/addon-image": "^0.9.0-beta.70", - "@xterm/addon-ligatures": "^0.10.0-beta.70", - "@xterm/addon-search": "^0.16.0-beta.70", - "@xterm/addon-serialize": "^0.14.0-beta.70", - "@xterm/addon-unicode11": "^0.9.0-beta.70", - "@xterm/addon-webgl": "^0.19.0-beta.70", - "@xterm/headless": "^5.6.0-beta.70", - "@xterm/xterm": "^5.6.0-beta.70", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.2", - "jschardet": "3.1.4", - "kerberos": "2.1.1", - "minimist": "^1.2.6", - "native-is-elevated": "0.7.0", - "native-keymap": "^3.3.5", - "native-watchdog": "^1.4.1", - "node-pty": "^1.1.0-beta22", - "open": "^8.4.2", - "tas-client-umd": "0.2.0", - "v8-inspect-profiler": "^0.1.1", - "vscode-oniguruma": "1.7.0", - "vscode-regexpp": "^3.1.0", - "vscode-textmate": "9.1.0", - "yauzl": "^3.0.0", - "yazl": "^2.4.3" - }, - "devDependencies": { - "@playwright/test": "^1.46.1", - "@stylistic/eslint-plugin-ts": "^2.8.0", - "@types/cookie": "^0.3.3", - "@types/debug": "^4.1.5", - "@types/eslint": "^9.6.1", - "@types/gulp-svgmin": "^1.2.1", - "@types/http-proxy-agent": "^2.0.1", - "@types/kerberos": "^1.1.2", - "@types/minimist": "^1.2.1", - "@types/mocha": "^9.1.1", - "@types/node": "20.x", - "@types/sinon": "^10.0.2", - "@types/sinon-test": "^2.4.2", - "@types/trusted-types": "^1.0.6", - "@types/vscode-notebook-renderer": "^1.72.0", - "@types/webpack": "^5.28.5", - "@types/wicg-file-system-access": "^2020.9.6", - "@types/windows-foreground-love": "^0.3.0", - "@types/winreg": "^1.2.30", - "@types/yauzl": "^2.10.0", - "@types/yazl": "^2.4.2", - "@typescript-eslint/utils": "^8.8.0", - "@vscode/gulp-electron": "^1.36.0", - "@vscode/l10n-dev": "0.0.35", - "@vscode/telemetry-extractor": "^1.10.2", - "@vscode/test-cli": "^0.0.6", - "@vscode/test-electron": "^2.4.0", - "@vscode/test-web": "^0.0.62", - "@vscode/v8-heap-parser": "^0.1.0", - "@vscode/vscode-perf": "^0.0.19", - "@webgpu/types": "^0.1.44", - "ansi-colors": "^3.2.3", - "asar": "^3.0.3", - "chromium-pickle-js": "^0.2.0", - "cookie": "^0.7.2", - "copy-webpack-plugin": "^11.0.0", - "css-loader": "^6.9.1", - "cssnano": "^6.0.3", - "debounce": "^1.0.0", - "deemon": "^1.8.0", - "electron": "32.2.6", - "eslint": "^9.11.1", - "eslint-formatter-compact": "^8.40.0", - "eslint-plugin-header": "3.1.1", - "eslint-plugin-jsdoc": "^50.3.1", - "eslint-plugin-local": "^6.0.0", - "event-stream": "3.3.4", - "fancy-log": "^1.3.3", - "file-loader": "^6.2.0", - "glob": "^5.0.13", - "gulp": "^4.0.0", - "gulp-azure-storage": "^0.12.1", - "gulp-bom": "^3.0.0", - "gulp-buffer": "0.0.2", - "gulp-filter": "^5.1.0", - "gulp-flatmap": "^1.0.2", - "gulp-gunzip": "^1.0.0", - "gulp-gzip": "^1.4.2", - "gulp-json-editor": "^2.5.0", - "gulp-plumber": "^1.2.0", - "gulp-rename": "^1.2.0", - "gulp-replace": "^0.5.4", - "gulp-sourcemaps": "^3.0.0", - "gulp-svgmin": "^4.1.0", - "gulp-untar": "^0.0.7", - "husky": "^0.13.1", - "innosetup": "6.0.5", - "istanbul-lib-coverage": "^3.2.0", - "istanbul-lib-instrument": "^6.0.1", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.1", - "istanbul-reports": "^3.1.5", - "lazy.js": "^0.4.2", - "merge-options": "^1.0.1", - "mime": "^1.4.1", - "minimatch": "^3.0.4", - "minimist": "^1.2.6", - "mocha": "^10.2.0", - "mocha-junit-reporter": "^2.2.1", - "mocha-multi-reporters": "^1.5.1", - "npm-run-all": "^4.1.5", - "os-browserify": "^0.3.0", - "p-all": "^1.0.0", - "path-browserify": "^1.0.1", - "postcss": "^8.4.33", - "postcss-nesting": "^12.0.2", - "pump": "^1.0.1", - "rcedit": "^1.1.0", - "rimraf": "^2.2.8", - "sinon": "^12.0.1", - "sinon-test": "^3.1.3", - "source-map": "0.6.1", - "source-map-support": "^0.3.2", - "style-loader": "^3.3.2", - "ts-loader": "^9.5.1", - "ts-node": "^10.9.1", - "tsec": "0.2.7", - "tslib": "^2.6.3", - "typescript": "^5.8.0-dev.20241202", - "typescript-eslint": "^8.8.0", - "util": "^0.12.4", - "webpack": "^5.94.0", - "webpack-cli": "^5.1.4", - "webpack-stream": "^7.0.0", - "xml2js": "^0.5.0", - "yaserver": "^0.4.0" - }, - "optionalDependencies": { - "windows-foreground-love": "0.5.0" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", - "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@azure-rest/ai-translation-text": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/@azure-rest/ai-translation-text/-/ai-translation-text-1.0.0-beta.1.tgz", - "integrity": "sha512-h1xDrmVRbk6eAAqTHxy9Npv543cWteqgop15sVXBQhadOwzHoREn+UqMCzNfvL6/AjiInUlwNSaNQK1ANgobLA==", - "dev": true, - "dependencies": { - "@azure-rest/core-client": "^1.1.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.8.0", - "@azure/logger": "^1.0.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@azure-rest/core-client": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@azure-rest/core-client/-/core-client-1.4.0.tgz", - "integrity": "sha512-ozTDPBVUDR5eOnMIwhggbnVmOrka4fXCs8n8mvUo4WLLc38kki6bAOByDoVZZPz/pZy2jMt2kwfpvy/UjALj6w==", - "dev": true, - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.5.0", - "@azure/core-tracing": "^1.0.1", - "@azure/core-util": "^1.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/abort-controller": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz", - "integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==", - "dev": true, - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-asynciterator-polyfill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@azure/core-asynciterator-polyfill/-/core-asynciterator-polyfill-1.0.0.tgz", - "integrity": "sha512-kmv8CGrPfN9SwMwrkiBK9VTQYxdFQEGe0BmQk+M8io56P9KNzpAxcWE/1fxJj7uouwN4kXF0BHW8DNlgx+wtCg==", - "dev": true - }, - "node_modules/@azure/core-auth": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.7.2.tgz", - "integrity": "sha512-Igm/S3fDYmnMq1uKS38Ae1/m37B3zigdlZw+kocwEhh5GjyKjPrXKO2J6rzpC1wAxrNil/jX9BJRqBshyjnF3g==", - "dev": true, - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-util": "^1.1.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-http": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.2.2.tgz", - "integrity": "sha512-V1DdoO9V/sFimKpdWoNBgsE+QUjQgpXYnxrTdUp5RyhsTJjvEVn/HKmTQXIHuLUUo6IyIWj+B+Dg4VaXse9dIA==", - "dev": true, - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-asynciterator-polyfill": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-tracing": "1.0.0-preview.13", - "@azure/logger": "^1.0.0", - "@types/node-fetch": "^2.5.0", - "@types/tunnel": "^0.0.3", - "form-data": "^4.0.0", - "node-fetch": "^2.6.0", - "process": "^0.11.10", - "tough-cookie": "^4.0.0", - "tslib": "^2.2.0", - "tunnel": "^0.0.6", - "uuid": "^8.3.0", - "xml2js": "^0.4.19" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@azure/core-http/node_modules/@azure/abort-controller": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.0.4.tgz", - "integrity": "sha512-lNUmDRVGpanCsiUN3NWxFTdwmdFI53xwhkTFfHDGTYk46ca7Ind3nanJc+U6Zj9Tv+9nTCWRBscWEW1DyKOpTw==", - "dev": true, - "dependencies": { - "tslib": "^2.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@azure/core-http/node_modules/@azure/core-tracing": { - "version": "1.0.0-preview.13", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", - "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", - "dev": true, - "dependencies": { - "@opentelemetry/api": "^1.0.1", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@azure/core-http/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@azure/core-http/node_modules/xml2js": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", - "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", - "dev": true, - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/@azure/core-http/node_modules/xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/@azure/core-lro": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.2.1.tgz", - "integrity": "sha512-HE6PBl+mlKa0eBsLwusHqAqjLc5n9ByxeDo3Hz4kF3B1hqHvRkBr4oMgoT6tX7Hc3q97KfDctDUon7EhvoeHPA==", - "dev": true, - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-tracing": "1.0.0-preview.13", - "@azure/logger": "^1.0.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@azure/core-lro/node_modules/@azure/abort-controller": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.0.4.tgz", - "integrity": "sha512-lNUmDRVGpanCsiUN3NWxFTdwmdFI53xwhkTFfHDGTYk46ca7Ind3nanJc+U6Zj9Tv+9nTCWRBscWEW1DyKOpTw==", - "dev": true, - "dependencies": { - "tslib": "^2.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@azure/core-lro/node_modules/@azure/core-tracing": { - "version": "1.0.0-preview.13", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", - "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", - "dev": true, - "dependencies": { - "@opentelemetry/api": "^1.0.1", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@azure/core-paging": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.2.0.tgz", - "integrity": "sha512-ZX1bCjm/MjKPCN6kQD/9GJErYSoKA8YWp6YWoo5EIzcTWlSBLXu3gNaBTUl8usGl+UShiKo7b4Gdy1NSTIlpZg==", - "dev": true, - "dependencies": { - "@azure/core-asynciterator-polyfill": "^1.0.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@azure/core-rest-pipeline": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.16.0.tgz", - "integrity": "sha512-CeuTvsXxCUmEuxH5g/aceuSl6w2EugvNHKAtKKVdiX915EjJJxAwfzNNWZreNnbxHZ2fi0zaM6wwS23x2JVqSQ==", - "dev": true, - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "@azure/core-auth": "^1.4.0", - "@azure/core-tracing": "^1.0.1", - "@azure/core-util": "^1.9.0", - "@azure/logger": "^1.0.0", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-tracing": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.1.2.tgz", - "integrity": "sha512-dawW9ifvWAWmUm9/h+/UQ2jrdvjCJ7VJEuCJ6XVNudzcOwm53BFZH4Q845vjfgoUAM8ZxokvVNxNxAITc502YA==", - "dev": true, - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/core-util": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.9.0.tgz", - "integrity": "sha512-AfalUQ1ZppaKuxPPMsFEUdX6GZPB3d9paR9d/TTL7Ow2De8cJaC7ibi7kWVlFAVPCYo31OcnGymc0R89DX8Oaw==", - "dev": true, - "dependencies": { - "@azure/abort-controller": "^2.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@azure/logger": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.3.tgz", - "integrity": "sha512-aK4s3Xxjrx3daZr3VylxejK3vG5ExXck5WOHDJ8in/k9AqlfIyFMMT1uG7u8mNjX+QRILTIn0/Xgschfh/dQ9g==", - "dev": true, - "dependencies": { - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@azure/storage-blob": { - "version": "12.8.0", - "resolved": "https://registry.npmjs.org/@azure/storage-blob/-/storage-blob-12.8.0.tgz", - "integrity": "sha512-c8+Wz19xauW0bGkTCoqZH4dYfbtBniPiGiRQOn1ca6G5jsjr4azwaTk9gwjVY8r3vY2Taf95eivLzipfIfiS4A==", - "dev": true, - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-http": "^2.0.0", - "@azure/core-lro": "^2.2.0", - "@azure/core-paging": "^1.1.1", - "@azure/core-tracing": "1.0.0-preview.13", - "@azure/logger": "^1.0.0", - "events": "^3.0.0", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@azure/storage-blob/node_modules/@azure/abort-controller": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.0.4.tgz", - "integrity": "sha512-lNUmDRVGpanCsiUN3NWxFTdwmdFI53xwhkTFfHDGTYk46ca7Ind3nanJc+U6Zj9Tv+9nTCWRBscWEW1DyKOpTw==", - "dev": true, - "dependencies": { - "tslib": "^2.0.0" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@azure/storage-blob/node_modules/@azure/core-tracing": { - "version": "1.0.0-preview.13", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", - "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", - "dev": true, - "dependencies": { - "@opentelemetry/api": "^1.0.1", - "tslib": "^2.2.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/code-frame/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/code-frame/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/code-frame/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/code-frame/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.8.tgz", - "integrity": "sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.18.10.tgz", - "integrity": "sha512-JQM6k6ENcBFKVtWvLavlvi/mPcpYZ3+R+2EySDEMSMbp7Mn4FexlbbJVrx2R7Ijhr01T8gyqrOaABWIOgxeUyw==", - "dev": true, - "dependencies": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.18.10", - "@babel/helper-compilation-targets": "^7.18.9", - "@babel/helper-module-transforms": "^7.18.9", - "@babel/helpers": "^7.18.9", - "@babel/parser": "^7.18.10", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.18.10", - "@babel/types": "^7.18.10", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/generator": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", - "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", - "dev": true, - "dependencies": { - "@babel/types": "^7.23.0", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.9.tgz", - "integrity": "sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.18.8", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.20.2", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "dev": true, - "dependencies": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.18.9.tgz", - "integrity": "sha512-KYNqY0ICwfv19b31XzvmI/mfcylOzbLtowkw+mfvGPAQ3kfCnMLYbED3YecL5tPd8nAYFQFAd6JHp2LxZk/J1g==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.18.6", - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.9", - "@babel/types": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", - "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", - "dev": true, - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.9.tgz", - "integrity": "sha512-Jf5a+rbrLoR4eNdUmnFu8cN5eNJT6qdTdOg5IHIzq87WwyRw9PwguLFOWYgktN/60IP4fgDUawJvs7PjQIzELQ==", - "dev": true, - "dependencies": { - "@babel/template": "^7.18.6", - "@babel/traverse": "^7.18.9", - "@babel/types": "^7.18.9" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/parser": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", - "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", - "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.0", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.0", - "@babel/types": "^7.23.0", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/types": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", - "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", - "dev": true, - "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true - }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "node_modules/@csstools/selector-specificity": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-3.0.1.tgz", - "integrity": "sha512-NPljRHkq4a14YzZ3YD406uaxh7s0g6eAq3L9aLOWywoqe8PkYamAvtsh7KNX6c++ihDrJ0RiU+/z7rGnhlZ5ww==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss-selector-parser": "^6.0.13" - } - }, - "node_modules/@discoveryjs/json-ext": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.3.tgz", - "integrity": "sha512-Fxt+AfXgjMoin2maPIYzFZnQjAXjAL0PHscM5pRTtatFqB+vZxAM9tLp2Optnuw3QOQC40jTNeGYFOMvyf7v9g==", - "dev": true, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/@electron/get": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@electron/get/-/get-2.0.2.tgz", - "integrity": "sha512-eFZVFoRXb3GFGd7Ak7W4+6jBl9wBtiZ4AaYOse97ej6mKj5tkyO0dUnUChs1IhJZtx1BENo4/p4WUTXpi6vT+g==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "env-paths": "^2.2.0", - "fs-extra": "^8.1.0", - "got": "^11.8.5", - "progress": "^2.0.3", - "semver": "^6.2.0", - "sumchecker": "^3.0.1" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "global-agent": "^3.0.0" - } - }, - "node_modules/@electron/get/node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/@electron/get/node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@electron/get/node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/@electron/get/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@electron/get/node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/@es-joy/jsdoccomment": { - "version": "0.48.0", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.48.0.tgz", - "integrity": "sha512-G6QUWIcC+KvSwXNsJyDTHvqUdNoAVJPPgkc3+Uk4WBKqZvoXhlvazOgm9aL0HwihJLQf0l+tOE2UFzXBqCqgDw==", - "dev": true, - "dependencies": { - "comment-parser": "1.4.1", - "esquery": "^1.6.0", - "jsdoc-type-pratt-parser": "~4.1.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.11.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", - "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", - "dev": true, - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/config-array": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", - "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", - "dev": true, - "dependencies": { - "@eslint/object-schema": "^2.1.4", - "debug": "^4.3.1", - "minimatch": "^3.1.2" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/core": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.6.0.tgz", - "integrity": "sha512-8I2Q8ykA4J0x0o7cg67FPVnehcqWTBehu/lmY+bolPFHGjh49YzGBMXTvpqVgEbBdvNCSxj6iFgiIyHzf03lzg==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/eslintrc": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", - "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", - "dev": true, - "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^10.0.1", - "globals": "^14.0.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/js": { - "version": "9.11.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.11.1.tgz", - "integrity": "sha512-/qu+TWz8WwPWc7/HcIJKi+c+MOm46GdVaSlTTQcaqaL53+GsoA6MxWp5PtTx48qbSP7ylM1Kn7nhvkugfJvRSA==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/object-schema": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", - "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.0.tgz", - "integrity": "sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==", - "dev": true, - "dependencies": { - "levn": "^0.4.1" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - } - }, - "node_modules/@gulp-sourcemaps/identity-map": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/identity-map/-/identity-map-2.0.1.tgz", - "integrity": "sha512-Tb+nSISZku+eQ4X1lAkevcQa+jknn/OVUgZ3XCxEKIsLsqYuPoJwJOPQeaOk75X3WPftb29GWY1eqE7GLsXb1Q==", - "dev": true, - "dependencies": { - "acorn": "^6.4.1", - "normalize-path": "^3.0.0", - "postcss": "^7.0.16", - "source-map": "^0.6.0", - "through2": "^3.0.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/@gulp-sourcemaps/identity-map/node_modules/acorn": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", - "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/@gulp-sourcemaps/identity-map/node_modules/picocolors": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", - "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", - "dev": true - }, - "node_modules/@gulp-sourcemaps/identity-map/node_modules/postcss": { - "version": "7.0.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", - "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", - "dev": true, - "dependencies": { - "picocolors": "^0.2.1", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/@gulp-sourcemaps/map-sources": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz", - "integrity": "sha1-iQrnxdjId/bThIYCFazp1+yUW9o= sha512-o/EatdaGt8+x2qpb0vFLC/2Gug/xYPRXb6a+ET1wGYKozKN3krDWC/zZFZAtrzxJHuDL12mwdfEFKcKMNvc55A==", - "dev": true, - "dependencies": { - "normalize-path": "^2.0.1", - "through2": "^2.0.3" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/@gulp-sourcemaps/map-sources/node_modules/normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", - "dev": true, - "dependencies": { - "remove-trailing-separator": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@gulp-sourcemaps/map-sources/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/@gulp-sourcemaps/map-sources/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/retry": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.0.tgz", - "integrity": "sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==", - "dev": true, - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "dev": true, - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, - "node_modules/@isaacs/cliui/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", - "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", - "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25" - } - }, - "node_modules/@jridgewell/source-map/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" - } - }, - "node_modules/@koa/cors": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@koa/cors/-/cors-5.0.0.tgz", - "integrity": "sha512-x/iUDjcS90W69PryLDIMgFyV21YLTnG9zOpPXS7Bkt2b8AsY3zZsIpOLBkYr9fBcF3HbkKaER5hOBZLfpLgYNw==", - "dev": true, - "dependencies": { - "vary": "^1.1.2" - }, - "engines": { - "node": ">= 14.0.0" - } - }, - "node_modules/@koa/router": { - "version": "13.1.0", - "resolved": "https://registry.npmjs.org/@koa/router/-/router-13.1.0.tgz", - "integrity": "sha512-mNVu1nvkpSd8Q8gMebGbCkDWJ51ODetrFvLKYusej+V0ByD4btqHYnPIzTBLXnQMVUlm/oxVwqmWBY3zQfZilw==", - "dev": true, - "license": "MIT", - "dependencies": { - "http-errors": "^2.0.0", - "koa-compose": "^4.1.0", - "path-to-regexp": "^6.3.0" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/@microsoft/1ds-core-js": { - "version": "3.2.13", - "resolved": "https://registry.npmjs.org/@microsoft/1ds-core-js/-/1ds-core-js-3.2.13.tgz", - "integrity": "sha512-CluYTRWcEk0ObG5EWFNWhs87e2qchJUn0p2D21ZUa3PWojPZfPSBs4//WIE0MYV8Qg1Hdif2ZTwlM7TbYUjfAg==", - "dependencies": { - "@microsoft/applicationinsights-core-js": "2.8.15", - "@microsoft/applicationinsights-shims": "^2.0.2", - "@microsoft/dynamicproto-js": "^1.1.7" - } - }, - "node_modules/@microsoft/1ds-post-js": { - "version": "3.2.13", - "resolved": "https://registry.npmjs.org/@microsoft/1ds-post-js/-/1ds-post-js-3.2.13.tgz", - "integrity": "sha512-HgS574fdD19Bo2vPguyznL4eDw7Pcm1cVNpvbvBLWiW3x4e1FCQ3VMXChWnAxCae8Hb0XqlA2sz332ZobBavTA==", - "dependencies": { - "@microsoft/1ds-core-js": "3.2.13", - "@microsoft/applicationinsights-shims": "^2.0.2", - "@microsoft/dynamicproto-js": "^1.1.7" - } - }, - "node_modules/@microsoft/applicationinsights-core-js": { - "version": "2.8.15", - "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-core-js/-/applicationinsights-core-js-2.8.15.tgz", - "integrity": "sha512-yYAs9MyjGr2YijQdUSN9mVgT1ijI1FPMgcffpaPmYbHAVbQmF7bXudrBWHxmLzJlwl5rfep+Zgjli2e67lwUqQ==", - "dependencies": { - "@microsoft/applicationinsights-shims": "2.0.2", - "@microsoft/dynamicproto-js": "^1.1.9" - }, - "peerDependencies": { - "tslib": "*" - } - }, - "node_modules/@microsoft/applicationinsights-shims": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-shims/-/applicationinsights-shims-2.0.2.tgz", - "integrity": "sha512-PoHEgsnmcqruLNHZ/amACqdJ6YYQpED0KSRe6J7gIJTtpZC1FfFU9b1fmDKDKtFoUSrPzEh1qzO3kmRZP0betg==" - }, - "node_modules/@microsoft/dynamicproto-js": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@microsoft/dynamicproto-js/-/dynamicproto-js-1.1.9.tgz", - "integrity": "sha512-n1VPsljTSkthsAFYdiWfC+DKzK2WwcRp83Y1YAqdX552BstvsDjft9YXppjUzp11BPsapDoO1LDgrDB0XVsfNQ==" - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@octokit/auth-token": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz", - "integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==", - "dev": true, - "dependencies": { - "@octokit/types": "^6.0.3" - } - }, - "node_modules/@octokit/core": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz", - "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==", - "dev": true, - "dependencies": { - "@octokit/auth-token": "^2.4.4", - "@octokit/graphql": "^4.5.8", - "@octokit/request": "^5.6.3", - "@octokit/request-error": "^2.0.5", - "@octokit/types": "^6.0.3", - "before-after-hook": "^2.2.0", - "universal-user-agent": "^6.0.0" - } - }, - "node_modules/@octokit/endpoint": { - "version": "6.0.12", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz", - "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==", - "dev": true, - "dependencies": { - "@octokit/types": "^6.0.3", - "is-plain-object": "^5.0.0", - "universal-user-agent": "^6.0.0" - } - }, - "node_modules/@octokit/graphql": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz", - "integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==", - "dev": true, - "dependencies": { - "@octokit/request": "^5.6.0", - "@octokit/types": "^6.0.3", - "universal-user-agent": "^6.0.0" - } - }, - "node_modules/@octokit/openapi-types": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-11.2.0.tgz", - "integrity": "sha512-PBsVO+15KSlGmiI8QAzaqvsNlZlrDlyAJYcrXBCvVUxCp7VnXjkwPoFHgjEJXx3WF9BAwkA6nfCUA7i9sODzKA==", - "dev": true - }, - "node_modules/@octokit/plugin-paginate-rest": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.17.0.tgz", - "integrity": "sha512-tzMbrbnam2Mt4AhuyCHvpRkS0oZ5MvwwcQPYGtMv4tUa5kkzG58SVB0fcsLulOZQeRnOgdkZWkRUiyBlh0Bkyw==", - "dev": true, - "dependencies": { - "@octokit/types": "^6.34.0" - }, - "peerDependencies": { - "@octokit/core": ">=2" - } - }, - "node_modules/@octokit/plugin-request-log": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz", - "integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==", - "dev": true, - "peerDependencies": { - "@octokit/core": ">=3" - } - }, - "node_modules/@octokit/plugin-rest-endpoint-methods": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.13.0.tgz", - "integrity": "sha512-uJjMTkN1KaOIgNtUPMtIXDOjx6dGYysdIFhgA52x4xSadQCz3b/zJexvITDVpANnfKPW/+E0xkOvLntqMYpviA==", - "dev": true, - "dependencies": { - "@octokit/types": "^6.34.0", - "deprecation": "^2.3.1" - }, - "peerDependencies": { - "@octokit/core": ">=3" - } - }, - "node_modules/@octokit/request": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz", - "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==", - "dev": true, - "dependencies": { - "@octokit/endpoint": "^6.0.1", - "@octokit/request-error": "^2.1.0", - "@octokit/types": "^6.16.1", - "is-plain-object": "^5.0.0", - "node-fetch": "^2.6.7", - "universal-user-agent": "^6.0.0" - } - }, - "node_modules/@octokit/request-error": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz", - "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==", - "dev": true, - "dependencies": { - "@octokit/types": "^6.0.3", - "deprecation": "^2.0.0", - "once": "^1.4.0" - } - }, - "node_modules/@octokit/rest": { - "version": "18.12.0", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.12.0.tgz", - "integrity": "sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q==", - "dev": true, - "dependencies": { - "@octokit/core": "^3.5.1", - "@octokit/plugin-paginate-rest": "^2.16.8", - "@octokit/plugin-request-log": "^1.0.4", - "@octokit/plugin-rest-endpoint-methods": "^5.12.0" - } - }, - "node_modules/@octokit/types": { - "version": "6.34.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.34.0.tgz", - "integrity": "sha512-s1zLBjWhdEI2zwaoSgyOFoKSl109CUcVBCc7biPJ3aAf6LGLU6szDvi31JPU7bxfla2lqfhjbbg/5DdFNxOwHw==", - "dev": true, - "dependencies": { - "@octokit/openapi-types": "^11.2.0" - } - }, - "node_modules/@opentelemetry/api": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.0.3.tgz", - "integrity": "sha512-puWxACExDe9nxbBB3lOymQFrLYml2dVOrd7USiVRnSbgXE+KwBu+HxFvxrzfqsiSda9IWsXJG1ef7C1O2/GmKQ==", - "dev": true, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@parcel/watcher": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.1.0.tgz", - "integrity": "sha512-8s8yYjd19pDSsBpbkOHnT6Z2+UJSuLQx61pCFM0s5wSRvKCEMDjd/cHY3/GI1szHIWbpXpsJdg3V6ISGGx9xDw==", - "hasInstallScript": true, - "dependencies": { - "is-glob": "^4.0.3", - "micromatch": "^4.0.5", - "node-addon-api": "^3.2.1", - "node-gyp-build": "^4.3.0" - }, - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, - "optional": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/@pkgr/core": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", - "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/unts" - } - }, - "node_modules/@playwright/browser-chromium": { - "version": "1.47.2", - "resolved": "https://registry.npmjs.org/@playwright/browser-chromium/-/browser-chromium-1.47.2.tgz", - "integrity": "sha512-tsk9bLcGzIu4k4xI2ixlwDrdJhMqCalUCsSj7TRI8VuvK7cLiJIa5SR0dprKbX+wkku/JMR4EN6g9DMHvfna+Q==", - "dev": true, - "hasInstallScript": true, - "license": "Apache-2.0", - "dependencies": { - "playwright-core": "1.47.2" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@playwright/test": { - "version": "1.46.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.46.1.tgz", - "integrity": "sha512-Fq6SwLujA/DOIvNC2EL/SojJnkKf/rAwJ//APpJJHRyMi1PdKrY3Az+4XNQ51N4RTbItbIByQ0jgd1tayq1aeA==", - "dev": true, - "dependencies": { - "playwright": "1.46.1" - }, - "bin": { - "playwright": "cli.js" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@sindresorhus/is": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", - "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/is?sponsor=1" - } - }, - "node_modules/@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", - "dev": true, - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz", - "integrity": "sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.7.0" - } - }, - "node_modules/@sinonjs/samsam": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.0.2.tgz", - "integrity": "sha512-jxPRPp9n93ci7b8hMfJOFDPRLFYadN6FSpeROFTR4UNF4i5b+EK6m4QXPO46BDhFgRy1JuS87zAnFOzCUwMJcQ==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.6.0", - "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" - } - }, - "node_modules/@sinonjs/text-encoding": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", - "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", - "dev": true - }, - "node_modules/@stylistic/eslint-plugin-ts": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-ts/-/eslint-plugin-ts-2.8.0.tgz", - "integrity": "sha512-VukJqkRlC2psLKoIHJ+4R3ZxLJfWeizGGX+X5ZxunjXo4MbxRNtwu5UvXuerABg4s2RV6Z3LFTdm0WvI4+RAMQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/utils": "^8.4.0", - "eslint-visitor-keys": "^4.0.0", - "espree": "^10.1.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "peerDependencies": { - "eslint": ">=8.40.0" - } - }, - "node_modules/@stylistic/eslint-plugin-ts/node_modules/eslint-visitor-keys": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", - "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@szmarczak/http-timer": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", - "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", - "dev": true, - "dependencies": { - "defer-to-connect": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@thisismanta/pessimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@thisismanta/pessimist/-/pessimist-1.2.0.tgz", - "integrity": "sha512-rm8/zjNMuO9hPYhEMavVIIxmvawJJB8mthvbVXd74XUW7V/SbgmtDBQjICbCWKjluvA+gh+cqi7dv85/jexknA==", - "dev": true, - "dependencies": { - "lodash": "^4.17.21" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@tootallnate/once": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-3.0.0.tgz", - "integrity": "sha512-OAdBVB7rlwvLD+DiecSAyVKzKVmSfXbouCyM5I6wHGi4MGXIyFqErg1IvyJ7PI1e+GYZuZh7cCHV/c4LA8SKMw==", - "engines": { - "node": ">= 10" - } - }, - "node_modules/@trysound/sax": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz", - "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==", - "dev": true, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/@ts-morph/common": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.20.0.tgz", - "integrity": "sha512-7uKjByfbPpwuzkstL3L5MQyuXPSKdoNG93Fmi2JoDcTf3pEP731JdRFAduRVkOs8oqxPsXKA+ScrWkdQ8t/I+Q==", - "dev": true, - "dependencies": { - "fast-glob": "^3.2.12", - "minimatch": "^7.4.3", - "mkdirp": "^2.1.6", - "path-browserify": "^1.0.1" - } - }, - "node_modules/@ts-morph/common/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@ts-morph/common/node_modules/minimatch": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz", - "integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@ts-morph/common/node_modules/mkdirp": { - "version": "2.1.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.6.tgz", - "integrity": "sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A==", - "dev": true, - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", - "dev": true - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", - "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", - "dev": true - }, - "node_modules/@types/cacheable-request": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", - "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", - "dev": true, - "dependencies": { - "@types/http-cache-semantics": "*", - "@types/keyv": "^3.1.4", - "@types/node": "*", - "@types/responselike": "^1.0.0" - } - }, - "node_modules/@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", - "dev": true - }, - "node_modules/@types/cookie": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.3.3.tgz", - "integrity": "sha512-LKVP3cgXBT9RYj+t+9FDKwS5tdI+rPBXaNSkma7hvqy35lc7mAokC2zsqWJH0LaqIt3B962nuYI77hsJoT1gow==", - "dev": true - }, - "node_modules/@types/debug": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.9.tgz", - "integrity": "sha512-8Hz50m2eoS56ldRlepxSBa6PWEVCtzUo/92HgLc2qTMnotJNIm7xP+UZhyWoYsyOdd5dxZ+NZLb24rsKyFs2ow==", - "dev": true, - "dependencies": { - "@types/ms": "*" - } - }, - "node_modules/@types/eslint": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", - "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", - "dev": true, - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true - }, - "node_modules/@types/expect": { - "version": "1.20.4", - "resolved": "https://registry.npmjs.org/@types/expect/-/expect-1.20.4.tgz", - "integrity": "sha512-Q5Vn3yjTDyCMV50TB6VRIbQNxSE4OmZR86VSbGaNpfUolm0iePBB4KdEEHmxoY5sT2+2DIvXW0rvMDP2nHZ4Mg==", - "dev": true - }, - "node_modules/@types/glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", - "dev": true, - "optional": true, - "dependencies": { - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "node_modules/@types/gulp-svgmin": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@types/gulp-svgmin/-/gulp-svgmin-1.2.1.tgz", - "integrity": "sha512-qT/Y+C2uWJZoGw4oAjuJGZk+ImmTrx+QZbMGSzf8a1absW3wztrmMPvCF64pdogATDVUSPQDLzPWAFeIxylJTA==", - "dev": true, - "dependencies": { - "@types/node": "*", - "@types/svgo": "^1", - "@types/vinyl": "*" - } - }, - "node_modules/@types/http-cache-semantics": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz", - "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==", - "dev": true - }, - "node_modules/@types/http-proxy-agent": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/http-proxy-agent/-/http-proxy-agent-2.0.1.tgz", - "integrity": "sha512-dgsgbsgI3t+ZkdzF9H19uBaLsurIZJJjJsVpj4mCLp8B6YghQ7jVwyqhaL0PcVtuC3nOi0ZBhAi2Dd9jCUwdFA==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", - "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", - "dev": true - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true - }, - "node_modules/@types/kerberos": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@types/kerberos/-/kerberos-1.1.2.tgz", - "integrity": "sha512-cLixfcXjdj7qohLasmC1G4fh+en4e4g7mFZiG38D+K9rS9BRKFlq1JH5dGkQzICckbu4wM+RcwSa4VRHlBg7Rg==", - "dev": true - }, - "node_modules/@types/keyv": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", - "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/minimatch": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", - "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", - "dev": true, - "optional": true - }, - "node_modules/@types/minimist": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.1.tgz", - "integrity": "sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg==", - "dev": true - }, - "node_modules/@types/mocha": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", - "integrity": "sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==", - "dev": true - }, - "node_modules/@types/ms": { - "version": "0.7.32", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.32.tgz", - "integrity": "sha512-xPSg0jm4mqgEkNhowKgZFBNtwoEwF6gJ4Dhww+GFpm3IgtNseHQZ5IqdNwnquZEoANxyDAKDRAdVo4Z72VvD/g==", - "dev": true - }, - "node_modules/@types/node": { - "version": "20.14.13", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.13.tgz", - "integrity": "sha512-+bHoGiZb8UiQ0+WEtmph2IWQCjIqg8MDZMAV+ppRRhUZnquF5mQkP/9vpSwJClEiSM/C7fZZExPzfU0vJTyp8w==", - "dev": true, - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/@types/node-fetch": { - "version": "2.5.12", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz", - "integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==", - "dev": true, - "dependencies": { - "@types/node": "*", - "form-data": "^3.0.0" - } - }, - "node_modules/@types/node-fetch/node_modules/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/@types/responselike": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz", - "integrity": "sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/semver": { - "version": "7.5.8", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", - "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==" - }, - "node_modules/@types/sinon": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.2.tgz", - "integrity": "sha512-BHn8Bpkapj8Wdfxvh2jWIUoaYB/9/XhsL0oOvBfRagJtKlSl9NWPcFOz2lRukI9szwGxFtYZCTejJSqsGDbdmw==", - "dev": true, - "dependencies": { - "@sinonjs/fake-timers": "^7.1.0" - } - }, - "node_modules/@types/sinon-test": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@types/sinon-test/-/sinon-test-2.4.2.tgz", - "integrity": "sha512-3BX9mk5+o//Xzs5N4bFYxPT+QlPLrqbyNfDWkIGtk9pVIp2Nl8ctsIGXsY3F01DsCd1Zlin3FqAk6V5XqkCyJA==", - "dev": true, - "dependencies": { - "@types/sinon": "*" - } - }, - "node_modules/@types/svgo": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/@types/svgo/-/svgo-1.3.6.tgz", - "integrity": "sha512-AZU7vQcy/4WFEuwnwsNsJnFwupIpbllH1++LXScN6uxT1Z4zPzdrWG97w4/I7eFKFTvfy/bHFStWjdBAg2Vjug==", - "dev": true - }, - "node_modules/@types/trusted-types": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-1.0.6.tgz", - "integrity": "sha512-230RC8sFeHoT6sSUlRO6a8cAnclO06eeiq1QDfiv2FGCLWFvvERWgwIQD4FWqD9A69BN7Lzee4OXwoMVnnsWDw==", - "dev": true - }, - "node_modules/@types/tunnel": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@types/tunnel/-/tunnel-0.0.3.tgz", - "integrity": "sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/vinyl": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.12.tgz", - "integrity": "sha512-Sr2fYMBUVGYq8kj3UthXFAu5UN6ZW+rYr4NACjZQJvHvj+c8lYv0CahmZ2P/r7iUkN44gGUBwqxZkrKXYPb7cw==", - "dev": true, - "dependencies": { - "@types/expect": "^1.20.4", - "@types/node": "*" - } - }, - "node_modules/@types/vscode-notebook-renderer": { - "version": "1.72.0", - "resolved": "https://registry.npmjs.org/@types/vscode-notebook-renderer/-/vscode-notebook-renderer-1.72.0.tgz", - "integrity": "sha512-5iTjb39DpLn03ULUwrDR3L2Dy59RV4blSUHy0oLdQuIY11PhgWO4mXIcoFS0VxY1GZQ4IcjSf3ooT2Jrrcahnw==", - "dev": true - }, - "node_modules/@types/webpack": { - "version": "5.28.5", - "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-5.28.5.tgz", - "integrity": "sha512-wR87cgvxj3p6D0Crt1r5avwqffqPXUkNlnQ1mjU93G7gCuFjufZR4I6j8cz5g1F1tTYpfOOFvly+cmIQwL9wvw==", - "dev": true, - "dependencies": { - "@types/node": "*", - "tapable": "^2.2.0", - "webpack": "^5" - } - }, - "node_modules/@types/wicg-file-system-access": { - "version": "2020.9.6", - "resolved": "https://registry.npmjs.org/@types/wicg-file-system-access/-/wicg-file-system-access-2020.9.6.tgz", - "integrity": "sha512-6hogE75Hl2Ov/jgp8ZhDaGmIF/q3J07GtXf8nCJCwKTHq7971po5+DId7grft09zG7plBwpF6ZU0yx9Du4/e1A==", - "dev": true - }, - "node_modules/@types/windows-foreground-love": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@types/windows-foreground-love/-/windows-foreground-love-0.3.0.tgz", - "integrity": "sha512-tFUVA/fiofNqOh6lZlymvQiQYPY+cZXZPR9mn9wN6/KS8uwx0zgH4Ij/jmFyRYr+x+DGZWEIeknS2BMi7FZJAQ==", - "dev": true - }, - "node_modules/@types/winreg": { - "version": "1.2.30", - "resolved": "https://registry.npmjs.org/@types/winreg/-/winreg-1.2.30.tgz", - "integrity": "sha1-kdZxDlNtNFucmwF8V0z2qNpkxRg= sha512-c4m/hnOI1j34i8hXlkZzelE6SXfOqaTWhBp0UgBuwmpiafh22OpsE261Rlg//agZtQHIY5cMgbkX8bnthUFrmA==", - "dev": true - }, - "node_modules/@types/yauzl": { - "version": "2.10.3", - "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", - "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/yazl": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@types/yazl/-/yazl-2.4.2.tgz", - "integrity": "sha512-T+9JH8O2guEjXNxqmybzQ92mJUh2oCwDDMSSimZSe1P+pceZiFROZLYmcbqkzV5EUwz6VwcKXCO2S2yUpra6XQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.8.0.tgz", - "integrity": "sha512-EL8eaGC6gx3jDd8GwEFEV091210U97J0jeEHrAYvIYosmEGet4wJ+g0SYmLu+oRiAwbSA5AVrt6DxLHfdd+bUg==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "8.8.0", - "@typescript-eslint/visitor-keys": "8.8.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.8.0.tgz", - "integrity": "sha512-QJwc50hRCgBd/k12sTykOJbESe1RrzmX6COk8Y525C9l7oweZ+1lw9JiU56im7Amm8swlz00DRIlxMYLizr2Vw==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.8.0.tgz", - "integrity": "sha512-ZaMJwc/0ckLz5DaAZ+pNLmHv8AMVGtfWxZe/x2JVEkD5LnmhWiQMMcYT7IY7gkdJuzJ9P14fRy28lUrlDSWYdw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "8.8.0", - "@typescript-eslint/visitor-keys": "8.8.0", - "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.8.0.tgz", - "integrity": "sha512-QE2MgfOTem00qrlPgyByaCHay9yb1+9BjnMFnSFkUKQfu7adBXDTnCAivURnuPPAG/qiB+kzKkZKmKfaMT0zVg==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.8.0", - "@typescript-eslint/types": "8.8.0", - "@typescript-eslint/typescript-estree": "8.8.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.8.0.tgz", - "integrity": "sha512-8mq51Lx6Hpmd7HnA2fcHQo3YgfX1qbccxQOgZcb4tvasu//zXRaA1j5ZRFeCw/VRAdFi4mRM9DnZw0Nu0Q2d1g==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "8.8.0", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@vscode/deviceid": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@vscode/deviceid/-/deviceid-0.1.1.tgz", - "integrity": "sha512-ErpoMeKKNYAkR1IT3zxB5RtiTqEECdh8fxggupWvzuxpTAX77hwOI2NdJ7um+vupnXRBZVx4ugo0+dVHJWUkag==", - "hasInstallScript": true, - "dependencies": { - "fs-extra": "^11.2.0", - "uuid": "^9.0.1" - } - }, - "node_modules/@vscode/gulp-electron": { - "version": "1.36.0", - "resolved": "https://registry.npmjs.org/@vscode/gulp-electron/-/gulp-electron-1.36.0.tgz", - "integrity": "sha512-zGNnxN2mccAa0fgyjUn0+HUX4sv4syUfoLQru3/QAQYki1oeqnkPpCXZxhismFmWpXwTwsf5sXeh1AOs8uyU0g==", - "dev": true, - "dependencies": { - "@electron/get": "^2.0.2", - "@octokit/rest": "^18.0.14", - "event-stream": "3.3.4", - "gulp-filter": "^5.1.0", - "gulp-rename": "1.2.2", - "gulp-symdest": "^1.2.0", - "gulp-vinyl-zip": "^2.1.2", - "mkdirp": "^0.5.1", - "plist": "^3.0.1", - "progress": "^1.1.8", - "rcedit": "^0.3.0", - "rimraf": "^2.4.2", - "semver": "^4.3.4", - "sumchecker": "^3.0.1", - "temp": "^0.8.3", - "vinyl": "^3.0.0", - "vinyl-fs": "^3.0.3" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@vscode/gulp-electron/node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/@vscode/gulp-electron/node_modules/rcedit": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/rcedit/-/rcedit-0.3.0.tgz", - "integrity": "sha1-y17uGF5Ub57aWXwkjJkGGG+pa84= sha512-6cFo8dgNFf92BPdBNEKtwCl321wSVW6HYn3+QRQMGf0sclBMerCyMAreQDdIchfR8ECG0pAYD33NIODaJEnv4w==", - "dev": true - }, - "node_modules/@vscode/gulp-electron/node_modules/semver": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", - "integrity": "sha512-IrpJ+yoG4EOH8DFWuVg+8H1kW1Oaof0Wxe7cPcXW3x9BjkN/eVo54F15LyqemnDIUYskQWr9qvl/RihmSy6+xQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/@vscode/iconv-lite-umd": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@vscode/iconv-lite-umd/-/iconv-lite-umd-0.7.0.tgz", - "integrity": "sha512-bRRFxLfg5dtAyl5XyiVWz/ZBPahpOpPrNYnnHpOpUZvam4tKH35wdhP4Kj6PbM0+KdliOsPzbGWpkxcdpNB/sg==" - }, - "node_modules/@vscode/l10n-dev": { - "version": "0.0.35", - "resolved": "https://registry.npmjs.org/@vscode/l10n-dev/-/l10n-dev-0.0.35.tgz", - "integrity": "sha512-s6uzBXsVDSL69Z85HSqpc5dfKswQkeucY8L00t1TWzGalw7wkLQUKMRwuzqTq+AMwQKrRd7Po14cMoTcd11iDw==", - "dev": true, - "dependencies": { - "@azure-rest/ai-translation-text": "^1.0.0-beta.1", - "debug": "^4.3.4", - "deepmerge-json": "^1.5.0", - "glob": "^10.0.0", - "markdown-it": "^14.0.0", - "node-html-markdown": "^1.3.0", - "pseudo-localization": "^2.4.0", - "web-tree-sitter": "^0.20.8", - "xml2js": "^0.5.0", - "yargs": "^17.7.1" - }, - "bin": { - "vscode-l10n-dev": "dist/cli.js" - } - }, - "node_modules/@vscode/l10n-dev/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@vscode/l10n-dev/node_modules/glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", - "dev": true, - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@vscode/l10n-dev/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@vscode/policy-watcher": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/@vscode/policy-watcher/-/policy-watcher-1.1.8.tgz", - "integrity": "sha512-IFT3eIPLIcjjgyOUBvbxfKlqTjSDJU+ZJrTlrgdjZrwS3HRLexAMTCfmBqIgZ+vS5N9QWtQW0yp8vX8UJv8JFg==", - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "bindings": "^1.5.0", - "node-addon-api": "^8.2.0" - } - }, - "node_modules/@vscode/policy-watcher/node_modules/node-addon-api": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.2.0.tgz", - "integrity": "sha512-qnyuI2ROiCkye42n9Tj5aX1ns7rzj6n7zW1XReSnLSL9v/vbLeR6fJq6PU27YU/ICfYw6W7Ouk/N7cysWu/hlw==", - "license": "MIT", - "engines": { - "node": "^18 || ^20 || >= 21" - } - }, - "node_modules/@vscode/proxy-agent": { - "version": "0.27.0", - "resolved": "git+ssh://git@github.com/microsoft/vscode-proxy-agent.git#0803e0a7d1249bcb64ae9d256d0ee732b7246ea5", - "integrity": "sha512-ID1MOlynRkVN121n85Hs1enjW16B5Z1O6bMDkSPqvAMVD6eHUOqmgPZuEkBbRI43PfA6boUEY9Ndjp+0wPKtsg==", - "license": "MIT", - "dependencies": { - "@tootallnate/once": "^3.0.0", - "agent-base": "^7.0.1", - "debug": "^4.3.4", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.2", - "socks-proxy-agent": "^8.0.1", - "undici": "^6.20.1" - }, - "optionalDependencies": { - "@vscode/windows-ca-certs": "^0.3.1" - } - }, - "node_modules/@vscode/ripgrep": { - "version": "1.15.9", - "resolved": "https://registry.npmjs.org/@vscode/ripgrep/-/ripgrep-1.15.9.tgz", - "integrity": "sha512-4q2PXRvUvr3bF+LsfrifmUZgSPmCNcUZo6SbEAZgArIChchkezaxLoIeQMJe/z3CCKStvaVKpBXLxN3Z8lQjFQ==", - "hasInstallScript": true, - "dependencies": { - "https-proxy-agent": "^7.0.2", - "proxy-from-env": "^1.1.0", - "yauzl": "^2.9.2" - } - }, - "node_modules/@vscode/ripgrep/node_modules/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - }, - "node_modules/@vscode/spdlog": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/@vscode/spdlog/-/spdlog-0.15.1.tgz", - "integrity": "sha512-tVPeXmyz3/4NKqtNfNQxqcrBSSEZVIbF4lVDuDh9Nik5xhuHVceCU6cTpwmJ6yVBs+jv51SGF622txOQv95sZA==", - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "bindings": "^1.5.0", - "mkdirp": "^1.0.4", - "node-addon-api": "7.1.0" - } - }, - "node_modules/@vscode/sqlite3": { - "version": "5.1.8-vscode", - "resolved": "https://registry.npmjs.org/@vscode/sqlite3/-/sqlite3-5.1.8-vscode.tgz", - "integrity": "sha512-9Ku18yZej1kxS7mh6dhCWxkCof043HljcLIdq+RRJr65QdOeAqPOUJ2i6qXRL63l1Kd72uXV/zLA2SBwhfgiOw==", - "hasInstallScript": true, - "license": "BSD-3-Clause", - "dependencies": { - "node-addon-api": "^8.2.0", - "tar": "^6.1.11" - } - }, - "node_modules/@vscode/sqlite3/node_modules/node-addon-api": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.2.0.tgz", - "integrity": "sha512-qnyuI2ROiCkye42n9Tj5aX1ns7rzj6n7zW1XReSnLSL9v/vbLeR6fJq6PU27YU/ICfYw6W7Ouk/N7cysWu/hlw==", - "license": "MIT", - "engines": { - "node": "^18 || ^20 || >= 21" - } - }, - "node_modules/@vscode/sudo-prompt": { - "version": "9.3.1", - "resolved": "https://registry.npmjs.org/@vscode/sudo-prompt/-/sudo-prompt-9.3.1.tgz", - "integrity": "sha512-9ORTwwS74VaTn38tNbQhsA5U44zkJfcb0BdTSyyG6frP4e8KMtHuTXYmwefe5dpL8XB1aGSIVTaLjD3BbWb5iA==" - }, - "node_modules/@vscode/telemetry-extractor": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/@vscode/telemetry-extractor/-/telemetry-extractor-1.10.2.tgz", - "integrity": "sha512-hn+KDSwIRj7LzDSFd9HALkc80UY1g16nQgWztHml+nxAZU3Hw/EoWEEDxOncvDYq9YcV+tX/cVHrVjbNL2Dg0g==", - "dev": true, - "dependencies": { - "@vscode/ripgrep": "^1.15.9", - "command-line-args": "^5.2.1", - "ts-morph": "^19.0.0" - }, - "bin": { - "vscode-telemetry-extractor": "out/extractor.js" - } - }, - "node_modules/@vscode/test-cli": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/@vscode/test-cli/-/test-cli-0.0.6.tgz", - "integrity": "sha512-4i61OUv5PQr3GxhHOuUgHdgBDfIO/kXTPCsEyFiMaY4SOqQTgkTmyZLagHehjOgCfsXdcrJa3zgQ7zoc+Dh6hQ==", - "dev": true, - "dependencies": { - "@types/mocha": "^10.0.2", - "c8": "^9.1.0", - "chokidar": "^3.5.3", - "enhanced-resolve": "^5.15.0", - "glob": "^10.3.10", - "minimatch": "^9.0.3", - "mocha": "^10.2.0", - "supports-color": "^9.4.0", - "yargs": "^17.7.2" - }, - "bin": { - "vscode-test": "out/bin.mjs" - } - }, - "node_modules/@vscode/test-cli/node_modules/@types/mocha": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.2.tgz", - "integrity": "sha512-NaHL0+0lLNhX6d9rs+NSt97WH/gIlRHmszXbQ/8/MV/eVcFNdeJ/GYhrFuUc8K7WuPhRhTSdMkCp8VMzhUq85w==", - "dev": true - }, - "node_modules/@vscode/test-cli/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@vscode/test-cli/node_modules/glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", - "dev": true, - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@vscode/test-cli/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@vscode/test-electron": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@vscode/test-electron/-/test-electron-2.4.0.tgz", - "integrity": "sha512-yojuDFEjohx6Jb+x949JRNtSn6Wk2FAh4MldLE3ck9cfvCqzwxF32QsNy1T9Oe4oT+ZfFcg0uPUCajJzOmPlTA==", - "dev": true, - "dependencies": { - "http-proxy-agent": "^7.0.2", - "https-proxy-agent": "^7.0.4", - "jszip": "^3.10.1", - "ora": "^7.0.1", - "semver": "^7.6.2" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@vscode/test-web": { - "version": "0.0.62", - "resolved": "https://registry.npmjs.org/@vscode/test-web/-/test-web-0.0.62.tgz", - "integrity": "sha512-Ypug5PvhPOPFbuHVilai7t23tm3Wm5geIpC2DB09Gy9o0jZCduramiSdPf+YN7yhkFy1usFYtN3Eaks1XoBrOQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@koa/cors": "^5.0.0", - "@koa/router": "^13.1.0", - "@playwright/browser-chromium": "^1.47.2", - "glob": "^11.0.0", - "gunzip-maybe": "^1.4.2", - "http-proxy-agent": "^7.0.2", - "https-proxy-agent": "^7.0.5", - "koa": "^2.15.3", - "koa-morgan": "^1.0.1", - "koa-mount": "^4.0.0", - "koa-static": "^5.0.0", - "minimist": "^1.2.8", - "playwright": "^1.47.2", - "tar-fs": "^3.0.6", - "vscode-uri": "^3.0.8" - }, - "bin": { - "vscode-test-web": "out/server/index.js" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@vscode/test-web/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@vscode/test-web/node_modules/glob": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.0.tgz", - "integrity": "sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==", - "dev": true, - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^4.0.1", - "minimatch": "^10.0.0", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^2.0.0" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@vscode/test-web/node_modules/jackspeak": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.0.1.tgz", - "integrity": "sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog==", - "dev": true, - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "node_modules/@vscode/test-web/node_modules/lru-cache": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.1.tgz", - "integrity": "sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==", - "dev": true, - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@vscode/test-web/node_modules/minimatch": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", - "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@vscode/test-web/node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "dev": true, - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/@vscode/test-web/node_modules/path-scurry": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", - "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", - "dev": true, - "dependencies": { - "lru-cache": "^11.0.0", - "minipass": "^7.1.2" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@vscode/test-web/node_modules/playwright": { - "version": "1.47.2", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.47.2.tgz", - "integrity": "sha512-nx1cLMmQWqmA3UsnjaaokyoUpdVaaDhJhMoxX2qj3McpjnsqFHs516QAKYhqHAgOP+oCFTEOCOAaD1RgD/RQfA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "playwright-core": "1.47.2" - }, - "bin": { - "playwright": "cli.js" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "fsevents": "2.3.2" - } - }, - "node_modules/@vscode/tree-sitter-wasm": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/@vscode/tree-sitter-wasm/-/tree-sitter-wasm-0.0.4.tgz", - "integrity": "sha512-vOONG3Zxsh1I4JOA48WdQ5KiXjJAdfMvYTuHbW7b27tGtRqsPLY5WZyTwLXc5uujKHyhG3LJXE9poxRZSxTIiA==" - }, - "node_modules/@vscode/v8-heap-parser": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@vscode/v8-heap-parser/-/v8-heap-parser-0.1.0.tgz", - "integrity": "sha512-3EvQak7EIOLyIGz+IP9qSwRmP08ZRWgTeoRgAXPVkkDXZ8riqJ7LDtkgx++uHBiJ3MUaSdlUYPZcLFFw7E6zGg==", - "dev": true - }, - "node_modules/@vscode/vscode-languagedetection": { - "version": "1.0.21", - "resolved": "https://registry.npmjs.org/@vscode/vscode-languagedetection/-/vscode-languagedetection-1.0.21.tgz", - "integrity": "sha512-zSUH9HYCw5qsCtd7b31yqkpaCU6jhtkKLkvOOA8yTrIRfBSOFb8PPhgmMicD7B/m+t4PwOJXzU1XDtrM9Fd3/g==", - "bin": { - "vscode-languagedetection": "cli/index.js" - } - }, - "node_modules/@vscode/vscode-perf": { - "version": "0.0.19", - "resolved": "https://registry.npmjs.org/@vscode/vscode-perf/-/vscode-perf-0.0.19.tgz", - "integrity": "sha512-E/I0S+71K3Jo4kiMYbeKM8mUG3K8cHlj5MFVfPYVAvlp7KuIZTM914E7osp+jx8XgMLN6fChxnFmntm1GtVrKA==", - "dev": true, - "dependencies": { - "chalk": "^4.x", - "commander": "^9.4.0", - "cookie": "^0.7.2", - "js-base64": "^3.7.4", - "node-fetch": "2.6.8", - "playwright": "^1.29.2" - }, - "bin": { - "vscode-perf": "bin/vscode-perf" - }, - "engines": { - "node": ">= 16" - } - }, - "node_modules/@vscode/windows-ca-certs": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@vscode/windows-ca-certs/-/windows-ca-certs-0.3.3.tgz", - "integrity": "sha512-C0Iq5RcH+H31GUZ8bsMORsX3LySVkGAqe4kQfUSVcCqJ0QOhXkhgwUMU7oCiqYLXaQWyXFp6Fj6eMdt05uK7VA==", - "hasInstallScript": true, - "license": "BSD", - "optional": true, - "os": [ - "win32" - ], - "dependencies": { - "node-addon-api": "^8.2.0" - } - }, - "node_modules/@vscode/windows-ca-certs/node_modules/node-addon-api": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.2.0.tgz", - "integrity": "sha512-qnyuI2ROiCkye42n9Tj5aX1ns7rzj6n7zW1XReSnLSL9v/vbLeR6fJq6PU27YU/ICfYw6W7Ouk/N7cysWu/hlw==", - "license": "MIT", - "optional": true, - "engines": { - "node": "^18 || ^20 || >= 21" - } - }, - "node_modules/@vscode/windows-mutex": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@vscode/windows-mutex/-/windows-mutex-0.5.0.tgz", - "integrity": "sha512-iD29L9AUscpn07aAvhP2QuhrXzuKc1iQpPF6u7ybtvRbR+o+RotfbuKqqF1RDlDDrJZkL+3AZTy4D01U4nEe5A==", - "hasInstallScript": true, - "dependencies": { - "bindings": "^1.5.0", - "node-addon-api": "7.1.0" - } - }, - "node_modules/@vscode/windows-process-tree": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@vscode/windows-process-tree/-/windows-process-tree-0.6.0.tgz", - "integrity": "sha512-7/DjBKKUtlmKNiAet2GRbdvfjgMKmfBeWVClIgONv8aqxGnaKca5N85eIDxh6rLMy2hKvFqIIsqgxs1Q26TWwg==", - "hasInstallScript": true, - "dependencies": { - "node-addon-api": "7.1.0" - } - }, - "node_modules/@vscode/windows-registry": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@vscode/windows-registry/-/windows-registry-1.1.0.tgz", - "integrity": "sha512-5AZzuWJpGscyiMOed0IuyEwt6iKmV5Us7zuwCDCFYMIq7tsvooO9BUiciywsvuthGz6UG4LSpeDeCxvgMVhnIw==", - "hasInstallScript": true - }, - "node_modules/@webassemblyjs/ast": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", - "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", - "dev": true, - "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6" - } - }, - "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", - "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", - "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", - "dev": true, - "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.6", - "@webassemblyjs/helper-api-error": "1.11.6", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", - "dev": true - }, - "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", - "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.12.1" - } - }, - "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", - "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", - "dev": true, - "dependencies": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "node_modules/@webassemblyjs/leb128": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", - "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", - "dev": true, - "dependencies": { - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/utf8": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", - "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", - "dev": true - }, - "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", - "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-opt": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1", - "@webassemblyjs/wast-printer": "1.12.1" - } - }, - "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", - "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", - "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-buffer": "1.12.1", - "@webassemblyjs/wasm-gen": "1.12.1", - "@webassemblyjs/wasm-parser": "1.12.1" - } - }, - "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", - "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@webassemblyjs/helper-api-error": "1.11.6", - "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/ieee754": "1.11.6", - "@webassemblyjs/leb128": "1.11.6", - "@webassemblyjs/utf8": "1.11.6" - } - }, - "node_modules/@webassemblyjs/wast-printer": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", - "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", - "dev": true, - "dependencies": { - "@webassemblyjs/ast": "1.12.1", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webgpu/types": { - "version": "0.1.44", - "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.44.tgz", - "integrity": "sha512-JDpYJN5E/asw84LTYhKyvPpxGnD+bAKPtpW9Ilurf7cZpxaTbxkQcGwOd7jgB9BPBrTYQ+32ufo4HiuomTjHNQ==", - "dev": true - }, - "node_modules/@webpack-cli/configtest": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", - "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", - "dev": true, - "engines": { - "node": ">=14.15.0" - }, - "peerDependencies": { - "webpack": "5.x.x", - "webpack-cli": "5.x.x" - } - }, - "node_modules/@webpack-cli/info": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", - "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", - "dev": true, - "engines": { - "node": ">=14.15.0" - }, - "peerDependencies": { - "webpack": "5.x.x", - "webpack-cli": "5.x.x" - } - }, - "node_modules/@webpack-cli/serve": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", - "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", - "dev": true, - "engines": { - "node": ">=14.15.0" - }, - "peerDependencies": { - "webpack": "5.x.x", - "webpack-cli": "5.x.x" - }, - "peerDependenciesMeta": { - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/@xterm/addon-clipboard": { - "version": "0.2.0-beta.53", - "resolved": "https://registry.npmjs.org/@xterm/addon-clipboard/-/addon-clipboard-0.2.0-beta.53.tgz", - "integrity": "sha512-kCcBuGvF8mwzExU+Tm9eylPvp1kXTkvm+kO0V4qP7HI3ZCw5vfKmnlRn41FvNIylsK2hnmrFtxauPHEGBy/dfA==", - "license": "MIT", - "dependencies": { - "js-base64": "^3.7.5" - }, - "peerDependencies": { - "@xterm/xterm": "^5.6.0-beta.70" - } - }, - "node_modules/@xterm/addon-image": { - "version": "0.9.0-beta.70", - "resolved": "https://registry.npmjs.org/@xterm/addon-image/-/addon-image-0.9.0-beta.70.tgz", - "integrity": "sha512-QLhy77i0sjnffkLuxj1yB/mBUJI64bbL86eMW+1g5XEsZnSevY8YwU/cEJg02PAGK0ggwQNNfiRwoO6VBCdYFg==", - "license": "MIT", - "peerDependencies": { - "@xterm/xterm": "^5.6.0-beta.70" - } - }, - "node_modules/@xterm/addon-ligatures": { - "version": "0.10.0-beta.70", - "resolved": "https://registry.npmjs.org/@xterm/addon-ligatures/-/addon-ligatures-0.10.0-beta.70.tgz", - "integrity": "sha512-BPDHHOybUWO6mjHf/RMDBjSKDl9QdyyGTyHvmlyhuI/2sma3lu98bA4U03F8nBnvj/6otzEFARuOeoN7rkfRng==", - "license": "MIT", - "dependencies": { - "font-finder": "^1.1.0", - "font-ligatures": "^1.4.1" - }, - "engines": { - "node": ">8.0.0" - }, - "peerDependencies": { - "@xterm/xterm": "^5.6.0-beta.70" - } - }, - "node_modules/@xterm/addon-search": { - "version": "0.16.0-beta.70", - "resolved": "https://registry.npmjs.org/@xterm/addon-search/-/addon-search-0.16.0-beta.70.tgz", - "integrity": "sha512-uaNBf77cr5Jikj69TDkTfe3V3wHA+4tDTFcv8DwJ/KGORPLUfBk8cn9HpbIJ+0jc1kOZr5xDrEjaYNwEVDkGeQ==", - "license": "MIT", - "peerDependencies": { - "@xterm/xterm": "^5.6.0-beta.70" - } - }, - "node_modules/@xterm/addon-serialize": { - "version": "0.14.0-beta.70", - "resolved": "https://registry.npmjs.org/@xterm/addon-serialize/-/addon-serialize-0.14.0-beta.70.tgz", - "integrity": "sha512-4ijqHU7xDRcZ4Gm6yN/tKsZzovUwzttE9/pPfhxpWIgSdm9c8i5R4rGyOAlAZCnuU3DT5vPplQO7W/0zwAmJsQ==", - "license": "MIT", - "peerDependencies": { - "@xterm/xterm": "^5.6.0-beta.70" - } - }, - "node_modules/@xterm/addon-unicode11": { - "version": "0.9.0-beta.70", - "resolved": "https://registry.npmjs.org/@xterm/addon-unicode11/-/addon-unicode11-0.9.0-beta.70.tgz", - "integrity": "sha512-9UE4v2SpWtqd85Hqvk8LW4QA9Phe93RMVltrNtt9jCUmkAok/QLFOEbLqoq2JUOvlmfsYfXmIl11Wg4CYIsvwA==", - "license": "MIT", - "peerDependencies": { - "@xterm/xterm": "^5.6.0-beta.70" - } - }, - "node_modules/@xterm/addon-webgl": { - "version": "0.19.0-beta.70", - "resolved": "https://registry.npmjs.org/@xterm/addon-webgl/-/addon-webgl-0.19.0-beta.70.tgz", - "integrity": "sha512-3BkmF24i66SHCfAkcHy1VC6H715qyelfOIjd6n7sTqHon56J1bUO782Q1al/MK0vSvplElBRKVdR31SDvITzpg==", - "license": "MIT", - "peerDependencies": { - "@xterm/xterm": "^5.6.0-beta.70" - } - }, - "node_modules/@xterm/headless": { - "version": "5.6.0-beta.70", - "resolved": "https://registry.npmjs.org/@xterm/headless/-/headless-5.6.0-beta.70.tgz", - "integrity": "sha512-npSJzmtJq8LLAzV3nwD9KkBQLNWSusi+cOBPyc3zlYYE63Vkqbtbp/iQS27zH2GxJ95rzCzDwnX6VOn0OoUPYQ==", - "license": "MIT" - }, - "node_modules/@xterm/xterm": { - "version": "5.6.0-beta.70", - "resolved": "https://registry.npmjs.org/@xterm/xterm/-/xterm-5.6.0-beta.70.tgz", - "integrity": "sha512-qviQMVWhRtgPn4z8PHNH6D/ffSKkNBHmUX1HyJxl325QM2xF8M8met83uFv7JZm7a5OQYScnLGsFAoTreSgdew==", - "license": "MIT" - }, - "node_modules/@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true - }, - "node_modules/@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true - }, - "node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true - }, - "node_modules/accepts": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", - "dev": true, - "dependencies": { - "mime-types": "~2.1.24", - "negotiator": "0.6.2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-import-attributes": { - "version": "1.9.5", - "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", - "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", - "dev": true, - "peerDependencies": { - "acorn": "^8" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/agent-base": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", - "dependencies": { - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-formats": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", - "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", - "dev": true, - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "node_modules/ajv-formats/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-formats/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "peerDependencies": { - "ajv": "^6.9.1" - } - }, - "node_modules/amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU= sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", - "dev": true, - "engines": { - "node": ">=0.4.2" - } - }, - "node_modules/ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-cyan": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz", - "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM= sha512-eCjan3AVo/SxZ0/MyIYRtkpxIu/H3xZN7URr1vXVrISxeyz8fUFz0FJziamK4sS8I+t35y4rHg1b2PklyBe/7A==", - "dev": true, - "dependencies": { - "ansi-wrap": "0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ansi-gray": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", - "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE= sha512-HrgGIZUl8h2EHuZaU9hTR/cU5nhKxpVE1V6kdGsQ8e4zirElJ5fvtfc8N7Q1oq1aatO275i8pUFUCpNWCAnVWw==", - "dev": true, - "dependencies": { - "ansi-wrap": "0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ansi-red": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", - "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw= sha512-ewaIr5y+9CUTGFwZfpECUbFlGcC0GCw1oqR9RI6h1gQCd9Aj2GxSckCnPsVJnmfMZbwFYE+leZGASgkWl06Jow==", - "dev": true, - "dependencies": { - "ansi-wrap": "0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "dev": true, - "dependencies": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/ansi-wrap": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", - "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768= sha512-ZyznvL8k/FZeQHr2T6LzcJ/+vBApDnMNZvfVFy3At0knswWd6rJ3/0Hhmpu8oqa6C92npmozs890sX9Dl6q+Qw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8= sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", - "dev": true - }, - "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/append-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", - "integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE= sha512-WLbYiXzD3y/ATLZFufV/rZvWdZOs+Z/+5v1rBZ463Jn398pa6kcde27cvozYnBoxXblGZTFfoPpsaEw0orU5BA==", - "dev": true, - "dependencies": { - "buffer-equal": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA= sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", - "dev": true - }, - "node_modules/are-docs-informative": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", - "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==", - "dev": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arr-filter": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz", - "integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4= sha512-A2BETWCqhsecSvCkWAeVBFLH6sXEUGASuzkpjL3GR1SlL/PWL6M3J8EAAld2Uubmh39tvkJTqC9LeLHCUKmFXA==", - "dev": true, - "dependencies": { - "make-iterator": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arr-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz", - "integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ= sha512-tVqVTHt+Q5Xb09qRkbu+DidW1yYzz5izWS2Xm2yFm7qJnmUfz4HPzNxbHkdRJbz2lrqI7S+z17xNYdFcBBO8Hw==", - "dev": true, - "dependencies": { - "make-iterator": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-back": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", - "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/array-differ": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", - "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE= sha512-LeZY+DZDRnvP7eMuQ6LHfCzUGxAAIViUBliK24P3hWXL6y4SortgR6Nim6xrkfSLlmH0+k+9NYNwVC2s53ZrYQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", - "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8= sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-initial": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", - "integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U= sha512-BC4Yl89vneCYfpLrs5JU2aAu9/a+xWbeKhvISg9PT7eWFB9UlRvI+rKEtk6mgxWr3dSkk9gQ8hCrdqt06NXPdw==", - "dev": true, - "dependencies": { - "array-slice": "^1.0.0", - "is-number": "^4.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-initial/node_modules/is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-last": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/array-last/-/array-last-1.3.0.tgz", - "integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==", - "dev": true, - "dependencies": { - "is-number": "^4.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-last/node_modules/is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-slice": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", - "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-sort": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz", - "integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==", - "dev": true, - "dependencies": { - "default-compare": "^1.0.0", - "get-value": "^2.0.6", - "kind-of": "^5.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/asar": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/asar/-/asar-3.0.3.tgz", - "integrity": "sha512-k7zd+KoR+n8pl71PvgElcoKHrVNiSXtw7odKbyNpmgKe7EGRF9Pnu3uLOukD37EvavKwVFxOUpqXTIZC5B5Pmw==", - "deprecated": "Please use @electron/asar moving forward. There is no API change, just a package name change", - "dev": true, - "dependencies": { - "chromium-pickle-js": "^0.2.0", - "commander": "^5.0.0", - "glob": "^7.1.6", - "minimatch": "^3.0.4" - }, - "bin": { - "asar": "bin/asar.js" - }, - "engines": { - "node": ">=10.12.0" - }, - "optionalDependencies": { - "@types/glob": "^7.1.1" - } - }, - "node_modules/asar/node_modules/commander": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/asar/node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/async-done": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz", - "integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==", - "dev": true, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.2", - "process-nextick-args": "^2.0.0", - "stream-exhaust": "^1.0.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/async-each": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", - "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", - "dev": true - }, - "node_modules/async-settle": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz", - "integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs= sha512-VPXfB4Vk49z1LHHodrEQ6Xf7W4gg1w0dAPROHngx7qgDjqmIQ+fXmwgGXTW/ITLai0YLSvWepJOP9EVpMnEAcw==", - "dev": true, - "dependencies": { - "async-done": "^1.2.2" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k= sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true - }, - "node_modules/atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true, - "bin": { - "atob": "bin/atob.js" - }, - "engines": { - "node": ">= 4.5.0" - } - }, - "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/b4a": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.4.tgz", - "integrity": "sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==", - "dev": true - }, - "node_modules/bach": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz", - "integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA= sha512-bZOOfCb3gXBXbTFXq3OZtGR88LwGeJvzu6szttaIzymOTS4ZttBNOWSv7aLZja2EMycKtRYV0Oa8SNKH/zkxvg==", - "dev": true, - "dependencies": { - "arr-filter": "^1.1.1", - "arr-flatten": "^1.0.1", - "arr-map": "^2.0.0", - "array-each": "^1.0.0", - "array-initial": "^1.0.0", - "array-last": "^1.1.1", - "async-done": "^1.2.2", - "async-settle": "^1.0.0", - "now-and-later": "^2.0.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/bare-events": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.4.2.tgz", - "integrity": "sha512-qMKFd2qG/36aA4GwvKq8MxnPgCQAmBWmSyLWsJcbn8v03wvIPQ/hG1Ms8bPzndZxMDoHpxez5VOS+gC9Yi24/Q==", - "dev": true, - "optional": true - }, - "node_modules/bare-fs": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.3.1.tgz", - "integrity": "sha512-W/Hfxc/6VehXlsgFtbB5B4xFcsCl+pAh30cYhoFyXErf6oGrwjh8SwiPAdHgpmWonKuYpZgGywN0SXt7dgsADA==", - "dev": true, - "optional": true, - "dependencies": { - "bare-events": "^2.0.0", - "bare-path": "^2.0.0", - "bare-stream": "^2.0.0" - } - }, - "node_modules/bare-os": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-2.4.0.tgz", - "integrity": "sha512-v8DTT08AS/G0F9xrhyLtepoo9EJBJ85FRSMbu1pQUlAf6A8T0tEEQGMVObWeqpjhSPXsE0VGlluFBJu2fdoTNg==", - "dev": true, - "optional": true - }, - "node_modules/bare-path": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-2.1.3.tgz", - "integrity": "sha512-lh/eITfU8hrj9Ru5quUp0Io1kJWIk1bTjzo7JH1P5dWmQ2EL4hFUlfI8FonAhSlgIfhn63p84CDY/x+PisgcXA==", - "dev": true, - "optional": true, - "dependencies": { - "bare-os": "^2.1.0" - } - }, - "node_modules/bare-stream": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.1.3.tgz", - "integrity": "sha512-tiDAH9H/kP+tvNO5sczyn9ZAA7utrSMobyDchsnyyXBuUe2FSQWbxhtuHB8jwpHYYevVo2UJpcmvvjrbHboUUQ==", - "dev": true, - "optional": true, - "dependencies": { - "streamx": "^2.18.0" - } - }, - "node_modules/base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "dependencies": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/base/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY= sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", - "dev": true, - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/basic-auth": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", - "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", - "dev": true, - "dependencies": { - "safe-buffer": "5.1.2" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/before-after-hook": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz", - "integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ==", - "dev": true - }, - "node_modules/big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/binaryextensions": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-1.0.1.tgz", - "integrity": "sha1-HmN0iLNbWL2l9HdL+WpSEqjJB1U= sha512-xnG0l4K3ghM62rFzDi2jcNEuICl6uQ4NgvGpqQsY7HgW8gPDeAWGOxHI/k+qZfXfMANytzrArGNPXidaCwtbmA==", - "dev": true - }, - "node_modules/bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "dependencies": { - "file-uri-to-path": "1.0.0" - } - }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/block-stream": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo= sha512-OorbnJVPII4DuUKbjARAe8u8EfqOmkEEaSFIyoQ7OjTHn6kafxWl0wLgoZ2rXaYd7MyLcDaU4TmhfxtwgcccMQ==", - "dev": true, - "dependencies": { - "inherits": "~2.0.0" - }, - "engines": { - "node": "0.4 || >=0.5.8" - } - }, - "node_modules/boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24= sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "dev": true - }, - "node_modules/boolean": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.0.2.tgz", - "integrity": "sha512-RwywHlpCRc3/Wh81MiCKun4ydaIFyW5Ea6JbL6sRCVx5q5irDw7pMXBUFYF/jArQ6YrG36q0kpovc9P/Kd3I4g==", - "dev": true, - "optional": true - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "node_modules/browserify-zlib": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", - "integrity": "sha512-19OEpq7vWgsH6WkvkBJQDFvJS1uPcbFOQ4v9CU839dO+ZZXUZO6XpE6hNCqvlIIj+4fZvRiJ6DsAQ382GwiyTQ==", - "dev": true, - "dependencies": { - "pako": "~0.2.0" - } - }, - "node_modules/browserslist": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", - "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "caniuse-lite": "^1.0.30001663", - "electron-to-chromium": "^1.5.28", - "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.0" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "engines": { - "node": "*" - } - }, - "node_modules/buffer-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", - "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74= sha512-tcBWO2Dl4e7Asr9hTGcpVrCe+F7DubpmqWCTbj4FHLmjqO2hIaC383acQubWtRJhdceqs5uBHs6Es+Sk//RKiQ==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/c8": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/c8/-/c8-9.1.0.tgz", - "integrity": "sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==", - "dev": true, - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@istanbuljs/schema": "^0.1.3", - "find-up": "^5.0.0", - "foreground-child": "^3.1.1", - "istanbul-lib-coverage": "^3.2.0", - "istanbul-lib-report": "^3.0.1", - "istanbul-reports": "^3.1.6", - "test-exclude": "^6.0.0", - "v8-to-istanbul": "^9.0.0", - "yargs": "^17.7.2", - "yargs-parser": "^21.1.1" - }, - "bin": { - "c8": "bin/c8.js" - }, - "engines": { - "node": ">=14.14.0" - } - }, - "node_modules/cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "dependencies": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/cache-content-type": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-content-type/-/cache-content-type-1.0.1.tgz", - "integrity": "sha512-IKufZ1o4Ut42YUrZSo8+qnMTrFuKkvyoLXUywKz9GJ5BrhOFGhLdkx9sG4KAnVvbY6kEcSFjLQul+DVmBm2bgA==", - "dev": true, - "dependencies": { - "mime-types": "^2.1.18", - "ylru": "^1.2.0" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/cacheable-lookup": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", - "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", - "dev": true, - "engines": { - "node": ">=10.6.0" - } - }, - "node_modules/cacheable-request": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", - "integrity": "sha512-pouW8/FmiPQbuGpkXQ9BAPv/Mo5xDGANgSNXzTzJ8DrKGuXOssM4wIQRjfanNRh3Yu5cfYPvcorqbhg2KIJtew==", - "dev": true, - "dependencies": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^4.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^6.0.1", - "responselike": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", - "dev": true, - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/caniuse-api": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", - "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", - "dev": true, - "license": "MIT", - "dependencies": { - "browserslist": "^4.0.0", - "caniuse-lite": "^1.0.0", - "lodash.memoize": "^4.1.2", - "lodash.uniq": "^4.5.0" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001667", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001667.tgz", - "integrity": "sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "CC-BY-4.0" - }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/chalk/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/chalk/node_modules/supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/charenc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", - "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "engines": { - "node": ">=10" - } - }, - "node_modules/chrome-remote-interface": { - "version": "0.33.0", - "resolved": "https://registry.npmjs.org/chrome-remote-interface/-/chrome-remote-interface-0.33.0.tgz", - "integrity": "sha512-tv/SgeBfShXk43fwFpQ9wnS7mOCPzETnzDXTNxCb6TqKOiOeIfbrJz+2NAp8GmzwizpKa058wnU1Te7apONaYg==", - "dependencies": { - "commander": "2.11.x", - "ws": "^7.2.0" - }, - "bin": { - "chrome-remote-interface": "bin/client.js" - } - }, - "node_modules/chrome-remote-interface/node_modules/commander": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", - "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==" - }, - "node_modules/chrome-remote-interface/node_modules/ws": { - "version": "7.5.10", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", - "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/chrome-trace-event": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz", - "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==", - "dev": true, - "dependencies": { - "tslib": "^1.9.0" - }, - "engines": { - "node": ">=6.0" - } - }, - "node_modules/chrome-trace-event/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/chromium-pickle-js": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/chromium-pickle-js/-/chromium-pickle-js-0.2.0.tgz", - "integrity": "sha1-BKEGZywYsIWrd02YPfo+oTjyIgU= sha512-1R5Fho+jBq0DDydt+/vHWj5KJNJCKdARKOCwZUen84I5BreWoLqRLANH1U87eJy1tiASPtMnGqJJq0ZsLoRPOw==", - "dev": true - }, - "node_modules/ci-info": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz", - "integrity": "sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A==", - "dev": true - }, - "node_modules/class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "dependencies": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dev": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "deprecated": "Please upgrade to v0.1.7", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "deprecated": "Please upgrade to v0.1.5", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/class-utils/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/cli-cursor": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", - "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", - "dev": true, - "dependencies": { - "restore-cursor": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cli-spinners": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", - "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", - "dev": true, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/cliui/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/clone-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", - "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg= sha512-KLLTJWrvwIP+OPfMn0x2PheDEP20RPUcGXj/ERegTgdmPEZylALQldygiqrPPu8P45uNuPs7ckmReLY6v/iA5g==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/clone-deep/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/clone-deep/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/clone-response": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", - "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= sha512-yjLXh88P599UOyPTFX0POsd7WxnbsVsGohcwzHOLspIhhpalPw1BcqED8NblyZLKcGrL8dTgMlcaZxV2jAD41Q==", - "dev": true, - "dependencies": { - "mimic-response": "^1.0.0" - } - }, - "node_modules/clone-stats": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", - "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA= sha512-au6ydSpg6nsrigcZ4m8Bc9hxjeW+GJ8xh5G3BJCMt4WXe1H10UNaVOamqQTmrx1kjVuxAHIQSNU6hY4Nsn9/ag==", - "dev": true - }, - "node_modules/cloneable-readable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", - "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "process-nextick-args": "^2.0.0", - "readable-stream": "^2.3.5" - } - }, - "node_modules/cloneable-readable/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", - "dev": true, - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "node_modules/code-block-writer": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-12.0.0.tgz", - "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==", - "dev": true - }, - "node_modules/code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/collection-map": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz", - "integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw= sha512-5D2XXSpkOnleOI21TG7p3T0bGAsZ/XknZpKBmGYyluO8pw4zA3K8ZlrBIbC4FXg3m6z/RNFiUFfT2sQK01+UHA==", - "dev": true, - "dependencies": { - "arr-map": "^2.0.2", - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==", - "dev": true, - "dependencies": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "dev": true, - "bin": { - "color-support": "bin.js" - } - }, - "node_modules/colord": { - "version": "2.9.3", - "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.3.tgz", - "integrity": "sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw==", - "dev": true, - "license": "MIT" - }, - "node_modules/colorette": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", - "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", - "dev": true - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/combined-stream/node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk= sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/command-line-args": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.1.tgz", - "integrity": "sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==", - "dev": true, - "dependencies": { - "array-back": "^3.1.0", - "find-replace": "^3.0.0", - "lodash.camelcase": "^4.3.0", - "typical": "^4.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/commander": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", - "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", - "dev": true, - "engines": { - "node": "^12.20.0 || >=14" - } - }, - "node_modules/comment-parser": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", - "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", - "dev": true, - "engines": { - "node": ">= 12.0.0" - } - }, - "node_modules/component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "engines": [ - "node >= 0.8" - ], - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "node_modules/concat-stream/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/config-chain": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz", - "integrity": "sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==", - "dev": true, - "dependencies": { - "ini": "^1.3.4", - "proto-list": "~1.2.1" - } - }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "dev": true, - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-disposition/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/content-type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.1" - } - }, - "node_modules/cookie": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", - "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookies": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/cookies/-/cookies-0.9.1.tgz", - "integrity": "sha512-TG2hpqe4ELx54QER/S3HQ9SRVnQnGBtKUz5bLQWtYAQ+o6GpgMs6sYUvaiJjVxb+UXwhRhAEP3m7LbsIZ77Hmw==", - "dev": true, - "dependencies": { - "depd": "~2.0.0", - "keygrip": "~1.1.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/copy-props": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.5.tgz", - "integrity": "sha512-XBlx8HSqrT0ObQwmSzM7WE5k8FxTV75h1DX1Z3n6NhQ/UYYAvInWYmG06vFt7hQZArE2fuO62aihiWIVQwh1sw==", - "dev": true, - "dependencies": { - "each-props": "^1.3.2", - "is-plain-object": "^5.0.0" - } - }, - "node_modules/copy-webpack-plugin": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-11.0.0.tgz", - "integrity": "sha512-fX2MWpamkW0hZxMEg0+mYnA40LTosOSa5TqZ9GYIBzyJa9C3QUaMPSE2xAi/buNr8u89SfD9wHSQVBzrRa/SOQ==", - "dev": true, - "dependencies": { - "fast-glob": "^3.2.11", - "glob-parent": "^6.0.1", - "globby": "^13.1.1", - "normalize-path": "^3.0.0", - "schema-utils": "^4.0.0", - "serialize-javascript": "^6.0.0" - }, - "engines": { - "node": ">= 14.15.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.1.0" - } - }, - "node_modules/copy-webpack-plugin/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/copy-webpack-plugin/node_modules/globby": { - "version": "13.1.3", - "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.3.tgz", - "integrity": "sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==", - "dev": true, - "dependencies": { - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.11", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/copy-webpack-plugin/node_modules/slash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", - "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true - }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true - }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/crypt": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", - "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/css": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz", - "integrity": "sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ==", - "dev": true, - "dependencies": { - "inherits": "^2.0.4", - "source-map": "^0.6.1", - "source-map-resolve": "^0.6.0" - } - }, - "node_modules/css-declaration-sorter": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-7.2.0.tgz", - "integrity": "sha512-h70rUM+3PNFuaBDTLe8wF/cdWu+dOZmb7pJt8Z2sedYbAcQVQV/tEchueg3GWxwqS0cxtbxmaHEdkNACqcvsow==", - "dev": true, - "license": "ISC", - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.0.9" - } - }, - "node_modules/css-loader": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.9.1.tgz", - "integrity": "sha512-OzABOh0+26JKFdMzlK6PY1u5Zx8+Ck7CVRlcGNZoY9qwJjdfu2VWFuprTIpPW+Av5TZTVViYWcFQaEEQURLknQ==", - "dev": true, - "dependencies": { - "icss-utils": "^5.1.0", - "postcss": "^8.4.33", - "postcss-modules-extract-imports": "^3.0.0", - "postcss-modules-local-by-default": "^4.0.4", - "postcss-modules-scope": "^3.1.1", - "postcss-modules-values": "^4.0.0", - "postcss-value-parser": "^4.2.0", - "semver": "^7.5.4" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.0.0" - } - }, - "node_modules/css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/css-tree": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", - "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", - "dev": true, - "dependencies": { - "mdn-data": "2.0.14", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", - "dev": true, - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/cssesc": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", - "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", - "dev": true, - "bin": { - "cssesc": "bin/cssesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/cssnano": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-6.1.2.tgz", - "integrity": "sha512-rYk5UeX7VAM/u0lNqewCdasdtPK81CgX8wJFLEIXHbV2oldWRgJAsZrdhRXkV1NJzA2g850KiFm9mMU2HxNxMA==", - "dev": true, - "license": "MIT", - "dependencies": { - "cssnano-preset-default": "^6.1.2", - "lilconfig": "^3.1.1" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/cssnano" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/cssnano-preset-default": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-6.1.2.tgz", - "integrity": "sha512-1C0C+eNaeN8OcHQa193aRgYexyJtU8XwbdieEjClw+J9d94E41LwT6ivKH0WT+fYwYWB0Zp3I3IZ7tI/BbUbrg==", - "dev": true, - "license": "MIT", - "dependencies": { - "browserslist": "^4.23.0", - "css-declaration-sorter": "^7.2.0", - "cssnano-utils": "^4.0.2", - "postcss-calc": "^9.0.1", - "postcss-colormin": "^6.1.0", - "postcss-convert-values": "^6.1.0", - "postcss-discard-comments": "^6.0.2", - "postcss-discard-duplicates": "^6.0.3", - "postcss-discard-empty": "^6.0.3", - "postcss-discard-overridden": "^6.0.2", - "postcss-merge-longhand": "^6.0.5", - "postcss-merge-rules": "^6.1.1", - "postcss-minify-font-values": "^6.1.0", - "postcss-minify-gradients": "^6.0.3", - "postcss-minify-params": "^6.1.0", - "postcss-minify-selectors": "^6.0.4", - "postcss-normalize-charset": "^6.0.2", - "postcss-normalize-display-values": "^6.0.2", - "postcss-normalize-positions": "^6.0.2", - "postcss-normalize-repeat-style": "^6.0.2", - "postcss-normalize-string": "^6.0.2", - "postcss-normalize-timing-functions": "^6.0.2", - "postcss-normalize-unicode": "^6.1.0", - "postcss-normalize-url": "^6.0.2", - "postcss-normalize-whitespace": "^6.0.2", - "postcss-ordered-values": "^6.0.2", - "postcss-reduce-initial": "^6.1.0", - "postcss-reduce-transforms": "^6.0.2", - "postcss-svgo": "^6.0.3", - "postcss-unique-selectors": "^6.0.4" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/cssnano-utils": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-4.0.2.tgz", - "integrity": "sha512-ZR1jHg+wZ8o4c3zqf1SIUSTIvm/9mU343FMR6Obe/unskbvpGhZOo1J6d/r8D1pzkRQYuwbcH3hToOuoA2G7oQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/csso": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", - "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", - "dev": true, - "dependencies": { - "css-tree": "^1.1.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", - "dev": true, - "dependencies": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, - "node_modules/debounce": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.1.0.tgz", - "integrity": "sha512-ZQVKfRVlwRfD150ndzEK8M90ABT+Y/JQKs4Y7U4MXdpuoUkkrr4DwKbVux3YjylA5bUMUj0Nc3pMxPJX6N2QQQ==", - "dev": true - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/debug-fabulous": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/debug-fabulous/-/debug-fabulous-1.1.0.tgz", - "integrity": "sha512-GZqvGIgKNlUnHUPQhepnUZFIMoi3dgZKQBzKDeL2g7oJF9SNAji/AAu36dusFUas0O+pae74lNeoIPHqXWDkLg==", - "dev": true, - "dependencies": { - "debug": "3.X", - "memoizee": "0.4.X", - "object-assign": "4.X" - } - }, - "node_modules/debug-fabulous/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/decode-uri-component": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", - "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", - "dev": true, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "dependencies": { - "mimic-response": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/decompress-response/node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/deemon": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/deemon/-/deemon-1.8.0.tgz", - "integrity": "sha512-qcuSMls/W5DdoEKKAF0PiNQrc8+tItFjvszfjNm1YqNv1p5wwEt+6qILA9sws6eM81nmNwD38ducqlgIXzQlsQ==", - "dev": true, - "dependencies": { - "bl": "^4.0.2", - "tree-kill": "^1.2.2" - }, - "bin": { - "deemon": "src/deemon.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU= sha512-bHtC0iYvWhyaTzvV3CZgPeZQqCOBGyGsVV7v4eevpdkLHfiSrXUdBG+qAuSz4RI70sszvjQ1QSZ98An1yNwpSw==", - "dev": true - }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "node_modules/deepmerge": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-3.1.0.tgz", - "integrity": "sha512-/TnecbwXEdycfbsM2++O3eGiatEFHjjNciHEwJclM+T5Kd94qD1AP+2elP/Mq0L5b9VZJao5znR01Mz6eX8Seg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/deepmerge-json": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/deepmerge-json/-/deepmerge-json-1.5.0.tgz", - "integrity": "sha512-jZRrDmBKjmGcqMFEUJ14FjMJwm05Qaked+1vxaALRtF0UAl7lPU8OLWXFxvoeg3jbQM249VPFVn8g2znaQkEtA==", - "dev": true, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/default-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz", - "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==", - "dev": true, - "dependencies": { - "kind-of": "^5.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/default-resolution": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/default-resolution/-/default-resolution-2.0.0.tgz", - "integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ= sha512-2xaP6GiwVwOEbXCGoJ4ufgC76m8cj805jrghScewJC2ZDsb9U0b4BIrba+xt/Uytyd0HvQ6+WymSRTfnYj59GQ==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/defer-to-connect": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", - "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/define-lazy-prop": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", - "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", - "engines": { - "node": ">=8" - } - }, - "node_modules/define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "dependencies": { - "object-keys": "^1.0.12" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "dependencies": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/delayed-stream": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.6.tgz", - "integrity": "sha1-omRst+w9XXd0YUZwp6Zd4MFz7bw= sha512-Si7mB08fdumvLNFddq3HQOoYf8BUxfITyZi+0RBn1sbojFm8c4gD1+3se7qVEji1uiVVLYE0Np0laaS9E+j6ag==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", - "dev": true - }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/deprecation": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", - "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", - "dev": true - }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "dev": true, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/detect-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc= sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/detect-indent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz", - "integrity": "sha1-OHHMCmoALow+Wzz38zYmRnXwa50= sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/detect-libc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", - "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", - "engines": { - "node": ">=8" - } - }, - "node_modules/detect-newline": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", - "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I= sha512-CwffZFvlJffUg9zZA0uqrjQayUTC8ob94pnr5sFwaVv3IOmkfUHcWH+jXaQK3askE51Cqe8/9Ql/0uXNwqZ8Zg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/detect-node": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz", - "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==", - "dev": true, - "optional": true - }, - "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ] - }, - "node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "dependencies": { - "domelementtype": "^2.3.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/domutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", - "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", - "dev": true, - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/duplexer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", - "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E= sha512-sxNZ+ljy+RA1maXoUReeqBBpBC6RLKmg5ewzV+x+mSETmWNoKdZN6vcQjpFROemza23hGFskJtFNoUWUaQ+R4Q==", - "dev": true - }, - "node_modules/duplexify": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", - "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", - "dev": true, - "dependencies": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - } - }, - "node_modules/duplexify/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/each-props": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz", - "integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.1", - "object.defaults": "^1.1.0" - } - }, - "node_modules/each-props/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, - "node_modules/editorconfig": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.2.tgz", - "integrity": "sha512-GWjSI19PVJAM9IZRGOS+YKI8LN+/sjkSjNyvxL5ucqP9/IqtYNXBaQ/6c/hkPNYQHyOHra2KoXZI/JVpuqwmcQ==", - "dev": true, - "dependencies": { - "@types/node": "^10.11.7", - "@types/semver": "^5.5.0", - "commander": "^2.19.0", - "lru-cache": "^4.1.3", - "semver": "^5.6.0", - "sigmund": "^1.0.1" - }, - "bin": { - "editorconfig": "bin/editorconfig" - } - }, - "node_modules/editorconfig/node_modules/@types/node": { - "version": "10.12.21", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.21.tgz", - "integrity": "sha512-CBgLNk4o3XMnqMc0rhb6lc77IwShMEglz05deDcn2lQxyXEZivfwgYJu7SMha9V5XcrP6qZuevTHV/QrN2vjKQ==", - "dev": true - }, - "node_modules/editorconfig/node_modules/@types/semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ==", - "dev": true - }, - "node_modules/editorconfig/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "node_modules/editorconfig/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true - }, - "node_modules/electron": { - "version": "32.2.6", - "resolved": "https://registry.npmjs.org/electron/-/electron-32.2.6.tgz", - "integrity": "sha512-aGG1MLvWCf+ECUFBCmaCF52F8312OPAJfph2D0FSsFmlbfnJuNevZCbty2lFzsiIMtU7/QRo6d0ksbgR4s7y3w==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "@electron/get": "^2.0.0", - "@types/node": "^20.9.0", - "extract-zip": "^2.0.1" - }, - "bin": { - "electron": "cli.js" - }, - "engines": { - "node": ">= 12.20.55" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.5.32", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.32.tgz", - "integrity": "sha512-M+7ph0VGBQqqpTT2YrabjNKSQ2fEl9PVx6AK3N558gDH9NO8O6XN9SXXFWRo9u9PbEg/bWq+tjXQr+eXmxubCw==", - "dev": true, - "license": "ISC" - }, - "node_modules/emoji-regex": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", - "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", - "dev": true - }, - "node_modules/emojis-list": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", - "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/enhanced-resolve": { - "version": "5.17.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", - "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/env-paths": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.0.tgz", - "integrity": "sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/envinfo": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", - "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", - "dev": true, - "bin": { - "envinfo": "dist/cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/errno": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", - "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", - "dev": true, - "dependencies": { - "prr": "~1.0.1" - }, - "bin": { - "errno": "cli.js" - } - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", - "dev": true, - "dependencies": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-module-lexer": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", - "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", - "dev": true - }, - "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es5-ext": { - "version": "0.10.63", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.63.tgz", - "integrity": "sha512-hUCZd2Byj/mNKjfP9jXrdVZ62B8KuA/VoK7X8nUh5qT+AxDmcbvZz041oDVZdbIN1qW6XY9VDNwzkvKnZvK2TQ==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.3", - "esniff": "^2.0.1", - "next-tick": "^1.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true, - "optional": true - }, - "node_modules/es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c= sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", - "dev": true, - "dependencies": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "node_modules/es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "dev": true, - "dependencies": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, - "node_modules/es6-weak-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", - "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", - "dev": true, - "dependencies": { - "d": "1", - "es5-ext": "^0.10.46", - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.1" - } - }, - "node_modules/escalade": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", - "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "9.11.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.11.1.tgz", - "integrity": "sha512-MobhYKIoAO1s1e4VUrgx1l1Sk2JBR/Gqjjgw8+mfgoLE2xwsHur4gdfTxyTgShrhvdVFTaJSgMiQBl1jv/AWxg==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.11.0", - "@eslint/config-array": "^0.18.0", - "@eslint/core": "^0.6.0", - "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "9.11.1", - "@eslint/plugin-kit": "^0.2.0", - "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.3.0", - "@nodelib/fs.walk": "^1.2.8", - "@types/estree": "^1.0.6", - "@types/json-schema": "^7.0.15", - "ajv": "^6.12.4", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.0.2", - "eslint-visitor-keys": "^4.0.0", - "espree": "^10.1.0", - "esquery": "^1.5.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^8.0.0", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "json-stable-stringify-without-jsonify": "^1.0.1", - "lodash.merge": "^4.6.2", - "minimatch": "^3.1.2", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "jiti": "*" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - } - } - }, - "node_modules/eslint-formatter-compact": { - "version": "8.40.0", - "resolved": "https://registry.npmjs.org/eslint-formatter-compact/-/eslint-formatter-compact-8.40.0.tgz", - "integrity": "sha512-cwGUs113TgmTQXecx5kfRjB7m0y2wkDLSadPTE2pK6M/wO4N8PjmUaoWOFNCP9MHgsiZwgqd5bZFnDCnszC56Q==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/eslint-plugin-header": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-header/-/eslint-plugin-header-3.1.1.tgz", - "integrity": "sha512-9vlKxuJ4qf793CmeeSrZUvVClw6amtpghq3CuWcB5cUNnWHQhgcqy5eF8oVKFk1G3Y/CbchGfEaw3wiIJaNmVg==", - "dev": true, - "peerDependencies": { - "eslint": ">=7.7.0" - } - }, - "node_modules/eslint-plugin-jsdoc": { - "version": "50.3.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-50.3.1.tgz", - "integrity": "sha512-SY9oUuTMr6aWoJggUS40LtMjsRzJPB5ZT7F432xZIHK3EfHF+8i48GbUBpwanrtlL9l1gILNTHK9o8gEhYLcKA==", - "dev": true, - "dependencies": { - "@es-joy/jsdoccomment": "~0.48.0", - "are-docs-informative": "^0.0.2", - "comment-parser": "1.4.1", - "debug": "^4.3.6", - "escape-string-regexp": "^4.0.0", - "espree": "^10.1.0", - "esquery": "^1.6.0", - "parse-imports": "^2.1.1", - "semver": "^7.6.3", - "spdx-expression-parse": "^4.0.0", - "synckit": "^0.9.1" - }, - "engines": { - "node": ">=18" - }, - "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" - } - }, - "node_modules/eslint-plugin-jsdoc/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/eslint-plugin-jsdoc/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/eslint-plugin-jsdoc/node_modules/spdx-expression-parse": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", - "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/eslint-plugin-local": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-local/-/eslint-plugin-local-6.0.0.tgz", - "integrity": "sha512-pvy/pTTyanEKAqpYqy/SLfd4TdiAQ/yFO+GRXDGvGQa2vEUGtmlEjmWQXBDGSk790j4nrAB/7ipqPQY3nLduDg==", - "deprecated": "Since the coming of ESLint flat config file, you can specify local rules without the need of this package. For running ESLint rule unit tests, use eslint-rule-tester instead", - "dev": true, - "dependencies": { - "@thisismanta/pessimist": "^1.2.0", - "chalk": "^4.0.0" - }, - "bin": { - "eslint-plugin-local": "executable.js" - }, - "peerDependencies": { - "eslint": ">=9.0.0" - } - }, - "node_modules/eslint-scope": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.1.0.tgz", - "integrity": "sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", - "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/esniff": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz", - "integrity": "sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==", - "dev": true, - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.62", - "event-emitter": "^0.3.5", - "type": "^2.7.2" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esniff/node_modules/type": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", - "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", - "dev": true - }, - "node_modules/espree": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.2.0.tgz", - "integrity": "sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==", - "dev": true, - "dependencies": { - "acorn": "^8.12.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.1.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", - "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", - "dev": true, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esquery": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", - "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", - "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk= sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", - "dev": true, - "dependencies": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "node_modules/event-stream": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz", - "integrity": "sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE= sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==", - "dev": true, - "dependencies": { - "duplexer": "~0.1.1", - "from": "~0", - "map-stream": "~0.1.0", - "pause-stream": "0.0.11", - "split": "0.3", - "stream-combiner": "~0.0.4", - "through": "~2.3.1" - } - }, - "node_modules/events": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz", - "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==", - "dev": true, - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI= sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==", - "dev": true, - "dependencies": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/expand-brackets/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dev": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "deprecated": "Please upgrade to v0.1.7", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "deprecated": "Please upgrade to v0.1.5", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/expand-brackets/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/expand-template": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", - "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", - "engines": { - "node": ">=6" - } - }, - "node_modules/expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI= sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", - "dev": true, - "dependencies": { - "homedir-polyfill": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ext": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", - "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", - "dev": true, - "dependencies": { - "type": "^2.0.0" - } - }, - "node_modules/ext/node_modules/type": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/type/-/type-2.1.0.tgz", - "integrity": "sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA==", - "dev": true - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", - "dev": true, - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "dependencies": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY= sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", - "dev": true, - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extglob/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extract-zip": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", - "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "get-stream": "^5.1.0", - "yauzl": "^2.10.0" - }, - "bin": { - "extract-zip": "cli.js" - }, - "engines": { - "node": ">= 10.17.0" - }, - "optionalDependencies": { - "@types/yauzl": "^2.9.1" - } - }, - "node_modules/extract-zip/node_modules/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "dev": true, - "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - }, - "node_modules/fancy-log": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz", - "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==", - "dev": true, - "dependencies": { - "ansi-gray": "^0.1.1", - "color-support": "^1.1.3", - "parse-node-version": "^1.0.0", - "time-stamp": "^1.0.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-fifo": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", - "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", - "dev": true - }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "node_modules/fastest-levenshtein": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", - "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==", - "dev": true - }, - "node_modules/fastq": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.9.0.tgz", - "integrity": "sha512-i7FVWL8HhVY+CTkwFxkN2mk3h+787ixS5S63eb78diVRc1MCssarHq3W5cj0av7YDSwmaV928RNag+U1etRQ7w==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "dependencies": { - "pend": "~1.2.0" - } - }, - "node_modules/file-entry-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", - "dev": true, - "dependencies": { - "flat-cache": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/file-loader": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz", - "integrity": "sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==", - "dev": true, - "dependencies": { - "loader-utils": "^2.0.0", - "schema-utils": "^3.0.0" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^4.0.0 || ^5.0.0" - } - }, - "node_modules/file-loader/node_modules/schema-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", - "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.6", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-parent-dir": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.1.tgz", - "integrity": "sha512-o4UcykWV/XN9wm+jMEtWLPlV8RXCZnMhQI6F6OdHeSez7iiJWePw8ijOlskJZMsaQoGR/b7dH6lO02HhaTN7+A==", - "dev": true - }, - "node_modules/find-replace": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", - "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", - "dev": true, - "dependencies": { - "array-back": "^3.0.1" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/findup-sync": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", - "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", - "dev": true, - "dependencies": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/findup-sync/node_modules/braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "dependencies": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/findup-sync/node_modules/braces/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/findup-sync/node_modules/fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", - "dev": true, - "dependencies": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/findup-sync/node_modules/fill-range/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/findup-sync/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/findup-sync/node_modules/is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/findup-sync/node_modules/is-number/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/findup-sync/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/findup-sync/node_modules/micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/findup-sync/node_modules/to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", - "dev": true, - "dependencies": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fined": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", - "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", - "dev": true, - "dependencies": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^2.0.3", - "object.defaults": "^1.1.0", - "object.pick": "^1.2.0", - "parse-filepath": "^1.0.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/fined/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/flagged-respawn": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", - "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "bin": { - "flat": "cli.js" - } - }, - "node_modules/flat-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", - "dev": true, - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", - "dev": true - }, - "node_modules/flush-write-stream": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", - "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" - } - }, - "node_modules/flush-write-stream/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/font-finder": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/font-finder/-/font-finder-1.1.0.tgz", - "integrity": "sha512-wpCL2uIbi6GurJbU7ZlQ3nGd61Ho+dSU6U83/xJT5UPFfN35EeCW/rOtS+5k+IuEZu2SYmHzDIPL9eA5tSYRAw==", - "license": "MIT", - "dependencies": { - "get-system-fonts": "^2.0.0", - "promise-stream-reader": "^1.0.1" - }, - "engines": { - "node": ">8.0.0" - } - }, - "node_modules/font-ligatures": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/font-ligatures/-/font-ligatures-1.4.1.tgz", - "integrity": "sha512-7W6zlfyhvCqShZ5ReUWqmSd9vBaUudW0Hxis+tqUjtHhsPU+L3Grf8mcZAtCiXHTzorhwdRTId2WeH/88gdFkw==", - "license": "MIT", - "dependencies": { - "font-finder": "^1.0.3", - "lru-cache": "^6.0.0", - "opentype.js": "^0.8.0" - }, - "engines": { - "node": ">8.0.0" - } - }, - "node_modules/font-ligatures/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/font-ligatures/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "license": "ISC" - }, - "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.3" - } - }, - "node_modules/for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs= sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", - "dev": true, - "dependencies": { - "for-in": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", - "dev": true, - "dependencies": { - "map-cache": "^0.2.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/from": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", - "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4= sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==", - "dev": true - }, - "node_modules/fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" - }, - "node_modules/fs-extra": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", - "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/fs-minipass/node_modules/minipass": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", - "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fs-minipass/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "node_modules/fs-mkdirp-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", - "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes= sha512-+vSd9frUnapVC2RZYfL3FCB2p3g4TBhaUmrsWlSudsGdnxIuUvBB2QM1VZeBtc49QFwrp+wQLrDs3+xxDgI5gQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.11", - "through2": "^2.0.3" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/fs-mkdirp-stream/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/fs-mkdirp-stream/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8= sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/fstream": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", - "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", - "deprecated": "This package is no longer supported.", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - }, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/fstream/node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", - "dev": true, - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-stdin": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-7.0.0.tgz", - "integrity": "sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-stream/node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/get-system-fonts": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-system-fonts/-/get-system-fonts-2.0.2.tgz", - "integrity": "sha512-zzlgaYnHMIEgHRrfC7x0Qp0Ylhw/sHpM6MHXeVBTYIsvGf5GpbnClB+Q6rAPdn+0gd2oZZIo6Tj3EaWrt4VhDQ==", - "license": "MIT", - "engines": { - "node": ">8.0.0" - } - }, - "node_modules/get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/github-from-package": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4= sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==" - }, - "node_modules/glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E= sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/glob-stream": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", - "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ= sha512-uMbLGAP3S2aDOHUDfdoYcdIePUCfysbAd0IAoWVZbeGU/oNQ8asHVSshLDJUPWxfzj8zsCG7/XeHPHTtow0nsw==", - "dev": true, - "dependencies": { - "extend": "^3.0.0", - "glob": "^7.1.1", - "glob-parent": "^3.1.0", - "is-negated-glob": "^1.0.0", - "ordered-read-streams": "^1.0.0", - "pumpify": "^1.3.5", - "readable-stream": "^2.1.5", - "remove-trailing-separator": "^1.0.1", - "to-absolute-glob": "^2.0.0", - "unique-stream": "^2.0.2" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/glob-stream/node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-stream/node_modules/glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", - "dev": true, - "dependencies": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - } - }, - "node_modules/glob-stream/node_modules/is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/glob-stream/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true - }, - "node_modules/glob-watcher": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.5.tgz", - "integrity": "sha512-zOZgGGEHPklZNjZQaZ9f41i7F2YwE+tS5ZHrDhbBCk3stwahn5vQxnFmBJZHoYdusR6R1bLSXeGUy/BhctwKzw==", - "dev": true, - "dependencies": { - "anymatch": "^2.0.0", - "async-done": "^1.2.0", - "chokidar": "^2.0.0", - "is-negated-glob": "^1.0.0", - "just-debounce": "^1.0.0", - "normalize-path": "^3.0.0", - "object.defaults": "^1.1.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/glob-watcher/node_modules/anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "dependencies": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - } - }, - "node_modules/glob-watcher/node_modules/anymatch/node_modules/normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", - "dev": true, - "dependencies": { - "remove-trailing-separator": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/glob-watcher/node_modules/binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/glob-watcher/node_modules/braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "dependencies": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/glob-watcher/node_modules/braces/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/glob-watcher/node_modules/chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", - "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", - "deprecated": "Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies", - "dev": true, - "dependencies": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - }, - "optionalDependencies": { - "fsevents": "^1.2.7" - } - }, - "node_modules/glob-watcher/node_modules/fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", - "dev": true, - "dependencies": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/glob-watcher/node_modules/fill-range/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/glob-watcher/node_modules/fsevents": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", - "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", - "deprecated": "The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "dependencies": { - "bindings": "^1.5.0", - "nan": "^2.12.1" - }, - "engines": { - "node": ">= 4.0" - } - }, - "node_modules/glob-watcher/node_modules/glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", - "dev": true, - "dependencies": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - } - }, - "node_modules/glob-watcher/node_modules/glob-parent/node_modules/is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/glob-watcher/node_modules/is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= sha512-9fRVlXc0uCxEDj1nQzaWONSpbTfx0FmJfzHF7pwlI8DkWGoHBBea4Pg5Ky0ojwwxQmnSifgbKkI06Qv0Ljgj+Q==", - "dev": true, - "dependencies": { - "binary-extensions": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/glob-watcher/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/glob-watcher/node_modules/is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/glob-watcher/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/glob-watcher/node_modules/micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/glob-watcher/node_modules/micromatch/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/glob-watcher/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/glob-watcher/node_modules/readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/glob-watcher/node_modules/to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", - "dev": true, - "dependencies": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/global-agent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/global-agent/-/global-agent-3.0.0.tgz", - "integrity": "sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==", - "dev": true, - "optional": true, - "dependencies": { - "boolean": "^3.0.1", - "es6-error": "^4.1.1", - "matcher": "^3.0.0", - "roarr": "^2.15.3", - "semver": "^7.3.2", - "serialize-error": "^7.0.1" - }, - "engines": { - "node": ">=10.0" - } - }, - "node_modules/global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "dev": true, - "dependencies": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4= sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", - "dev": true, - "dependencies": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/global-prefix/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globalthis": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.1.tgz", - "integrity": "sha512-mJPRTc/P39NH/iNG4mXa9aIhNymaQikTrnspeCa2ZuJ+mH2QN/rXwtX3XwKrHqWgUQFbNZKtHM105aHzJalElw==", - "dev": true, - "optional": true, - "dependencies": { - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/glogg": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz", - "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==", - "dev": true, - "dependencies": { - "sparkles": "^1.0.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/got": { - "version": "11.8.5", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.5.tgz", - "integrity": "sha512-o0Je4NvQObAuZPHLFoRSkdG2lTgtcynqymzg2Vupdx6PorhaT5MCbIyXG6d4D94kk8ZG57QeosgdiqfJWhEhlQ==", - "dev": true, - "dependencies": { - "@sindresorhus/is": "^4.0.0", - "@szmarczak/http-timer": "^4.0.5", - "@types/cacheable-request": "^6.0.1", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^5.0.3", - "cacheable-request": "^7.0.2", - "decompress-response": "^6.0.0", - "http2-wrapper": "^1.0.0-beta.5.2", - "lowercase-keys": "^2.0.0", - "p-cancelable": "^2.0.0", - "responselike": "^2.0.0" - }, - "engines": { - "node": ">=10.19.0" - }, - "funding": { - "url": "https://github.com/sindresorhus/got?sponsor=1" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" - }, - "node_modules/graphemer": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", - "dev": true - }, - "node_modules/gulp": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz", - "integrity": "sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==", - "dev": true, - "dependencies": { - "glob-watcher": "^5.0.3", - "gulp-cli": "^2.2.0", - "undertaker": "^1.2.1", - "vinyl-fs": "^3.0.0" - }, - "bin": { - "gulp": "bin/gulp.js" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/gulp-azure-storage": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/gulp-azure-storage/-/gulp-azure-storage-0.12.1.tgz", - "integrity": "sha512-n/hx8bbGsqrcizruqDTX6zy2FUdkTDGAz04IdopNxNTZivZmizf8u9WLYJreUE6/qCnSJnyjS1HP82+mLk7rjg==", - "dev": true, - "dependencies": { - "@azure/storage-blob": "^12.8.0", - "delayed-stream": "0.0.6", - "event-stream": "3.3.4", - "mime": "^1.3.4", - "progress": "^1.1.8", - "queue": "^3.0.10", - "streamifier": "^0.1.1", - "vinyl": "^2.2.0", - "vinyl-fs": "^3.0.3", - "yargs": "^15.3.0" - }, - "bin": { - "upload-to-azure": "bin/upload.js" - } - }, - "node_modules/gulp-azure-storage/node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/gulp-azure-storage/node_modules/cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "node_modules/gulp-azure-storage/node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-azure-storage/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/gulp-azure-storage/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/gulp-azure-storage/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/gulp-azure-storage/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/gulp-azure-storage/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/gulp-azure-storage/node_modules/replace-ext": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", - "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/gulp-azure-storage/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/gulp-azure-storage/node_modules/vinyl": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", - "integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==", - "dev": true, - "dependencies": { - "clone": "^2.1.1", - "clone-buffer": "^1.0.0", - "clone-stats": "^1.0.0", - "cloneable-readable": "^1.0.0", - "remove-trailing-separator": "^1.0.1", - "replace-ext": "^1.0.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/gulp-azure-storage/node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/gulp-azure-storage/node_modules/y18n": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", - "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", - "dev": true - }, - "node_modules/gulp-azure-storage/node_modules/yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "dev": true, - "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/gulp-azure-storage/node_modules/yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/gulp-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/gulp-bom/-/gulp-bom-3.0.0.tgz", - "integrity": "sha512-iw/J94F+MVlxG64Q17BSkHsyjpY17qHl3N3A/jDdrL77zQBkhKtTiKLqM4di9CUX/qFToyyeDsOWwH+rESBgmA==", - "dev": true, - "dependencies": { - "plugin-error": "^1.0.1", - "through2": "^3.0.1" - }, - "engines": { - "node": ">=8" - }, - "peerDependencies": { - "gulp": ">=4" - }, - "peerDependenciesMeta": { - "gulp": { - "optional": true - } - } - }, - "node_modules/gulp-buffer": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/gulp-buffer/-/gulp-buffer-0.0.2.tgz", - "integrity": "sha1-r4G0NGEBc2tJlC7GyfqGf/5zcDY= sha512-EBkbjjTH2gRr2B8KBAcomdTemfZHqiKs8CxSYdaW0Hq3zxltQFrCg9BBmKVHC9cfxX/3l2BZK5oiGHYNJ/gcVw==", - "dev": true, - "dependencies": { - "through2": "~0.4.0" - } - }, - "node_modules/gulp-buffer/node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", - "dev": true - }, - "node_modules/gulp-buffer/node_modules/object-keys": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", - "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY= sha512-ncrLw+X55z7bkl5PnUvHwFK9FcGuFYo9gtjws2XtSzL+aZ8tm830P60WJ0dSmFVaSalWieW5MD7kEdnXda9yJw==", - "dev": true - }, - "node_modules/gulp-buffer/node_modules/readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw= sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "node_modules/gulp-buffer/node_modules/string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", - "dev": true - }, - "node_modules/gulp-buffer/node_modules/through2": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.4.2.tgz", - "integrity": "sha1-2/WGYDEVHsg1K7bE22SiKSqEC5s= sha512-45Llu+EwHKtAZYTPPVn3XZHBgakWMN3rokhEv5hu596XP+cNgplMg+Gj+1nmAvj+L0K7+N49zBKx5rah5u0QIQ==", - "dev": true, - "dependencies": { - "readable-stream": "~1.0.17", - "xtend": "~2.1.1" - } - }, - "node_modules/gulp-buffer/node_modules/xtend": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", - "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os= sha512-vMNKzr2rHP9Dp/e1NQFnLQlwlhp9L/LfvnsVdHxN1f+uggyVI3i08uD14GPvCToPkdsRfyPqIyYGmIk58V98ZQ==", - "dev": true, - "dependencies": { - "object-keys": "~0.4.0" - }, - "engines": { - "node": ">=0.4" - } - }, - "node_modules/gulp-cli": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.3.0.tgz", - "integrity": "sha512-zzGBl5fHo0EKSXsHzjspp3y5CONegCm8ErO5Qh0UzFzk2y4tMvzLWhoDokADbarfZRL2pGpRp7yt6gfJX4ph7A==", - "dev": true, - "dependencies": { - "ansi-colors": "^1.0.1", - "archy": "^1.0.0", - "array-sort": "^1.0.0", - "color-support": "^1.1.3", - "concat-stream": "^1.6.0", - "copy-props": "^2.0.1", - "fancy-log": "^1.3.2", - "gulplog": "^1.0.0", - "interpret": "^1.4.0", - "isobject": "^3.0.1", - "liftoff": "^3.1.0", - "matchdep": "^2.0.0", - "mute-stdout": "^1.0.0", - "pretty-hrtime": "^1.0.0", - "replace-homedir": "^1.0.0", - "semver-greatest-satisfied-range": "^1.1.0", - "v8flags": "^3.2.0", - "yargs": "^7.1.0" - }, - "bin": { - "gulp": "bin/gulp.js" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/gulp-cli/node_modules/ansi-colors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", - "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", - "dev": true, - "dependencies": { - "ansi-wrap": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-cli/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-cli/node_modules/camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-cli/node_modules/cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==", - "dev": true, - "dependencies": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "node_modules/gulp-cli/node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-cli/node_modules/get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "node_modules/gulp-cli/node_modules/is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs= sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", - "dev": true, - "dependencies": { - "number-is-nan": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-cli/node_modules/require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug==", - "dev": true - }, - "node_modules/gulp-cli/node_modules/string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", - "dev": true, - "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-cli/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-cli/node_modules/which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8= sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ==", - "dev": true - }, - "node_modules/gulp-cli/node_modules/wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==", - "dev": true, - "dependencies": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-cli/node_modules/y18n": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", - "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", - "dev": true - }, - "node_modules/gulp-cli/node_modules/yargs": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.2.tgz", - "integrity": "sha512-ZEjj/dQYQy0Zx0lgLMLR8QuaqTihnxirir7EwUHp1Axq4e3+k8jXU5K0VLbNvedv1f4EWtBonDIZm0NUr+jCcA==", - "dev": true, - "dependencies": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.1" - } - }, - "node_modules/gulp-cli/node_modules/yargs-parser": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.1.tgz", - "integrity": "sha512-wpav5XYiddjXxirPoCTUPbqM0PXvJ9hiBMvuJgInvo4/lAOTZzUprArw17q2O1P2+GHhbBr18/iQwjL5Z9BqfA==", - "dev": true, - "dependencies": { - "camelcase": "^3.0.0", - "object.assign": "^4.1.0" - } - }, - "node_modules/gulp-filter": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/gulp-filter/-/gulp-filter-5.1.0.tgz", - "integrity": "sha1-oF4Rr/sHz33PQafeHLe2OsN4PnM= sha512-ZERu1ipbPmjrNQ2dQD6lL4BjrJQG66P/c5XiyMMBqV+tUAJ+fLOyYIL/qnXd2pHmw/G/r7CLQb9ttANvQWbpfQ==", - "dev": true, - "dependencies": { - "multimatch": "^2.0.0", - "plugin-error": "^0.1.2", - "streamfilter": "^1.0.5" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/gulp-filter/node_modules/arr-diff": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", - "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo= sha512-OQwDZUqYaQwyyhDJHThmzId8daf4/RFNLaeh3AevmSeZ5Y7ug4Ga/yKc6l6kTZOBW781rCj103ZuTh8GAsB3+Q==", - "dev": true, - "dependencies": { - "arr-flatten": "^1.0.1", - "array-slice": "^0.2.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-filter/node_modules/arr-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", - "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0= sha512-t5db90jq+qdgk8aFnxEkjqta0B/GHrM1pxzuuZz2zWsOXc5nKu3t+76s/PQBA8FTcM/ipspIH9jWG4OxCBc2eA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-filter/node_modules/array-slice": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", - "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU= sha512-rlVfZW/1Ph2SNySXwR9QYkChp8EkOEiTMO5Vwx60usw04i4nWemkm9RXmQqgkQFaLHsqLuADvjp6IfgL9l2M8Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-filter/node_modules/extend-shallow": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", - "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE= sha512-L7AGmkO6jhDkEBBGWlLtftA80Xq8DipnrRPr0pyi7GQLXkaq9JYA4xF4z6qnadIC6euiTDKco0cGSU9muw+WTw==", - "dev": true, - "dependencies": { - "kind-of": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-filter/node_modules/kind-of": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", - "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ= sha512-aUH6ElPnMGon2/YkxRIigV32MOpTVcoXQ1Oo8aYn40s+sJ3j+0gFZsT8HKDcxNy7Fi9zuquWtGaGAahOdv5p/g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-filter/node_modules/plugin-error": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", - "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4= sha512-WzZHcm4+GO34sjFMxQMqZbsz3xiNEgonCskQ9v+IroMmYgk/tas8dG+Hr2D6IbRPybZ12oWpzE/w3cGJ6FJzOw==", - "dev": true, - "dependencies": { - "ansi-cyan": "^0.1.1", - "ansi-red": "^0.1.1", - "arr-diff": "^1.0.1", - "arr-union": "^2.0.1", - "extend-shallow": "^1.1.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-flatmap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/gulp-flatmap/-/gulp-flatmap-1.0.2.tgz", - "integrity": "sha512-xm+Ax2vPL/xiMBqLFI++wUyPtncm3b55ztGHewmRcoG/sYb0OUTatjSacOud3fee77rnk+jOgnDEHhwBtMHgFA==", - "dev": true, - "dependencies": { - "plugin-error": "0.1.2", - "through2": "2.0.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-flatmap/node_modules/arr-diff": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", - "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo= sha512-OQwDZUqYaQwyyhDJHThmzId8daf4/RFNLaeh3AevmSeZ5Y7ug4Ga/yKc6l6kTZOBW781rCj103ZuTh8GAsB3+Q==", - "dev": true, - "dependencies": { - "arr-flatten": "^1.0.1", - "array-slice": "^0.2.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-flatmap/node_modules/arr-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", - "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0= sha512-t5db90jq+qdgk8aFnxEkjqta0B/GHrM1pxzuuZz2zWsOXc5nKu3t+76s/PQBA8FTcM/ipspIH9jWG4OxCBc2eA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-flatmap/node_modules/array-slice": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", - "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU= sha512-rlVfZW/1Ph2SNySXwR9QYkChp8EkOEiTMO5Vwx60usw04i4nWemkm9RXmQqgkQFaLHsqLuADvjp6IfgL9l2M8Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-flatmap/node_modules/extend-shallow": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", - "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE= sha512-L7AGmkO6jhDkEBBGWlLtftA80Xq8DipnrRPr0pyi7GQLXkaq9JYA4xF4z6qnadIC6euiTDKco0cGSU9muw+WTw==", - "dev": true, - "dependencies": { - "kind-of": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-flatmap/node_modules/kind-of": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", - "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ= sha512-aUH6ElPnMGon2/YkxRIigV32MOpTVcoXQ1Oo8aYn40s+sJ3j+0gFZsT8HKDcxNy7Fi9zuquWtGaGAahOdv5p/g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-flatmap/node_modules/plugin-error": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", - "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4= sha512-WzZHcm4+GO34sjFMxQMqZbsz3xiNEgonCskQ9v+IroMmYgk/tas8dG+Hr2D6IbRPybZ12oWpzE/w3cGJ6FJzOw==", - "dev": true, - "dependencies": { - "ansi-cyan": "^0.1.1", - "ansi-red": "^0.1.1", - "arr-diff": "^1.0.1", - "arr-union": "^2.0.1", - "extend-shallow": "^1.1.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-flatmap/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/gulp-flatmap/node_modules/through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4= sha512-tmNYYHFqXmaKSSlOU4ZbQ82cxmFQa5LRWKFtWCNkGIiZ3/VHmOffCeWfBRZZRyXAhNP9itVMR+cuvomBOPlm8g==", - "dev": true, - "dependencies": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" - } - }, - "node_modules/gulp-gunzip": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/gulp-gunzip/-/gulp-gunzip-1.1.0.tgz", - "integrity": "sha512-3INeprGyz5fUtAs75k6wVslGuRZIjKAoQp39xA7Bz350ReqkrfYaLYqjZ67XyIfLytRXdzeX04f+DnBduYhQWw==", - "dev": true, - "dependencies": { - "through2": "~2.0.3", - "vinyl": "~2.0.1" - } - }, - "node_modules/gulp-gunzip/node_modules/clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4= sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/gulp-gunzip/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/gulp-gunzip/node_modules/replace-ext": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", - "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/gulp-gunzip/node_modules/through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4= sha512-tmNYYHFqXmaKSSlOU4ZbQ82cxmFQa5LRWKFtWCNkGIiZ3/VHmOffCeWfBRZZRyXAhNP9itVMR+cuvomBOPlm8g==", - "dev": true, - "dependencies": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" - } - }, - "node_modules/gulp-gunzip/node_modules/vinyl": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.0.2.tgz", - "integrity": "sha1-CjcT2NTpIhxY8QyhbAEWyeJe2nw= sha512-ViPXqulxjb1yXxaf/kQZfLHkd2ppnVBWPq4XmvW377vcBTxHFtHR5NRfYsdXsiKpWndKRoCdn11DfEnoCz1Inw==", - "dev": true, - "dependencies": { - "clone": "^1.0.0", - "clone-buffer": "^1.0.0", - "clone-stats": "^1.0.0", - "cloneable-readable": "^1.0.0", - "is-stream": "^1.1.0", - "remove-trailing-separator": "^1.0.1", - "replace-ext": "^1.0.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/gulp-gzip": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/gulp-gzip/-/gulp-gzip-1.4.2.tgz", - "integrity": "sha512-ZIxfkUwk2XmZPTT9pPHrHUQlZMyp9nPhg2sfoeN27mBGpi7OaHnOD+WCN41NXjfJQ69lV1nQ9LLm1hYxx4h3UQ==", - "dev": true, - "dependencies": { - "ansi-colors": "^1.0.1", - "bytes": "^3.0.0", - "fancy-log": "^1.3.2", - "plugin-error": "^1.0.0", - "stream-to-array": "^2.3.0", - "through2": "^2.0.3" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/gulp-gzip/node_modules/ansi-colors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", - "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", - "dev": true, - "dependencies": { - "ansi-wrap": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-gzip/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/gulp-gzip/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/gulp-json-editor": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/gulp-json-editor/-/gulp-json-editor-2.5.0.tgz", - "integrity": "sha512-HyrBSaE+Di6oQbKsfNM6X7dPFowOuTTuVYjxratU8QAiW7LR7Rydm+/fSS3OehdnuP++A/07q/nksihuD5FZSA==", - "dev": true, - "dependencies": { - "deepmerge": "^3.0.0", - "detect-indent": "^5.0.0", - "js-beautify": "^1.8.9", - "plugin-error": "^1.0.1", - "through2": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/gulp-plumber": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gulp-plumber/-/gulp-plumber-1.2.0.tgz", - "integrity": "sha512-L/LJftsbKoHbVj6dN5pvMsyJn9jYI0wT0nMg3G6VZhDac4NesezecYTi8/48rHi+yEic3sUpw6jlSc7qNWh32A==", - "dev": true, - "dependencies": { - "chalk": "^1.1.3", - "fancy-log": "^1.3.2", - "plugin-error": "^0.1.2", - "through2": "^2.0.3" - }, - "engines": { - "node": ">=0.10", - "npm": ">=1.2.10" - } - }, - "node_modules/gulp-plumber/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-plumber/node_modules/ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-plumber/node_modules/arr-diff": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", - "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo= sha512-OQwDZUqYaQwyyhDJHThmzId8daf4/RFNLaeh3AevmSeZ5Y7ug4Ga/yKc6l6kTZOBW781rCj103ZuTh8GAsB3+Q==", - "dev": true, - "dependencies": { - "arr-flatten": "^1.0.1", - "array-slice": "^0.2.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-plumber/node_modules/arr-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", - "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0= sha512-t5db90jq+qdgk8aFnxEkjqta0B/GHrM1pxzuuZz2zWsOXc5nKu3t+76s/PQBA8FTcM/ipspIH9jWG4OxCBc2eA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-plumber/node_modules/array-slice": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", - "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU= sha512-rlVfZW/1Ph2SNySXwR9QYkChp8EkOEiTMO5Vwx60usw04i4nWemkm9RXmQqgkQFaLHsqLuADvjp6IfgL9l2M8Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-plumber/node_modules/chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-plumber/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/gulp-plumber/node_modules/extend-shallow": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", - "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE= sha512-L7AGmkO6jhDkEBBGWlLtftA80Xq8DipnrRPr0pyi7GQLXkaq9JYA4xF4z6qnadIC6euiTDKco0cGSU9muw+WTw==", - "dev": true, - "dependencies": { - "kind-of": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-plumber/node_modules/kind-of": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", - "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ= sha512-aUH6ElPnMGon2/YkxRIigV32MOpTVcoXQ1Oo8aYn40s+sJ3j+0gFZsT8HKDcxNy7Fi9zuquWtGaGAahOdv5p/g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-plumber/node_modules/plugin-error": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", - "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4= sha512-WzZHcm4+GO34sjFMxQMqZbsz3xiNEgonCskQ9v+IroMmYgk/tas8dG+Hr2D6IbRPybZ12oWpzE/w3cGJ6FJzOw==", - "dev": true, - "dependencies": { - "ansi-cyan": "^0.1.1", - "ansi-red": "^0.1.1", - "arr-diff": "^1.0.1", - "arr-union": "^2.0.1", - "extend-shallow": "^1.1.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-plumber/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/gulp-plumber/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-plumber/node_modules/supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/gulp-plumber/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/gulp-rename": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-1.2.2.tgz", - "integrity": "sha1-OtRCh2PwXidk3sHGfYaNsnVoeBc= sha512-qhfUlYwq5zIP4cpRjx+np2vZVnr0xCRQrF3RsGel8uqL47Gu3yjmllSfnvJyl/39zYuxS68e1nnxImbm7388vw==", - "dev": true, - "engines": { - "node": ">=0.10.0", - "npm": ">=1.2.10" - } - }, - "node_modules/gulp-replace": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/gulp-replace/-/gulp-replace-0.5.4.tgz", - "integrity": "sha1-aaZ5FLvRPFYr/xT1BKQDeWqg2qk= sha512-lHL+zKJN8uV95UkONnfRkoj2yJxPPupt2SahxA4vo5c+Ee3+WaIiMdWbOyUhg8BhAROQrWKnnxKOWPdVrnBwGw==", - "dev": true, - "dependencies": { - "istextorbinary": "1.0.2", - "readable-stream": "^2.0.1", - "replacestream": "^4.0.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/gulp-replace/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/gulp-sourcemaps": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-3.0.0.tgz", - "integrity": "sha512-RqvUckJkuYqy4VaIH60RMal4ZtG0IbQ6PXMNkNsshEGJ9cldUPRb/YCgboYae+CLAs1HQNb4ADTKCx65HInquQ==", - "dev": true, - "dependencies": { - "@gulp-sourcemaps/identity-map": "^2.0.1", - "@gulp-sourcemaps/map-sources": "^1.0.0", - "acorn": "^6.4.1", - "convert-source-map": "^1.0.0", - "css": "^3.0.0", - "debug-fabulous": "^1.0.0", - "detect-newline": "^2.0.0", - "graceful-fs": "^4.0.0", - "source-map": "^0.6.0", - "strip-bom-string": "^1.0.0", - "through2": "^2.0.0" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/gulp-sourcemaps/node_modules/acorn": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", - "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/gulp-sourcemaps/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/gulp-sourcemaps/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/gulp-svgmin": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/gulp-svgmin/-/gulp-svgmin-4.1.0.tgz", - "integrity": "sha512-WKpif+yu3+oIlp1e11CQi5F64YddP699l2mFmxpz8swv8/P8dhxVcMKdCPFWouArlVyn7Ma1eWCJHw5gx4NMtw==", - "dev": true, - "dependencies": { - "lodash.clonedeep": "^4.5.0", - "plugin-error": "^1.0.1", - "svgo": "^2.7.0" - } - }, - "node_modules/gulp-symdest": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/gulp-symdest/-/gulp-symdest-1.3.0.tgz", - "integrity": "sha512-n1VaNYMpyOq4GfyQyIwRZhXOOsQVdEy56BCFxL4hu+stKwYeSQcZxLX5FOZL6jZUlBYXCWlXL+E5JU13ZMldIw==", - "dev": true, - "dependencies": { - "event-stream": "3.3.4", - "mkdirp": "^0.5.1", - "queue": "^3.1.0", - "vinyl-fs": "^3.0.3" - } - }, - "node_modules/gulp-symdest/node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/gulp-untar": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/gulp-untar/-/gulp-untar-0.0.7.tgz", - "integrity": "sha512-0QfbCH2a1k2qkTLWPqTX+QO4qNsHn3kC546YhAP3/n0h+nvtyGITDuDrYBMDZeW4WnFijmkOvBWa5HshTic1tw==", - "dev": true, - "dependencies": { - "event-stream": "~3.3.4", - "streamifier": "~0.1.1", - "tar": "^2.2.1", - "through2": "~2.0.3", - "vinyl": "^1.2.0" - } - }, - "node_modules/gulp-untar/node_modules/clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4= sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/gulp-untar/node_modules/clone-stats": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", - "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE= sha512-dhUqc57gSMCo6TX85FLfe51eC/s+Im2MLkAgJwfaRRexR2tA4dd3eLEW4L6efzHc2iNorrRRXITifnDLlRrhaA==", - "dev": true - }, - "node_modules/gulp-untar/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/gulp-untar/node_modules/replace-ext": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ= sha512-AFBWBy9EVRTa/LhEcG8QDP3FvpwZqmvN2QFDuJswFeaVhWnZMp8q3E6Zd90SR04PlIwfGdyVjNyLPyen/ek5CQ==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/gulp-untar/node_modules/tar": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", - "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", - "deprecated": "This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.", - "dev": true, - "dependencies": { - "block-stream": "*", - "fstream": "^1.0.12", - "inherits": "2" - } - }, - "node_modules/gulp-untar/node_modules/through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4= sha512-tmNYYHFqXmaKSSlOU4ZbQ82cxmFQa5LRWKFtWCNkGIiZ3/VHmOffCeWfBRZZRyXAhNP9itVMR+cuvomBOPlm8g==", - "dev": true, - "dependencies": { - "readable-stream": "^2.1.5", - "xtend": "~4.0.1" - } - }, - "node_modules/gulp-untar/node_modules/vinyl": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-1.2.0.tgz", - "integrity": "sha1-XIgDbPVl5d8FVYv8kR+GVt8hiIQ= sha512-Ci3wnR2uuSAWFMSglZuB8Z2apBdtOyz8CV7dC6/U1XbltXBC+IuutUkXQISz01P+US2ouBuesSbV6zILZ6BuzQ==", - "dev": true, - "dependencies": { - "clone": "^1.0.0", - "clone-stats": "^0.0.1", - "replace-ext": "0.0.1" - }, - "engines": { - "node": ">= 0.9" - } - }, - "node_modules/gulp-vinyl-zip": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/gulp-vinyl-zip/-/gulp-vinyl-zip-2.1.2.tgz", - "integrity": "sha512-wJn09jsb8PyvUeyFF7y7ImEJqJwYy40BqL9GKfJs6UGpaGW9A+N68Q+ajsIpb9AeR6lAdjMbIdDPclIGo1/b7Q==", - "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", - "dev": true, - "dependencies": { - "event-stream": "3.3.4", - "queue": "^4.2.1", - "through2": "^2.0.3", - "vinyl": "^2.0.2", - "vinyl-fs": "^3.0.3", - "yauzl": "^2.2.1", - "yazl": "^2.2.1" - } - }, - "node_modules/gulp-vinyl-zip/node_modules/fd-slicer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.0.1.tgz", - "integrity": "sha1-i1vL2ewyfFBBv5qwI/1nUPEXfmU= sha512-MX1ZLPIuKED51hrI4++K+1B0VX87Cs4EkybD2q12Ysuf5p4vkmHqMvQJRlDwROqFr4D2Pzyit5wGQxf30grIcw==", - "dev": true, - "dependencies": { - "pend": "~1.2.0" - } - }, - "node_modules/gulp-vinyl-zip/node_modules/queue": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/queue/-/queue-4.5.0.tgz", - "integrity": "sha512-DwxpAnqJuoQa+wyDgQuwkSshkhlqIlWEvwvdAY27fDPunZ2cVJzXU4JyjY+5l7zs7oGLaYAQm4MbLOVFAHFBzA==", - "dev": true, - "dependencies": { - "inherits": "~2.0.0" - } - }, - "node_modules/gulp-vinyl-zip/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/gulp-vinyl-zip/node_modules/replace-ext": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", - "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/gulp-vinyl-zip/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/gulp-vinyl-zip/node_modules/vinyl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", - "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==", - "dev": true, - "dependencies": { - "clone": "^2.1.1", - "clone-buffer": "^1.0.0", - "clone-stats": "^1.0.0", - "cloneable-readable": "^1.0.0", - "remove-trailing-separator": "^1.0.1", - "replace-ext": "^1.0.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/gulp-vinyl-zip/node_modules/yauzl": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.9.1.tgz", - "integrity": "sha1-qBmB6nCleUYTOIPwKcWCGok1mn8= sha512-tOFjaiYI4cNrDuqujDv5G1KdCmGtuIULZqLv263CCADNQlNInl8sJPD+Gf3neEVecFQ0sw6D4oJTI/dqlunkSw==", - "dev": true, - "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.0.1" - } - }, - "node_modules/gulplog": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", - "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U= sha512-hm6N8nrm3Y08jXie48jsC55eCZz9mnb4OirAStEk2deqeyhXU3C1otDVh+ccttMuc1sBi6RX6ZJ720hs9RCvgw==", - "dev": true, - "dependencies": { - "glogg": "^1.0.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/gunzip-maybe": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/gunzip-maybe/-/gunzip-maybe-1.4.2.tgz", - "integrity": "sha512-4haO1M4mLO91PW57BMsDFf75UmwoRX0GkdD+Faw+Lr+r/OZrOCS0pIBwOL1xCKQqnQzbNFGgK2V2CpBUPeFNTw==", - "dev": true, - "dependencies": { - "browserify-zlib": "^0.1.4", - "is-deflate": "^1.0.0", - "is-gzip": "^1.0.0", - "peek-stream": "^1.1.0", - "pumpify": "^1.3.3", - "through2": "^2.0.3" - }, - "bin": { - "gunzip-maybe": "bin.js" - } - }, - "node_modules/gunzip-maybe/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/gunzip-maybe/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-ansi/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0= sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==", - "dev": true, - "dependencies": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==", - "dev": true, - "dependencies": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/is-number/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-values/node_modules/kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc= sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, - "node_modules/homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "dev": true, - "dependencies": { - "parse-passwd": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "node_modules/html-escaper": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.0.tgz", - "integrity": "sha512-a4u9BeERWGu/S8JiWEAQcdrg9v4QArtP9keViQjGMdff20fBdd8waotXaNmODqBe6uZ3Nafi7K/ho4gCQHV3Ig==", - "dev": true - }, - "node_modules/http-assert": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/http-assert/-/http-assert-1.5.0.tgz", - "integrity": "sha512-uPpH7OKX4H25hBmU6G1jWNaqJGpTXxey+YOUizJUAgu0AjLUeC8D73hTrhvDS5D+GJN1DN1+hhc/eF/wpxtp0w==", - "dev": true, - "dependencies": { - "deep-equal": "~1.0.1", - "http-errors": "~1.8.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/http-assert/node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/http-assert/node_modules/http-errors": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", - "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", - "dev": true, - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/http-assert/node_modules/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/http-cache-semantics": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", - "dev": true - }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/http-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", - "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/http2-wrapper": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", - "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", - "dev": true, - "dependencies": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.0.0" - }, - "engines": { - "node": ">=10.19.0" - } - }, - "node_modules/https-proxy-agent": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", - "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", - "dependencies": { - "agent-base": "^7.0.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/husky": { - "version": "0.13.4", - "resolved": "https://registry.npmjs.org/husky/-/husky-0.13.4.tgz", - "integrity": "sha512-kafsK/82ndSVKJe1IoR/z7NKkiI2LYM6H+VNI/YlKOeoOXEJTpD65TNu05Zx7pzSZzLuAdMt4fHgpUsnd6HJ7A==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "chalk": "^1.1.3", - "find-parent-dir": "^0.3.0", - "is-ci": "^1.0.9", - "normalize-path": "^1.0.0" - } - }, - "node_modules/husky/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/husky/node_modules/ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/husky/node_modules/chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/husky/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/husky/node_modules/normalize-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-1.0.0.tgz", - "integrity": "sha512-7WyT0w8jhpDStXRq5836AMmihQwq2nrUVQrgjvUo/p/NZf9uy/MeJ246lBJVmWuYXMlJuG9BNZHF0hWjfTbQUA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/husky/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/husky/node_modules/supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/icss-utils": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", - "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", - "dev": true, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", - "dev": true - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/import-local": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", - "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", - "dev": true, - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o= sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" - }, - "node_modules/innosetup": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/innosetup/-/innosetup-6.0.5.tgz", - "integrity": "sha512-XRvidEN0dcxe7NrGXBjl/clfNRfmyakSDtgKaJgvZ3ciKE5ArQOVGqUJcLyPhllqHhMzYGpbUF3ZTZvtKVDP2g==", - "dev": true, - "bin": { - "innosetup-compiler": "lib/iscc" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY= sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ip-address": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", - "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", - "dependencies": { - "jsbn": "1.1.0", - "sprintf-js": "^1.1.3" - }, - "engines": { - "node": ">= 12" - } - }, - "node_modules/is-absolute": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", - "dev": true, - "dependencies": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "deprecated": "Please upgrade to v1.0.1", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "node_modules/is-callable": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", - "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-ci": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz", - "integrity": "sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg==", - "dev": true, - "dependencies": { - "ci-info": "^1.5.0" - }, - "bin": { - "is-ci": "bin.js" - } - }, - "node_modules/is-core-module": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", - "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "deprecated": "Please upgrade to v1.0.1", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-deflate": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-deflate/-/is-deflate-1.0.0.tgz", - "integrity": "sha512-YDoFpuZWu1VRXlsnlYMzKyVRITXj7Ej/V9gXQ2/pAe7X1J7M/RNOqaIYi6qUn+B7nGyB9pDXrv02dsB58d2ZAQ==", - "dev": true - }, - "node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-descriptor/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-extendable/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-generator-function": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.9.tgz", - "integrity": "sha512-ZJ34p1uvIfptHCN7sFTjGibB9/oBg17sHqzDLfuwhvmN/qLVvIQXRQ8licZQ35WJ8KuEQt/etnnzQFI9C9Ue/A==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-gzip": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-gzip/-/is-gzip-1.0.0.tgz", - "integrity": "sha512-rcfALRIb1YewtnksfRIHGcIY93QnK8BIQ/2c9yDYcG/Y6+vRoJuTWBmmSEbyLLYtXm7q35pHOHbZFQBaLrhlWQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-interactive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", - "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-negated-glob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", - "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI= sha512-czXVVn/QEmgvej1f50BZ648vUI+em0xqMq2Sn+QncCLN4zj1UAxlT+kw/6ggQTOaZPd1HqKQGEqbpQVtJucWug==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-plain-object": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", - "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-promise": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", - "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", - "dev": true - }, - "node_modules/is-regex": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", - "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-relative": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", - "dev": true, - "dependencies": { - "is-unc-path": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ= sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", - "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", - "dev": true, - "dependencies": { - "which-typed-array": "^1.1.11" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-unc-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", - "dev": true, - "dependencies": { - "unc-path-regex": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", - "dev": true - }, - "node_modules/is-valid-glob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", - "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao= sha512-AhiROmoEFDSsjx8hW+5sGwgKVIORcXnrlAx/R0ZSeaPw70Vw0CqkGBBhHGL58Uox2eXnU1AnvXJl1XlyedO5bA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dependencies": { - "is-docker": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8= sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.1.tgz", - "integrity": "sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA==", - "dev": true, - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^7.5.4" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", - "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", - "dev": true, - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^4.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-lib-report/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-report/node_modules/supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-reports": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", - "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", - "dev": true, - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istextorbinary": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-1.0.2.tgz", - "integrity": "sha1-rOGTVNGpoBc+/rEITOD4ewrX3s8= sha512-qZ5ptUDuni2pdCngFTraYa5kalQ0mX47Mhn08tT0DZZv/7yhX1eMb9lFtXVbWhFtgRtpLG/UdqVAjh9teO5x+w==", - "dev": true, - "dependencies": { - "binaryextensions": "~1.0.0", - "textextensions": "~1.0.0" - }, - "engines": { - "node": ">=0.4" - } - }, - "node_modules/jackspeak": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", - "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", - "dev": true, - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "node_modules/jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "dev": true, - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/jest-worker/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/js-base64": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.7.tgz", - "integrity": "sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==" - }, - "node_modules/js-beautify": { - "version": "1.8.9", - "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.8.9.tgz", - "integrity": "sha512-MwPmLywK9RSX0SPsUJjN7i+RQY9w/yC17Lbrq9ViEefpLRgqAR2BgrMN2AbifkUuhDV8tRauLhLda/9+bE0YQA==", - "dev": true, - "dependencies": { - "config-chain": "^1.1.12", - "editorconfig": "^0.15.2", - "glob": "^7.1.3", - "mkdirp": "~0.5.0", - "nopt": "~4.0.1" - }, - "bin": { - "css-beautify": "js/bin/css-beautify.js", - "html-beautify": "js/bin/html-beautify.js", - "js-beautify": "js/bin/js-beautify.js" - } - }, - "node_modules/js-beautify/node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/js-beautify/node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsbn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", - "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" - }, - "node_modules/jschardet": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/jschardet/-/jschardet-3.1.4.tgz", - "integrity": "sha512-/kmVISmrwVwtyYU40iQUOp3SUPk2dhNCMsZBQX0R1/jZ8maaXJ/oZIzUOiyOqcgtLnETFKYChbJ5iDC/eWmFHg==", - "license": "LGPL-2.1+", - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/jsdoc-type-pratt-parser": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.1.0.tgz", - "integrity": "sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==", - "dev": true, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true - }, - "node_modules/json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true, - "optional": true - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/jszip": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz", - "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", - "dev": true, - "dependencies": { - "lie": "~3.3.0", - "pako": "~1.0.2", - "readable-stream": "~2.3.6", - "setimmediate": "^1.0.5" - } - }, - "node_modules/jszip/node_modules/pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true - }, - "node_modules/jszip/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/just-debounce": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.0.0.tgz", - "integrity": "sha1-h/zPrv/AtozRnVX2cilD+SnqNeo= sha512-/QLqfspz7WJ+TPmzDp5WJOlm2r3j+/12rGo7dG5uwD9vGM5sWg8p251b7Us0p19JqjddJzcYOK2v6FN92nREmg==", - "dev": true - }, - "node_modules/just-extend": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", - "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", - "dev": true - }, - "node_modules/kerberos": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/kerberos/-/kerberos-2.1.1.tgz", - "integrity": "sha512-414s1G/qgK2T60cXnZsHbtRj8Ynjg0DBlQWeY99tkyqQ2e8vGgFHvxRdvjTlLHg/SxBA0zLQcGE6Pk6Dfq/BCA==", - "hasInstallScript": true, - "dependencies": { - "bindings": "^1.5.0", - "node-addon-api": "^6.1.0", - "prebuild-install": "^7.1.2" - }, - "engines": { - "node": ">=12.9.0" - } - }, - "node_modules/keygrip": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.1.0.tgz", - "integrity": "sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==", - "dev": true, - "dependencies": { - "tsscmp": "1.0.6" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/koa": { - "version": "2.15.3", - "resolved": "https://registry.npmjs.org/koa/-/koa-2.15.3.tgz", - "integrity": "sha512-j/8tY9j5t+GVMLeioLaxweJiKUayFhlGqNTzf2ZGwL0ZCQijd2RLHK0SLW5Tsko8YyyqCZC2cojIb0/s62qTAg==", - "dev": true, - "dependencies": { - "accepts": "^1.3.5", - "cache-content-type": "^1.0.0", - "content-disposition": "~0.5.2", - "content-type": "^1.0.4", - "cookies": "~0.9.0", - "debug": "^4.3.2", - "delegates": "^1.0.0", - "depd": "^2.0.0", - "destroy": "^1.0.4", - "encodeurl": "^1.0.2", - "escape-html": "^1.0.3", - "fresh": "~0.5.2", - "http-assert": "^1.3.0", - "http-errors": "^1.6.3", - "is-generator-function": "^1.0.7", - "koa-compose": "^4.1.0", - "koa-convert": "^2.0.0", - "on-finished": "^2.3.0", - "only": "~0.0.2", - "parseurl": "^1.3.2", - "statuses": "^1.5.0", - "type-is": "^1.6.16", - "vary": "^1.1.2" - }, - "engines": { - "node": "^4.8.4 || ^6.10.1 || ^7.10.1 || >= 8.1.4" - } - }, - "node_modules/koa-compose": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/koa-compose/-/koa-compose-4.1.0.tgz", - "integrity": "sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw==", - "dev": true - }, - "node_modules/koa-convert": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/koa-convert/-/koa-convert-2.0.0.tgz", - "integrity": "sha512-asOvN6bFlSnxewce2e/DK3p4tltyfC4VM7ZwuTuepI7dEQVcvpyFuBcEARu1+Hxg8DIwytce2n7jrZtRlPrARA==", - "dev": true, - "dependencies": { - "co": "^4.6.0", - "koa-compose": "^4.1.0" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/koa-morgan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/koa-morgan/-/koa-morgan-1.0.1.tgz", - "integrity": "sha1-CAUuDODYOdPEMXi5CluzQkvvH5k= sha512-JOUdCNlc21G50afBXfErUrr1RKymbgzlrO5KURY+wmDG1Uvd2jmxUJcHgylb/mYXy2SjiNZyYim/ptUBGsIi3A==", - "dev": true, - "dependencies": { - "morgan": "^1.6.1" - } - }, - "node_modules/koa-mount": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/koa-mount/-/koa-mount-4.0.0.tgz", - "integrity": "sha512-rm71jaA/P+6HeCpoRhmCv8KVBIi0tfGuO/dMKicbQnQW/YJntJ6MnnspkodoA4QstMVEZArsCphmd0bJEtoMjQ==", - "dev": true, - "dependencies": { - "debug": "^4.0.1", - "koa-compose": "^4.1.0" - }, - "engines": { - "node": ">= 7.6.0" - } - }, - "node_modules/koa-send": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/koa-send/-/koa-send-5.0.1.tgz", - "integrity": "sha512-tmcyQ/wXXuxpDxyNXv5yNNkdAMdFRqwtegBXUaowiQzUKqJehttS0x2j0eOZDQAyloAth5w6wwBImnFzkUz3pQ==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "http-errors": "^1.7.3", - "resolve-path": "^1.4.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/koa-send/node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/koa-send/node_modules/http-errors": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", - "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", - "dev": true, - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/koa-send/node_modules/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/koa-static": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/koa-static/-/koa-static-5.0.0.tgz", - "integrity": "sha512-UqyYyH5YEXaJrf9S8E23GoJFQZXkBVJ9zYYMPGz919MSX1KuvAcycIuS0ci150HCoPf4XQVhQ84Qf8xRPWxFaQ==", - "dev": true, - "dependencies": { - "debug": "^3.1.0", - "koa-send": "^5.0.0" - }, - "engines": { - "node": ">= 7.6.0" - } - }, - "node_modules/koa-static/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/koa/node_modules/http-errors": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", - "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", - "dev": true, - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/koa/node_modules/http-errors/node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/koa/node_modules/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/last-run": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz", - "integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls= sha512-U/VxvpX4N/rFvPzr3qG5EtLKEnNI0emvIQB3/ecEwv+8GHaUKbIB8vxv1Oai5FAF0d0r7LXHhLLe5K/yChm5GQ==", - "dev": true, - "dependencies": { - "default-resolution": "^2.0.0", - "es6-weak-map": "^2.0.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/lazy.js": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/lazy.js/-/lazy.js-0.4.3.tgz", - "integrity": "sha1-h/Z6B602VVEh5P/xUg3zG+Znhtg= sha512-kHcnVaCZzhv6P+YgC4iRZFw62+biYIcBYU8qqKzJysC7cdKwPgb3WRtcBPyINTSLZwsjyFdBtd97sHbkseTZKw==", - "dev": true - }, - "node_modules/lazystream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", - "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ= sha512-/330KFbmC/zKdtZoVDRwvkJ8snrJyBPfoZ39zsJl2O24HOE1CTNiEbeZmHXmjBVxTSSv7JlJEXPYhU83DhA2yg==", - "dev": true, - "dependencies": { - "readable-stream": "^2.0.5" - }, - "engines": { - "node": ">= 0.6.3" - } - }, - "node_modules/lazystream/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==", - "dev": true, - "dependencies": { - "invert-kv": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/lead": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", - "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI= sha512-IpSVCk9AYvLHo5ctcIXxOBpMWUe+4TKN3VPWAKUbJikkmsGp0VrSM8IttVc32D6J4WUsiPE6aEFRNmIoF/gdow==", - "dev": true, - "dependencies": { - "flush-write-stream": "^1.0.2" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/lie": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", - "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", - "dev": true, - "dependencies": { - "immediate": "~3.0.5" - } - }, - "node_modules/liftoff": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz", - "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==", - "dev": true, - "dependencies": { - "extend": "^3.0.0", - "findup-sync": "^3.0.0", - "fined": "^1.0.1", - "flagged-respawn": "^1.0.0", - "is-plain-object": "^2.0.4", - "object.map": "^1.0.0", - "rechoir": "^0.6.2", - "resolve": "^1.1.7" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/liftoff/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/lilconfig": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz", - "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/antonk52" - } - }, - "node_modules/linkify-it": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", - "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", - "dev": true, - "dependencies": { - "uc.micro": "^2.0.0" - } - }, - "node_modules/load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs= sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/loader-runner": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.2.0.tgz", - "integrity": "sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==", - "dev": true, - "engines": { - "node": ">=6.11.5" - } - }, - "node_modules/loader-utils": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", - "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", - "dev": true, - "dependencies": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - }, - "engines": { - "node": ">=8.9.0" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/lodash.camelcase": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", - "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY= sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", - "dev": true - }, - "node_modules/lodash.clone": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-4.5.0.tgz", - "integrity": "sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y= sha512-GhrVeweiTD6uTmmn5hV/lzgCQhccwReIVRLHp7LT4SopOjqEZ5BbX8b5WWEtAKasjmy8hR7ZPwsYlxRCku5odg==", - "dev": true - }, - "node_modules/lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", - "dev": true - }, - "node_modules/lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", - "dev": true - }, - "node_modules/lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", - "dev": true, - "license": "MIT" - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true - }, - "node_modules/lodash.some": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.some/-/lodash.some-4.6.0.tgz", - "integrity": "sha1-G7nzFO9ri63tE7VJFpsqlF62jk0= sha512-j7MJE+TuT51q9ggt4fSgVqro163BEFjAt3u97IqU+JA2DkWl80nFTrowzLpZ/BnpN7rrl0JA/593NAdd8p/scQ==", - "dev": true - }, - "node_modules/lodash.uniq": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "dependencies": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "node_modules/lru-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", - "integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM= sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", - "dev": true, - "dependencies": { - "es5-ext": "~0.10.2" - } - }, - "node_modules/make-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", - "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", - "dev": true, - "dependencies": { - "semver": "^7.5.3" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, - "node_modules/make-iterator": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", - "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/make-iterator/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/map-stream": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz", - "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ= sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==", - "dev": true - }, - "node_modules/map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==", - "dev": true, - "dependencies": { - "object-visit": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/markdown-it": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", - "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1", - "entities": "^4.4.0", - "linkify-it": "^5.0.0", - "mdurl": "^2.0.0", - "punycode.js": "^2.3.1", - "uc.micro": "^2.1.0" - }, - "bin": { - "markdown-it": "bin/markdown-it.mjs" - } - }, - "node_modules/matchdep": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz", - "integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4= sha512-LFgVbaHIHMqCRuCZyfCtUOq9/Lnzhi7Z0KFUE2fhD54+JN2jLh3hC02RLkqauJ3U4soU6H1J3tfj/Byk7GoEjA==", - "dev": true, - "dependencies": { - "findup-sync": "^2.0.0", - "micromatch": "^3.0.4", - "resolve": "^1.4.0", - "stack-trace": "0.0.10" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/matchdep/node_modules/braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "dependencies": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/braces/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", - "dev": true, - "dependencies": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/fill-range/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/findup-sync": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", - "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw= sha512-vs+3unmJT45eczmcAZ6zMJtxN3l/QXeccaXQx5cu/MeJMhewVfoWZqibRkOxPnmoR59+Zy5hjabfQc6JLSah4g==", - "dev": true, - "dependencies": { - "detect-file": "^1.0.0", - "is-glob": "^3.1.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/matchdep/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/is-number/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matchdep/node_modules/to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", - "dev": true, - "dependencies": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/matcher": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz", - "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==", - "dev": true, - "optional": true, - "dependencies": { - "escape-string-regexp": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/md5": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", - "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==", - "dev": true, - "dependencies": { - "charenc": "0.0.2", - "crypt": "0.0.2", - "is-buffer": "~1.1.6" - } - }, - "node_modules/mdn-data": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", - "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", - "dev": true - }, - "node_modules/mdurl": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", - "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", - "dev": true - }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/memoizee": { - "version": "0.4.15", - "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", - "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", - "dev": true, - "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.53", - "es6-weak-map": "^2.0.3", - "event-emitter": "^0.3.5", - "is-promise": "^2.2.2", - "lru-queue": "^0.1.0", - "next-tick": "^1.1.0", - "timers-ext": "^0.1.7" - } - }, - "node_modules/memory-fs": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz", - "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==", - "dev": true, - "dependencies": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - }, - "engines": { - "node": ">=4.3.0 <5.0.0 || >=5.10" - } - }, - "node_modules/memory-fs/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/memorystream": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", - "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI= sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", - "dev": true, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/merge-options": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-1.0.1.tgz", - "integrity": "sha512-iuPV41VWKWBIOpBsjoxjDZw8/GbSfZ2mk7N1453bwMrfzdrIk7EzBd+8UVR6rkw67th7xnk9Dytl3J+lHPdxvg==", - "dev": true, - "dependencies": { - "is-plain-obj": "^1.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/mime-db": { - "version": "1.45.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz", - "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.28", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz", - "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==", - "dev": true, - "dependencies": { - "mime-db": "1.45.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/minipass": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", - "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/minizlib/node_modules/minipass": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", - "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minizlib/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "node_modules/mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", - "dev": true, - "dependencies": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" - }, - "node_modules/mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", - "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", - "dev": true, - "dependencies": { - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.3", - "debug": "4.3.4", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.2.0", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "5.0.1", - "ms": "2.1.3", - "nanoid": "3.3.3", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "workerpool": "6.2.1", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha.js" - }, - "engines": { - "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" - } - }, - "node_modules/mocha-junit-reporter": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/mocha-junit-reporter/-/mocha-junit-reporter-2.2.1.tgz", - "integrity": "sha512-iDn2tlKHn8Vh8o4nCzcUVW4q7iXp7cC4EB78N0cDHIobLymyHNwe0XG8HEHHjc3hJlXm0Vy6zcrxaIhnI2fWmw==", - "dev": true, - "dependencies": { - "debug": "^4.3.4", - "md5": "^2.3.0", - "mkdirp": "^3.0.0", - "strip-ansi": "^6.0.1", - "xml": "^1.0.1" - }, - "peerDependencies": { - "mocha": ">=2.2.5" - } - }, - "node_modules/mocha-junit-reporter/node_modules/mkdirp": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", - "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", - "dev": true, - "bin": { - "mkdirp": "dist/cjs/src/bin.js" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/mocha-multi-reporters": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/mocha-multi-reporters/-/mocha-multi-reporters-1.5.1.tgz", - "integrity": "sha512-Yb4QJOaGLIcmB0VY7Wif5AjvLMUFAdV57D2TWEva1Y0kU/3LjKpeRVmlMIfuO1SVbauve459kgtIizADqxMWPg==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "lodash": "^4.17.15" - }, - "engines": { - "node": ">=6.0.0" - }, - "peerDependencies": { - "mocha": ">=3.1.2" - } - }, - "node_modules/mocha/node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/mocha/node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "node_modules/mocha/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/mocha/node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/mocha/node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/mocha/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/mocha/node_modules/minimatch": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", - "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mocha/node_modules/minimatch/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/mocha/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/mocha/node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mocha/node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/morgan": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", - "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", - "dev": true, - "dependencies": { - "basic-auth": "~2.0.1", - "debug": "2.6.9", - "depd": "~2.0.0", - "on-finished": "~2.3.0", - "on-headers": "~1.0.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/morgan/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/morgan/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/morgan/node_modules/on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", - "dev": true, - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/multimatch": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz", - "integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis= sha512-0mzK8ymiWdehTBiJh0vClAzGyQbdtyWqzSVx//EK4N/D+599RFlGfTAsKw2zMSABtDG9C6Ul2+t8f2Lbdjf5mA==", - "dev": true, - "dependencies": { - "array-differ": "^1.0.0", - "array-union": "^1.0.1", - "arrify": "^1.0.0", - "minimatch": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/multimatch/node_modules/array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==", - "dev": true, - "dependencies": { - "array-uniq": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/mute-stdout": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz", - "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/nan": { - "version": "2.14.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz", - "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==", - "dev": true, - "optional": true - }, - "node_modules/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/nanomatch/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/napi-build-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" - }, - "node_modules/native-is-elevated": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/native-is-elevated/-/native-is-elevated-0.7.0.tgz", - "integrity": "sha512-tp8hUqK7vexBiyIWKMvmRxdG6kqUtO+3eay9iB0i16NYgvCqE5wMe1Y0guHilpkmRgvVXEWNW4et1+qqcwpLBA==", - "hasInstallScript": true - }, - "node_modules/native-keymap": { - "version": "3.3.5", - "resolved": "https://registry.npmjs.org/native-keymap/-/native-keymap-3.3.5.tgz", - "integrity": "sha512-7XDOLPNX1FnUFC/cX3cioBz2M+dO212ai9DuwpfKFzkPu3xTmEzOm5xewOMLXE4V9YoRhNPxvq1H2YpPWDgSsg==", - "hasInstallScript": true - }, - "node_modules/native-watchdog": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/native-watchdog/-/native-watchdog-1.4.2.tgz", - "integrity": "sha512-iT3Uj6FFdrW5vHbQ/ybiznLus9oiUoMJ8A8nyugXv9rV3EBhIodmGs+mztrwQyyBc+PB5/CrskAH/WxaUVRRSQ==", - "hasInstallScript": true - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "node_modules/negotiator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "node_modules/next-tick": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", - "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", - "dev": true - }, - "node_modules/nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "node_modules/nise": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.0.tgz", - "integrity": "sha512-W5WlHu+wvo3PaKLsJJkgPup2LrsXCcm7AWwyNZkUnn5rwPkuPBi3Iwk5SQtN0mv+K65k7nKKjwNQ30wg3wLAQQ==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.7.0", - "@sinonjs/fake-timers": "^7.0.4", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" - } - }, - "node_modules/nise/node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", - "dev": true - }, - "node_modules/nise/node_modules/path-to-regexp": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.9.0.tgz", - "integrity": "sha512-xIp7/apCFJuUHdDLWe8O1HIkb0kQrOMb/0u6FXQjemHn/ii5LrIzU6bdECnsiTF/GjZkMEKg1xdiZwNqDYlZ6g==", - "dev": true, - "dependencies": { - "isarray": "0.0.1" - } - }, - "node_modules/node-abi": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.8.0.tgz", - "integrity": "sha512-tzua9qWWi7iW4I42vUPKM+SfaF0vQSLAm4yO5J83mSwB7GeoWrDKC/K+8YCnYNwqP5duwazbw2X9l4m8SC2cUw==", - "dependencies": { - "semver": "^7.3.5" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/node-addon-api": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.0.tgz", - "integrity": "sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g==", - "license": "MIT", - "engines": { - "node": "^16 || ^18 || >= 20" - } - }, - "node_modules/node-fetch": { - "version": "2.6.8", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.8.tgz", - "integrity": "sha512-RZ6dBYuj8dRSfxpUSu+NsdF1dpPpluJxwOp+6IoDp/sH2QNDSvurYsAa+F1WxY2RjA1iP93xhcsUoYbF2XBqVg==", - "dev": true, - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/node-gyp-build": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.1.tgz", - "integrity": "sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==", - "bin": { - "node-gyp-build": "bin.js", - "node-gyp-build-optional": "optional.js", - "node-gyp-build-test": "build-test.js" - } - }, - "node_modules/node-html-markdown": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/node-html-markdown/-/node-html-markdown-1.3.0.tgz", - "integrity": "sha512-OeFi3QwC/cPjvVKZ114tzzu+YoR+v9UXW5RwSXGUqGb0qCl0DvP406tzdL7SFn8pZrMyzXoisfG2zcuF9+zw4g==", - "dev": true, - "dependencies": { - "node-html-parser": "^6.1.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/node-html-parser": { - "version": "6.1.13", - "resolved": "https://registry.npmjs.org/node-html-parser/-/node-html-parser-6.1.13.tgz", - "integrity": "sha512-qIsTMOY4C/dAa5Q5vsobRpOOvPfC4pB61UVW2uSwZNUp0QU/jCekTal1vMmbO0DgdHeLUJpv/ARmDqErVxA3Sg==", - "dev": true, - "dependencies": { - "css-select": "^5.1.0", - "he": "1.2.0" - } - }, - "node_modules/node-pty": { - "version": "1.1.0-beta22", - "resolved": "https://registry.npmjs.org/node-pty/-/node-pty-1.1.0-beta22.tgz", - "integrity": "sha512-CpT334H2oAIULlENvd9U+VBW4ZL+G3clOnpXYzUIurlPCLnl/9xen/KDHBLRcwhZuWcHxIrsCxR1TDCdVDtr0w==", - "hasInstallScript": true, - "dependencies": { - "node-addon-api": "^7.1.0" - } - }, - "node_modules/node-releases": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", - "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", - "dev": true, - "license": "MIT" - }, - "node_modules/nopt": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= sha512-+5XZFpQZEY0cg5JaxLwGxDlKNKYxuXwGt8/Oi3UXm5/4ymrJve9d2CURituxv3rSrVCGZj4m1U1JlHTdcKt2Ng==", - "dev": true, - "dependencies": { - "abbrev": "1", - "osenv": "^0.1.4" - }, - "bin": { - "nopt": "bin/nopt.js" - } - }, - "node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/normalize-package-data/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/normalize-url": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", - "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/now-and-later": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", - "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", - "dev": true, - "dependencies": { - "once": "^1.3.2" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/npm-run-all": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", - "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "chalk": "^2.4.1", - "cross-spawn": "^6.0.5", - "memorystream": "^0.3.1", - "minimatch": "^3.0.4", - "pidtree": "^0.3.0", - "read-pkg": "^3.0.0", - "shell-quote": "^1.6.1", - "string.prototype.padend": "^3.0.0" - }, - "bin": { - "npm-run-all": "bin/npm-run-all/index.js", - "run-p": "bin/run-p/index.js", - "run-s": "bin/run-s/index.js" - }, - "engines": { - "node": ">= 4" - } - }, - "node_modules/npm-run-all/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/npm-run-all/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/npm-run-all/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/npm-run-all/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/npm-run-all/node_modules/cross-spawn": { - "version": "6.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz", - "integrity": "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==", - "dev": true, - "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "engines": { - "node": ">=4.8" - } - }, - "node_modules/npm-run-all/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/npm-run-all/node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/npm-run-all/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/npm-run-all/node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", - "dev": true, - "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-run-all/node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-run-all/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/npm-run-all/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/nth-check": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz", - "integrity": "sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0" - }, - "funding": { - "url": "https://github.com/fb55/nth-check?sponsor=1" - } - }, - "node_modules/number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw= sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==", - "dev": true, - "dependencies": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dev": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "deprecated": "Please upgrade to v0.1.7", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "deprecated": "Please upgrade to v0.1.5", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-copy/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-inspect": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", - "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==", - "dev": true, - "dependencies": { - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.defaults": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", - "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8= sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", - "dev": true, - "dependencies": { - "array-each": "^1.0.1", - "array-slice": "^1.0.0", - "for-own": "^1.0.0", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object.map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", - "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc= sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", - "dev": true, - "dependencies": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object.reduce": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz", - "integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60= sha512-naLhxxpUESbNkRqc35oQ2scZSJueHGQNUfMW/0U37IgN6tE2dgDWg3whf+NEliy3F/QysrO48XKUz/nGPe+AQw==", - "dev": true, - "dependencies": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dev": true, - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E= sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/only": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/only/-/only-0.0.2.tgz", - "integrity": "sha1-Kv3oTQPlC5qO3EROMGEKcCle37Q= sha512-Fvw+Jemq5fjjyWz6CpKx6w9s7xxqo3+JCyM0WXWeCSOboZ8ABkyvP8ID4CZuChA/wxSx+XSJmdOm8rGVyJ1hdQ==", - "dev": true - }, - "node_modules/open": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-8.4.2.tgz", - "integrity": "sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==", - "dependencies": { - "define-lazy-prop": "^2.0.0", - "is-docker": "^2.1.1", - "is-wsl": "^2.2.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/opentype.js": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/opentype.js/-/opentype.js-0.8.0.tgz", - "integrity": "sha512-FQHR4oGP+a0m/f6yHoRpBOIbn/5ZWxKd4D/djHVJu8+KpBTYrJda0b7mLcgDEMWXE9xBCJm+qb0yv6FcvPjukg==", - "license": "MIT", - "dependencies": { - "tiny-inflate": "^1.0.2" - }, - "bin": { - "ot": "bin/ot" - } - }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/ora": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-7.0.1.tgz", - "integrity": "sha512-0TUxTiFJWv+JnjWm4o9yvuskpEJLXTcng8MJuKd+SzAzp2o+OP3HWqNhB4OdJRt1Vsd9/mR0oyaEYlOnL7XIRw==", - "dev": true, - "dependencies": { - "chalk": "^5.3.0", - "cli-cursor": "^4.0.0", - "cli-spinners": "^2.9.0", - "is-interactive": "^2.0.0", - "is-unicode-supported": "^1.3.0", - "log-symbols": "^5.1.0", - "stdin-discarder": "^0.1.0", - "string-width": "^6.1.0", - "strip-ansi": "^7.1.0" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ora/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/ora/node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "dev": true, - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/ora/node_modules/is-unicode-supported": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", - "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ora/node_modules/log-symbols": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-5.1.0.tgz", - "integrity": "sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==", - "dev": true, - "dependencies": { - "chalk": "^5.0.0", - "is-unicode-supported": "^1.1.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ora/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/ordered-read-streams": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", - "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4= sha512-Z87aSjx3r5c0ZB7bcJqIgIRX5bxR7A4aSzvIbaxd0oTkWBCOoKfuGHiKj60CHVUgg1Phm5yMZzBdt8XqRs73Mw==", - "dev": true, - "dependencies": { - "readable-stream": "^2.0.1" - } - }, - "node_modules/ordered-read-streams/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==", - "dev": true - }, - "node_modules/os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M= sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==", - "dev": true, - "dependencies": { - "lcid": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "deprecated": "This package is no longer supported.", - "dev": true, - "dependencies": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "node_modules/p-all": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-all/-/p-all-1.0.0.tgz", - "integrity": "sha1-k731OlWiOCH9+pi0F0qZv38x340= sha512-OtbznqfGjQT+i89LK9C9YPh1G8d6n8xgsJ8yRVXrx6PRXrlOthNJhP+dHxrPopty8fugYb1DodpwrzP7z0Mtvw==", - "dev": true, - "dependencies": { - "p-map": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/p-cancelable": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", - "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-map": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", - "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/package-json-from-dist": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", - "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", - "dev": true - }, - "node_modules/pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==", - "dev": true - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-filepath": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", - "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE= sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==", - "dev": true, - "dependencies": { - "is-absolute": "^1.0.0", - "map-cache": "^0.2.0", - "path-root": "^0.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/parse-imports": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/parse-imports/-/parse-imports-2.2.1.tgz", - "integrity": "sha512-OL/zLggRp8mFhKL0rNORUTR4yBYujK/uU+xZL+/0Rgm2QE4nLO9v8PzEweSJEbMGKmDRjJE4R3IMJlL2di4JeQ==", - "dev": true, - "dependencies": { - "es-module-lexer": "^1.5.3", - "slashes": "^3.0.12" - }, - "engines": { - "node": ">= 18" - } - }, - "node_modules/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", - "dev": true, - "dependencies": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/parse-node-version": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", - "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-browserify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", - "dev": true - }, - "node_modules/path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q==", - "dev": true - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18= sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/path-root": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", - "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc= sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", - "dev": true, - "dependencies": { - "path-root-regex": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-root-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", - "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0= sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "dev": true, - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.3.0.tgz", - "integrity": "sha512-CQl19J/g+Hbjbv4Y3mFNNXFEL/5t/KCg8POCuUqd4rMKjGG+j1ybER83hxV58zL+dFI1PTkt3GNFSHRt+d8qEQ==", - "dev": true, - "engines": { - "node": "14 || >=16.14" - } - }, - "node_modules/path-to-regexp": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", - "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/pause-stream": { - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", - "integrity": "sha1-/lo0sMvOErWqaitAPuLnO2AvFEU= sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==", - "dev": true, - "dependencies": { - "through": "~2.3" - } - }, - "node_modules/peek-stream": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/peek-stream/-/peek-stream-1.1.3.tgz", - "integrity": "sha512-FhJ+YbOSBb9/rIl2ZeE/QHEsWn7PqNYt8ARAY3kIgNGOk13g9FGyIY6JIl/xB/3TFRVoTv5as0l11weORrTekA==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "duplexify": "^3.5.0", - "through2": "^2.0.3" - } - }, - "node_modules/peek-stream/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/peek-stream/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA= sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==" - }, - "node_modules/picocolors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", - "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", - "dev": true, - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pidtree": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", - "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", - "dev": true, - "bin": { - "pidtree": "bin/pidtree.js" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA= sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o= sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", - "dev": true, - "dependencies": { - "pinkie": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/playwright": { - "version": "1.46.1", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.46.1.tgz", - "integrity": "sha512-oPcr1yqoXLCkgKtD5eNUPLiN40rYEM39odNpIb6VE6S7/15gJmA1NzVv6zJYusV0e7tzvkU/utBFNa/Kpxmwng==", - "dev": true, - "dependencies": { - "playwright-core": "1.46.1" - }, - "bin": { - "playwright": "cli.js" - }, - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "fsevents": "2.3.2" - } - }, - "node_modules/playwright-core": { - "version": "1.47.2", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.47.2.tgz", - "integrity": "sha512-3JvMfF+9LJfe16l7AbSmU555PaTl2tPyQsVInqm3id16pdDfvZ8TTZ/pyzmkbDrZTQefyzU7AIHlZqQnxpqHVQ==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "playwright-core": "cli.js" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/playwright/node_modules/playwright-core": { - "version": "1.46.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.46.1.tgz", - "integrity": "sha512-h9LqIQaAv+CYvWzsZ+h3RsrqCStkBHlgo6/TJlFst3cOTlLghBQlJwPOZKQJTKNaD3QIB7aAVQ+gfWbN3NXB7A==", - "dev": true, - "bin": { - "playwright-core": "cli.js" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/plist": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.5.tgz", - "integrity": "sha512-83vX4eYdQp3vP9SxuYgEM/G/pJQqLUz/V/xzPrzruLs7fz7jxGQ1msZ/mg1nwZxUSuOp4sb+/bEIbRrbzZRxDA==", - "dev": true, - "dependencies": { - "base64-js": "^1.5.1", - "xmlbuilder": "^9.0.7" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/plist/node_modules/xmlbuilder": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0= sha512-7YXTQc3P2l9+0rjaUbLwMKRhtmwg1M1eDf6nag7urC7pIPYLD9W/jmzQ4ptRSUbodw5S0jfoGTflLemQibSpeQ==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/plugin-error": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", - "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", - "dev": true, - "dependencies": { - "ansi-colors": "^1.0.1", - "arr-diff": "^4.0.0", - "arr-union": "^3.1.0", - "extend-shallow": "^3.0.2" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/plugin-error/node_modules/ansi-colors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", - "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", - "dev": true, - "dependencies": { - "ansi-wrap": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/postcss": { - "version": "8.4.38", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", - "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "nanoid": "^3.3.7", - "picocolors": "^1.0.0", - "source-map-js": "^1.2.0" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, - "node_modules/postcss-calc": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-9.0.1.tgz", - "integrity": "sha512-TipgjGyzP5QzEhsOZUaIkeO5mKeMFpebWzRogWG/ysonUlnHcq5aJe0jOjpfzUU8PeSaBQnrE8ehR0QA5vs8PQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "postcss-selector-parser": "^6.0.11", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.2.2" - } - }, - "node_modules/postcss-colormin": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-6.1.0.tgz", - "integrity": "sha512-x9yX7DOxeMAR+BgGVnNSAxmAj98NX/YxEMNFP+SDCEeNLb2r3i6Hh1ksMsnW8Ub5SLCpbescQqn9YEbE9554Sw==", - "dev": true, - "license": "MIT", - "dependencies": { - "browserslist": "^4.23.0", - "caniuse-api": "^3.0.0", - "colord": "^2.9.3", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-convert-values": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-6.1.0.tgz", - "integrity": "sha512-zx8IwP/ts9WvUM6NkVSkiU902QZL1bwPhaVaLynPtCsOTqp+ZKbNi+s6XJg3rfqpKGA/oc7Oxk5t8pOQJcwl/w==", - "dev": true, - "license": "MIT", - "dependencies": { - "browserslist": "^4.23.0", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-discard-comments": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-6.0.2.tgz", - "integrity": "sha512-65w/uIqhSBBfQmYnG92FO1mWZjJ4GL5b8atm5Yw2UgrwD7HiNiSSNwJor1eCFGzUgYnN/iIknhNRVqjrrpuglw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-discard-duplicates": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-6.0.3.tgz", - "integrity": "sha512-+JA0DCvc5XvFAxwx6f/e68gQu/7Z9ud584VLmcgto28eB8FqSFZwtrLwB5Kcp70eIoWP/HXqz4wpo8rD8gpsTw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-discard-empty": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-6.0.3.tgz", - "integrity": "sha512-znyno9cHKQsK6PtxL5D19Fj9uwSzC2mB74cpT66fhgOadEUPyXFkbgwm5tvc3bt3NAy8ltE5MrghxovZRVnOjQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-discard-overridden": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-6.0.2.tgz", - "integrity": "sha512-j87xzI4LUggC5zND7KdjsI25APtyMuynXZSujByMaav2roV6OZX+8AaCUcZSWqckZpjAjRyFDdpqybgjFO0HJQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-merge-longhand": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-6.0.5.tgz", - "integrity": "sha512-5LOiordeTfi64QhICp07nzzuTDjNSO8g5Ksdibt44d+uvIIAE1oZdRn8y/W5ZtYgRH/lnLDlvi9F8btZcVzu3w==", - "dev": true, - "license": "MIT", - "dependencies": { - "postcss-value-parser": "^4.2.0", - "stylehacks": "^6.1.1" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-merge-rules": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-6.1.1.tgz", - "integrity": "sha512-KOdWF0gju31AQPZiD+2Ar9Qjowz1LTChSjFFbS+e2sFgc4uHOp3ZvVX4sNeTlk0w2O31ecFGgrFzhO0RSWbWwQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "browserslist": "^4.23.0", - "caniuse-api": "^3.0.0", - "cssnano-utils": "^4.0.2", - "postcss-selector-parser": "^6.0.16" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-minify-font-values": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-6.1.0.tgz", - "integrity": "sha512-gklfI/n+9rTh8nYaSJXlCo3nOKqMNkxuGpTn/Qm0gstL3ywTr9/WRKznE+oy6fvfolH6dF+QM4nCo8yPLdvGJg==", - "dev": true, - "license": "MIT", - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-minify-gradients": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-6.0.3.tgz", - "integrity": "sha512-4KXAHrYlzF0Rr7uc4VrfwDJ2ajrtNEpNEuLxFgwkhFZ56/7gaE4Nr49nLsQDZyUe+ds+kEhf+YAUolJiYXF8+Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "colord": "^2.9.3", - "cssnano-utils": "^4.0.2", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-minify-params": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-6.1.0.tgz", - "integrity": "sha512-bmSKnDtyyE8ujHQK0RQJDIKhQ20Jq1LYiez54WiaOoBtcSuflfK3Nm596LvbtlFcpipMjgClQGyGr7GAs+H1uA==", - "dev": true, - "license": "MIT", - "dependencies": { - "browserslist": "^4.23.0", - "cssnano-utils": "^4.0.2", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-minify-selectors": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-6.0.4.tgz", - "integrity": "sha512-L8dZSwNLgK7pjTto9PzWRoMbnLq5vsZSTu8+j1P/2GB8qdtGQfn+K1uSvFgYvgh83cbyxT5m43ZZhUMTJDSClQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "postcss-selector-parser": "^6.0.16" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-modules-extract-imports": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", - "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", - "dev": true, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-modules-local-by-default": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.4.tgz", - "integrity": "sha512-L4QzMnOdVwRm1Qb8m4x8jsZzKAaPAgrUF1r/hjDR2Xj7R+8Zsf97jAlSQzWtKx5YNiNGN8QxmPFIc/sh+RQl+Q==", - "dev": true, - "dependencies": { - "icss-utils": "^5.0.0", - "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.1.0" - }, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-modules-scope": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.1.1.tgz", - "integrity": "sha512-uZgqzdTleelWjzJY+Fhti6F3C9iF1JR/dODLs/JDefozYcKTBCdD8BIl6nNPbTbcLnGrk56hzwZC2DaGNvYjzA==", - "dev": true, - "dependencies": { - "postcss-selector-parser": "^6.0.4" - }, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-modules-values": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", - "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", - "dev": true, - "dependencies": { - "icss-utils": "^5.0.0" - }, - "engines": { - "node": "^10 || ^12 || >= 14" - }, - "peerDependencies": { - "postcss": "^8.1.0" - } - }, - "node_modules/postcss-nesting": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-12.0.2.tgz", - "integrity": "sha512-63PpJHSeNs93S3ZUIyi+7kKx4JqOIEJ6QYtG3x+0qA4J03+4n0iwsyA1GAHyWxsHYljQS4/4ZK1o2sMi70b5wQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/csstools" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/csstools" - } - ], - "dependencies": { - "@csstools/selector-specificity": "^3.0.1", - "postcss-selector-parser": "^6.0.13" - }, - "engines": { - "node": "^14 || ^16 || >=18" - }, - "peerDependencies": { - "postcss": "^8.4" - } - }, - "node_modules/postcss-normalize-charset": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-6.0.2.tgz", - "integrity": "sha512-a8N9czmdnrjPHa3DeFlwqst5eaL5W8jYu3EBbTTkI5FHkfMhFZh1EGbku6jhHhIzTA6tquI2P42NtZ59M/H/kQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-normalize-display-values": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-6.0.2.tgz", - "integrity": "sha512-8H04Mxsb82ON/aAkPeq8kcBbAtI5Q2a64X/mnRRfPXBq7XeogoQvReqxEfc0B4WPq1KimjezNC8flUtC3Qz6jg==", - "dev": true, - "license": "MIT", - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-normalize-positions": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-6.0.2.tgz", - "integrity": "sha512-/JFzI441OAB9O7VnLA+RtSNZvQ0NCFZDOtp6QPFo1iIyawyXg0YI3CYM9HBy1WvwCRHnPep/BvI1+dGPKoXx/Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-normalize-repeat-style": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-6.0.2.tgz", - "integrity": "sha512-YdCgsfHkJ2jEXwR4RR3Tm/iOxSfdRt7jplS6XRh9Js9PyCR/aka/FCb6TuHT2U8gQubbm/mPmF6L7FY9d79VwQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-normalize-string": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-6.0.2.tgz", - "integrity": "sha512-vQZIivlxlfqqMp4L9PZsFE4YUkWniziKjQWUtsxUiVsSSPelQydwS8Wwcuw0+83ZjPWNTl02oxlIvXsmmG+CiQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-normalize-timing-functions": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-6.0.2.tgz", - "integrity": "sha512-a+YrtMox4TBtId/AEwbA03VcJgtyW4dGBizPl7e88cTFULYsprgHWTbfyjSLyHeBcK/Q9JhXkt2ZXiwaVHoMzA==", - "dev": true, - "license": "MIT", - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-normalize-unicode": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-6.1.0.tgz", - "integrity": "sha512-QVC5TQHsVj33otj8/JD869Ndr5Xcc/+fwRh4HAsFsAeygQQXm+0PySrKbr/8tkDKzW+EVT3QkqZMfFrGiossDg==", - "dev": true, - "license": "MIT", - "dependencies": { - "browserslist": "^4.23.0", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-normalize-url": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-6.0.2.tgz", - "integrity": "sha512-kVNcWhCeKAzZ8B4pv/DnrU1wNh458zBNp8dh4y5hhxih5RZQ12QWMuQrDgPRw3LRl8mN9vOVfHl7uhvHYMoXsQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-normalize-whitespace": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-6.0.2.tgz", - "integrity": "sha512-sXZ2Nj1icbJOKmdjXVT9pnyHQKiSAyuNQHSgRCUgThn2388Y9cGVDR+E9J9iAYbSbLHI+UUwLVl1Wzco/zgv0Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-ordered-values": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-6.0.2.tgz", - "integrity": "sha512-VRZSOB+JU32RsEAQrO94QPkClGPKJEL/Z9PCBImXMhIeK5KAYo6slP/hBYlLgrCjFxyqvn5VC81tycFEDBLG1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "cssnano-utils": "^4.0.2", - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-reduce-initial": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-6.1.0.tgz", - "integrity": "sha512-RarLgBK/CrL1qZags04oKbVbrrVK2wcxhvta3GCxrZO4zveibqbRPmm2VI8sSgCXwoUHEliRSbOfpR0b/VIoiw==", - "dev": true, - "license": "MIT", - "dependencies": { - "browserslist": "^4.23.0", - "caniuse-api": "^3.0.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-reduce-transforms": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-6.0.2.tgz", - "integrity": "sha512-sB+Ya++3Xj1WaT9+5LOOdirAxP7dJZms3GRcYheSPi1PiTMigsxHAdkrbItHxwYHr4kt1zL7mmcHstgMYT+aiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-selector-parser": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", - "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", - "dev": true, - "license": "MIT", - "dependencies": { - "cssesc": "^3.0.0", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/postcss-svgo": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-6.0.3.tgz", - "integrity": "sha512-dlrahRmxP22bX6iKEjOM+c8/1p+81asjKT+V5lrgOH944ryx/OHpclnIbGsKVd3uWOXFLYJwCVf0eEkJGvO96g==", - "dev": true, - "license": "MIT", - "dependencies": { - "postcss-value-parser": "^4.2.0", - "svgo": "^3.2.0" - }, - "engines": { - "node": "^14 || ^16 || >= 18" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-svgo/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10" - } - }, - "node_modules/postcss-svgo/node_modules/css-tree": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", - "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", - "dev": true, - "license": "MIT", - "dependencies": { - "mdn-data": "2.0.30", - "source-map-js": "^1.0.1" - }, - "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" - } - }, - "node_modules/postcss-svgo/node_modules/csso": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/csso/-/csso-5.0.5.tgz", - "integrity": "sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "css-tree": "~2.2.0" - }, - "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/postcss-svgo/node_modules/csso/node_modules/css-tree": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz", - "integrity": "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==", - "dev": true, - "license": "MIT", - "dependencies": { - "mdn-data": "2.0.28", - "source-map-js": "^1.0.1" - }, - "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0", - "npm": ">=7.0.0" - } - }, - "node_modules/postcss-svgo/node_modules/csso/node_modules/mdn-data": { - "version": "2.0.28", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.28.tgz", - "integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==", - "dev": true, - "license": "CC0-1.0" - }, - "node_modules/postcss-svgo/node_modules/mdn-data": { - "version": "2.0.30", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", - "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", - "dev": true, - "license": "CC0-1.0" - }, - "node_modules/postcss-svgo/node_modules/svgo": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-3.3.2.tgz", - "integrity": "sha512-OoohrmuUlBs8B8o6MB2Aevn+pRIH9zDALSR+6hhqVfa6fRwG/Qw9VUMSMW9VNg2CFc/MTIfabtdOVl9ODIJjpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@trysound/sax": "0.2.0", - "commander": "^7.2.0", - "css-select": "^5.1.0", - "css-tree": "^2.3.1", - "css-what": "^6.1.0", - "csso": "^5.0.5", - "picocolors": "^1.0.0" - }, - "bin": { - "svgo": "bin/svgo" - }, - "engines": { - "node": ">=14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/svgo" - } - }, - "node_modules/postcss-unique-selectors": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-6.0.4.tgz", - "integrity": "sha512-K38OCaIrO8+PzpArzkLKB42dSARtC2tmG6PvD4b1o1Q2E9Os8jzfWFfSy/rixsHwohtsDdFtAWGjFVFUdwYaMg==", - "dev": true, - "license": "MIT", - "dependencies": { - "postcss-selector-parser": "^6.0.16" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/postcss-value-parser": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", - "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true - }, - "node_modules/postcss/node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/prebuild-install": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.2.tgz", - "integrity": "sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==", - "dependencies": { - "detect-libc": "^2.0.0", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^1.0.1", - "node-abi": "^3.3.0", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^4.0.0", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - }, - "bin": { - "prebuild-install": "bin.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/prebuild-install/node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" - }, - "node_modules/prebuild-install/node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/prebuild-install/node_modules/tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "node_modules/prebuild-install/node_modules/tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/pretty-hrtime": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", - "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE= sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI= sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", - "dev": true, - "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "node_modules/progress": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", - "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74= sha512-UdA8mJ4weIkUBO224tIarHzuHs4HuYiJvsuGT7j/SPQiUJVjYvNDBIPa0hAorduOfjGohB/qHWRa/lrrWX/mXw==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/promise-stream-reader": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-stream-reader/-/promise-stream-reader-1.0.1.tgz", - "integrity": "sha512-Tnxit5trUjBAqqZCGWwjyxhmgMN4hGrtpW3Oc/tRI4bpm/O2+ej72BB08l6JBnGQgVDGCLvHFGjGgQS6vzhwXg==", - "license": "MIT", - "engines": { - "node": ">8.0.0" - } - }, - "node_modules/proto-list": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", - "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", - "dev": true - }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, - "node_modules/prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY= sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", - "dev": true - }, - "node_modules/pseudo-localization": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/pseudo-localization/-/pseudo-localization-2.4.0.tgz", - "integrity": "sha512-ISYMOKY8+f+PmiXMFw2y6KLY74LBrv/8ml/VjjoVEV2k+MS+OJZz7ydciK5ntJwxPrKQPTU1+oXq9Mx2b0zEzg==", - "dev": true, - "dependencies": { - "flat": "^5.0.2", - "get-stdin": "^7.0.0", - "typescript": "^4.7.4", - "yargs": "^17.2.1" - }, - "bin": { - "pseudo-localization": "bin/pseudo-localize" - } - }, - "node_modules/pseudo-localization/node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM= sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", - "dev": true - }, - "node_modules/psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "dev": true - }, - "node_modules/pump": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.2.tgz", - "integrity": "sha1-Oz7mUS+U8OV1U4wXmV+fFpkKXVE= sha512-0l9Rf87wCGXiNCxHxjixpBTPa0iLYFp6an+fwXp7Yz6Fxyhdo7YiBsV76yqzwajT/2+XjKdiCaCDVIcvyEHqCA==", - "dev": true, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", - "dev": true, - "dependencies": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - } - }, - "node_modules/pumpify/node_modules/pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "dev": true, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/punycode.js": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", - "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", - "dev": true - }, - "node_modules/queue": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/queue/-/queue-3.1.0.tgz", - "integrity": "sha1-bEnQHwCeIlZ4h4nyv/rGuLmZBYU= sha512-z3XqdkYJ/YVQuAAoAKLcePEk2BZDMZR2jv2hTrpQb0K5M0dUbiwADr48N1F63M4ChD/GwPc/LeaA9VC5dJFfTA==", - "dev": true, - "dependencies": { - "inherits": "~2.0.0" - } - }, - "node_modules/queue-tick": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", - "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==", - "dev": true - }, - "node_modules/quick-lru": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", - "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, - "node_modules/rc/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo= sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/rcedit": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/rcedit/-/rcedit-1.1.0.tgz", - "integrity": "sha512-JkXJ0IrUcdupLoIx6gE4YcFaMVSGtu7kQf4NJoDJUnfBZGuATmJ2Yal2v55KTltp+WV8dGr7A0RtOzx6jmtM6Q==", - "dev": true - }, - "node_modules/read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", - "dev": true, - "dependencies": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==", - "dev": true, - "dependencies": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/read-pkg-up/node_modules/find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", - "dev": true, - "dependencies": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/read-pkg-up/node_modules/load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/read-pkg-up/node_modules/parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", - "dev": true, - "dependencies": { - "error-ex": "^1.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/read-pkg-up/node_modules/path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", - "dev": true, - "dependencies": { - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/read-pkg-up/node_modules/path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/read-pkg-up/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/read-pkg-up/node_modules/read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", - "dev": true, - "dependencies": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/read-pkg-up/node_modules/strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==", - "dev": true, - "dependencies": { - "is-utf8": "^0.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/read-pkg/node_modules/path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "dependencies": { - "pify": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", - "dev": true, - "dependencies": { - "resolve": "^1.1.6" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", - "dev": true, - "dependencies": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/remove-bom-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", - "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5", - "is-utf8": "^0.2.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/remove-bom-stream": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", - "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM= sha512-wigO8/O08XHb8YPzpDDT+QmRANfW6vLqxfaXm1YXhnFf3AkSLyjfG3GEFg4McZkmgL7KvCj5u2KczkvSP6NfHA==", - "dev": true, - "dependencies": { - "remove-bom-buffer": "^3.0.0", - "safe-buffer": "^5.1.0", - "through2": "^2.0.3" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/remove-bom-stream/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/remove-bom-stream/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8= sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==", - "dev": true - }, - "node_modules/repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc= sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", - "dev": true, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/replace-ext": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-2.0.0.tgz", - "integrity": "sha512-UszKE5KVK6JvyD92nzMn9cDapSk6w/CaFZ96CnmDMUqH9oowfxF/ZjRITD25H4DnOQClLA4/j7jLGXXLVKxAug==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/replace-homedir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz", - "integrity": "sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw= sha512-CHPV/GAglbIB1tnQgaiysb8H2yCy8WQ7lcEwQ/eT+kLj0QHV8LnJW0zpqpE7RSkrMSRoa+EBoag86clf7WAgSg==", - "dev": true, - "dependencies": { - "homedir-polyfill": "^1.0.1", - "is-absolute": "^1.0.0", - "remove-trailing-separator": "^1.1.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/replacestream": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/replacestream/-/replacestream-4.0.3.tgz", - "integrity": "sha512-AC0FiLS352pBBiZhd4VXB1Ab/lh0lEgpP+GGvZqbQh8a5cmXVoTe5EX/YeTFArnp4SRGTHh1qCHu9lGs1qG8sA==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^1.0.3", - "object-assign": "^4.0.1", - "readable-stream": "^2.0.2" - } - }, - "node_modules/replacestream/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/replacestream/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I= sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "node_modules/requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "dev": true - }, - "node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-alpn": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", - "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", - "dev": true - }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-cwd/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-dir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M= sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", - "dev": true, - "dependencies": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/resolve-options": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", - "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE= sha512-NYDgziiroVeDC29xq7bp/CacZERYsA9bXYd1ZmcJlF3BcrZv5pTb4NG7SjdyKDnXZ84aC4vo2u6sNKIA1LCu/A==", - "dev": true, - "dependencies": { - "value-or-function": "^3.0.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/resolve-path": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/resolve-path/-/resolve-path-1.4.0.tgz", - "integrity": "sha1-xL2p9e+y/OZSR4c6s2u02DT+Fvc= sha512-i1xevIst/Qa+nA9olDxLWnLk8YZbi8R/7JPbCMcgyWaFR6bKWaexgJgEB5oc2PKMjYdrHynyz0NY+if+H98t1w==", - "dev": true, - "dependencies": { - "http-errors": "~1.6.2", - "path-is-absolute": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/resolve-path/node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/resolve-path/node_modules/http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", - "dev": true, - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/resolve-path/node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", - "dev": true - }, - "node_modules/resolve-path/node_modules/setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "dev": true - }, - "node_modules/resolve-path/node_modules/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==", - "deprecated": "https://github.com/lydell/resolve-url#deprecated", - "dev": true - }, - "node_modules/responselike": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", - "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", - "dev": true, - "dependencies": { - "lowercase-keys": "^2.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/restore-cursor": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", - "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", - "dev": true, - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/restore-cursor/node_modules/signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", - "dev": true - }, - "node_modules/ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/rimraf/node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/roarr": { - "version": "2.15.4", - "resolved": "https://registry.npmjs.org/roarr/-/roarr-2.15.4.tgz", - "integrity": "sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==", - "dev": true, - "optional": true, - "dependencies": { - "boolean": "^3.0.1", - "detect-node": "^2.0.4", - "globalthis": "^1.0.1", - "json-stringify-safe": "^5.0.1", - "semver-compare": "^1.0.0", - "sprintf-js": "^1.1.2" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/run-parallel": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.10.tgz", - "integrity": "sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "node_modules/safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4= sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==", - "dev": true, - "dependencies": { - "ret": "~0.1.10" - } - }, - "node_modules/sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true - }, - "node_modules/schema-utils": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", - "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.8.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.0.0" - }, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/schema-utils/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/schema-utils/node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, - "node_modules/schema-utils/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w= sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==", - "dev": true, - "optional": true - }, - "node_modules/semver-greatest-satisfied-range": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz", - "integrity": "sha1-E+jCZYq5aRywzXEJMkAoDTb3els= sha512-Ny/iyOzSSa8M5ML46IAx3iXc6tfOsYU2R4AXi2UpHk60Zrgyq6eqPj/xiOfS0rRl/iiQ/rdJkVjw/5cdUyCntQ==", - "dev": true, - "dependencies": { - "sver-compat": "^1.5.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/serialize-error": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz", - "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==", - "dev": true, - "optional": true, - "dependencies": { - "type-fest": "^0.13.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/serialize-error/node_modules/type-fest": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", - "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", - "dev": true, - "optional": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc= sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "dev": true - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", - "dev": true, - "dependencies": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/set-value/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/set-value/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/set-value/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", - "dev": true - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true - }, - "node_modules/shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shallow-clone/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/shell-quote": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz", - "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==", - "dev": true - }, - "node_modules/sigmund": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", - "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA= sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g==", - "dev": true - }, - "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/simple-get": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", - "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "decompress-response": "^6.0.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, - "node_modules/sinon": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-12.0.1.tgz", - "integrity": "sha512-iGu29Xhym33ydkAT+aNQFBINakjq69kKO6ByPvTsm3yyIACfyQttRTP03aBP/I8GfhFmLzrnKwNNkr0ORb1udg==", - "deprecated": "16.1.1", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": "^8.1.0", - "@sinonjs/samsam": "^6.0.2", - "diff": "^5.0.0", - "nise": "^5.1.0", - "supports-color": "^7.2.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/sinon" - } - }, - "node_modules/sinon-test": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/sinon-test/-/sinon-test-3.1.3.tgz", - "integrity": "sha512-jBDvPVW2z8uAoiud3Nqc6+e8+WX6UTB1gPQuYXK00mSnp9m/JYyeLdBjLlqbnk1DVmsgRCAHSoXYPNLHp0t56Q==", - "dev": true, - "peerDependencies": { - "sinon": "2.x - 13.x" - } - }, - "node_modules/sinon/node_modules/@sinonjs/fake-timers": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", - "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.7.0" - } - }, - "node_modules/sinon/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/sinon/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/slashes": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/slashes/-/slashes-3.0.12.tgz", - "integrity": "sha512-Q9VME8WyGkc7pJf6QEkj3wE+2CnvZMI+XJhwdTPR8Z/kWQRXi7boAWLDibRPyHRTUTPx5FaU7MsyrjI3yLB4HA==", - "dev": true - }, - "node_modules/smart-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", - "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", - "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", - "dev": true, - "dependencies": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", - "dev": true, - "dependencies": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-node/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY= sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", - "dev": true, - "dependencies": { - "is-descriptor": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", - "dev": true, - "dependencies": { - "kind-of": "^3.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon-util/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/snapdragon/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dev": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", - "dev": true, - "dependencies": { - "is-extendable": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "deprecated": "Please upgrade to v0.1.7", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "deprecated": "Please upgrade to v0.1.5", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/snapdragon/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/snapdragon/node_modules/source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", - "dev": true, - "dependencies": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, - "node_modules/socks": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", - "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", - "dependencies": { - "ip-address": "^9.0.5", - "smart-buffer": "^4.2.0" - }, - "engines": { - "node": ">= 10.0.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/socks-proxy-agent": { - "version": "8.0.4", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz", - "integrity": "sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==", - "dependencies": { - "agent-base": "^7.1.1", - "debug": "^4.3.4", - "socks": "^2.8.3" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-resolve": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz", - "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==", - "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", - "dev": true, - "dependencies": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0" - } - }, - "node_modules/source-map-support": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.3.3.tgz", - "integrity": "sha1-NJAJd9W6PwfHdX7nLnO7GptTdU8= sha512-9O4+y9n64RewmFoKUZ/5Tx9IHIcXM6Q+RTSw6ehnqybUz4a7iwR3Eaw80uLtqqQ5D0C+5H03D4KKGo9PdP33Gg==", - "dev": true, - "dependencies": { - "source-map": "0.1.32" - } - }, - "node_modules/source-map-support/node_modules/source-map": { - "version": "0.1.32", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.32.tgz", - "integrity": "sha1-yLbBZ3l7pHQKjqMyUhYv8IWRsmY= sha512-htQyLrrRLkQ87Zfrir4/yN+vAUd6DNjVayEjTSHXu29AYQJw57I4/xEL/M6p6E/woPNJwvZt6rVlzc7gFEJccQ==", - "dev": true, - "dependencies": { - "amdefine": ">=0.0.4" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/source-map-url": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", - "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= sha512-liJwHPI9x9d9w5WSIjM58MqGmmb7XzNqwdUA3kSBQ4lmDngexlKwawGzK3J1mKXi6+sysoMDlpVyZh9sv5vRfw==", - "deprecated": "See https://github.com/lydell/source-map-url#deprecated", - "dev": true - }, - "node_modules/sparkles": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", - "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "dev": true, - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", - "dev": true - }, - "node_modules/split": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz", - "integrity": "sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8= sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==", - "dev": true, - "dependencies": { - "through": "2" - }, - "engines": { - "node": "*" - } - }, - "node_modules/split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", - "dev": true, - "dependencies": { - "extend-shallow": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sprintf-js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" - }, - "node_modules/stable": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", - "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", - "deprecated": "Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility", - "dev": true - }, - "node_modules/stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA= sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==", - "dev": true, - "dependencies": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", - "dev": true, - "dependencies": { - "is-descriptor": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", - "deprecated": "Please upgrade to v0.1.7", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", - "deprecated": "Please upgrade to v0.1.5", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/static-extend/node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/stdin-discarder": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.1.0.tgz", - "integrity": "sha512-xhV7w8S+bUwlPTb4bAOUQhv8/cSS5offJuX8GQGq32ONF0ZtDWKfkdomM3HMRA+LhX6um/FZ0COqlwsjD53LeQ==", - "dev": true, - "dependencies": { - "bl": "^5.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/stdin-discarder/node_modules/bl": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz", - "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==", - "dev": true, - "dependencies": { - "buffer": "^6.0.3", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/stdin-discarder/node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "node_modules/stream-combiner": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", - "integrity": "sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ= sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==", - "dev": true, - "dependencies": { - "duplexer": "~0.1.1" - } - }, - "node_modules/stream-exhaust": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz", - "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==", - "dev": true - }, - "node_modules/stream-shift": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", - "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", - "dev": true - }, - "node_modules/stream-to-array": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/stream-to-array/-/stream-to-array-2.3.0.tgz", - "integrity": "sha1-u/azn19D7DC8cbq8s3VXrOzzQ1M= sha512-UsZtOYEn4tWU2RGLOXr/o/xjRBftZRlG3dEWoaHr8j4GuypJ3isitGbVyjQKAuMu+xbiop8q224TjiZWc4XTZA==", - "dev": true, - "dependencies": { - "any-promise": "^1.1.0" - } - }, - "node_modules/streamfilter": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/streamfilter/-/streamfilter-1.0.5.tgz", - "integrity": "sha1-h1BxEb644phFFxe1Ec/tjwAqv1M= sha512-IHuyNEAPs3pi2ABhJ7Dbjza9Gc6Nq7NDvx14tsKw4h4cMUz4YoLOON6nghUvIZVO4NW4qvYUoED1kd6/bipTVQ==", - "dev": true, - "dependencies": { - "readable-stream": "^2.0.2" - } - }, - "node_modules/streamfilter/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/streamifier": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/streamifier/-/streamifier-0.1.1.tgz", - "integrity": "sha1-l+mNj6TRBdYqJpHR3AfoINuN/E8= sha512-zDgl+muIlWzXNsXeyUfOk9dChMjlpkq0DRsxujtYPgyJ676yQ8jEm6zzaaWHFDg5BNcLuif0eD2MTyJdZqXpdg==", - "dev": true, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/streamx": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.18.0.tgz", - "integrity": "sha512-LLUC1TWdjVdn1weXGcSxyTR3T4+acB6tVGXT95y0nGbca4t4o/ng1wKAGTljm9VicuCVLvRlqFYXYy5GwgM7sQ==", - "dev": true, - "dependencies": { - "fast-fifo": "^1.3.2", - "queue-tick": "^1.0.1", - "text-decoder": "^1.1.0" - }, - "optionalDependencies": { - "bare-events": "^2.2.0" - } - }, - "node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/string-width": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-6.1.0.tgz", - "integrity": "sha512-k01swCJAgQmuADB0YIc+7TuatfNvTBVOoaUWJjTB9R4VJzR5vNWzf5t42ESVZFPS8xTySF7CAdV4t/aaIm3UnQ==", - "dev": true, - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^10.2.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/string-width-cjs": { - "name": "string-width", - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/string.prototype.padend": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.1.tgz", - "integrity": "sha512-eCzTASPnoCr5Ht+Vn1YXgm8SB015hHKgEIMu9Nr9bQmLhRBxKRfmzSj/IQsxDFc8JInJDDFA0qXwK+xxI7wDkg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz", - "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz", - "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-bom-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", - "integrity": "sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI= sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/style-loader": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.2.tgz", - "integrity": "sha512-RHs/vcrKdQK8wZliteNK4NKzxvLBzpuHMqYmUVWeKa6MkaIQ97ZTOS0b+zapZhy6GcrgWnvWYCMHRirC3FsUmw==", - "dev": true, - "engines": { - "node": ">= 12.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.0.0" - } - }, - "node_modules/stylehacks": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-6.1.1.tgz", - "integrity": "sha512-gSTTEQ670cJNoaeIp9KX6lZmm8LJ3jPB5yJmX8Zq/wQxOsAFXV3qjWzHas3YYk1qesuVIyYWWUpZ0vSE/dTSGg==", - "dev": true, - "license": "MIT", - "dependencies": { - "browserslist": "^4.23.0", - "postcss-selector-parser": "^6.0.16" - }, - "engines": { - "node": "^14 || ^16 || >=18.0" - }, - "peerDependencies": { - "postcss": "^8.4.31" - } - }, - "node_modules/sumchecker": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.1.tgz", - "integrity": "sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==", - "dev": true, - "dependencies": { - "debug": "^4.1.0" - }, - "engines": { - "node": ">= 8.0" - } - }, - "node_modules/supports-color": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-9.4.0.tgz", - "integrity": "sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/sver-compat": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz", - "integrity": "sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg= sha512-aFTHfmjwizMNlNE6dsGmoAM4lHjL0CyiobWaFiXWSlD7cIxshW422Nb8KbXCmR6z+0ZEPY+daXJrDyh/vuwTyg==", - "dev": true, - "dependencies": { - "es6-iterator": "^2.0.1", - "es6-symbol": "^3.1.1" - } - }, - "node_modules/svgo": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz", - "integrity": "sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==", - "dev": true, - "dependencies": { - "@trysound/sax": "0.2.0", - "commander": "^7.2.0", - "css-select": "^4.1.3", - "css-tree": "^1.1.3", - "csso": "^4.2.0", - "picocolors": "^1.0.0", - "stable": "^0.1.8" - }, - "bin": { - "svgo": "bin/svgo" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/svgo/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true, - "engines": { - "node": ">= 10" - } - }, - "node_modules/svgo/node_modules/css-select": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.2.1.tgz", - "integrity": "sha512-/aUslKhzkTNCQUB2qTX84lVmfia9NyjP3WpDGtj/WxhwBzWBYUV3DgUpurHTme8UTPcPlAD1DJ+b0nN/t50zDQ==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^5.1.0", - "domhandler": "^4.3.0", - "domutils": "^2.8.0", - "nth-check": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/svgo/node_modules/css-what": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.1.0.tgz", - "integrity": "sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==", - "dev": true, - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/svgo/node_modules/dom-serializer": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", - "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", - "dev": true, - "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/svgo/node_modules/domhandler": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.0.tgz", - "integrity": "sha512-fC0aXNQXqKSFTr2wDNZDhsEYjCiYsDWl3D01kwt25hm1YIPyDGHvvi3rw+PLqHAl/m71MaiF7d5zvBr0p5UB2g==", - "dev": true, - "dependencies": { - "domelementtype": "^2.2.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/svgo/node_modules/domutils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", - "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", - "dev": true, - "dependencies": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/svgo/node_modules/entities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", - "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", - "dev": true, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/synckit": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.1.tgz", - "integrity": "sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==", - "dev": true, - "dependencies": { - "@pkgr/core": "^0.1.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/unts" - } - }, - "node_modules/tapable": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", - "integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/tar": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", - "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", - "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^5.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/tar-fs": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.6.tgz", - "integrity": "sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==", - "dev": true, - "dependencies": { - "pump": "^3.0.0", - "tar-stream": "^3.1.5" - }, - "optionalDependencies": { - "bare-fs": "^2.1.1", - "bare-path": "^2.1.0" - } - }, - "node_modules/tar-fs/node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/tar-stream": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz", - "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==", - "dev": true, - "dependencies": { - "b4a": "^1.6.4", - "fast-fifo": "^1.2.0", - "streamx": "^2.15.0" - } - }, - "node_modules/tar/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "node_modules/tas-client-umd": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/tas-client-umd/-/tas-client-umd-0.2.0.tgz", - "integrity": "sha512-oezN7mJVm5qZDVEby7OzxCLKUpUN5of0rY4dvOWaDF2JZBlGpd3BXceFN8B53qlTaIkVSzP65aAMT0Vc+/N25Q==" - }, - "node_modules/teex": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/teex/-/teex-1.0.1.tgz", - "integrity": "sha512-eYE6iEI62Ni1H8oIa7KlDU6uQBtqr4Eajni3wX7rpfXD8ysFx8z0+dri+KWEPWpBsxXfxu58x/0jvTVT1ekOSg==", - "dev": true, - "dependencies": { - "streamx": "^2.12.5" - } - }, - "node_modules/temp": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.4.tgz", - "integrity": "sha512-s0ZZzd0BzYv5tLSptZooSjK8oj6C+c19p7Vqta9+6NPOf7r+fxq0cJe6/oN4LTC79sy5NY8ucOJNgwsKCSbfqg==", - "dev": true, - "dependencies": { - "rimraf": "~2.6.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/terser": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.30.0.tgz", - "integrity": "sha512-Y/SblUl5kEyEFzhMAQdsxVHh+utAxd4IuRNJzKywY/4uzSogh3G219jqbDDxYu4MXO9CzY3tSEqmZvW6AoEDJw==", - "dev": true, - "dependencies": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.8.2", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/terser-webpack-plugin": { - "version": "5.3.10", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", - "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.20", - "jest-worker": "^27.4.5", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.1", - "terser": "^5.26.0" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.1.0" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "uglify-js": { - "optional": true - } - } - }, - "node_modules/terser-webpack-plugin/node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/terser-webpack-plugin/node_modules/serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/terser/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "node_modules/terser/node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/test-exclude/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/text-decoder": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.1.0.tgz", - "integrity": "sha512-TmLJNj6UgX8xcUZo4UDStGQtDiTzF7BzWlzn9g7UWrjkpHr5uJTK1ld16wZ3LXb2vb6jH8qU89dW5whuMdXYdw==", - "dev": true, - "dependencies": { - "b4a": "^1.6.4" - } - }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true - }, - "node_modules/textextensions": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-1.0.2.tgz", - "integrity": "sha1-ZUhjk+4fK7A5pgy7oFsLaL2VAdI= sha512-jm9KjEWiDmtGLBrTqXEduGzlYTTlPaoDKdq5YRQhD0rYjo61ZNTYKZ/x5J4ajPSBH9wIYY5qm9GNG5otIKjtOA==", - "dev": true - }, - "node_modules/through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "dev": true - }, - "node_modules/through2": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", - "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", - "dev": true, - "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "2 || 3" - } - }, - "node_modules/through2-filter": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", - "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", - "dev": true, - "dependencies": { - "through2": "~2.0.0", - "xtend": "~4.0.0" - } - }, - "node_modules/through2-filter/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/through2-filter/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/time-stamp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", - "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM= sha512-gLCeArryy2yNTRzTGKbZbloctj64jkZ57hj5zdraXue6aFgd6PmvVtEyiUU+hvU0v7q08oVv8r8ev0tRo6bvgw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/timers-ext": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", - "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", - "dev": true, - "dependencies": { - "es5-ext": "~0.10.46", - "next-tick": "1" - } - }, - "node_modules/tiny-inflate": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz", - "integrity": "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==", - "license": "MIT" - }, - "node_modules/to-absolute-glob": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", - "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs= sha512-rtwLUQEwT8ZeKQbyFJyomBRYXyE16U5VKuy0ftxLMK/PZb2fkOsg5r9kHdauuVDbsNdIBoC/HCthpidamQFXYA==", - "dev": true, - "dependencies": { - "is-absolute": "^1.0.0", - "is-negated-glob": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-object-path/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "dependencies": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/to-through": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", - "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY= sha512-+QIz37Ly7acM4EMdw2PRN389OneM5+d844tirkGp4dPKzI5OE72V9OsbFp+CIYJDahZ41ZV05hNtcPAQUAm9/Q==", - "dev": true, - "dependencies": { - "through2": "^2.0.3" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/to-through/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/to-through/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/tough-cookie": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz", - "integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==", - "dev": true, - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.2.0", - "url-parse": "^1.5.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tough-cookie/node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/tough-cookie/node_modules/universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "node_modules/tree-kill": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", - "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", - "dev": true, - "bin": { - "tree-kill": "cli.js" - } - }, - "node_modules/ts-api-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", - "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", - "dev": true, - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "typescript": ">=4.2.0" - } - }, - "node_modules/ts-loader": { - "version": "9.5.1", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.1.tgz", - "integrity": "sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg==", - "dev": true, - "dependencies": { - "chalk": "^4.1.0", - "enhanced-resolve": "^5.0.0", - "micromatch": "^4.0.0", - "semver": "^7.3.4", - "source-map": "^0.7.4" - }, - "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "typescript": "*", - "webpack": "^5.0.0" - } - }, - "node_modules/ts-loader/node_modules/source-map": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", - "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/ts-morph": { - "version": "19.0.0", - "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-19.0.0.tgz", - "integrity": "sha512-D6qcpiJdn46tUqV45vr5UGM2dnIEuTGNxVhg0sk5NX11orcouwj6i1bMqZIz2mZTZB1Hcgy7C3oEVhAT+f6mbQ==", - "dev": true, - "dependencies": { - "@ts-morph/common": "~0.20.0", - "code-block-writer": "^12.0.0" - } - }, - "node_modules/ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", - "dev": true, - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/ts-node/node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/tsec": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/tsec/-/tsec-0.2.7.tgz", - "integrity": "sha512-Pj9DuBBWLEo8p7QsbrEdXzW/u6QJBcib0ZGOTXkeSDx+PLXFY7hwyZE9Tfhp3TA3LQNpYouyT0WmzXRyUW4otQ==", - "dev": true, - "dependencies": { - "glob": "^7.1.1", - "minimatch": "^3.0.3" - }, - "bin": { - "tsec": "bin/tsec" - }, - "peerDependencies": { - "@bazel/bazelisk": ">=1.7.5", - "@bazel/concatjs": ">=5.3.0", - "typescript": ">=3.9.2" - } - }, - "node_modules/tsec/node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", - "dev": true - }, - "node_modules/tsscmp": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.6.tgz", - "integrity": "sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==", - "dev": true, - "engines": { - "node": ">=0.6.x" - } - }, - "node_modules/tunnel": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", - "dev": true, - "engines": { - "node": ">=0.6.11 <=0.7.0 || >=0.7.3" - } - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", - "dev": true - }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", - "dev": true - }, - "node_modules/typescript": { - "version": "5.8.0-dev.20241202", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.0-dev.20241202.tgz", - "integrity": "sha512-4b4+FbKk5Wp51uwCztSyh68rdK1rv4afoC/P/g8HOmWmfHIdCgZNxzLS6TvjBU7e8XVzmW3jE/CJl1n59lcIhg==", - "dev": true, - "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/typescript-eslint": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.8.0.tgz", - "integrity": "sha512-BjIT/VwJ8+0rVO01ZQ2ZVnjE1svFBiRczcpr1t1Yxt7sT25VSbPfrJtDsQ8uQTy2pilX5nI9gwxhUyLULNentw==", - "dev": true, - "dependencies": { - "@typescript-eslint/eslint-plugin": "8.8.0", - "@typescript-eslint/parser": "8.8.0", - "@typescript-eslint/utils": "8.8.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/typescript-eslint/node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.8.0.tgz", - "integrity": "sha512-wORFWjU30B2WJ/aXBfOm1LX9v9nyt9D3jsSOxC3cCaTQGCW5k4jNpmjFv3U7p/7s4yvdjHzwtv2Sd2dOyhjS0A==", - "dev": true, - "dependencies": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.8.0", - "@typescript-eslint/type-utils": "8.8.0", - "@typescript-eslint/utils": "8.8.0", - "@typescript-eslint/visitor-keys": "8.8.0", - "graphemer": "^1.4.0", - "ignore": "^5.3.1", - "natural-compare": "^1.4.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", - "eslint": "^8.57.0 || ^9.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/typescript-eslint/node_modules/@typescript-eslint/parser": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.8.0.tgz", - "integrity": "sha512-uEFUsgR+tl8GmzmLjRqz+VrDv4eoaMqMXW7ruXfgThaAShO9JTciKpEsB+TvnfFfbg5IpujgMXVV36gOJRLtZg==", - "dev": true, - "dependencies": { - "@typescript-eslint/scope-manager": "8.8.0", - "@typescript-eslint/types": "8.8.0", - "@typescript-eslint/typescript-estree": "8.8.0", - "@typescript-eslint/visitor-keys": "8.8.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/typescript-eslint/node_modules/@typescript-eslint/type-utils": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.8.0.tgz", - "integrity": "sha512-IKwJSS7bCqyCeG4NVGxnOP6lLT9Okc3Zj8hLO96bpMkJab+10HIfJbMouLrlpyOr3yrQ1cA413YPFiGd1mW9/Q==", - "dev": true, - "dependencies": { - "@typescript-eslint/typescript-estree": "8.8.0", - "@typescript-eslint/utils": "8.8.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/typical": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", - "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/uc.micro": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", - "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", - "dev": true - }, - "node_modules/unc-path-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo= sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/undertaker": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.3.0.tgz", - "integrity": "sha512-/RXwi5m/Mu3H6IHQGww3GNt1PNXlbeCuclF2QYR14L/2CHPz3DFZkvB5hZ0N/QUkiXWCACML2jXViIQEQc2MLg==", - "dev": true, - "dependencies": { - "arr-flatten": "^1.0.1", - "arr-map": "^2.0.0", - "bach": "^1.0.0", - "collection-map": "^1.0.0", - "es6-weak-map": "^2.0.1", - "fast-levenshtein": "^1.0.0", - "last-run": "^1.1.0", - "object.defaults": "^1.0.0", - "object.reduce": "^1.0.0", - "undertaker-registry": "^1.0.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/undertaker-registry": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz", - "integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA= sha512-UR1khWeAjugW3548EfQmL9Z7pGMlBgXteQpr1IZeZBtnkCJQJIJ1Scj0mb9wQaPvUZ9Q17XqW6TIaPchJkyfqw==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/undertaker/node_modules/fast-levenshtein": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.4.tgz", - "integrity": "sha1-5qdUzI8V5YmHqpy9J69m/W9OWvk= sha512-Ia0sQNrMPXXkqVFt6w6M1n1oKo3NfKs+mvaV811Jwir7vAk9a6PVV9VPYf6X3BU97QiLEmuW3uXH9u87zDFfdw==", - "dev": true - }, - "node_modules/undici": { - "version": "6.20.1", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.20.1.tgz", - "integrity": "sha512-AjQF1QsmqfJys+LXfGTNum+qw4S88CojRInG/6t31W/1fk6G59s92bnAvGz5Cmur+kQv2SURXEvvudLmbrE8QA==", - "license": "MIT", - "engines": { - "node": ">=18.17" - } - }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true - }, - "node_modules/union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", - "dev": true, - "dependencies": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/union-value/node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unique-stream": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", - "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", - "dev": true, - "dependencies": { - "json-stable-stringify-without-jsonify": "^1.0.1", - "through2-filter": "^3.0.0" - } - }, - "node_modules/universal-user-agent": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", - "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==", - "dev": true - }, - "node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==", - "dev": true, - "dependencies": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==", - "dev": true, - "dependencies": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", - "dev": true, - "dependencies": { - "isarray": "1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E= sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/upath": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", - "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", - "dev": true, - "engines": { - "node": ">=4", - "yarn": "*" - } - }, - "node_modules/update-browserslist-db": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", - "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "escalade": "^3.2.0", - "picocolors": "^1.1.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/uri-js/node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", - "deprecated": "Please see https://github.com/lydell/urix#deprecated", - "dev": true - }, - "node_modules/url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "dev": true, - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "node_modules/use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/util": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", - "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "which-typed-array": "^1.1.2" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true - }, - "node_modules/v8-inspect-profiler": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/v8-inspect-profiler/-/v8-inspect-profiler-0.1.1.tgz", - "integrity": "sha512-GB3X9w7w+y9v4gq85olmf/bM3F2hj2DjjwvVpDXIziW5JBy8cDcIQ/K7m8xJVDWiFemxRX2Dxoo1k6JDvLMTig==", - "dependencies": { - "chrome-remote-interface": "^0.33.0" - } - }, - "node_modules/v8-to-istanbul": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", - "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^2.0.0" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/v8-to-istanbul/node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, - "node_modules/v8flags": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", - "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", - "dev": true, - "dependencies": { - "homedir-polyfill": "^1.0.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "node_modules/value-or-function": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", - "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM= sha512-jdBB2FrWvQC/pnPtIqcLsMaQgjhdb6B7tk1MMyTKapox+tQZbdRP4uLxu/JY0t7fbfDCUMnuelzEYv5GsxHhdg==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/vinyl": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-3.0.0.tgz", - "integrity": "sha512-rC2VRfAVVCGEgjnxHUnpIVh3AGuk62rP3tqVrn+yab0YH7UULisC085+NYH+mnqf3Wx4SpSi1RQMwudL89N03g==", - "dev": true, - "dependencies": { - "clone": "^2.1.2", - "clone-stats": "^1.0.0", - "remove-trailing-separator": "^1.1.0", - "replace-ext": "^2.0.0", - "teex": "^1.0.1" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/vinyl-fs": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", - "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", - "dev": true, - "dependencies": { - "fs-mkdirp-stream": "^1.0.0", - "glob-stream": "^6.1.0", - "graceful-fs": "^4.0.0", - "is-valid-glob": "^1.0.0", - "lazystream": "^1.0.0", - "lead": "^1.0.0", - "object.assign": "^4.0.4", - "pumpify": "^1.3.5", - "readable-stream": "^2.3.3", - "remove-bom-buffer": "^3.0.0", - "remove-bom-stream": "^1.2.0", - "resolve-options": "^1.1.0", - "through2": "^2.0.0", - "to-through": "^2.0.0", - "value-or-function": "^3.0.0", - "vinyl": "^2.0.0", - "vinyl-sourcemap": "^1.1.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/vinyl-fs/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/vinyl-fs/node_modules/replace-ext": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", - "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/vinyl-fs/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/vinyl-fs/node_modules/vinyl": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.1.0.tgz", - "integrity": "sha1-Ah+cLPlR1rk5lDyJ617lrdT9kkw= sha512-M5D/ZRG7KC3ETrV7iA/GNF/lznml4dZ7ggwtYbqM/B+0INyNTjCdFhw4TqMq//PtNbPpceE7wOqKqK5YfUThPA==", - "dev": true, - "dependencies": { - "clone": "^2.1.1", - "clone-buffer": "^1.0.0", - "clone-stats": "^1.0.0", - "cloneable-readable": "^1.0.0", - "remove-trailing-separator": "^1.0.1", - "replace-ext": "^1.0.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/vinyl-sourcemap": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", - "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY= sha512-NiibMgt6VJGJmyw7vtzhctDcfKch4e4n9TBeoWlirb7FMg9/1Ov9k+A5ZRAtywBpRPiyECvQRQllYM8dECegVA==", - "dev": true, - "dependencies": { - "append-buffer": "^1.0.2", - "convert-source-map": "^1.5.0", - "graceful-fs": "^4.1.6", - "normalize-path": "^2.1.1", - "now-and-later": "^2.0.0", - "remove-bom-buffer": "^3.0.0", - "vinyl": "^2.0.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/vinyl-sourcemap/node_modules/normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", - "dev": true, - "dependencies": { - "remove-trailing-separator": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/vinyl-sourcemap/node_modules/replace-ext": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", - "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/vinyl-sourcemap/node_modules/vinyl": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.1.0.tgz", - "integrity": "sha1-Ah+cLPlR1rk5lDyJ617lrdT9kkw= sha512-M5D/ZRG7KC3ETrV7iA/GNF/lznml4dZ7ggwtYbqM/B+0INyNTjCdFhw4TqMq//PtNbPpceE7wOqKqK5YfUThPA==", - "dev": true, - "dependencies": { - "clone": "^2.1.1", - "clone-buffer": "^1.0.0", - "clone-stats": "^1.0.0", - "cloneable-readable": "^1.0.0", - "remove-trailing-separator": "^1.0.1", - "replace-ext": "^1.0.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/vscode-oniguruma": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", - "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==" - }, - "node_modules/vscode-regexpp": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/vscode-regexpp/-/vscode-regexpp-3.1.0.tgz", - "integrity": "sha512-pqtN65VC1jRLawfluX4Y80MMG0DHJydWhe5ZwMHewZD6sys4LbU6lHwFAHxeuaVE6Y6+xZOtAw+9hvq7/0ejkg==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/vscode-textmate": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-9.1.0.tgz", - "integrity": "sha512-lxKSVp2DkFOx9RDAvpiYUrB9/KT1fAfi1aE8CBGstP8N7rLF+Seifj8kDA198X0mYj1CjQUC+81+nQf8CO0nVA==" - }, - "node_modules/vscode-uri": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", - "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==", - "dev": true - }, - "node_modules/watchpack": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.1.tgz", - "integrity": "sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==", - "dev": true, - "dependencies": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/web-tree-sitter": { - "version": "0.20.8", - "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.20.8.tgz", - "integrity": "sha512-weOVgZ3aAARgdnb220GqYuh7+rZU0Ka9k9yfKtGAzEYMa6GgiCzW9JjQRJyCJakvibQW+dfjJdihjInKuuCAUQ==", - "dev": true - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "node_modules/webpack": { - "version": "5.94.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz", - "integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==", - "dev": true, - "dependencies": { - "@types/estree": "^1.0.5", - "@webassemblyjs/ast": "^1.12.1", - "@webassemblyjs/wasm-edit": "^1.12.1", - "@webassemblyjs/wasm-parser": "^1.12.1", - "acorn": "^8.7.1", - "acorn-import-attributes": "^1.9.5", - "browserslist": "^4.21.10", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.17.1", - "es-module-lexer": "^1.2.1", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.11", - "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.2.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.10", - "watchpack": "^2.4.1", - "webpack-sources": "^3.2.3" - }, - "bin": { - "webpack": "bin/webpack.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-cli": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", - "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", - "dev": true, - "dependencies": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^2.1.1", - "@webpack-cli/info": "^2.0.2", - "@webpack-cli/serve": "^2.0.5", - "colorette": "^2.0.14", - "commander": "^10.0.1", - "cross-spawn": "^7.0.3", - "envinfo": "^7.7.3", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^3.1.1", - "rechoir": "^0.8.0", - "webpack-merge": "^5.7.3" - }, - "bin": { - "webpack-cli": "bin/cli.js" - }, - "engines": { - "node": ">=14.15.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "5.x.x" - }, - "peerDependenciesMeta": { - "@webpack-cli/generators": { - "optional": true - }, - "webpack-bundle-analyzer": { - "optional": true - }, - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/webpack-cli/node_modules/commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", - "dev": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/webpack-cli/node_modules/interpret": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", - "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", - "dev": true, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webpack-cli/node_modules/rechoir": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", - "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", - "dev": true, - "dependencies": { - "resolve": "^1.20.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/webpack-merge": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", - "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", - "dev": true, - "dependencies": { - "clone-deep": "^4.0.1", - "wildcard": "^2.0.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", - "dev": true, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webpack-stream": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webpack-stream/-/webpack-stream-7.0.0.tgz", - "integrity": "sha512-XoAQTHyCaYMo6TS7Atv1HYhtmBgKiVLONJbzLBl2V3eibXQ2IT/MCRM841RW/r3vToKD5ivrTJFWgd/ghoxoRg==", - "dev": true, - "dependencies": { - "fancy-log": "^1.3.3", - "lodash.clone": "^4.3.2", - "lodash.some": "^4.2.2", - "memory-fs": "^0.5.0", - "plugin-error": "^1.0.1", - "supports-color": "^8.1.1", - "through": "^2.3.8", - "vinyl": "^2.2.1" - }, - "engines": { - "node": ">= 10.0.0" - }, - "peerDependencies": { - "webpack": "^5.21.2" - } - }, - "node_modules/webpack-stream/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/webpack-stream/node_modules/replace-ext": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", - "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/webpack-stream/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/webpack-stream/node_modules/vinyl": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", - "integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==", - "dev": true, - "dependencies": { - "clone": "^2.1.1", - "clone-buffer": "^1.0.0", - "clone-stats": "^1.0.0", - "cloneable-readable": "^1.0.0", - "remove-trailing-separator": "^1.0.1", - "replace-ext": "^1.0.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/webpack/node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/webpack/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/webpack/node_modules/schema-utils": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", - "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0= sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==", - "dev": true - }, - "node_modules/which-typed-array": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", - "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", - "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/wildcard": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", - "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", - "dev": true - }, - "node_modules/windows-foreground-love": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/windows-foreground-love/-/windows-foreground-love-0.5.0.tgz", - "integrity": "sha512-yjBwmKEmQBDk3Z7yg/U9hizGWat8C6Pe4MQWl5bN6mvPU81Bt6HV2k/6mGlK3ETJLW1hCLhYx2wcGh+ykUUCyA==", - "hasInstallScript": true, - "optional": true - }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/workerpool": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", - "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", - "dev": true - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - }, - "node_modules/xml": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", - "integrity": "sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==", - "dev": true - }, - "node_modules/xml2js": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", - "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", - "dev": true, - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/xml2js/node_modules/xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true, - "engines": { - "node": ">=0.4" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", - "dev": true - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser/node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/yargs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yaserver": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/yaserver/-/yaserver-0.4.0.tgz", - "integrity": "sha512-98Vj4sgqB1fLcpf2wK7h3dFCaabISHU9CXZHaAx3QLkvTTCD31MzMcNbw5V5jZFBK7ffkFqfWig6B20KQt4wtA==", - "dev": true, - "bin": { - "yaserver": "bin/yaserver" - } - }, - "node_modules/yauzl": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-3.1.1.tgz", - "integrity": "sha512-MPxA7oN5cvGV0wzfkeHKF2/+Q4TkMpHSWGRy/96I4Cozljmx0ph91+Muxh6HegEtDC4GftJ8qYDE51vghFiEYA==", - "dependencies": { - "buffer-crc32": "~0.2.3", - "pend": "~1.2.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yazl": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.4.3.tgz", - "integrity": "sha1-7CblzIfVYBud+EMtvdPNLlFzoHE= sha512-cIUrm3/81iF/BzuyORI7ppz1vGHAhA62JYzAFFC+rwJ2jQF1LcYxY9UXx4XyUXojkCnol0SvPuc+Toc7FO4W8g==", - "dependencies": { - "buffer-crc32": "~0.2.3" - } - }, - "node_modules/ylru": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ylru/-/ylru-1.2.1.tgz", - "integrity": "sha512-faQrqNMzcPCHGVC2aaOINk13K+aaBDUPjGWl0teOXywElLjyVAB6Oe2jj62jHYtwsU49jXhScYbvPENK+6zAvQ==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - } -} diff --git a/package.json b/package.json index f283587b8c5f4..0bf5aec63c273 100644 --- a/package.json +++ b/package.json @@ -1,242 +1,147 @@ { - "name": "code-oss-dev", - "version": "1.97.0", - "distro": "c883c91dadf5f063b26c86ffe01851acee3747c6", - "author": { - "name": "Microsoft Corporation" - }, - "license": "MIT", - "main": "./out/main.js", - "type": "module", - "private": true, - "scripts": { - "test": "echo Please run any of the test scripts from the scripts folder.", - "test-browser": "npx playwright install && node test/unit/browser/index.js", - "test-browser-no-install": "node test/unit/browser/index.js", - "test-node": "mocha test/unit/node/index.js --delay --ui=tdd --timeout=5000 --exit", - "test-extension": "vscode-test", - "preinstall": "node build/npm/preinstall.js", - "postinstall": "node build/npm/postinstall.js", - "compile": "node ./node_modules/gulp/bin/gulp.js compile", - "watch": "npm-run-all -lp watch-client watch-extensions", - "watchd": "deemon npm run watch", - "watch-webd": "deemon npm run watch-web", - "kill-watchd": "deemon --kill npm run watch", - "kill-watch-webd": "deemon --kill npm run watch-web", - "restart-watchd": "deemon --restart npm run watch", - "restart-watch-webd": "deemon --restart npm run watch-web", - "watch-client": "node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js watch-client", - "watch-clientd": "deemon npm run watch-client", - "kill-watch-clientd": "deemon --kill npm run watch-client", - "watch-extensions": "node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js watch-extensions watch-extension-media", - "watch-extensionsd": "deemon npm run watch-extensions", - "kill-watch-extensionsd": "deemon --kill npm run watch-extensions", - "precommit": "node build/hygiene.js", - "gulp": "node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js", - "electron": "node build/lib/electron", - "7z": "7z", - "update-grammars": "node build/npm/update-all-grammars.mjs", - "update-localization-extension": "node build/npm/update-localization-extension.js", - "smoketest": "node build/lib/preLaunch.js && cd test/smoke && npm run compile && node test/index.js", - "smoketest-no-compile": "cd test/smoke && node test/index.js", - "download-builtin-extensions": "node build/lib/builtInExtensions.js", - "download-builtin-extensions-cg": "node build/lib/builtInExtensionsCG.js", - "monaco-compile-check": "tsc -p src/tsconfig.monaco.json --noEmit", - "tsec-compile-check": "node node_modules/tsec/bin/tsec -p src/tsconfig.tsec.json", - "vscode-dts-compile-check": "tsc -p src/tsconfig.vscode-dts.json && tsc -p src/tsconfig.vscode-proposed-dts.json", - "valid-layers-check": "node build/lib/layersChecker.js", - "update-distro": "node build/npm/update-distro.mjs", - "web": "echo 'npm run web' is replaced by './scripts/code-server' or './scripts/code-web'", - "compile-cli": "gulp compile-cli", - "compile-web": "node ./node_modules/gulp/bin/gulp.js compile-web", - "watch-web": "node ./node_modules/gulp/bin/gulp.js watch-web", - "watch-cli": "node ./node_modules/gulp/bin/gulp.js watch-cli", - "eslint": "node build/eslint", - "stylelint": "node build/stylelint", - "playwright-install": "npm exec playwright install", - "compile-build": "node ./node_modules/gulp/bin/gulp.js compile-build", - "compile-extensions-build": "node ./node_modules/gulp/bin/gulp.js compile-extensions-build", - "minify-vscode": "node ./node_modules/gulp/bin/gulp.js minify-vscode", - "minify-vscode-reh": "node ./node_modules/gulp/bin/gulp.js minify-vscode-reh", - "minify-vscode-reh-web": "node ./node_modules/gulp/bin/gulp.js minify-vscode-reh-web", - "hygiene": "node ./node_modules/gulp/bin/gulp.js hygiene", - "core-ci": "node ./node_modules/gulp/bin/gulp.js core-ci", - "core-ci-pr": "node ./node_modules/gulp/bin/gulp.js core-ci-pr", - "extensions-ci": "node ./node_modules/gulp/bin/gulp.js extensions-ci", - "extensions-ci-pr": "node ./node_modules/gulp/bin/gulp.js extensions-ci-pr", - "perf": "node scripts/code-perf.js", - "update-build-ts-version": "npm install typescript@next && tsc -p ./build/tsconfig.build.json" - }, - "dependencies": { - "@microsoft/1ds-core-js": "^3.2.13", - "@microsoft/1ds-post-js": "^3.2.13", - "@parcel/watcher": "2.1.0", - "@types/semver": "^7.5.8", - "@vscode/deviceid": "^0.1.1", - "@vscode/iconv-lite-umd": "0.7.0", - "@vscode/policy-watcher": "^1.1.8", - "@vscode/proxy-agent": "^0.27.0", - "@vscode/ripgrep": "^1.15.9", - "@vscode/spdlog": "^0.15.0", - "@vscode/sqlite3": "5.1.8-vscode", - "@vscode/sudo-prompt": "9.3.1", - "@vscode/tree-sitter-wasm": "^0.0.4", - "@vscode/vscode-languagedetection": "1.0.21", - "@vscode/windows-mutex": "^0.5.0", - "@vscode/windows-process-tree": "^0.6.0", - "@vscode/windows-registry": "^1.1.0", - "@xterm/addon-clipboard": "^0.2.0-beta.53", - "@xterm/addon-image": "^0.9.0-beta.70", - "@xterm/addon-ligatures": "^0.10.0-beta.70", - "@xterm/addon-search": "^0.16.0-beta.70", - "@xterm/addon-serialize": "^0.14.0-beta.70", - "@xterm/addon-unicode11": "^0.9.0-beta.70", - "@xterm/addon-webgl": "^0.19.0-beta.70", - "@xterm/headless": "^5.6.0-beta.70", - "@xterm/xterm": "^5.6.0-beta.70", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.2", - "jschardet": "3.1.4", - "kerberos": "2.1.1", - "minimist": "^1.2.6", - "native-is-elevated": "0.7.0", - "native-keymap": "^3.3.5", - "native-watchdog": "^1.4.1", - "node-pty": "^1.1.0-beta22", - "open": "^8.4.2", - "tas-client-umd": "0.2.0", - "v8-inspect-profiler": "^0.1.1", - "vscode-oniguruma": "1.7.0", - "vscode-regexpp": "^3.1.0", - "vscode-textmate": "9.1.0", - "yauzl": "^3.0.0", - "yazl": "^2.4.3" - }, - "devDependencies": { - "@playwright/test": "^1.46.1", - "@stylistic/eslint-plugin-ts": "^2.8.0", - "@types/cookie": "^0.3.3", - "@types/debug": "^4.1.5", - "@types/eslint": "^9.6.1", - "@types/gulp-svgmin": "^1.2.1", - "@types/http-proxy-agent": "^2.0.1", - "@types/kerberos": "^1.1.2", - "@types/minimist": "^1.2.1", - "@types/mocha": "^9.1.1", - "@types/node": "20.x", - "@types/sinon": "^10.0.2", - "@types/sinon-test": "^2.4.2", - "@types/trusted-types": "^1.0.6", - "@types/vscode-notebook-renderer": "^1.72.0", - "@types/webpack": "^5.28.5", - "@types/wicg-file-system-access": "^2020.9.6", - "@types/windows-foreground-love": "^0.3.0", - "@types/winreg": "^1.2.30", - "@types/yauzl": "^2.10.0", - "@types/yazl": "^2.4.2", - "@typescript-eslint/utils": "^8.8.0", - "@vscode/gulp-electron": "^1.36.0", - "@vscode/l10n-dev": "0.0.35", - "@vscode/telemetry-extractor": "^1.10.2", - "@vscode/test-cli": "^0.0.6", - "@vscode/test-electron": "^2.4.0", - "@vscode/test-web": "^0.0.62", - "@vscode/v8-heap-parser": "^0.1.0", - "@vscode/vscode-perf": "^0.0.19", - "@webgpu/types": "^0.1.44", - "ansi-colors": "^3.2.3", - "asar": "^3.0.3", - "chromium-pickle-js": "^0.2.0", - "cookie": "^0.7.2", - "copy-webpack-plugin": "^11.0.0", - "css-loader": "^6.9.1", - "cssnano": "^6.0.3", - "debounce": "^1.0.0", - "deemon": "^1.8.0", - "electron": "32.2.6", - "eslint": "^9.11.1", - "eslint-formatter-compact": "^8.40.0", - "eslint-plugin-header": "3.1.1", - "eslint-plugin-jsdoc": "^50.3.1", - "eslint-plugin-local": "^6.0.0", - "event-stream": "3.3.4", - "fancy-log": "^1.3.3", - "file-loader": "^6.2.0", - "glob": "^5.0.13", - "gulp": "^4.0.0", - "gulp-azure-storage": "^0.12.1", - "gulp-bom": "^3.0.0", - "gulp-buffer": "0.0.2", - "gulp-filter": "^5.1.0", - "gulp-flatmap": "^1.0.2", - "gulp-gunzip": "^1.0.0", - "gulp-gzip": "^1.4.2", - "gulp-json-editor": "^2.5.0", - "gulp-plumber": "^1.2.0", - "gulp-rename": "^1.2.0", - "gulp-replace": "^0.5.4", - "gulp-sourcemaps": "^3.0.0", - "gulp-svgmin": "^4.1.0", - "gulp-untar": "^0.0.7", - "husky": "^0.13.1", - "innosetup": "6.0.5", - "istanbul-lib-coverage": "^3.2.0", - "istanbul-lib-instrument": "^6.0.1", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.1", - "istanbul-reports": "^3.1.5", - "lazy.js": "^0.4.2", - "merge-options": "^1.0.1", - "mime": "^1.4.1", - "minimatch": "^3.0.4", - "minimist": "^1.2.6", - "mocha": "^10.2.0", - "mocha-junit-reporter": "^2.2.1", - "mocha-multi-reporters": "^1.5.1", - "npm-run-all": "^4.1.5", - "os-browserify": "^0.3.0", - "p-all": "^1.0.0", - "path-browserify": "^1.0.1", - "postcss": "^8.4.33", - "postcss-nesting": "^12.0.2", - "pump": "^1.0.1", - "rcedit": "^1.1.0", - "rimraf": "^2.2.8", - "sinon": "^12.0.1", - "sinon-test": "^3.1.3", - "source-map": "0.6.1", - "source-map-support": "^0.3.2", - "style-loader": "^3.3.2", - "ts-loader": "^9.5.1", - "ts-node": "^10.9.1", - "tsec": "0.2.7", - "tslib": "^2.6.3", - "typescript": "^5.8.0-dev.20241202", - "typescript-eslint": "^8.8.0", - "util": "^0.12.4", - "webpack": "^5.94.0", - "webpack-cli": "^5.1.4", - "webpack-stream": "^7.0.0", - "xml2js": "^0.5.0", - "yaserver": "^0.4.0" - }, - "overrides": { - "node-gyp-build": "4.8.1", - "kerberos@2.1.1": { - "node-addon-api": "7.1.0" - }, - "@parcel/watcher@2.1.0": { - "node-addon-api": "7.1.0" - } - }, - "repository": { - "type": "git", - "url": "https://github.com/microsoft/vscode.git" - }, - "bugs": { - "url": "https://github.com/microsoft/vscode/issues" - }, - "optionalDependencies": { - "windows-foreground-love": "0.5.0" - } + "dependencies": { + "@types/semver": "^7.5.8", + "@vscode/deviceid": "^0.1.1", + "@vscode/tree-sitter-wasm": "^0.0.4", + "@xterm/addon-clipboard": "^0.2.0-beta.53", + "@xterm/addon-image": "^0.9.0-beta.70", + "@xterm/addon-ligatures": "^0.10.0-beta.70", + "@xterm/addon-search": "^0.16.0-beta.70", + "@xterm/addon-serialize": "^0.14.0-beta.70", + "@xterm/addon-unicode11": "^0.9.0-beta.70", + "@xterm/addon-webgl": "^0.19.0-beta.70", + "@xterm/headless": "^5.6.0-beta.70", + "@xterm/xterm": "^5.6.0-beta.70", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", + "jschardet": "3.1.4", + "kerberos": "2.1.1", + "minimist": "^1.2.6", + "native-is-elevated": "0.7.0", + "native-keymap": "^3.3.5", + "native-watchdog": "^1.4.1", + "node-pty": "^1.1.0-beta22", + "open": "^8.4.2", + "tas-client-umd": "0.2.0", + "yauzl": "^3.0.0", + "yazl": "^2.4.3" + }, + "devDependencies": { + "@types/cookie": "^0.3.3", + "@types/debug": "^4.1.5", + "@types/http-proxy-agent": "^2.0.1", + "@types/kerberos": "^1.1.2", + "@types/minimist": "^1.2.1", + "@types/node": "20.x", + "@types/sinon": "^10.0.2", + "@types/trusted-types": "^1.0.6", + "@types/wicg-file-system-access": "^2020.9.6", + "@types/windows-foreground-love": "^0.3.0", + "@types/winreg": "^1.2.30", + "@types/yauzl": "^2.10.0", + "@types/yazl": "^2.4.2", + "@webgpu/types": "^0.1.44", + "ansi-colors": "^3.2.3", + "asar": "^3.0.3", + "cookie": "^0.7.2", + "css-loader": "^6.9.1", + "cssnano": "^6.0.3", + "debounce": "^1.0.0", + "deemon": "^1.8.0", + "event-stream": "3.3.4", + "fancy-log": "^1.3.3", + "file-loader": "^6.2.0", + "glob": "^5.0.13", + "innosetup": "6.0.5", + "lazy.js": "^0.4.2", + "merge-options": "^1.0.1", + "mime": "^1.4.1", + "minimatch": "^3.0.4", + "minimist": "^1.2.6", + "npm-run-all": "^4.1.5", + "os-browserify": "^0.3.0", + "p-all": "^1.0.0", + "path-browserify": "^1.0.1", + "postcss": "^8.4.33", + "postcss-nesting": "^12.0.2", + "pump": "^1.0.1", + "rcedit": "^1.1.0", + "rimraf": "^2.2.8", + "sinon": "^12.0.1", + "source-map": "0.6.1", + "source-map-support": "^0.3.2", + "style-loader": "^3.3.2", + "ts-loader": "^9.5.1", + "tsec": "0.2.7", + "tslib": "^2.6.3", + "util": "^0.12.4", + "xml2js": "^0.5.0", + "yaserver": "^0.4.0" + }, + "main": "./out/main.js", + "name": "code-oss-dev", + "optionalDependencies": { + "windows-foreground-love": "0.5.0" + }, + "overrides": { + "@parcel/watcher@2.1.0": { + "node-addon-api": "7.1.0" + }, + "kerberos@2.1.1": { + "node-addon-api": "7.1.0" + }, + "node-gyp-build": "4.8.1" + }, + "scripts": { + "7z": "7z", + "compile": "node ./node_modules/gulp/bin/gulp.js compile", + "compile-build": "node ./node_modules/gulp/bin/gulp.js compile-build", + "compile-cli": "gulp compile-cli", + "compile-extensions-build": "node ./node_modules/gulp/bin/gulp.js compile-extensions-build", + "compile-web": "node ./node_modules/gulp/bin/gulp.js compile-web", + "core-ci": "node ./node_modules/gulp/bin/gulp.js core-ci", + "core-ci-pr": "node ./node_modules/gulp/bin/gulp.js core-ci-pr", + "download-builtin-extensions": "node build/lib/builtInExtensions.js", + "download-builtin-extensions-cg": "node build/lib/builtInExtensionsCG.js", + "electron": "node build/lib/electron", + "extensions-ci": "node ./node_modules/gulp/bin/gulp.js extensions-ci", + "extensions-ci-pr": "node ./node_modules/gulp/bin/gulp.js extensions-ci-pr", + "gulp": "node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js", + "hygiene": "node ./node_modules/gulp/bin/gulp.js hygiene", + "kill-watch-clientd": "deemon --kill npm run watch-client", + "kill-watch-extensionsd": "deemon --kill npm run watch-extensions", + "kill-watch-webd": "deemon --kill npm run watch-web", + "kill-watchd": "deemon --kill npm run watch", + "minify-vscode": "node ./node_modules/gulp/bin/gulp.js minify-vscode", + "minify-vscode-reh": "node ./node_modules/gulp/bin/gulp.js minify-vscode-reh", + "minify-vscode-reh-web": "node ./node_modules/gulp/bin/gulp.js minify-vscode-reh-web", + "monaco-compile-check": "tsc -p src/tsconfig.monaco.json --noEmit", + "perf": "node scripts/code-perf.js", + "playwright-install": "npm exec playwright install", + "preinstall": "node build/npm/preinstall.js", + "restart-watch-webd": "deemon --restart npm run watch-web", + "restart-watchd": "deemon --restart npm run watch", + "smoketest": "node build/lib/preLaunch.js && cd test/smoke && npm run compile && node test/index.js", + "smoketest-no-compile": "cd test/smoke && node test/index.js", + "test-browser": "npx playwright install && node test/unit/browser/index.js", + "test-browser-no-install": "node test/unit/browser/index.js", + "test-extension": "vscode-test", + "test-node": "mocha test/unit/node/index.js --delay --ui=tdd --timeout=5000 --exit", + "tsec-compile-check": "node node_modules/tsec/bin/tsec -p src/tsconfig.tsec.json", + "update-build-ts-version": "npm install typescript@next && tsc -p ./build/tsconfig.build.json", + "update-distro": "node build/npm/update-distro.mjs", + "update-grammars": "node build/npm/update-all-grammars.mjs", + "update-localization-extension": "node build/npm/update-localization-extension.js", + "valid-layers-check": "node build/lib/layersChecker.js", + "vscode-dts-compile-check": "tsc -p src/tsconfig.vscode-dts.json && tsc -p src/tsconfig.vscode-proposed-dts.json", + "watch-cli": "node ./node_modules/gulp/bin/gulp.js watch-cli", + "watch-client": "node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js watch-client", + "watch-clientd": "deemon npm run watch-client", + "watch-extensions": "node --max-old-space-size=8192 ./node_modules/gulp/bin/gulp.js watch-extensions watch-extension-media", + "watch-extensionsd": "deemon npm run watch-extensions", + "watch-web": "node ./node_modules/gulp/bin/gulp.js watch-web", + "watch-webd": "deemon npm run watch-web", + "watchd": "deemon npm run watch", + "web": "echo 'npm run web' is replaced by './scripts/code-server' or './scripts/code-web'" + } } diff --git a/remote/package-lock.json b/remote/package-lock.json deleted file mode 100644 index f0ed1ccef11a4..0000000000000 --- a/remote/package-lock.json +++ /dev/null @@ -1,1207 +0,0 @@ -{ - "name": "vscode-reh", - "version": "0.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "vscode-reh", - "version": "0.0.0", - "dependencies": { - "@microsoft/1ds-core-js": "^3.2.13", - "@microsoft/1ds-post-js": "^3.2.13", - "@parcel/watcher": "2.1.0", - "@vscode/deviceid": "^0.1.1", - "@vscode/iconv-lite-umd": "0.7.0", - "@vscode/proxy-agent": "^0.27.0", - "@vscode/ripgrep": "^1.15.9", - "@vscode/spdlog": "^0.15.0", - "@vscode/tree-sitter-wasm": "^0.0.4", - "@vscode/vscode-languagedetection": "1.0.21", - "@vscode/windows-process-tree": "^0.6.0", - "@vscode/windows-registry": "^1.1.0", - "@xterm/addon-clipboard": "^0.2.0-beta.53", - "@xterm/addon-image": "^0.9.0-beta.70", - "@xterm/addon-ligatures": "^0.10.0-beta.70", - "@xterm/addon-search": "^0.16.0-beta.70", - "@xterm/addon-serialize": "^0.14.0-beta.70", - "@xterm/addon-unicode11": "^0.9.0-beta.70", - "@xterm/addon-webgl": "^0.19.0-beta.70", - "@xterm/headless": "^5.6.0-beta.70", - "@xterm/xterm": "^5.6.0-beta.70", - "cookie": "^0.7.0", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.2", - "jschardet": "3.1.4", - "kerberos": "2.1.1", - "minimist": "^1.2.6", - "native-watchdog": "^1.4.1", - "node-pty": "^1.1.0-beta22", - "tas-client-umd": "0.2.0", - "vscode-oniguruma": "1.7.0", - "vscode-regexpp": "^3.1.0", - "vscode-textmate": "9.1.0", - "yauzl": "^3.0.0", - "yazl": "^2.4.3" - } - }, - "node_modules/@microsoft/1ds-core-js": { - "version": "3.2.13", - "resolved": "https://registry.npmjs.org/@microsoft/1ds-core-js/-/1ds-core-js-3.2.13.tgz", - "integrity": "sha512-CluYTRWcEk0ObG5EWFNWhs87e2qchJUn0p2D21ZUa3PWojPZfPSBs4//WIE0MYV8Qg1Hdif2ZTwlM7TbYUjfAg==", - "dependencies": { - "@microsoft/applicationinsights-core-js": "2.8.15", - "@microsoft/applicationinsights-shims": "^2.0.2", - "@microsoft/dynamicproto-js": "^1.1.7" - } - }, - "node_modules/@microsoft/1ds-post-js": { - "version": "3.2.13", - "resolved": "https://registry.npmjs.org/@microsoft/1ds-post-js/-/1ds-post-js-3.2.13.tgz", - "integrity": "sha512-HgS574fdD19Bo2vPguyznL4eDw7Pcm1cVNpvbvBLWiW3x4e1FCQ3VMXChWnAxCae8Hb0XqlA2sz332ZobBavTA==", - "dependencies": { - "@microsoft/1ds-core-js": "3.2.13", - "@microsoft/applicationinsights-shims": "^2.0.2", - "@microsoft/dynamicproto-js": "^1.1.7" - } - }, - "node_modules/@microsoft/applicationinsights-core-js": { - "version": "2.8.15", - "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-core-js/-/applicationinsights-core-js-2.8.15.tgz", - "integrity": "sha512-yYAs9MyjGr2YijQdUSN9mVgT1ijI1FPMgcffpaPmYbHAVbQmF7bXudrBWHxmLzJlwl5rfep+Zgjli2e67lwUqQ==", - "dependencies": { - "@microsoft/applicationinsights-shims": "2.0.2", - "@microsoft/dynamicproto-js": "^1.1.9" - }, - "peerDependencies": { - "tslib": "*" - } - }, - "node_modules/@microsoft/applicationinsights-shims": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@microsoft/applicationinsights-shims/-/applicationinsights-shims-2.0.2.tgz", - "integrity": "sha512-PoHEgsnmcqruLNHZ/amACqdJ6YYQpED0KSRe6J7gIJTtpZC1FfFU9b1fmDKDKtFoUSrPzEh1qzO3kmRZP0betg==" - }, - "node_modules/@microsoft/dynamicproto-js": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@microsoft/dynamicproto-js/-/dynamicproto-js-1.1.9.tgz", - "integrity": "sha512-n1VPsljTSkthsAFYdiWfC+DKzK2WwcRp83Y1YAqdX552BstvsDjft9YXppjUzp11BPsapDoO1LDgrDB0XVsfNQ==" - }, - "node_modules/@parcel/watcher": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.1.0.tgz", - "integrity": "sha512-8s8yYjd19pDSsBpbkOHnT6Z2+UJSuLQx61pCFM0s5wSRvKCEMDjd/cHY3/GI1szHIWbpXpsJdg3V6ISGGx9xDw==", - "hasInstallScript": true, - "dependencies": { - "is-glob": "^4.0.3", - "micromatch": "^4.0.5", - "node-addon-api": "^3.2.1", - "node-gyp-build": "^4.3.0" - }, - "engines": { - "node": ">= 10.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/@tootallnate/once": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-3.0.0.tgz", - "integrity": "sha512-OAdBVB7rlwvLD+DiecSAyVKzKVmSfXbouCyM5I6wHGi4MGXIyFqErg1IvyJ7PI1e+GYZuZh7cCHV/c4LA8SKMw==", - "engines": { - "node": ">= 10" - } - }, - "node_modules/@vscode/deviceid": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@vscode/deviceid/-/deviceid-0.1.1.tgz", - "integrity": "sha512-ErpoMeKKNYAkR1IT3zxB5RtiTqEECdh8fxggupWvzuxpTAX77hwOI2NdJ7um+vupnXRBZVx4ugo0+dVHJWUkag==", - "hasInstallScript": true, - "dependencies": { - "fs-extra": "^11.2.0", - "uuid": "^9.0.1" - } - }, - "node_modules/@vscode/iconv-lite-umd": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@vscode/iconv-lite-umd/-/iconv-lite-umd-0.7.0.tgz", - "integrity": "sha512-bRRFxLfg5dtAyl5XyiVWz/ZBPahpOpPrNYnnHpOpUZvam4tKH35wdhP4Kj6PbM0+KdliOsPzbGWpkxcdpNB/sg==" - }, - "node_modules/@vscode/proxy-agent": { - "version": "0.27.0", - "resolved": "git+ssh://git@github.com/microsoft/vscode-proxy-agent.git#0803e0a7d1249bcb64ae9d256d0ee732b7246ea5", - "integrity": "sha512-ID1MOlynRkVN121n85Hs1enjW16B5Z1O6bMDkSPqvAMVD6eHUOqmgPZuEkBbRI43PfA6boUEY9Ndjp+0wPKtsg==", - "license": "MIT", - "dependencies": { - "@tootallnate/once": "^3.0.0", - "agent-base": "^7.0.1", - "debug": "^4.3.4", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.2", - "socks-proxy-agent": "^8.0.1", - "undici": "^6.20.1" - }, - "optionalDependencies": { - "@vscode/windows-ca-certs": "^0.3.1" - } - }, - "node_modules/@vscode/ripgrep": { - "version": "1.15.9", - "resolved": "https://registry.npmjs.org/@vscode/ripgrep/-/ripgrep-1.15.9.tgz", - "integrity": "sha512-4q2PXRvUvr3bF+LsfrifmUZgSPmCNcUZo6SbEAZgArIChchkezaxLoIeQMJe/z3CCKStvaVKpBXLxN3Z8lQjFQ==", - "hasInstallScript": true, - "dependencies": { - "https-proxy-agent": "^7.0.2", - "proxy-from-env": "^1.1.0", - "yauzl": "^2.9.2" - } - }, - "node_modules/@vscode/ripgrep/node_modules/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - }, - "node_modules/@vscode/spdlog": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/@vscode/spdlog/-/spdlog-0.15.1.tgz", - "integrity": "sha512-tVPeXmyz3/4NKqtNfNQxqcrBSSEZVIbF4lVDuDh9Nik5xhuHVceCU6cTpwmJ6yVBs+jv51SGF622txOQv95sZA==", - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "bindings": "^1.5.0", - "mkdirp": "^1.0.4", - "node-addon-api": "7.1.0" - } - }, - "node_modules/@vscode/tree-sitter-wasm": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/@vscode/tree-sitter-wasm/-/tree-sitter-wasm-0.0.4.tgz", - "integrity": "sha512-vOONG3Zxsh1I4JOA48WdQ5KiXjJAdfMvYTuHbW7b27tGtRqsPLY5WZyTwLXc5uujKHyhG3LJXE9poxRZSxTIiA==" - }, - "node_modules/@vscode/vscode-languagedetection": { - "version": "1.0.21", - "resolved": "https://registry.npmjs.org/@vscode/vscode-languagedetection/-/vscode-languagedetection-1.0.21.tgz", - "integrity": "sha512-zSUH9HYCw5qsCtd7b31yqkpaCU6jhtkKLkvOOA8yTrIRfBSOFb8PPhgmMicD7B/m+t4PwOJXzU1XDtrM9Fd3/g==", - "bin": { - "vscode-languagedetection": "cli/index.js" - } - }, - "node_modules/@vscode/windows-ca-certs": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@vscode/windows-ca-certs/-/windows-ca-certs-0.3.3.tgz", - "integrity": "sha512-C0Iq5RcH+H31GUZ8bsMORsX3LySVkGAqe4kQfUSVcCqJ0QOhXkhgwUMU7oCiqYLXaQWyXFp6Fj6eMdt05uK7VA==", - "hasInstallScript": true, - "license": "BSD", - "optional": true, - "os": [ - "win32" - ], - "dependencies": { - "node-addon-api": "^8.2.0" - } - }, - "node_modules/@vscode/windows-ca-certs/node_modules/node-addon-api": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.2.0.tgz", - "integrity": "sha512-qnyuI2ROiCkye42n9Tj5aX1ns7rzj6n7zW1XReSnLSL9v/vbLeR6fJq6PU27YU/ICfYw6W7Ouk/N7cysWu/hlw==", - "license": "MIT", - "optional": true, - "engines": { - "node": "^18 || ^20 || >= 21" - } - }, - "node_modules/@vscode/windows-process-tree": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@vscode/windows-process-tree/-/windows-process-tree-0.6.0.tgz", - "integrity": "sha512-7/DjBKKUtlmKNiAet2GRbdvfjgMKmfBeWVClIgONv8aqxGnaKca5N85eIDxh6rLMy2hKvFqIIsqgxs1Q26TWwg==", - "hasInstallScript": true, - "dependencies": { - "node-addon-api": "7.1.0" - } - }, - "node_modules/@vscode/windows-registry": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@vscode/windows-registry/-/windows-registry-1.1.0.tgz", - "integrity": "sha512-5AZzuWJpGscyiMOed0IuyEwt6iKmV5Us7zuwCDCFYMIq7tsvooO9BUiciywsvuthGz6UG4LSpeDeCxvgMVhnIw==", - "hasInstallScript": true - }, - "node_modules/@xterm/addon-clipboard": { - "version": "0.2.0-beta.53", - "resolved": "https://registry.npmjs.org/@xterm/addon-clipboard/-/addon-clipboard-0.2.0-beta.53.tgz", - "integrity": "sha512-kCcBuGvF8mwzExU+Tm9eylPvp1kXTkvm+kO0V4qP7HI3ZCw5vfKmnlRn41FvNIylsK2hnmrFtxauPHEGBy/dfA==", - "license": "MIT", - "dependencies": { - "js-base64": "^3.7.5" - }, - "peerDependencies": { - "@xterm/xterm": "^5.6.0-beta.70" - } - }, - "node_modules/@xterm/addon-image": { - "version": "0.9.0-beta.70", - "resolved": "https://registry.npmjs.org/@xterm/addon-image/-/addon-image-0.9.0-beta.70.tgz", - "integrity": "sha512-QLhy77i0sjnffkLuxj1yB/mBUJI64bbL86eMW+1g5XEsZnSevY8YwU/cEJg02PAGK0ggwQNNfiRwoO6VBCdYFg==", - "license": "MIT", - "peerDependencies": { - "@xterm/xterm": "^5.6.0-beta.70" - } - }, - "node_modules/@xterm/addon-ligatures": { - "version": "0.10.0-beta.70", - "resolved": "https://registry.npmjs.org/@xterm/addon-ligatures/-/addon-ligatures-0.10.0-beta.70.tgz", - "integrity": "sha512-BPDHHOybUWO6mjHf/RMDBjSKDl9QdyyGTyHvmlyhuI/2sma3lu98bA4U03F8nBnvj/6otzEFARuOeoN7rkfRng==", - "license": "MIT", - "dependencies": { - "font-finder": "^1.1.0", - "font-ligatures": "^1.4.1" - }, - "engines": { - "node": ">8.0.0" - }, - "peerDependencies": { - "@xterm/xterm": "^5.6.0-beta.70" - } - }, - "node_modules/@xterm/addon-search": { - "version": "0.16.0-beta.70", - "resolved": "https://registry.npmjs.org/@xterm/addon-search/-/addon-search-0.16.0-beta.70.tgz", - "integrity": "sha512-uaNBf77cr5Jikj69TDkTfe3V3wHA+4tDTFcv8DwJ/KGORPLUfBk8cn9HpbIJ+0jc1kOZr5xDrEjaYNwEVDkGeQ==", - "license": "MIT", - "peerDependencies": { - "@xterm/xterm": "^5.6.0-beta.70" - } - }, - "node_modules/@xterm/addon-serialize": { - "version": "0.14.0-beta.70", - "resolved": "https://registry.npmjs.org/@xterm/addon-serialize/-/addon-serialize-0.14.0-beta.70.tgz", - "integrity": "sha512-4ijqHU7xDRcZ4Gm6yN/tKsZzovUwzttE9/pPfhxpWIgSdm9c8i5R4rGyOAlAZCnuU3DT5vPplQO7W/0zwAmJsQ==", - "license": "MIT", - "peerDependencies": { - "@xterm/xterm": "^5.6.0-beta.70" - } - }, - "node_modules/@xterm/addon-unicode11": { - "version": "0.9.0-beta.70", - "resolved": "https://registry.npmjs.org/@xterm/addon-unicode11/-/addon-unicode11-0.9.0-beta.70.tgz", - "integrity": "sha512-9UE4v2SpWtqd85Hqvk8LW4QA9Phe93RMVltrNtt9jCUmkAok/QLFOEbLqoq2JUOvlmfsYfXmIl11Wg4CYIsvwA==", - "license": "MIT", - "peerDependencies": { - "@xterm/xterm": "^5.6.0-beta.70" - } - }, - "node_modules/@xterm/addon-webgl": { - "version": "0.19.0-beta.70", - "resolved": "https://registry.npmjs.org/@xterm/addon-webgl/-/addon-webgl-0.19.0-beta.70.tgz", - "integrity": "sha512-3BkmF24i66SHCfAkcHy1VC6H715qyelfOIjd6n7sTqHon56J1bUO782Q1al/MK0vSvplElBRKVdR31SDvITzpg==", - "license": "MIT", - "peerDependencies": { - "@xterm/xterm": "^5.6.0-beta.70" - } - }, - "node_modules/@xterm/headless": { - "version": "5.6.0-beta.70", - "resolved": "https://registry.npmjs.org/@xterm/headless/-/headless-5.6.0-beta.70.tgz", - "integrity": "sha512-npSJzmtJq8LLAzV3nwD9KkBQLNWSusi+cOBPyc3zlYYE63Vkqbtbp/iQS27zH2GxJ95rzCzDwnX6VOn0OoUPYQ==", - "license": "MIT" - }, - "node_modules/@xterm/xterm": { - "version": "5.6.0-beta.70", - "resolved": "https://registry.npmjs.org/@xterm/xterm/-/xterm-5.6.0-beta.70.tgz", - "integrity": "sha512-qviQMVWhRtgPn4z8PHNH6D/ffSKkNBHmUX1HyJxl325QM2xF8M8met83uFv7JZm7a5OQYScnLGsFAoTreSgdew==", - "license": "MIT" - }, - "node_modules/agent-base": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", - "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", - "dependencies": { - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "dependencies": { - "file-uri-to-path": "1.0.0" - } - }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "engines": { - "node": "*" - } - }, - "node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" - }, - "node_modules/cookie": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", - "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "dependencies": { - "mimic-response": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/detect-libc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", - "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", - "engines": { - "node": ">=8" - } - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/expand-template": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", - "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", - "engines": { - "node": ">=6" - } - }, - "node_modules/fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "dependencies": { - "pend": "~1.2.0" - } - }, - "node_modules/file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/font-finder": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/font-finder/-/font-finder-1.1.0.tgz", - "integrity": "sha512-wpCL2uIbi6GurJbU7ZlQ3nGd61Ho+dSU6U83/xJT5UPFfN35EeCW/rOtS+5k+IuEZu2SYmHzDIPL9eA5tSYRAw==", - "license": "MIT", - "dependencies": { - "get-system-fonts": "^2.0.0", - "promise-stream-reader": "^1.0.1" - }, - "engines": { - "node": ">8.0.0" - } - }, - "node_modules/font-ligatures": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/font-ligatures/-/font-ligatures-1.4.1.tgz", - "integrity": "sha512-7W6zlfyhvCqShZ5ReUWqmSd9vBaUudW0Hxis+tqUjtHhsPU+L3Grf8mcZAtCiXHTzorhwdRTId2WeH/88gdFkw==", - "license": "MIT", - "dependencies": { - "font-finder": "^1.0.3", - "lru-cache": "^6.0.0", - "opentype.js": "^0.8.0" - }, - "engines": { - "node": ">8.0.0" - } - }, - "node_modules/fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" - }, - "node_modules/fs-extra": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", - "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=14.14" - } - }, - "node_modules/get-system-fonts": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/get-system-fonts/-/get-system-fonts-2.0.2.tgz", - "integrity": "sha512-zzlgaYnHMIEgHRrfC7x0Qp0Ylhw/sHpM6MHXeVBTYIsvGf5GpbnClB+Q6rAPdn+0gd2oZZIo6Tj3EaWrt4VhDQ==", - "license": "MIT", - "engines": { - "node": ">8.0.0" - } - }, - "node_modules/github-from-package": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4= sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==" - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" - }, - "node_modules/http-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", - "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", - "dependencies": { - "agent-base": "^7.0.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" - }, - "node_modules/ip-address": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", - "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", - "dependencies": { - "jsbn": "1.1.0", - "sprintf-js": "^1.1.3" - }, - "engines": { - "node": ">= 12" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/js-base64": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-3.7.7.tgz", - "integrity": "sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==" - }, - "node_modules/jsbn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", - "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" - }, - "node_modules/jschardet": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/jschardet/-/jschardet-3.1.4.tgz", - "integrity": "sha512-/kmVISmrwVwtyYU40iQUOp3SUPk2dhNCMsZBQX0R1/jZ8maaXJ/oZIzUOiyOqcgtLnETFKYChbJ5iDC/eWmFHg==", - "license": "LGPL-2.1+", - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/kerberos": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/kerberos/-/kerberos-2.1.1.tgz", - "integrity": "sha512-414s1G/qgK2T60cXnZsHbtRj8Ynjg0DBlQWeY99tkyqQ2e8vGgFHvxRdvjTlLHg/SxBA0zLQcGE6Pk6Dfq/BCA==", - "hasInstallScript": true, - "dependencies": { - "bindings": "^1.5.0", - "node-addon-api": "^6.1.0", - "prebuild-install": "^7.1.2" - }, - "engines": { - "node": ">=12.9.0" - } - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" - }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/napi-build-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" - }, - "node_modules/native-watchdog": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/native-watchdog/-/native-watchdog-1.4.2.tgz", - "integrity": "sha512-iT3Uj6FFdrW5vHbQ/ybiznLus9oiUoMJ8A8nyugXv9rV3EBhIodmGs+mztrwQyyBc+PB5/CrskAH/WxaUVRRSQ==", - "hasInstallScript": true - }, - "node_modules/node-abi": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.8.0.tgz", - "integrity": "sha512-tzua9qWWi7iW4I42vUPKM+SfaF0vQSLAm4yO5J83mSwB7GeoWrDKC/K+8YCnYNwqP5duwazbw2X9l4m8SC2cUw==", - "dependencies": { - "semver": "^7.3.5" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/node-addon-api": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.0.tgz", - "integrity": "sha512-mNcltoe1R8o7STTegSOHdnJNN7s5EUvhoS7ShnTHDyOSd+8H+UdWODq6qSv67PjC8Zc5JRT8+oLAMCr0SIXw7g==", - "license": "MIT", - "engines": { - "node": "^16 || ^18 || >= 20" - } - }, - "node_modules/node-gyp-build": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.1.tgz", - "integrity": "sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==", - "bin": { - "node-gyp-build": "bin.js", - "node-gyp-build-optional": "optional.js", - "node-gyp-build-test": "build-test.js" - } - }, - "node_modules/node-pty": { - "version": "1.1.0-beta22", - "resolved": "https://registry.npmjs.org/node-pty/-/node-pty-1.1.0-beta22.tgz", - "integrity": "sha512-CpT334H2oAIULlENvd9U+VBW4ZL+G3clOnpXYzUIurlPCLnl/9xen/KDHBLRcwhZuWcHxIrsCxR1TDCdVDtr0w==", - "hasInstallScript": true, - "dependencies": { - "node-addon-api": "^7.1.0" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E= sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/opentype.js": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/opentype.js/-/opentype.js-0.8.0.tgz", - "integrity": "sha512-FQHR4oGP+a0m/f6yHoRpBOIbn/5ZWxKd4D/djHVJu8+KpBTYrJda0b7mLcgDEMWXE9xBCJm+qb0yv6FcvPjukg==", - "license": "MIT", - "dependencies": { - "tiny-inflate": "^1.0.2" - }, - "bin": { - "ot": "bin/ot" - } - }, - "node_modules/pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA= sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/prebuild-install": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.2.tgz", - "integrity": "sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==", - "dependencies": { - "detect-libc": "^2.0.0", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^1.0.1", - "node-abi": "^3.3.0", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^4.0.0", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - }, - "bin": { - "prebuild-install": "bin.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/promise-stream-reader": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-stream-reader/-/promise-stream-reader-1.0.1.tgz", - "integrity": "sha512-Tnxit5trUjBAqqZCGWwjyxhmgMN4hGrtpW3Oc/tRI4bpm/O2+ej72BB08l6JBnGQgVDGCLvHFGjGgQS6vzhwXg==", - "license": "MIT", - "engines": { - "node": ">8.0.0" - } - }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, - "node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/simple-get": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", - "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "decompress-response": "^6.0.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, - "node_modules/smart-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", - "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", - "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/socks": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", - "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", - "dependencies": { - "ip-address": "^9.0.5", - "smart-buffer": "^4.2.0" - }, - "engines": { - "node": ">= 10.0.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/socks-proxy-agent": { - "version": "8.0.4", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz", - "integrity": "sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==", - "dependencies": { - "agent-base": "^7.1.1", - "debug": "^4.3.4", - "socks": "^2.8.3" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/sprintf-js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo= sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "node_modules/tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tas-client-umd": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/tas-client-umd/-/tas-client-umd-0.2.0.tgz", - "integrity": "sha512-oezN7mJVm5qZDVEby7OzxCLKUpUN5of0rY4dvOWaDF2JZBlGpd3BXceFN8B53qlTaIkVSzP65aAMT0Vc+/N25Q==" - }, - "node_modules/tiny-inflate": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz", - "integrity": "sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==", - "license": "MIT" - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/undici": { - "version": "6.20.1", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.20.1.tgz", - "integrity": "sha512-AjQF1QsmqfJys+LXfGTNum+qw4S88CojRInG/6t31W/1fk6G59s92bnAvGz5Cmur+kQv2SURXEvvudLmbrE8QA==", - "license": "MIT", - "engines": { - "node": ">=18.17" - } - }, - "node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/vscode-oniguruma": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", - "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==" - }, - "node_modules/vscode-regexpp": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/vscode-regexpp/-/vscode-regexpp-3.1.0.tgz", - "integrity": "sha512-pqtN65VC1jRLawfluX4Y80MMG0DHJydWhe5ZwMHewZD6sys4LbU6lHwFAHxeuaVE6Y6+xZOtAw+9hvq7/0ejkg==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/vscode-textmate": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-9.1.0.tgz", - "integrity": "sha512-lxKSVp2DkFOx9RDAvpiYUrB9/KT1fAfi1aE8CBGstP8N7rLF+Seifj8kDA198X0mYj1CjQUC+81+nQf8CO0nVA==" - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "node_modules/yauzl": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-3.1.1.tgz", - "integrity": "sha512-MPxA7oN5cvGV0wzfkeHKF2/+Q4TkMpHSWGRy/96I4Cozljmx0ph91+Muxh6HegEtDC4GftJ8qYDE51vghFiEYA==", - "dependencies": { - "buffer-crc32": "~0.2.3", - "pend": "~1.2.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yazl": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.4.3.tgz", - "integrity": "sha1-7CblzIfVYBud+EMtvdPNLlFzoHE= sha512-cIUrm3/81iF/BzuyORI7ppz1vGHAhA62JYzAFFC+rwJ2jQF1LcYxY9UXx4XyUXojkCnol0SvPuc+Toc7FO4W8g==", - "dependencies": { - "buffer-crc32": "~0.2.3" - } - } - } -} diff --git a/remote/package.json b/remote/package.json index 33afee907a6c0..06af065e301f7 100644 --- a/remote/package.json +++ b/remote/package.json @@ -1,51 +1,36 @@ { - "name": "vscode-reh", - "version": "0.0.0", - "private": true, - "dependencies": { - "@microsoft/1ds-core-js": "^3.2.13", - "@microsoft/1ds-post-js": "^3.2.13", - "@parcel/watcher": "2.1.0", - "@vscode/deviceid": "^0.1.1", - "@vscode/iconv-lite-umd": "0.7.0", - "@vscode/proxy-agent": "^0.27.0", - "@vscode/ripgrep": "^1.15.9", - "@vscode/spdlog": "^0.15.0", - "@vscode/tree-sitter-wasm": "^0.0.4", - "@vscode/vscode-languagedetection": "1.0.21", - "@vscode/windows-process-tree": "^0.6.0", - "@vscode/windows-registry": "^1.1.0", - "@xterm/addon-clipboard": "^0.2.0-beta.53", - "@xterm/addon-image": "^0.9.0-beta.70", - "@xterm/addon-ligatures": "^0.10.0-beta.70", - "@xterm/addon-search": "^0.16.0-beta.70", - "@xterm/addon-serialize": "^0.14.0-beta.70", - "@xterm/addon-unicode11": "^0.9.0-beta.70", - "@xterm/addon-webgl": "^0.19.0-beta.70", - "@xterm/headless": "^5.6.0-beta.70", - "@xterm/xterm": "^5.6.0-beta.70", - "cookie": "^0.7.0", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.2", - "jschardet": "3.1.4", - "kerberos": "2.1.1", - "minimist": "^1.2.6", - "native-watchdog": "^1.4.1", - "node-pty": "^1.1.0-beta22", - "tas-client-umd": "0.2.0", - "vscode-oniguruma": "1.7.0", - "vscode-regexpp": "^3.1.0", - "vscode-textmate": "9.1.0", - "yauzl": "^3.0.0", - "yazl": "^2.4.3" - }, - "overrides": { - "node-gyp-build": "4.8.1", - "kerberos@2.1.1": { - "node-addon-api": "7.1.0" - }, - "@parcel/watcher@2.1.0": { - "node-addon-api": "7.1.0" - } - } + "dependencies": { + "@vscode/deviceid": "^0.1.1", + "@vscode/tree-sitter-wasm": "^0.0.4", + "@xterm/addon-clipboard": "^0.2.0-beta.53", + "@xterm/addon-image": "^0.9.0-beta.70", + "@xterm/addon-ligatures": "^0.10.0-beta.70", + "@xterm/addon-search": "^0.16.0-beta.70", + "@xterm/addon-serialize": "^0.14.0-beta.70", + "@xterm/addon-unicode11": "^0.9.0-beta.70", + "@xterm/addon-webgl": "^0.19.0-beta.70", + "@xterm/headless": "^5.6.0-beta.70", + "@xterm/xterm": "^5.6.0-beta.70", + "cookie": "^0.7.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", + "jschardet": "3.1.4", + "kerberos": "2.1.1", + "minimist": "^1.2.6", + "native-watchdog": "^1.4.1", + "node-pty": "^1.1.0-beta22", + "tas-client-umd": "0.2.0", + "yauzl": "^3.0.0", + "yazl": "^2.4.3" + }, + "name": "vscode-reh", + "overrides": { + "@parcel/watcher@2.1.0": { + "node-addon-api": "7.1.0" + }, + "kerberos@2.1.1": { + "node-addon-api": "7.1.0" + }, + "node-gyp-build": "4.8.1" + } } diff --git a/src/vs/editor/browser/config/migrateOptions.ts b/src/vs/editor/browser/config/migrateOptions.ts deleted file mode 100644 index 4adf4e3d848ea..0000000000000 --- a/src/vs/editor/browser/config/migrateOptions.ts +++ /dev/null @@ -1,234 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { IEditorOptions } from '../../common/config/editorOptions.js'; - -export interface ISettingsReader { - (key: string): any; -} - -export interface ISettingsWriter { - (key: string, value: any): void; -} - -export class EditorSettingMigration { - - public static items: EditorSettingMigration[] = []; - - constructor( - public readonly key: string, - public readonly migrate: (value: any, read: ISettingsReader, write: ISettingsWriter) => void - ) { } - - apply(options: any): void { - const value = EditorSettingMigration._read(options, this.key); - const read = (key: string) => EditorSettingMigration._read(options, key); - const write = (key: string, value: any) => EditorSettingMigration._write(options, key, value); - this.migrate(value, read, write); - } - - private static _read(source: any, key: string): any { - if (typeof source === 'undefined') { - return undefined; - } - - const firstDotIndex = key.indexOf('.'); - if (firstDotIndex >= 0) { - const firstSegment = key.substring(0, firstDotIndex); - return this._read(source[firstSegment], key.substring(firstDotIndex + 1)); - } - return source[key]; - } - - private static _write(target: any, key: string, value: any): void { - const firstDotIndex = key.indexOf('.'); - if (firstDotIndex >= 0) { - const firstSegment = key.substring(0, firstDotIndex); - target[firstSegment] = target[firstSegment] || {}; - this._write(target[firstSegment], key.substring(firstDotIndex + 1), value); - return; - } - target[key] = value; - } -} - -function registerEditorSettingMigration(key: string, migrate: (value: any, read: ISettingsReader, write: ISettingsWriter) => void): void { - EditorSettingMigration.items.push(new EditorSettingMigration(key, migrate)); -} - -function registerSimpleEditorSettingMigration(key: string, values: [any, any][]): void { - registerEditorSettingMigration(key, (value, read, write) => { - if (typeof value !== 'undefined') { - for (const [oldValue, newValue] of values) { - if (value === oldValue) { - write(key, newValue); - return; - } - } - } - }); -} - -/** - * Compatibility with old options - */ -export function migrateOptions(options: IEditorOptions): void { - EditorSettingMigration.items.forEach(migration => migration.apply(options)); -} - -registerSimpleEditorSettingMigration('wordWrap', [[true, 'on'], [false, 'off']]); -registerSimpleEditorSettingMigration('lineNumbers', [[true, 'on'], [false, 'off']]); -registerSimpleEditorSettingMigration('cursorBlinking', [['visible', 'solid']]); -registerSimpleEditorSettingMigration('renderWhitespace', [[true, 'boundary'], [false, 'none']]); -registerSimpleEditorSettingMigration('renderLineHighlight', [[true, 'line'], [false, 'none']]); -registerSimpleEditorSettingMigration('acceptSuggestionOnEnter', [[true, 'on'], [false, 'off']]); -registerSimpleEditorSettingMigration('tabCompletion', [[false, 'off'], [true, 'onlySnippets']]); -registerSimpleEditorSettingMigration('hover', [[true, { enabled: true }], [false, { enabled: false }]]); -registerSimpleEditorSettingMigration('parameterHints', [[true, { enabled: true }], [false, { enabled: false }]]); -registerSimpleEditorSettingMigration('autoIndent', [[false, 'advanced'], [true, 'full']]); -registerSimpleEditorSettingMigration('matchBrackets', [[true, 'always'], [false, 'never']]); -registerSimpleEditorSettingMigration('renderFinalNewline', [[true, 'on'], [false, 'off']]); -registerSimpleEditorSettingMigration('cursorSmoothCaretAnimation', [[true, 'on'], [false, 'off']]); -registerSimpleEditorSettingMigration('occurrencesHighlight', [[true, 'singleFile'], [false, 'off']]); -registerSimpleEditorSettingMigration('wordBasedSuggestions', [[true, 'matchingDocuments'], [false, 'off']]); -registerSimpleEditorSettingMigration('defaultColorDecorators', [[true, 'auto'], [false, 'never']]); - -registerEditorSettingMigration('autoClosingBrackets', (value, read, write) => { - if (value === false) { - write('autoClosingBrackets', 'never'); - if (typeof read('autoClosingQuotes') === 'undefined') { - write('autoClosingQuotes', 'never'); - } - if (typeof read('autoSurround') === 'undefined') { - write('autoSurround', 'never'); - } - } -}); - -registerEditorSettingMigration('renderIndentGuides', (value, read, write) => { - if (typeof value !== 'undefined') { - write('renderIndentGuides', undefined); - if (typeof read('guides.indentation') === 'undefined') { - write('guides.indentation', !!value); - } - } -}); - -registerEditorSettingMigration('highlightActiveIndentGuide', (value, read, write) => { - if (typeof value !== 'undefined') { - write('highlightActiveIndentGuide', undefined); - if (typeof read('guides.highlightActiveIndentation') === 'undefined') { - write('guides.highlightActiveIndentation', !!value); - } - } -}); - -const suggestFilteredTypesMapping: Record = { - method: 'showMethods', - function: 'showFunctions', - constructor: 'showConstructors', - deprecated: 'showDeprecated', - field: 'showFields', - variable: 'showVariables', - class: 'showClasses', - struct: 'showStructs', - interface: 'showInterfaces', - module: 'showModules', - property: 'showProperties', - event: 'showEvents', - operator: 'showOperators', - unit: 'showUnits', - value: 'showValues', - constant: 'showConstants', - enum: 'showEnums', - enumMember: 'showEnumMembers', - keyword: 'showKeywords', - text: 'showWords', - color: 'showColors', - file: 'showFiles', - reference: 'showReferences', - folder: 'showFolders', - typeParameter: 'showTypeParameters', - snippet: 'showSnippets', -}; - -registerEditorSettingMigration('suggest.filteredTypes', (value, read, write) => { - if (value && typeof value === 'object') { - for (const entry of Object.entries(suggestFilteredTypesMapping)) { - const v = value[entry[0]]; - if (v === false) { - if (typeof read(`suggest.${entry[1]}`) === 'undefined') { - write(`suggest.${entry[1]}`, false); - } - } - } - write('suggest.filteredTypes', undefined); - } -}); - -registerEditorSettingMigration('quickSuggestions', (input, read, write) => { - if (typeof input === 'boolean') { - const value = input ? 'on' : 'off'; - const newValue = { comments: value, strings: value, other: value }; - write('quickSuggestions', newValue); - } -}); - -// Sticky Scroll - -registerEditorSettingMigration('experimental.stickyScroll.enabled', (value, read, write) => { - if (typeof value === 'boolean') { - write('experimental.stickyScroll.enabled', undefined); - if (typeof read('stickyScroll.enabled') === 'undefined') { - write('stickyScroll.enabled', value); - } - } -}); - -registerEditorSettingMigration('experimental.stickyScroll.maxLineCount', (value, read, write) => { - if (typeof value === 'number') { - write('experimental.stickyScroll.maxLineCount', undefined); - if (typeof read('stickyScroll.maxLineCount') === 'undefined') { - write('stickyScroll.maxLineCount', value); - } - } -}); - -// Code Actions on Save -registerEditorSettingMigration('codeActionsOnSave', (value, read, write) => { - if (value && typeof value === 'object') { - let toBeModified = false; - const newValue = {} as any; - for (const entry of Object.entries(value)) { - if (typeof entry[1] === 'boolean') { - toBeModified = true; - newValue[entry[0]] = entry[1] ? 'explicit' : 'never'; - } else { - newValue[entry[0]] = entry[1]; - } - } - if (toBeModified) { - write(`codeActionsOnSave`, newValue); - } - } -}); - -// Migrate Quick Fix Settings -registerEditorSettingMigration('codeActionWidget.includeNearbyQuickfixes', (value, read, write) => { - if (typeof value === 'boolean') { - write('codeActionWidget.includeNearbyQuickfixes', undefined); - if (typeof read('codeActionWidget.includeNearbyQuickFixes') === 'undefined') { - write('codeActionWidget.includeNearbyQuickFixes', value); - } - } -}); - -// Migrate the lightbulb settings -registerEditorSettingMigration('lightbulb.enabled', (value, read, write) => { - if (typeof value === 'boolean') { - write('lightbulb.enabled', value ? undefined : 'off'); - } -}); - diff --git a/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.ts deleted file mode 100644 index ed20f95580a8e..0000000000000 --- a/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.ts +++ /dev/null @@ -1,2480 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import '../../services/markerDecorations.js'; -import * as dom from '../../../../base/browser/dom.js'; -import { IKeyboardEvent } from '../../../../base/browser/keyboardEvent.js'; -import { IMouseWheelEvent } from '../../../../base/browser/mouseEvent.js'; -import { Color } from '../../../../base/common/color.js'; -import { onUnexpectedError } from '../../../../base/common/errors.js'; -import { Emitter, EmitterOptions, Event, EventDeliveryQueue, createEventDeliveryQueue } from '../../../../base/common/event.js'; -import { hash } from '../../../../base/common/hash.js'; -import { Disposable, DisposableStore, IDisposable, dispose } from '../../../../base/common/lifecycle.js'; -import { Schemas } from '../../../../base/common/network.js'; -import './editor.css'; -import { applyFontInfo } from '../../config/domFontInfo.js'; -import { EditorConfiguration, IEditorConstructionOptions } from '../../config/editorConfiguration.js'; -import { TabFocus } from '../../config/tabFocus.js'; -import * as editorBrowser from '../../editorBrowser.js'; -import { EditorExtensionsRegistry, IEditorContributionDescription } from '../../editorExtensions.js'; -import { ICodeEditorService } from '../../services/codeEditorService.js'; -import { IContentWidgetData, IGlyphMarginWidgetData, IOverlayWidgetData, View } from '../../view.js'; -import { DOMLineBreaksComputerFactory } from '../../view/domLineBreaksComputer.js'; -import { ICommandDelegate } from '../../view/viewController.js'; -import { ViewUserInputEvents } from '../../view/viewUserInputEvents.js'; -import { CodeEditorContributions } from './codeEditorContributions.js'; -import { IEditorConfiguration } from '../../../common/config/editorConfiguration.js'; -import { ConfigurationChangedEvent, EditorLayoutInfo, EditorOption, FindComputedEditorOptionValueById, IComputedEditorOptions, IEditorOptions, filterValidationDecorations } from '../../../common/config/editorOptions.js'; -import { CursorColumns } from '../../../common/core/cursorColumns.js'; -import { IDimension } from '../../../common/core/dimension.js'; -import { editorUnnecessaryCodeOpacity } from '../../../common/core/editorColorRegistry.js'; -import { IPosition, Position } from '../../../common/core/position.js'; -import { IRange, Range } from '../../../common/core/range.js'; -import { ISelection, Selection } from '../../../common/core/selection.js'; -import { IWordAtPosition } from '../../../common/core/wordHelper.js'; -import { WordOperations } from '../../../common/cursor/cursorWordOperations.js'; -import { CursorChangeReason, ICursorPositionChangedEvent, ICursorSelectionChangedEvent } from '../../../common/cursorEvents.js'; -import { InternalEditorAction } from '../../../common/editorAction.js'; -import * as editorCommon from '../../../common/editorCommon.js'; -import { EditorContextKeys } from '../../../common/editorContextKeys.js'; -import { ILanguageConfigurationService } from '../../../common/languages/languageConfigurationRegistry.js'; -import { EndOfLinePreference, IAttachedView, ICursorStateComputer, IIdentifiedSingleEditOperation, IModelDecoration, IModelDecorationOptions, IModelDecorationsChangeAccessor, IModelDeltaDecoration, ITextModel } from '../../../common/model.js'; -import { ClassName } from '../../../common/model/intervalTree.js'; -import { ModelDecorationOptions } from '../../../common/model/textModel.js'; -import { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js'; -import { IModelContentChangedEvent, IModelDecorationsChangedEvent, IModelLanguageChangedEvent, IModelLanguageConfigurationChangedEvent, IModelOptionsChangedEvent, IModelTokensChangedEvent } from '../../../common/textModelEvents.js'; -import { VerticalRevealType } from '../../../common/viewEvents.js'; -import { IEditorWhitespace, IViewModel } from '../../../common/viewModel.js'; -import { MonospaceLineBreaksComputerFactory } from '../../../common/viewModel/monospaceLineBreaksComputer.js'; -import { ViewModel } from '../../../common/viewModel/viewModelImpl.js'; -import { OutgoingViewModelEventKind } from '../../../common/viewModelEventDispatcher.js'; -import * as nls from '../../../../nls.js'; -import { IAccessibilityService } from '../../../../platform/accessibility/common/accessibility.js'; -import { ICommandService } from '../../../../platform/commands/common/commands.js'; -import { ContextKeyValue, IContextKey, IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js'; -import { IInstantiationService, ServicesAccessor } from '../../../../platform/instantiation/common/instantiation.js'; -import { ServiceCollection } from '../../../../platform/instantiation/common/serviceCollection.js'; -import { INotificationService, Severity } from '../../../../platform/notification/common/notification.js'; -import { editorErrorForeground, editorHintForeground, editorInfoForeground, editorWarningForeground } from '../../../../platform/theme/common/colorRegistry.js'; -import { IThemeService, registerThemingParticipant } from '../../../../platform/theme/common/themeService.js'; -import { MenuId } from '../../../../platform/actions/common/actions.js'; - -export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeEditor { - - private static readonly dropIntoEditorDecorationOptions = ModelDecorationOptions.register({ - description: 'workbench-dnd-target', - className: 'dnd-target' - }); - - //#region Eventing - - private readonly _deliveryQueue = createEventDeliveryQueue(); - protected readonly _contributions: CodeEditorContributions = this._register(new CodeEditorContributions()); - - private readonly _onDidDispose: Emitter = this._register(new Emitter()); - public readonly onDidDispose: Event = this._onDidDispose.event; - - private readonly _onDidChangeModelContent: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); - public readonly onDidChangeModelContent: Event = this._onDidChangeModelContent.event; - - private readonly _onDidChangeModelLanguage: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); - public readonly onDidChangeModelLanguage: Event = this._onDidChangeModelLanguage.event; - - private readonly _onDidChangeModelLanguageConfiguration: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); - public readonly onDidChangeModelLanguageConfiguration: Event = this._onDidChangeModelLanguageConfiguration.event; - - private readonly _onDidChangeModelOptions: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); - public readonly onDidChangeModelOptions: Event = this._onDidChangeModelOptions.event; - - private readonly _onDidChangeModelDecorations: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); - public readonly onDidChangeModelDecorations: Event = this._onDidChangeModelDecorations.event; - - private readonly _onDidChangeModelTokens: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); - public readonly onDidChangeModelTokens: Event = this._onDidChangeModelTokens.event; - - private readonly _onDidChangeConfiguration: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); - public readonly onDidChangeConfiguration: Event = this._onDidChangeConfiguration.event; - - protected readonly _onWillChangeModel: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); - public readonly onWillChangeModel: Event = this._onWillChangeModel.event; - - protected readonly _onDidChangeModel: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); - public readonly onDidChangeModel: Event = this._onDidChangeModel.event; - - private readonly _onDidChangeCursorPosition: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); - public readonly onDidChangeCursorPosition: Event = this._onDidChangeCursorPosition.event; - - private readonly _onDidChangeCursorSelection: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); - public readonly onDidChangeCursorSelection: Event = this._onDidChangeCursorSelection.event; - - private readonly _onDidAttemptReadOnlyEdit: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); - public readonly onDidAttemptReadOnlyEdit: Event = this._onDidAttemptReadOnlyEdit.event; - - private readonly _onDidLayoutChange: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); - public readonly onDidLayoutChange: Event = this._onDidLayoutChange.event; - - private readonly _editorTextFocus: BooleanEventEmitter = this._register(new BooleanEventEmitter({ deliveryQueue: this._deliveryQueue })); - public readonly onDidFocusEditorText: Event = this._editorTextFocus.onDidChangeToTrue; - public readonly onDidBlurEditorText: Event = this._editorTextFocus.onDidChangeToFalse; - - private readonly _editorWidgetFocus: BooleanEventEmitter = this._register(new BooleanEventEmitter({ deliveryQueue: this._deliveryQueue })); - public readonly onDidFocusEditorWidget: Event = this._editorWidgetFocus.onDidChangeToTrue; - public readonly onDidBlurEditorWidget: Event = this._editorWidgetFocus.onDidChangeToFalse; - - private readonly _onWillType: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); - public readonly onWillType = this._onWillType.event; - - private readonly _onDidType: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); - public readonly onDidType = this._onDidType.event; - - private readonly _onDidCompositionStart: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); - public readonly onDidCompositionStart = this._onDidCompositionStart.event; - - private readonly _onDidCompositionEnd: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); - public readonly onDidCompositionEnd = this._onDidCompositionEnd.event; - - private readonly _onDidPaste: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); - public readonly onDidPaste = this._onDidPaste.event; - - private readonly _onMouseUp: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); - public readonly onMouseUp: Event = this._onMouseUp.event; - - private readonly _onMouseDown: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); - public readonly onMouseDown: Event = this._onMouseDown.event; - - private readonly _onMouseDrag: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); - public readonly onMouseDrag: Event = this._onMouseDrag.event; - - private readonly _onMouseDrop: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); - public readonly onMouseDrop: Event = this._onMouseDrop.event; - - private readonly _onMouseDropCanceled: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); - public readonly onMouseDropCanceled: Event = this._onMouseDropCanceled.event; - - private readonly _onDropIntoEditor = this._register(new InteractionEmitter<{ readonly position: IPosition; readonly event: DragEvent }>(this._contributions, this._deliveryQueue)); - public readonly onDropIntoEditor = this._onDropIntoEditor.event; - - private readonly _onContextMenu: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); - public readonly onContextMenu: Event = this._onContextMenu.event; - - private readonly _onMouseMove: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); - public readonly onMouseMove: Event = this._onMouseMove.event; - - private readonly _onMouseLeave: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); - public readonly onMouseLeave: Event = this._onMouseLeave.event; - - private readonly _onMouseWheel: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); - public readonly onMouseWheel: Event = this._onMouseWheel.event; - - private readonly _onKeyUp: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); - public readonly onKeyUp: Event = this._onKeyUp.event; - - private readonly _onKeyDown: Emitter = this._register(new InteractionEmitter(this._contributions, this._deliveryQueue)); - public readonly onKeyDown: Event = this._onKeyDown.event; - - private readonly _onDidContentSizeChange: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); - public readonly onDidContentSizeChange: Event = this._onDidContentSizeChange.event; - - private readonly _onDidScrollChange: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); - public readonly onDidScrollChange: Event = this._onDidScrollChange.event; - - private readonly _onDidChangeViewZones: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); - public readonly onDidChangeViewZones: Event = this._onDidChangeViewZones.event; - - private readonly _onDidChangeHiddenAreas: Emitter = this._register(new Emitter({ deliveryQueue: this._deliveryQueue })); - public readonly onDidChangeHiddenAreas: Event = this._onDidChangeHiddenAreas.event; - - private _updateCounter = 0; - - private readonly _onWillTriggerEditorOperationEvent: Emitter = this._register(new Emitter()); - public readonly onWillTriggerEditorOperationEvent: Event = this._onWillTriggerEditorOperationEvent.event; - - private readonly _onBeginUpdate: Emitter = this._register(new Emitter()); - public readonly onBeginUpdate: Event = this._onBeginUpdate.event; - - private readonly _onEndUpdate: Emitter = this._register(new Emitter()); - public readonly onEndUpdate: Event = this._onEndUpdate.event; - - private readonly _onBeforeExecuteEdit = this._register(new Emitter<{ source: string | undefined }>()); - public readonly onBeforeExecuteEdit = this._onBeforeExecuteEdit.event; - - //#endregion - - public get isSimpleWidget(): boolean { - return this._configuration.isSimpleWidget; - } - - public get contextMenuId(): MenuId { - return this._configuration.contextMenuId; - } - - private readonly _telemetryData?: object; - - private readonly _domElement: HTMLElement; - private readonly _overflowWidgetsDomNode: HTMLElement | undefined; - private readonly _id: number; - private readonly _configuration: IEditorConfiguration; - private _contributionsDisposable: IDisposable | undefined; - - protected readonly _actions = new Map(); - - // --- Members logically associated to a model - protected _modelData: ModelData | null; - - protected readonly _instantiationService: IInstantiationService; - protected readonly _contextKeyService: IContextKeyService; - get contextKeyService() { return this._contextKeyService; } - private readonly _notificationService: INotificationService; - protected readonly _codeEditorService: ICodeEditorService; - private readonly _commandService: ICommandService; - private readonly _themeService: IThemeService; - - private readonly _focusTracker: CodeEditorWidgetFocusTracker; - - private _contentWidgets: { [key: string]: IContentWidgetData }; - private _overlayWidgets: { [key: string]: IOverlayWidgetData }; - private _glyphMarginWidgets: { [key: string]: IGlyphMarginWidgetData }; - - /** - * map from "parent" decoration type to live decoration ids. - */ - private _decorationTypeKeysToIds: { [decorationTypeKey: string]: string[] }; - private _decorationTypeSubtypes: { [decorationTypeKey: string]: { [subtype: string]: boolean } }; - - private _bannerDomNode: HTMLElement | null = null; - - private _dropIntoEditorDecorations: EditorDecorationsCollection = this.createDecorationsCollection(); - - public inComposition: boolean = false; - - constructor( - domElement: HTMLElement, - _options: Readonly, - codeEditorWidgetOptions: ICodeEditorWidgetOptions, - @IInstantiationService instantiationService: IInstantiationService, - @ICodeEditorService codeEditorService: ICodeEditorService, - @ICommandService commandService: ICommandService, - @IContextKeyService contextKeyService: IContextKeyService, - @IThemeService themeService: IThemeService, - @INotificationService notificationService: INotificationService, - @IAccessibilityService accessibilityService: IAccessibilityService, - @ILanguageConfigurationService private readonly languageConfigurationService: ILanguageConfigurationService, - @ILanguageFeaturesService languageFeaturesService: ILanguageFeaturesService, - ) { - super(); - codeEditorService.willCreateCodeEditor(); - - const options = { ..._options }; - - this._domElement = domElement; - this._overflowWidgetsDomNode = options.overflowWidgetsDomNode; - delete options.overflowWidgetsDomNode; - this._id = (++EDITOR_ID); - this._decorationTypeKeysToIds = {}; - this._decorationTypeSubtypes = {}; - this._telemetryData = codeEditorWidgetOptions.telemetryData; - - this._configuration = this._register(this._createConfiguration(codeEditorWidgetOptions.isSimpleWidget || false, - codeEditorWidgetOptions.contextMenuId ?? (codeEditorWidgetOptions.isSimpleWidget ? MenuId.SimpleEditorContext : MenuId.EditorContext), - options, accessibilityService)); - this._register(this._configuration.onDidChange((e) => { - this._onDidChangeConfiguration.fire(e); - - const options = this._configuration.options; - if (e.hasChanged(EditorOption.layoutInfo)) { - const layoutInfo = options.get(EditorOption.layoutInfo); - this._onDidLayoutChange.fire(layoutInfo); - } - })); - - this._contextKeyService = this._register(contextKeyService.createScoped(this._domElement)); - this._notificationService = notificationService; - this._codeEditorService = codeEditorService; - this._commandService = commandService; - this._themeService = themeService; - this._register(new EditorContextKeysManager(this, this._contextKeyService)); - this._register(new EditorModeContext(this, this._contextKeyService, languageFeaturesService)); - - this._instantiationService = this._register(instantiationService.createChild(new ServiceCollection([IContextKeyService, this._contextKeyService]))); - - this._modelData = null; - - this._focusTracker = new CodeEditorWidgetFocusTracker(domElement, this._overflowWidgetsDomNode); - this._register(this._focusTracker.onChange(() => { - this._editorWidgetFocus.setValue(this._focusTracker.hasFocus()); - })); - - this._contentWidgets = {}; - this._overlayWidgets = {}; - this._glyphMarginWidgets = {}; - - let contributions: IEditorContributionDescription[]; - if (Array.isArray(codeEditorWidgetOptions.contributions)) { - contributions = codeEditorWidgetOptions.contributions; - } else { - contributions = EditorExtensionsRegistry.getEditorContributions(); - } - this._contributions.initialize(this, contributions, this._instantiationService); - - for (const action of EditorExtensionsRegistry.getEditorActions()) { - if (this._actions.has(action.id)) { - onUnexpectedError(new Error(`Cannot have two actions with the same id ${action.id}`)); - continue; - } - const internalAction = new InternalEditorAction( - action.id, - action.label, - action.alias, - action.metadata, - action.precondition ?? undefined, - (args: unknown): Promise => { - return this._instantiationService.invokeFunction((accessor) => { - return Promise.resolve(action.runEditorCommand(accessor, this, args)); - }); - }, - this._contextKeyService - ); - this._actions.set(internalAction.id, internalAction); - } - - const isDropIntoEnabled = () => { - return !this._configuration.options.get(EditorOption.readOnly) - && this._configuration.options.get(EditorOption.dropIntoEditor).enabled; - }; - - this._register(new dom.DragAndDropObserver(this._domElement, { - onDragOver: e => { - if (!isDropIntoEnabled()) { - return; - } - - const target = this.getTargetAtClientPoint(e.clientX, e.clientY); - if (target?.position) { - this.showDropIndicatorAt(target.position); - } - }, - onDrop: async e => { - if (!isDropIntoEnabled()) { - return; - } - - this.removeDropIndicator(); - - if (!e.dataTransfer) { - return; - } - - const target = this.getTargetAtClientPoint(e.clientX, e.clientY); - if (target?.position) { - this._onDropIntoEditor.fire({ position: target.position, event: e }); - } - }, - onDragLeave: () => { - this.removeDropIndicator(); - }, - onDragEnd: () => { - this.removeDropIndicator(); - }, - })); - - this._codeEditorService.addCodeEditor(this); - } - - public writeScreenReaderContent(reason: string): void { - this._modelData?.view.writeScreenReaderContent(reason); - } - - protected _createConfiguration(isSimpleWidget: boolean, contextMenuId: MenuId, options: Readonly, accessibilityService: IAccessibilityService): EditorConfiguration { - return new EditorConfiguration(isSimpleWidget, contextMenuId, options, this._domElement, accessibilityService); - } - - public getId(): string { - return this.getEditorType() + ':' + this._id; - } - - public getEditorType(): string { - return editorCommon.EditorType.ICodeEditor; - } - - public override dispose(): void { - this._codeEditorService.removeCodeEditor(this); - - this._focusTracker.dispose(); - this._actions.clear(); - this._contentWidgets = {}; - this._overlayWidgets = {}; - - this._removeDecorationTypes(); - this._postDetachModelCleanup(this._detachModel()); - - this._onDidDispose.fire(); - - super.dispose(); - } - - public invokeWithinContext(fn: (accessor: ServicesAccessor) => T): T { - return this._instantiationService.invokeFunction(fn); - } - - public updateOptions(newOptions: Readonly | undefined): void { - this._configuration.updateOptions(newOptions || {}); - } - - public getOptions(): IComputedEditorOptions { - return this._configuration.options; - } - - public getOption(id: T): FindComputedEditorOptionValueById { - return this._configuration.options.get(id); - } - - public getRawOptions(): IEditorOptions { - return this._configuration.getRawOptions(); - } - - public getOverflowWidgetsDomNode(): HTMLElement | undefined { - return this._overflowWidgetsDomNode; - } - - public getConfiguredWordAtPosition(position: Position): IWordAtPosition | null { - if (!this._modelData) { - return null; - } - return WordOperations.getWordAtPosition(this._modelData.model, this._configuration.options.get(EditorOption.wordSeparators), this._configuration.options.get(EditorOption.wordSegmenterLocales), position); - } - - public getValue(options: { preserveBOM: boolean; lineEnding: string } | null = null): string { - if (!this._modelData) { - return ''; - } - - const preserveBOM: boolean = (options && options.preserveBOM) ? true : false; - let eolPreference = EndOfLinePreference.TextDefined; - if (options && options.lineEnding && options.lineEnding === '\n') { - eolPreference = EndOfLinePreference.LF; - } else if (options && options.lineEnding && options.lineEnding === '\r\n') { - eolPreference = EndOfLinePreference.CRLF; - } - return this._modelData.model.getValue(eolPreference, preserveBOM); - } - - public setValue(newValue: string): void { - try { - this._beginUpdate(); - if (!this._modelData) { - return; - } - this._modelData.model.setValue(newValue); - } finally { - this._endUpdate(); - } - } - - public getModel(): ITextModel | null { - if (!this._modelData) { - return null; - } - return this._modelData.model; - } - - public setModel(_model: ITextModel | editorCommon.IDiffEditorModel | editorCommon.IDiffEditorViewModel | null = null): void { - try { - this._beginUpdate(); - const model = _model; - if (this._modelData === null && model === null) { - // Current model is the new model - return; - } - if (this._modelData && this._modelData.model === model) { - // Current model is the new model - return; - } - - const e: editorCommon.IModelChangedEvent = { - oldModelUrl: this._modelData?.model.uri || null, - newModelUrl: model?.uri || null - }; - this._onWillChangeModel.fire(e); - - const hasTextFocus = this.hasTextFocus(); - const detachedModel = this._detachModel(); - this._attachModel(model); - if (hasTextFocus && this.hasModel()) { - this.focus(); - } - - this._removeDecorationTypes(); - this._onDidChangeModel.fire(e); - this._postDetachModelCleanup(detachedModel); - - this._contributionsDisposable = this._contributions.onAfterModelAttached(); - } finally { - this._endUpdate(); - } - } - - private _removeDecorationTypes(): void { - this._decorationTypeKeysToIds = {}; - if (this._decorationTypeSubtypes) { - for (const decorationType in this._decorationTypeSubtypes) { - const subTypes = this._decorationTypeSubtypes[decorationType]; - for (const subType in subTypes) { - this._removeDecorationType(decorationType + '-' + subType); - } - } - this._decorationTypeSubtypes = {}; - } - } - - public getVisibleRanges(): Range[] { - if (!this._modelData) { - return []; - } - return this._modelData.viewModel.getVisibleRanges(); - } - - public getVisibleRangesPlusViewportAboveBelow(): Range[] { - if (!this._modelData) { - return []; - } - return this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow(); - } - - public getWhitespaces(): IEditorWhitespace[] { - if (!this._modelData) { - return []; - } - return this._modelData.viewModel.viewLayout.getWhitespaces(); - } - - private static _getVerticalOffsetAfterPosition(modelData: ModelData, modelLineNumber: number, modelColumn: number, includeViewZones: boolean): number { - const modelPosition = modelData.model.validatePosition({ - lineNumber: modelLineNumber, - column: modelColumn - }); - const viewPosition = modelData.viewModel.coordinatesConverter.convertModelPositionToViewPosition(modelPosition); - return modelData.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(viewPosition.lineNumber, includeViewZones); - } - - public getTopForLineNumber(lineNumber: number, includeViewZones: boolean = false): number { - if (!this._modelData) { - return -1; - } - return CodeEditorWidget._getVerticalOffsetForPosition(this._modelData, lineNumber, 1, includeViewZones); - } - - public getTopForPosition(lineNumber: number, column: number): number { - if (!this._modelData) { - return -1; - } - return CodeEditorWidget._getVerticalOffsetForPosition(this._modelData, lineNumber, column, false); - } - - private static _getVerticalOffsetForPosition(modelData: ModelData, modelLineNumber: number, modelColumn: number, includeViewZones: boolean = false): number { - const modelPosition = modelData.model.validatePosition({ - lineNumber: modelLineNumber, - column: modelColumn - }); - const viewPosition = modelData.viewModel.coordinatesConverter.convertModelPositionToViewPosition(modelPosition); - return modelData.viewModel.viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber, includeViewZones); - } - - public getBottomForLineNumber(lineNumber: number, includeViewZones: boolean = false): number { - if (!this._modelData) { - return -1; - } - const maxCol = this._modelData.model.getLineMaxColumn(lineNumber); - return CodeEditorWidget._getVerticalOffsetAfterPosition(this._modelData, lineNumber, maxCol, includeViewZones); - } - - public setHiddenAreas(ranges: IRange[], source?: unknown, forceUpdate?: boolean): void { - this._modelData?.viewModel.setHiddenAreas(ranges.map(r => Range.lift(r)), source, forceUpdate); - } - - public getVisibleColumnFromPosition(rawPosition: IPosition): number { - if (!this._modelData) { - return rawPosition.column; - } - - const position = this._modelData.model.validatePosition(rawPosition); - const tabSize = this._modelData.model.getOptions().tabSize; - - return CursorColumns.visibleColumnFromColumn(this._modelData.model.getLineContent(position.lineNumber), position.column, tabSize) + 1; - } - - public getStatusbarColumn(rawPosition: IPosition): number { - if (!this._modelData) { - return rawPosition.column; - } - - const position = this._modelData.model.validatePosition(rawPosition); - const tabSize = this._modelData.model.getOptions().tabSize; - - return CursorColumns.toStatusbarColumn(this._modelData.model.getLineContent(position.lineNumber), position.column, tabSize); - } - - public getPosition(): Position | null { - if (!this._modelData) { - return null; - } - return this._modelData.viewModel.getPosition(); - } - - public setPosition(position: IPosition, source: string = 'api'): void { - if (!this._modelData) { - return; - } - if (!Position.isIPosition(position)) { - throw new Error('Invalid arguments'); - } - this._modelData.viewModel.setSelections(source, [{ - selectionStartLineNumber: position.lineNumber, - selectionStartColumn: position.column, - positionLineNumber: position.lineNumber, - positionColumn: position.column - }]); - } - - private _sendRevealRange(modelRange: Range, verticalType: VerticalRevealType, revealHorizontal: boolean, scrollType: editorCommon.ScrollType): void { - if (!this._modelData) { - return; - } - if (!Range.isIRange(modelRange)) { - throw new Error('Invalid arguments'); - } - const validatedModelRange = this._modelData.model.validateRange(modelRange); - const viewRange = this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(validatedModelRange); - - this._modelData.viewModel.revealRange('api', revealHorizontal, viewRange, verticalType, scrollType); - } - - public revealLine(lineNumber: number, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { - this._revealLine(lineNumber, VerticalRevealType.Simple, scrollType); - } - - public revealLineInCenter(lineNumber: number, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { - this._revealLine(lineNumber, VerticalRevealType.Center, scrollType); - } - - public revealLineInCenterIfOutsideViewport(lineNumber: number, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { - this._revealLine(lineNumber, VerticalRevealType.CenterIfOutsideViewport, scrollType); - } - - public revealLineNearTop(lineNumber: number, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { - this._revealLine(lineNumber, VerticalRevealType.NearTop, scrollType); - } - - private _revealLine(lineNumber: number, revealType: VerticalRevealType, scrollType: editorCommon.ScrollType): void { - if (typeof lineNumber !== 'number') { - throw new Error('Invalid arguments'); - } - - this._sendRevealRange( - new Range(lineNumber, 1, lineNumber, 1), - revealType, - false, - scrollType - ); - } - - public revealPosition(position: IPosition, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { - this._revealPosition( - position, - VerticalRevealType.Simple, - true, - scrollType - ); - } - - public revealPositionInCenter(position: IPosition, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { - this._revealPosition( - position, - VerticalRevealType.Center, - true, - scrollType - ); - } - - public revealPositionInCenterIfOutsideViewport(position: IPosition, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { - this._revealPosition( - position, - VerticalRevealType.CenterIfOutsideViewport, - true, - scrollType - ); - } - - public revealPositionNearTop(position: IPosition, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { - this._revealPosition( - position, - VerticalRevealType.NearTop, - true, - scrollType - ); - } - - private _revealPosition(position: IPosition, verticalType: VerticalRevealType, revealHorizontal: boolean, scrollType: editorCommon.ScrollType): void { - if (!Position.isIPosition(position)) { - throw new Error('Invalid arguments'); - } - - this._sendRevealRange( - new Range(position.lineNumber, position.column, position.lineNumber, position.column), - verticalType, - revealHorizontal, - scrollType - ); - } - - public getSelection(): Selection | null { - if (!this._modelData) { - return null; - } - return this._modelData.viewModel.getSelection(); - } - - public getSelections(): Selection[] | null { - if (!this._modelData) { - return null; - } - return this._modelData.viewModel.getSelections(); - } - - public setSelection(range: IRange, source?: string): void; - public setSelection(editorRange: Range, source?: string): void; - public setSelection(selection: ISelection, source?: string): void; - public setSelection(editorSelection: Selection, source?: string): void; - public setSelection(something: any, source: string = 'api'): void { - const isSelection = Selection.isISelection(something); - const isRange = Range.isIRange(something); - - if (!isSelection && !isRange) { - throw new Error('Invalid arguments'); - } - - if (isSelection) { - this._setSelectionImpl(something, source); - } else if (isRange) { - // act as if it was an IRange - const selection: ISelection = { - selectionStartLineNumber: something.startLineNumber, - selectionStartColumn: something.startColumn, - positionLineNumber: something.endLineNumber, - positionColumn: something.endColumn - }; - this._setSelectionImpl(selection, source); - } - } - - private _setSelectionImpl(sel: ISelection, source: string): void { - if (!this._modelData) { - return; - } - const selection = new Selection(sel.selectionStartLineNumber, sel.selectionStartColumn, sel.positionLineNumber, sel.positionColumn); - this._modelData.viewModel.setSelections(source, [selection]); - } - - public revealLines(startLineNumber: number, endLineNumber: number, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { - this._revealLines( - startLineNumber, - endLineNumber, - VerticalRevealType.Simple, - scrollType - ); - } - - public revealLinesInCenter(startLineNumber: number, endLineNumber: number, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { - this._revealLines( - startLineNumber, - endLineNumber, - VerticalRevealType.Center, - scrollType - ); - } - - public revealLinesInCenterIfOutsideViewport(startLineNumber: number, endLineNumber: number, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { - this._revealLines( - startLineNumber, - endLineNumber, - VerticalRevealType.CenterIfOutsideViewport, - scrollType - ); - } - - public revealLinesNearTop(startLineNumber: number, endLineNumber: number, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { - this._revealLines( - startLineNumber, - endLineNumber, - VerticalRevealType.NearTop, - scrollType - ); - } - - private _revealLines(startLineNumber: number, endLineNumber: number, verticalType: VerticalRevealType, scrollType: editorCommon.ScrollType): void { - if (typeof startLineNumber !== 'number' || typeof endLineNumber !== 'number') { - throw new Error('Invalid arguments'); - } - - this._sendRevealRange( - new Range(startLineNumber, 1, endLineNumber, 1), - verticalType, - false, - scrollType - ); - } - - public revealRange(range: IRange, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth, revealVerticalInCenter: boolean = false, revealHorizontal: boolean = true): void { - this._revealRange( - range, - revealVerticalInCenter ? VerticalRevealType.Center : VerticalRevealType.Simple, - revealHorizontal, - scrollType - ); - } - - public revealRangeInCenter(range: IRange, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { - this._revealRange( - range, - VerticalRevealType.Center, - true, - scrollType - ); - } - - public revealRangeInCenterIfOutsideViewport(range: IRange, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { - this._revealRange( - range, - VerticalRevealType.CenterIfOutsideViewport, - true, - scrollType - ); - } - - public revealRangeNearTop(range: IRange, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { - this._revealRange( - range, - VerticalRevealType.NearTop, - true, - scrollType - ); - } - - public revealRangeNearTopIfOutsideViewport(range: IRange, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { - this._revealRange( - range, - VerticalRevealType.NearTopIfOutsideViewport, - true, - scrollType - ); - } - - public revealRangeAtTop(range: IRange, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void { - this._revealRange( - range, - VerticalRevealType.Top, - true, - scrollType - ); - } - - private _revealRange(range: IRange, verticalType: VerticalRevealType, revealHorizontal: boolean, scrollType: editorCommon.ScrollType): void { - if (!Range.isIRange(range)) { - throw new Error('Invalid arguments'); - } - - this._sendRevealRange( - Range.lift(range), - verticalType, - revealHorizontal, - scrollType - ); - } - - public setSelections(ranges: readonly ISelection[], source: string = 'api', reason = CursorChangeReason.NotSet): void { - if (!this._modelData) { - return; - } - if (!ranges || ranges.length === 0) { - throw new Error('Invalid arguments'); - } - for (let i = 0, len = ranges.length; i < len; i++) { - if (!Selection.isISelection(ranges[i])) { - throw new Error('Invalid arguments'); - } - } - this._modelData.viewModel.setSelections(source, ranges, reason); - } - - public getContentWidth(): number { - if (!this._modelData) { - return -1; - } - return this._modelData.viewModel.viewLayout.getContentWidth(); - } - - public getScrollWidth(): number { - if (!this._modelData) { - return -1; - } - return this._modelData.viewModel.viewLayout.getScrollWidth(); - } - public getScrollLeft(): number { - if (!this._modelData) { - return -1; - } - return this._modelData.viewModel.viewLayout.getCurrentScrollLeft(); - } - - public getContentHeight(): number { - if (!this._modelData) { - return -1; - } - return this._modelData.viewModel.viewLayout.getContentHeight(); - } - - public getScrollHeight(): number { - if (!this._modelData) { - return -1; - } - return this._modelData.viewModel.viewLayout.getScrollHeight(); - } - public getScrollTop(): number { - if (!this._modelData) { - return -1; - } - return this._modelData.viewModel.viewLayout.getCurrentScrollTop(); - } - - public setScrollLeft(newScrollLeft: number, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Immediate): void { - if (!this._modelData) { - return; - } - if (typeof newScrollLeft !== 'number') { - throw new Error('Invalid arguments'); - } - this._modelData.viewModel.viewLayout.setScrollPosition({ - scrollLeft: newScrollLeft - }, scrollType); - } - public setScrollTop(newScrollTop: number, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Immediate): void { - if (!this._modelData) { - return; - } - if (typeof newScrollTop !== 'number') { - throw new Error('Invalid arguments'); - } - this._modelData.viewModel.viewLayout.setScrollPosition({ - scrollTop: newScrollTop - }, scrollType); - } - public setScrollPosition(position: editorCommon.INewScrollPosition, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Immediate): void { - if (!this._modelData) { - return; - } - this._modelData.viewModel.viewLayout.setScrollPosition(position, scrollType); - } - public hasPendingScrollAnimation(): boolean { - if (!this._modelData) { - return false; - } - return this._modelData.viewModel.viewLayout.hasPendingScrollAnimation(); - } - - public saveViewState(): editorCommon.ICodeEditorViewState | null { - if (!this._modelData) { - return null; - } - const contributionsState = this._contributions.saveViewState(); - const cursorState = this._modelData.viewModel.saveCursorState(); - const viewState = this._modelData.viewModel.saveState(); - return { - cursorState: cursorState, - viewState: viewState, - contributionsState: contributionsState - }; - } - - public restoreViewState(s: editorCommon.IEditorViewState | null): void { - if (!this._modelData || !this._modelData.hasRealView) { - return; - } - const codeEditorState = s as editorCommon.ICodeEditorViewState | null; - if (codeEditorState && codeEditorState.cursorState && codeEditorState.viewState) { - const cursorState = codeEditorState.cursorState; - if (Array.isArray(cursorState)) { - if (cursorState.length > 0) { - this._modelData.viewModel.restoreCursorState(cursorState); - } - } else { - // Backwards compatibility - this._modelData.viewModel.restoreCursorState([cursorState]); - } - - this._contributions.restoreViewState(codeEditorState.contributionsState || {}); - const reducedState = this._modelData.viewModel.reduceRestoreState(codeEditorState.viewState); - this._modelData.view.restoreState(reducedState); - } - } - - public handleInitialized(): void { - this._getViewModel()?.visibleLinesStabilized(); - } - - public onVisible(): void { - this._modelData?.view.refreshFocusState(); - } - - public onHide(): void { - this._modelData?.view.refreshFocusState(); - this._focusTracker.refreshState(); - } - - public getContribution(id: string): T | null { - return this._contributions.get(id) as T | null; - } - - public getActions(): editorCommon.IEditorAction[] { - return Array.from(this._actions.values()); - } - - public getSupportedActions(): editorCommon.IEditorAction[] { - let result = this.getActions(); - - result = result.filter(action => action.isSupported()); - - return result; - } - - public getAction(id: string): editorCommon.IEditorAction | null { - return this._actions.get(id) || null; - } - - public trigger(source: string | null | undefined, handlerId: string, payload: any): void { - payload = payload || {}; - - try { - this._onWillTriggerEditorOperationEvent.fire({ source: source, handlerId: handlerId, payload: payload }); - this._beginUpdate(); - - switch (handlerId) { - case editorCommon.Handler.CompositionStart: - this._startComposition(); - return; - case editorCommon.Handler.CompositionEnd: - this._endComposition(source); - return; - case editorCommon.Handler.Type: { - const args = >payload; - this._type(source, args.text || ''); - return; - } - case editorCommon.Handler.ReplacePreviousChar: { - const args = >payload; - this._compositionType(source, args.text || '', args.replaceCharCnt || 0, 0, 0); - return; - } - case editorCommon.Handler.CompositionType: { - const args = >payload; - this._compositionType(source, args.text || '', args.replacePrevCharCnt || 0, args.replaceNextCharCnt || 0, args.positionDelta || 0); - return; - } - case editorCommon.Handler.Paste: { - const args = >payload; - this._paste(source, args.text || '', args.pasteOnNewLine || false, args.multicursorText || null, args.mode || null, args.clipboardEvent); - return; - } - case editorCommon.Handler.Cut: - this._cut(source); - return; - } - - const action = this.getAction(handlerId); - if (action) { - Promise.resolve(action.run(payload)).then(undefined, onUnexpectedError); - return; - } - - if (!this._modelData) { - return; - } - - if (this._triggerEditorCommand(source, handlerId, payload)) { - return; - } - - this._triggerCommand(handlerId, payload); - } finally { - this._endUpdate(); - } - } - - protected _triggerCommand(handlerId: string, payload: any): void { - this._commandService.executeCommand(handlerId, payload); - } - - private _startComposition(): void { - if (!this._modelData) { - return; - } - this.inComposition = true; - this._modelData.viewModel.startComposition(); - this._onDidCompositionStart.fire(); - } - - private _endComposition(source: string | null | undefined): void { - if (!this._modelData) { - return; - } - this.inComposition = false; - this._modelData.viewModel.endComposition(source); - this._onDidCompositionEnd.fire(); - } - - private _type(source: string | null | undefined, text: string): void { - if (!this._modelData || text.length === 0) { - return; - } - if (source === 'keyboard') { - this._onWillType.fire(text); - } - this._modelData.viewModel.type(text, source); - if (source === 'keyboard') { - this._onDidType.fire(text); - } - } - - private _compositionType(source: string | null | undefined, text: string, replacePrevCharCnt: number, replaceNextCharCnt: number, positionDelta: number): void { - if (!this._modelData) { - return; - } - this._modelData.viewModel.compositionType(text, replacePrevCharCnt, replaceNextCharCnt, positionDelta, source); - } - - private _paste(source: string | null | undefined, text: string, pasteOnNewLine: boolean, multicursorText: string[] | null, mode: string | null, clipboardEvent?: ClipboardEvent): void { - if (!this._modelData) { - return; - } - const viewModel = this._modelData.viewModel; - const startPosition = viewModel.getSelection().getStartPosition(); - viewModel.paste(text, pasteOnNewLine, multicursorText, source); - const endPosition = viewModel.getSelection().getStartPosition(); - if (source === 'keyboard') { - this._onDidPaste.fire({ - clipboardEvent, - range: new Range(startPosition.lineNumber, startPosition.column, endPosition.lineNumber, endPosition.column), - languageId: mode - }); - } - } - - private _cut(source: string | null | undefined): void { - if (!this._modelData) { - return; - } - this._modelData.viewModel.cut(source); - } - - private _triggerEditorCommand(source: string | null | undefined, handlerId: string, payload: any): boolean { - const command = EditorExtensionsRegistry.getEditorCommand(handlerId); - if (command) { - payload = payload || {}; - payload.source = source; - this._instantiationService.invokeFunction((accessor) => { - Promise.resolve(command.runEditorCommand(accessor, this, payload)).then(undefined, onUnexpectedError); - }); - return true; - } - - return false; - } - - public _getViewModel(): IViewModel | null { - if (!this._modelData) { - return null; - } - return this._modelData.viewModel; - } - - public pushUndoStop(): boolean { - if (!this._modelData) { - return false; - } - if (this._configuration.options.get(EditorOption.readOnly)) { - // read only editor => sorry! - return false; - } - this._modelData.model.pushStackElement(); - return true; - } - - public popUndoStop(): boolean { - if (!this._modelData) { - return false; - } - if (this._configuration.options.get(EditorOption.readOnly)) { - // read only editor => sorry! - return false; - } - this._modelData.model.popStackElement(); - return true; - } - - public executeEdits(source: string | null | undefined, edits: IIdentifiedSingleEditOperation[], endCursorState?: ICursorStateComputer | Selection[]): boolean { - if (!this._modelData) { - return false; - } - if (this._configuration.options.get(EditorOption.readOnly)) { - // read only editor => sorry! - return false; - } - - let cursorStateComputer: ICursorStateComputer; - if (!endCursorState) { - cursorStateComputer = () => null; - } else if (Array.isArray(endCursorState)) { - cursorStateComputer = () => endCursorState; - } else { - cursorStateComputer = endCursorState; - } - - this._onBeforeExecuteEdit.fire({ source: source ?? undefined }); - - this._modelData.viewModel.executeEdits(source, edits, cursorStateComputer); - return true; - } - - public executeCommand(source: string | null | undefined, command: editorCommon.ICommand): void { - if (!this._modelData) { - return; - } - this._modelData.viewModel.executeCommand(command, source); - } - - public executeCommands(source: string | null | undefined, commands: editorCommon.ICommand[]): void { - if (!this._modelData) { - return; - } - this._modelData.viewModel.executeCommands(commands, source); - } - - public createDecorationsCollection(decorations?: IModelDeltaDecoration[]): EditorDecorationsCollection { - return new EditorDecorationsCollection(this, decorations); - } - - public changeDecorations(callback: (changeAccessor: IModelDecorationsChangeAccessor) => any): any { - if (!this._modelData) { - // callback will not be called - return null; - } - return this._modelData.model.changeDecorations(callback, this._id); - } - - public getLineDecorations(lineNumber: number): IModelDecoration[] | null { - if (!this._modelData) { - return null; - } - return this._modelData.model.getLineDecorations(lineNumber, this._id, filterValidationDecorations(this._configuration.options)); - } - - public getDecorationsInRange(range: Range): IModelDecoration[] | null { - if (!this._modelData) { - return null; - } - return this._modelData.model.getDecorationsInRange(range, this._id, filterValidationDecorations(this._configuration.options)); - } - - /** - * @deprecated - */ - public deltaDecorations(oldDecorations: string[], newDecorations: IModelDeltaDecoration[]): string[] { - if (!this._modelData) { - return []; - } - - if (oldDecorations.length === 0 && newDecorations.length === 0) { - return oldDecorations; - } - - return this._modelData.model.deltaDecorations(oldDecorations, newDecorations, this._id); - } - - public removeDecorations(decorationIds: string[]): void { - if (!this._modelData || decorationIds.length === 0) { - return; - } - - this._modelData.model.changeDecorations((changeAccessor) => { - changeAccessor.deltaDecorations(decorationIds, []); - }); - } - - public setDecorationsByType(description: string, decorationTypeKey: string, decorationOptions: editorCommon.IDecorationOptions[]): void { - - const newDecorationsSubTypes: { [key: string]: boolean } = {}; - const oldDecorationsSubTypes = this._decorationTypeSubtypes[decorationTypeKey] || {}; - this._decorationTypeSubtypes[decorationTypeKey] = newDecorationsSubTypes; - - const newModelDecorations: IModelDeltaDecoration[] = []; - - for (const decorationOption of decorationOptions) { - let typeKey = decorationTypeKey; - if (decorationOption.renderOptions) { - // identify custom render options by a hash code over all keys and values - // For custom render options register a decoration type if necessary - const subType = hash(decorationOption.renderOptions).toString(16); - // The fact that `decorationTypeKey` appears in the typeKey has no influence - // it is just a mechanism to get predictable and unique keys (repeatable for the same options and unique across clients) - typeKey = decorationTypeKey + '-' + subType; - if (!oldDecorationsSubTypes[subType] && !newDecorationsSubTypes[subType]) { - // decoration type did not exist before, register new one - this._registerDecorationType(description, typeKey, decorationOption.renderOptions, decorationTypeKey); - } - newDecorationsSubTypes[subType] = true; - } - const opts = this._resolveDecorationOptions(typeKey, !!decorationOption.hoverMessage); - if (decorationOption.hoverMessage) { - opts.hoverMessage = decorationOption.hoverMessage; - } - newModelDecorations.push({ range: decorationOption.range, options: opts }); - } - - // remove decoration sub types that are no longer used, deregister decoration type if necessary - for (const subType in oldDecorationsSubTypes) { - if (!newDecorationsSubTypes[subType]) { - this._removeDecorationType(decorationTypeKey + '-' + subType); - } - } - - // update all decorations - const oldDecorationsIds = this._decorationTypeKeysToIds[decorationTypeKey] || []; - this.changeDecorations(accessor => this._decorationTypeKeysToIds[decorationTypeKey] = accessor.deltaDecorations(oldDecorationsIds, newModelDecorations)); - } - - public setDecorationsByTypeFast(decorationTypeKey: string, ranges: IRange[]): void { - - // remove decoration sub types that are no longer used, deregister decoration type if necessary - const oldDecorationsSubTypes = this._decorationTypeSubtypes[decorationTypeKey] || {}; - for (const subType in oldDecorationsSubTypes) { - this._removeDecorationType(decorationTypeKey + '-' + subType); - } - this._decorationTypeSubtypes[decorationTypeKey] = {}; - - const opts = ModelDecorationOptions.createDynamic(this._resolveDecorationOptions(decorationTypeKey, false)); - const newModelDecorations: IModelDeltaDecoration[] = new Array(ranges.length); - for (let i = 0, len = ranges.length; i < len; i++) { - newModelDecorations[i] = { range: ranges[i], options: opts }; - } - - // update all decorations - const oldDecorationsIds = this._decorationTypeKeysToIds[decorationTypeKey] || []; - this.changeDecorations(accessor => this._decorationTypeKeysToIds[decorationTypeKey] = accessor.deltaDecorations(oldDecorationsIds, newModelDecorations)); - } - - public removeDecorationsByType(decorationTypeKey: string): void { - // remove decorations for type and sub type - const oldDecorationsIds = this._decorationTypeKeysToIds[decorationTypeKey]; - if (oldDecorationsIds) { - this.changeDecorations(accessor => accessor.deltaDecorations(oldDecorationsIds, [])); - } - if (this._decorationTypeKeysToIds.hasOwnProperty(decorationTypeKey)) { - delete this._decorationTypeKeysToIds[decorationTypeKey]; - } - if (this._decorationTypeSubtypes.hasOwnProperty(decorationTypeKey)) { - delete this._decorationTypeSubtypes[decorationTypeKey]; - } - } - - public getLayoutInfo(): EditorLayoutInfo { - const options = this._configuration.options; - const layoutInfo = options.get(EditorOption.layoutInfo); - return layoutInfo; - } - - public createOverviewRuler(cssClassName: string): editorBrowser.IOverviewRuler | null { - if (!this._modelData || !this._modelData.hasRealView) { - return null; - } - return this._modelData.view.createOverviewRuler(cssClassName); - } - - public getContainerDomNode(): HTMLElement { - return this._domElement; - } - - public getDomNode(): HTMLElement | null { - if (!this._modelData || !this._modelData.hasRealView) { - return null; - } - return this._modelData.view.domNode.domNode; - } - - public delegateVerticalScrollbarPointerDown(browserEvent: PointerEvent): void { - if (!this._modelData || !this._modelData.hasRealView) { - return; - } - this._modelData.view.delegateVerticalScrollbarPointerDown(browserEvent); - } - - public delegateScrollFromMouseWheelEvent(browserEvent: IMouseWheelEvent) { - if (!this._modelData || !this._modelData.hasRealView) { - return; - } - this._modelData.view.delegateScrollFromMouseWheelEvent(browserEvent); - } - - public layout(dimension?: IDimension, postponeRendering: boolean = false): void { - this._configuration.observeContainer(dimension); - if (!postponeRendering) { - this.render(); - } - } - - public focus(): void { - if (!this._modelData || !this._modelData.hasRealView) { - return; - } - this._modelData.view.focus(); - } - - public hasTextFocus(): boolean { - if (!this._modelData || !this._modelData.hasRealView) { - return false; - } - return this._modelData.view.isFocused(); - } - - public hasWidgetFocus(): boolean { - return this._focusTracker && this._focusTracker.hasFocus(); - } - - public addContentWidget(widget: editorBrowser.IContentWidget): void { - const widgetData: IContentWidgetData = { - widget: widget, - position: widget.getPosition() - }; - - if (this._contentWidgets.hasOwnProperty(widget.getId())) { - console.warn('Overwriting a content widget with the same id:' + widget.getId()); - } - - this._contentWidgets[widget.getId()] = widgetData; - - if (this._modelData && this._modelData.hasRealView) { - this._modelData.view.addContentWidget(widgetData); - } - } - - public layoutContentWidget(widget: editorBrowser.IContentWidget): void { - const widgetId = widget.getId(); - if (this._contentWidgets.hasOwnProperty(widgetId)) { - const widgetData = this._contentWidgets[widgetId]; - widgetData.position = widget.getPosition(); - if (this._modelData && this._modelData.hasRealView) { - this._modelData.view.layoutContentWidget(widgetData); - } - } - } - - public removeContentWidget(widget: editorBrowser.IContentWidget): void { - const widgetId = widget.getId(); - if (this._contentWidgets.hasOwnProperty(widgetId)) { - const widgetData = this._contentWidgets[widgetId]; - delete this._contentWidgets[widgetId]; - if (this._modelData && this._modelData.hasRealView) { - this._modelData.view.removeContentWidget(widgetData); - } - } - } - - public addOverlayWidget(widget: editorBrowser.IOverlayWidget): void { - const widgetData: IOverlayWidgetData = { - widget: widget, - position: widget.getPosition() - }; - - if (this._overlayWidgets.hasOwnProperty(widget.getId())) { - console.warn('Overwriting an overlay widget with the same id.'); - } - - this._overlayWidgets[widget.getId()] = widgetData; - if (this._modelData && this._modelData.hasRealView) { - this._modelData.view.addOverlayWidget(widgetData); - } - } - - public layoutOverlayWidget(widget: editorBrowser.IOverlayWidget): void { - const widgetId = widget.getId(); - if (this._overlayWidgets.hasOwnProperty(widgetId)) { - const widgetData = this._overlayWidgets[widgetId]; - widgetData.position = widget.getPosition(); - if (this._modelData && this._modelData.hasRealView) { - this._modelData.view.layoutOverlayWidget(widgetData); - } - } - } - - public removeOverlayWidget(widget: editorBrowser.IOverlayWidget): void { - const widgetId = widget.getId(); - if (this._overlayWidgets.hasOwnProperty(widgetId)) { - const widgetData = this._overlayWidgets[widgetId]; - delete this._overlayWidgets[widgetId]; - if (this._modelData && this._modelData.hasRealView) { - this._modelData.view.removeOverlayWidget(widgetData); - } - } - } - - public addGlyphMarginWidget(widget: editorBrowser.IGlyphMarginWidget): void { - const widgetData: IGlyphMarginWidgetData = { - widget: widget, - position: widget.getPosition() - }; - - if (this._glyphMarginWidgets.hasOwnProperty(widget.getId())) { - console.warn('Overwriting a glyph margin widget with the same id.'); - } - - this._glyphMarginWidgets[widget.getId()] = widgetData; - - if (this._modelData && this._modelData.hasRealView) { - this._modelData.view.addGlyphMarginWidget(widgetData); - } - } - - public layoutGlyphMarginWidget(widget: editorBrowser.IGlyphMarginWidget): void { - const widgetId = widget.getId(); - if (this._glyphMarginWidgets.hasOwnProperty(widgetId)) { - const widgetData = this._glyphMarginWidgets[widgetId]; - widgetData.position = widget.getPosition(); - if (this._modelData && this._modelData.hasRealView) { - this._modelData.view.layoutGlyphMarginWidget(widgetData); - } - } - } - - public removeGlyphMarginWidget(widget: editorBrowser.IGlyphMarginWidget): void { - const widgetId = widget.getId(); - if (this._glyphMarginWidgets.hasOwnProperty(widgetId)) { - const widgetData = this._glyphMarginWidgets[widgetId]; - delete this._glyphMarginWidgets[widgetId]; - if (this._modelData && this._modelData.hasRealView) { - this._modelData.view.removeGlyphMarginWidget(widgetData); - } - } - } - - public changeViewZones(callback: (accessor: editorBrowser.IViewZoneChangeAccessor) => void): void { - if (!this._modelData || !this._modelData.hasRealView) { - return; - } - this._modelData.view.change(callback); - } - - public getTargetAtClientPoint(clientX: number, clientY: number): editorBrowser.IMouseTarget | null { - if (!this._modelData || !this._modelData.hasRealView) { - return null; - } - return this._modelData.view.getTargetAtClientPoint(clientX, clientY); - } - - public getScrolledVisiblePosition(rawPosition: IPosition): { top: number; left: number; height: number } | null { - if (!this._modelData || !this._modelData.hasRealView) { - return null; - } - - const position = this._modelData.model.validatePosition(rawPosition); - const options = this._configuration.options; - const layoutInfo = options.get(EditorOption.layoutInfo); - - const top = CodeEditorWidget._getVerticalOffsetForPosition(this._modelData, position.lineNumber, position.column) - this.getScrollTop(); - const left = this._modelData.view.getOffsetForColumn(position.lineNumber, position.column) + layoutInfo.glyphMarginWidth + layoutInfo.lineNumbersWidth + layoutInfo.decorationsWidth - this.getScrollLeft(); - - return { - top: top, - left: left, - height: options.get(EditorOption.lineHeight) - }; - } - - public getOffsetForColumn(lineNumber: number, column: number): number { - if (!this._modelData || !this._modelData.hasRealView) { - return -1; - } - return this._modelData.view.getOffsetForColumn(lineNumber, column); - } - - public render(forceRedraw: boolean = false): void { - if (!this._modelData || !this._modelData.hasRealView) { - return; - } - this._modelData.viewModel.batchEvents(() => { - this._modelData!.view.render(true, forceRedraw); - }); - } - - public setAriaOptions(options: editorBrowser.IEditorAriaOptions): void { - if (!this._modelData || !this._modelData.hasRealView) { - return; - } - this._modelData.view.setAriaOptions(options); - } - - public applyFontInfo(target: HTMLElement): void { - applyFontInfo(target, this._configuration.options.get(EditorOption.fontInfo)); - } - - public setBanner(domNode: HTMLElement | null, domNodeHeight: number): void { - if (this._bannerDomNode && this._domElement.contains(this._bannerDomNode)) { - this._bannerDomNode.remove(); - } - - this._bannerDomNode = domNode; - this._configuration.setReservedHeight(domNode ? domNodeHeight : 0); - - if (this._bannerDomNode) { - this._domElement.prepend(this._bannerDomNode); - } - } - - protected _attachModel(model: ITextModel | null): void { - if (!model) { - this._modelData = null; - return; - } - - const listenersToRemove: IDisposable[] = []; - - this._domElement.setAttribute('data-mode-id', model.getLanguageId()); - this._configuration.setIsDominatedByLongLines(model.isDominatedByLongLines()); - this._configuration.setModelLineCount(model.getLineCount()); - - const attachedView = model.onBeforeAttached(); - - const viewModel = new ViewModel( - this._id, - this._configuration, - model, - DOMLineBreaksComputerFactory.create(dom.getWindow(this._domElement)), - MonospaceLineBreaksComputerFactory.create(this._configuration.options), - (callback) => dom.scheduleAtNextAnimationFrame(dom.getWindow(this._domElement), callback), - this.languageConfigurationService, - this._themeService, - attachedView, - { - batchChanges: (cb) => { - try { - this._beginUpdate(); - return cb(); - } finally { - this._endUpdate(); - } - }, - } - ); - - // Someone might destroy the model from under the editor, so prevent any exceptions by setting a null model - listenersToRemove.push(model.onWillDispose(() => this.setModel(null))); - - listenersToRemove.push(viewModel.onEvent((e) => { - switch (e.kind) { - case OutgoingViewModelEventKind.ContentSizeChanged: - this._onDidContentSizeChange.fire(e); - break; - case OutgoingViewModelEventKind.FocusChanged: - this._editorTextFocus.setValue(e.hasFocus); - break; - case OutgoingViewModelEventKind.ScrollChanged: - this._onDidScrollChange.fire(e); - break; - case OutgoingViewModelEventKind.ViewZonesChanged: - this._onDidChangeViewZones.fire(); - break; - case OutgoingViewModelEventKind.HiddenAreasChanged: - this._onDidChangeHiddenAreas.fire(); - break; - case OutgoingViewModelEventKind.ReadOnlyEditAttempt: - this._onDidAttemptReadOnlyEdit.fire(); - break; - case OutgoingViewModelEventKind.CursorStateChanged: { - if (e.reachedMaxCursorCount) { - - const multiCursorLimit = this.getOption(EditorOption.multiCursorLimit); - const message = nls.localize('cursors.maximum', "The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.", multiCursorLimit); - this._notificationService.prompt(Severity.Warning, message, [ - { - label: 'Find and Replace', - run: () => { - this._commandService.executeCommand('editor.action.startFindReplaceAction'); - } - }, - { - label: nls.localize('goToSetting', 'Increase Multi Cursor Limit'), - run: () => { - this._commandService.executeCommand('workbench.action.openSettings2', { - query: 'editor.multiCursorLimit' - }); - } - } - ]); - } - - const positions: Position[] = []; - for (let i = 0, len = e.selections.length; i < len; i++) { - positions[i] = e.selections[i].getPosition(); - } - - const e1: ICursorPositionChangedEvent = { - position: positions[0], - secondaryPositions: positions.slice(1), - reason: e.reason, - source: e.source - }; - this._onDidChangeCursorPosition.fire(e1); - - const e2: ICursorSelectionChangedEvent = { - selection: e.selections[0], - secondarySelections: e.selections.slice(1), - modelVersionId: e.modelVersionId, - oldSelections: e.oldSelections, - oldModelVersionId: e.oldModelVersionId, - source: e.source, - reason: e.reason - }; - this._onDidChangeCursorSelection.fire(e2); - - break; - } - case OutgoingViewModelEventKind.ModelDecorationsChanged: - this._onDidChangeModelDecorations.fire(e.event); - break; - case OutgoingViewModelEventKind.ModelLanguageChanged: - this._domElement.setAttribute('data-mode-id', model.getLanguageId()); - this._onDidChangeModelLanguage.fire(e.event); - break; - case OutgoingViewModelEventKind.ModelLanguageConfigurationChanged: - this._onDidChangeModelLanguageConfiguration.fire(e.event); - break; - case OutgoingViewModelEventKind.ModelContentChanged: - this._onDidChangeModelContent.fire(e.event); - break; - case OutgoingViewModelEventKind.ModelOptionsChanged: - this._onDidChangeModelOptions.fire(e.event); - break; - case OutgoingViewModelEventKind.ModelTokensChanged: - this._onDidChangeModelTokens.fire(e.event); - break; - - } - })); - - const [view, hasRealView] = this._createView(viewModel); - if (hasRealView) { - this._domElement.appendChild(view.domNode.domNode); - - let keys = Object.keys(this._contentWidgets); - for (let i = 0, len = keys.length; i < len; i++) { - const widgetId = keys[i]; - view.addContentWidget(this._contentWidgets[widgetId]); - } - - keys = Object.keys(this._overlayWidgets); - for (let i = 0, len = keys.length; i < len; i++) { - const widgetId = keys[i]; - view.addOverlayWidget(this._overlayWidgets[widgetId]); - } - - keys = Object.keys(this._glyphMarginWidgets); - for (let i = 0, len = keys.length; i < len; i++) { - const widgetId = keys[i]; - view.addGlyphMarginWidget(this._glyphMarginWidgets[widgetId]); - } - - view.render(false, true); - view.domNode.domNode.setAttribute('data-uri', model.uri.toString()); - } - - this._modelData = new ModelData(model, viewModel, view, hasRealView, listenersToRemove, attachedView); - } - - protected _createView(viewModel: ViewModel): [View, boolean] { - let commandDelegate: ICommandDelegate; - if (this.isSimpleWidget) { - commandDelegate = { - paste: (text: string, pasteOnNewLine: boolean, multicursorText: string[] | null, mode: string | null) => { - this._paste('keyboard', text, pasteOnNewLine, multicursorText, mode); - }, - type: (text: string) => { - this._type('keyboard', text); - }, - compositionType: (text: string, replacePrevCharCnt: number, replaceNextCharCnt: number, positionDelta: number) => { - this._compositionType('keyboard', text, replacePrevCharCnt, replaceNextCharCnt, positionDelta); - }, - startComposition: () => { - this._startComposition(); - }, - endComposition: () => { - this._endComposition('keyboard'); - }, - cut: () => { - this._cut('keyboard'); - } - }; - } else { - commandDelegate = { - paste: (text: string, pasteOnNewLine: boolean, multicursorText: string[] | null, mode: string | null) => { - const payload: editorBrowser.PastePayload = { text, pasteOnNewLine, multicursorText, mode }; - this._commandService.executeCommand(editorCommon.Handler.Paste, payload); - }, - type: (text: string) => { - const payload: editorCommon.TypePayload = { text }; - this._commandService.executeCommand(editorCommon.Handler.Type, payload); - }, - compositionType: (text: string, replacePrevCharCnt: number, replaceNextCharCnt: number, positionDelta: number) => { - // Try if possible to go through the existing `replacePreviousChar` command - if (replaceNextCharCnt || positionDelta) { - // must be handled through the new command - const payload: editorCommon.CompositionTypePayload = { text, replacePrevCharCnt, replaceNextCharCnt, positionDelta }; - this._commandService.executeCommand(editorCommon.Handler.CompositionType, payload); - } else { - const payload: editorCommon.ReplacePreviousCharPayload = { text, replaceCharCnt: replacePrevCharCnt }; - this._commandService.executeCommand(editorCommon.Handler.ReplacePreviousChar, payload); - } - }, - startComposition: () => { - this._commandService.executeCommand(editorCommon.Handler.CompositionStart, {}); - }, - endComposition: () => { - this._commandService.executeCommand(editorCommon.Handler.CompositionEnd, {}); - }, - cut: () => { - this._commandService.executeCommand(editorCommon.Handler.Cut, {}); - } - }; - } - - const viewUserInputEvents = new ViewUserInputEvents(viewModel.coordinatesConverter); - viewUserInputEvents.onKeyDown = (e) => this._onKeyDown.fire(e); - viewUserInputEvents.onKeyUp = (e) => this._onKeyUp.fire(e); - viewUserInputEvents.onContextMenu = (e) => this._onContextMenu.fire(e); - viewUserInputEvents.onMouseMove = (e) => this._onMouseMove.fire(e); - viewUserInputEvents.onMouseLeave = (e) => this._onMouseLeave.fire(e); - viewUserInputEvents.onMouseDown = (e) => this._onMouseDown.fire(e); - viewUserInputEvents.onMouseUp = (e) => this._onMouseUp.fire(e); - viewUserInputEvents.onMouseDrag = (e) => this._onMouseDrag.fire(e); - viewUserInputEvents.onMouseDrop = (e) => this._onMouseDrop.fire(e); - viewUserInputEvents.onMouseDropCanceled = (e) => this._onMouseDropCanceled.fire(e); - viewUserInputEvents.onMouseWheel = (e) => this._onMouseWheel.fire(e); - - const view = new View( - this.getId(), - commandDelegate, - this._configuration, - this._themeService.getColorTheme(), - viewModel, - viewUserInputEvents, - this._overflowWidgetsDomNode, - this._instantiationService - ); - - return [view, true]; - } - - protected _postDetachModelCleanup(detachedModel: ITextModel | null): void { - detachedModel?.removeAllDecorationsWithOwnerId(this._id); - } - - private _detachModel(): ITextModel | null { - this._contributionsDisposable?.dispose(); - this._contributionsDisposable = undefined; - if (!this._modelData) { - return null; - } - const model = this._modelData.model; - const removeDomNode = this._modelData.hasRealView ? this._modelData.view.domNode.domNode : null; - - this._modelData.dispose(); - this._modelData = null; - - this._domElement.removeAttribute('data-mode-id'); - if (removeDomNode && this._domElement.contains(removeDomNode)) { - removeDomNode.remove(); - } - if (this._bannerDomNode && this._domElement.contains(this._bannerDomNode)) { - this._bannerDomNode.remove(); - } - return model; - } - - private _registerDecorationType(description: string, key: string, options: editorCommon.IDecorationRenderOptions, parentTypeKey?: string): void { - this._codeEditorService.registerDecorationType(description, key, options, parentTypeKey, this); - } - - private _removeDecorationType(key: string): void { - this._codeEditorService.removeDecorationType(key); - } - - private _resolveDecorationOptions(typeKey: string, writable: boolean): IModelDecorationOptions { - return this._codeEditorService.resolveDecorationOptions(typeKey, writable); - } - - public getTelemetryData(): { [key: string]: any } | undefined { - return this._telemetryData; - } - - public hasModel(): this is editorBrowser.IActiveCodeEditor { - return (this._modelData !== null); - } - - private showDropIndicatorAt(position: Position): void { - const newDecorations: IModelDeltaDecoration[] = [{ - range: new Range(position.lineNumber, position.column, position.lineNumber, position.column), - options: CodeEditorWidget.dropIntoEditorDecorationOptions - }]; - - this._dropIntoEditorDecorations.set(newDecorations); - this.revealPosition(position, editorCommon.ScrollType.Immediate); - } - - private removeDropIndicator(): void { - this._dropIntoEditorDecorations.clear(); - } - - public setContextValue(key: string, value: ContextKeyValue): void { - this._contextKeyService.createKey(key, value); - } - - private _beginUpdate(): void { - this._updateCounter++; - if (this._updateCounter === 1) { - this._onBeginUpdate.fire(); - } - } - - private _endUpdate(): void { - this._updateCounter--; - if (this._updateCounter === 0) { - this._onEndUpdate.fire(); - } - } -} - -let EDITOR_ID = 0; - -export interface ICodeEditorWidgetOptions { - /** - * Is this a simple widget (not a real code editor)? - * Defaults to false. - */ - isSimpleWidget?: boolean; - - /** - * Contributions to instantiate. - * When provided, only the contributions included will be instantiated. - * To include the defaults, those must be provided as well via [...EditorExtensionsRegistry.getEditorContributions()] - * Defaults to EditorExtensionsRegistry.getEditorContributions(). - */ - contributions?: IEditorContributionDescription[]; - - /** - * Telemetry data associated with this CodeEditorWidget. - * Defaults to null. - */ - telemetryData?: object; - - /** - * The ID of the context menu. - * Defaults to MenuId.SimpleEditorContext or MenuId.EditorContext depending on whether the widget is simple. - */ - contextMenuId?: MenuId; -} - -class ModelData { - constructor( - public readonly model: ITextModel, - public readonly viewModel: ViewModel, - public readonly view: View, - public readonly hasRealView: boolean, - public readonly listenersToRemove: IDisposable[], - public readonly attachedView: IAttachedView, - ) { - } - - public dispose(): void { - dispose(this.listenersToRemove); - this.model.onBeforeDetached(this.attachedView); - if (this.hasRealView) { - this.view.dispose(); - } - this.viewModel.dispose(); - } -} - -const enum BooleanEventValue { - NotSet, - False, - True -} - -export class BooleanEventEmitter extends Disposable { - private readonly _onDidChangeToTrue: Emitter = this._register(new Emitter(this._emitterOptions)); - public readonly onDidChangeToTrue: Event = this._onDidChangeToTrue.event; - - private readonly _onDidChangeToFalse: Emitter = this._register(new Emitter(this._emitterOptions)); - public readonly onDidChangeToFalse: Event = this._onDidChangeToFalse.event; - - private _value: BooleanEventValue; - - constructor( - private readonly _emitterOptions: EmitterOptions - ) { - super(); - this._value = BooleanEventValue.NotSet; - } - - public setValue(_value: boolean) { - const value = (_value ? BooleanEventValue.True : BooleanEventValue.False); - if (this._value === value) { - return; - } - this._value = value; - if (this._value === BooleanEventValue.True) { - this._onDidChangeToTrue.fire(); - } else if (this._value === BooleanEventValue.False) { - this._onDidChangeToFalse.fire(); - } - } -} - -/** - * A regular event emitter that also makes sure contributions are instantiated if necessary - */ -class InteractionEmitter extends Emitter { - - constructor( - private readonly _contributions: CodeEditorContributions, - deliveryQueue: EventDeliveryQueue - ) { - super({ deliveryQueue }); - } - - override fire(event: T): void { - this._contributions.onBeforeInteractionEvent(); - super.fire(event); - } -} - -class EditorContextKeysManager extends Disposable { - - private readonly _editor: CodeEditorWidget; - private readonly _editorSimpleInput: IContextKey; - private readonly _editorFocus: IContextKey; - private readonly _textInputFocus: IContextKey; - private readonly _editorTextFocus: IContextKey; - private readonly _tabMovesFocus: IContextKey; - private readonly _editorReadonly: IContextKey; - private readonly _inDiffEditor: IContextKey; - private readonly _editorColumnSelection: IContextKey; - private readonly _hasMultipleSelections: IContextKey; - private readonly _hasNonEmptySelection: IContextKey; - private readonly _canUndo: IContextKey; - private readonly _canRedo: IContextKey; - - constructor( - editor: CodeEditorWidget, - contextKeyService: IContextKeyService - ) { - super(); - - this._editor = editor; - - contextKeyService.createKey('editorId', editor.getId()); - - this._editorSimpleInput = EditorContextKeys.editorSimpleInput.bindTo(contextKeyService); - this._editorFocus = EditorContextKeys.focus.bindTo(contextKeyService); - this._textInputFocus = EditorContextKeys.textInputFocus.bindTo(contextKeyService); - this._editorTextFocus = EditorContextKeys.editorTextFocus.bindTo(contextKeyService); - this._tabMovesFocus = EditorContextKeys.tabMovesFocus.bindTo(contextKeyService); - this._editorReadonly = EditorContextKeys.readOnly.bindTo(contextKeyService); - this._inDiffEditor = EditorContextKeys.inDiffEditor.bindTo(contextKeyService); - this._editorColumnSelection = EditorContextKeys.columnSelection.bindTo(contextKeyService); - this._hasMultipleSelections = EditorContextKeys.hasMultipleSelections.bindTo(contextKeyService); - this._hasNonEmptySelection = EditorContextKeys.hasNonEmptySelection.bindTo(contextKeyService); - this._canUndo = EditorContextKeys.canUndo.bindTo(contextKeyService); - this._canRedo = EditorContextKeys.canRedo.bindTo(contextKeyService); - - this._register(this._editor.onDidChangeConfiguration(() => this._updateFromConfig())); - this._register(this._editor.onDidChangeCursorSelection(() => this._updateFromSelection())); - this._register(this._editor.onDidFocusEditorWidget(() => this._updateFromFocus())); - this._register(this._editor.onDidBlurEditorWidget(() => this._updateFromFocus())); - this._register(this._editor.onDidFocusEditorText(() => this._updateFromFocus())); - this._register(this._editor.onDidBlurEditorText(() => this._updateFromFocus())); - this._register(this._editor.onDidChangeModel(() => this._updateFromModel())); - this._register(this._editor.onDidChangeConfiguration(() => this._updateFromModel())); - this._register(TabFocus.onDidChangeTabFocus((tabFocusMode: boolean) => this._tabMovesFocus.set(tabFocusMode))); - - this._updateFromConfig(); - this._updateFromSelection(); - this._updateFromFocus(); - this._updateFromModel(); - - this._editorSimpleInput.set(this._editor.isSimpleWidget); - } - - private _updateFromConfig(): void { - const options = this._editor.getOptions(); - - this._tabMovesFocus.set(TabFocus.getTabFocusMode()); - this._editorReadonly.set(options.get(EditorOption.readOnly)); - this._inDiffEditor.set(options.get(EditorOption.inDiffEditor)); - this._editorColumnSelection.set(options.get(EditorOption.columnSelection)); - } - - private _updateFromSelection(): void { - const selections = this._editor.getSelections(); - if (!selections) { - this._hasMultipleSelections.reset(); - this._hasNonEmptySelection.reset(); - } else { - this._hasMultipleSelections.set(selections.length > 1); - this._hasNonEmptySelection.set(selections.some(s => !s.isEmpty())); - } - } - - private _updateFromFocus(): void { - this._editorFocus.set(this._editor.hasWidgetFocus() && !this._editor.isSimpleWidget); - this._editorTextFocus.set(this._editor.hasTextFocus() && !this._editor.isSimpleWidget); - this._textInputFocus.set(this._editor.hasTextFocus()); - } - - private _updateFromModel(): void { - const model = this._editor.getModel(); - this._canUndo.set(Boolean(model && model.canUndo())); - this._canRedo.set(Boolean(model && model.canRedo())); - } -} - -export class EditorModeContext extends Disposable { - - private readonly _langId: IContextKey; - private readonly _hasCompletionItemProvider: IContextKey; - private readonly _hasCodeActionsProvider: IContextKey; - private readonly _hasCodeLensProvider: IContextKey; - private readonly _hasDefinitionProvider: IContextKey; - private readonly _hasDeclarationProvider: IContextKey; - private readonly _hasImplementationProvider: IContextKey; - private readonly _hasTypeDefinitionProvider: IContextKey; - private readonly _hasHoverProvider: IContextKey; - private readonly _hasDocumentHighlightProvider: IContextKey; - private readonly _hasDocumentSymbolProvider: IContextKey; - private readonly _hasReferenceProvider: IContextKey; - private readonly _hasRenameProvider: IContextKey; - private readonly _hasDocumentFormattingProvider: IContextKey; - private readonly _hasDocumentSelectionFormattingProvider: IContextKey; - private readonly _hasMultipleDocumentFormattingProvider: IContextKey; - private readonly _hasMultipleDocumentSelectionFormattingProvider: IContextKey; - private readonly _hasSignatureHelpProvider: IContextKey; - private readonly _hasInlayHintsProvider: IContextKey; - private readonly _isInEmbeddedEditor: IContextKey; - - constructor( - private readonly _editor: CodeEditorWidget, - private readonly _contextKeyService: IContextKeyService, - private readonly _languageFeaturesService: ILanguageFeaturesService, - ) { - super(); - - this._langId = EditorContextKeys.languageId.bindTo(_contextKeyService); - this._hasCompletionItemProvider = EditorContextKeys.hasCompletionItemProvider.bindTo(_contextKeyService); - this._hasCodeActionsProvider = EditorContextKeys.hasCodeActionsProvider.bindTo(_contextKeyService); - this._hasCodeLensProvider = EditorContextKeys.hasCodeLensProvider.bindTo(_contextKeyService); - this._hasDefinitionProvider = EditorContextKeys.hasDefinitionProvider.bindTo(_contextKeyService); - this._hasDeclarationProvider = EditorContextKeys.hasDeclarationProvider.bindTo(_contextKeyService); - this._hasImplementationProvider = EditorContextKeys.hasImplementationProvider.bindTo(_contextKeyService); - this._hasTypeDefinitionProvider = EditorContextKeys.hasTypeDefinitionProvider.bindTo(_contextKeyService); - this._hasHoverProvider = EditorContextKeys.hasHoverProvider.bindTo(_contextKeyService); - this._hasDocumentHighlightProvider = EditorContextKeys.hasDocumentHighlightProvider.bindTo(_contextKeyService); - this._hasDocumentSymbolProvider = EditorContextKeys.hasDocumentSymbolProvider.bindTo(_contextKeyService); - this._hasReferenceProvider = EditorContextKeys.hasReferenceProvider.bindTo(_contextKeyService); - this._hasRenameProvider = EditorContextKeys.hasRenameProvider.bindTo(_contextKeyService); - this._hasSignatureHelpProvider = EditorContextKeys.hasSignatureHelpProvider.bindTo(_contextKeyService); - this._hasInlayHintsProvider = EditorContextKeys.hasInlayHintsProvider.bindTo(_contextKeyService); - this._hasDocumentFormattingProvider = EditorContextKeys.hasDocumentFormattingProvider.bindTo(_contextKeyService); - this._hasDocumentSelectionFormattingProvider = EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(_contextKeyService); - this._hasMultipleDocumentFormattingProvider = EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo(_contextKeyService); - this._hasMultipleDocumentSelectionFormattingProvider = EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo(_contextKeyService); - this._isInEmbeddedEditor = EditorContextKeys.isInEmbeddedEditor.bindTo(_contextKeyService); - - const update = () => this._update(); - - // update when model/mode changes - this._register(_editor.onDidChangeModel(update)); - this._register(_editor.onDidChangeModelLanguage(update)); - - // update when registries change - this._register(_languageFeaturesService.completionProvider.onDidChange(update)); - this._register(_languageFeaturesService.codeActionProvider.onDidChange(update)); - this._register(_languageFeaturesService.codeLensProvider.onDidChange(update)); - this._register(_languageFeaturesService.definitionProvider.onDidChange(update)); - this._register(_languageFeaturesService.declarationProvider.onDidChange(update)); - this._register(_languageFeaturesService.implementationProvider.onDidChange(update)); - this._register(_languageFeaturesService.typeDefinitionProvider.onDidChange(update)); - this._register(_languageFeaturesService.hoverProvider.onDidChange(update)); - this._register(_languageFeaturesService.documentHighlightProvider.onDidChange(update)); - this._register(_languageFeaturesService.documentSymbolProvider.onDidChange(update)); - this._register(_languageFeaturesService.referenceProvider.onDidChange(update)); - this._register(_languageFeaturesService.renameProvider.onDidChange(update)); - this._register(_languageFeaturesService.documentFormattingEditProvider.onDidChange(update)); - this._register(_languageFeaturesService.documentRangeFormattingEditProvider.onDidChange(update)); - this._register(_languageFeaturesService.signatureHelpProvider.onDidChange(update)); - this._register(_languageFeaturesService.inlayHintsProvider.onDidChange(update)); - - update(); - } - - override dispose() { - super.dispose(); - } - - reset() { - this._contextKeyService.bufferChangeEvents(() => { - this._langId.reset(); - this._hasCompletionItemProvider.reset(); - this._hasCodeActionsProvider.reset(); - this._hasCodeLensProvider.reset(); - this._hasDefinitionProvider.reset(); - this._hasDeclarationProvider.reset(); - this._hasImplementationProvider.reset(); - this._hasTypeDefinitionProvider.reset(); - this._hasHoverProvider.reset(); - this._hasDocumentHighlightProvider.reset(); - this._hasDocumentSymbolProvider.reset(); - this._hasReferenceProvider.reset(); - this._hasRenameProvider.reset(); - this._hasDocumentFormattingProvider.reset(); - this._hasDocumentSelectionFormattingProvider.reset(); - this._hasSignatureHelpProvider.reset(); - this._isInEmbeddedEditor.reset(); - }); - } - - private _update() { - const model = this._editor.getModel(); - if (!model) { - this.reset(); - return; - } - this._contextKeyService.bufferChangeEvents(() => { - this._langId.set(model.getLanguageId()); - this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(model)); - this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(model)); - this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(model)); - this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(model)); - this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(model)); - this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(model)); - this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(model)); - this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(model)); - this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(model)); - this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(model)); - this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(model)); - this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(model)); - this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(model)); - this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(model)); - this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(model) || this._languageFeaturesService.documentRangeFormattingEditProvider.has(model)); - this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(model)); - this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(model).length + this._languageFeaturesService.documentRangeFormattingEditProvider.all(model).length > 1); - this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(model).length > 1); - this._isInEmbeddedEditor.set(model.uri.scheme === Schemas.walkThroughSnippet || model.uri.scheme === Schemas.vscodeChatCodeBlock); - }); - } -} - -class CodeEditorWidgetFocusTracker extends Disposable { - - private _hasDomElementFocus: boolean; - private readonly _domFocusTracker: dom.IFocusTracker; - private readonly _overflowWidgetsDomNode: dom.IFocusTracker | undefined; - - private readonly _onChange: Emitter = this._register(new Emitter()); - public readonly onChange: Event = this._onChange.event; - - private _overflowWidgetsDomNodeHasFocus: boolean; - - private _hadFocus: boolean | undefined = undefined; - - constructor(domElement: HTMLElement, overflowWidgetsDomNode: HTMLElement | undefined) { - super(); - - this._hasDomElementFocus = false; - this._domFocusTracker = this._register(dom.trackFocus(domElement)); - - this._overflowWidgetsDomNodeHasFocus = false; - - this._register(this._domFocusTracker.onDidFocus(() => { - this._hasDomElementFocus = true; - this._update(); - })); - this._register(this._domFocusTracker.onDidBlur(() => { - this._hasDomElementFocus = false; - this._update(); - })); - - if (overflowWidgetsDomNode) { - this._overflowWidgetsDomNode = this._register(dom.trackFocus(overflowWidgetsDomNode)); - this._register(this._overflowWidgetsDomNode.onDidFocus(() => { - this._overflowWidgetsDomNodeHasFocus = true; - this._update(); - })); - this._register(this._overflowWidgetsDomNode.onDidBlur(() => { - this._overflowWidgetsDomNodeHasFocus = false; - this._update(); - })); - } - } - - private _update() { - const focused = this._hasDomElementFocus || this._overflowWidgetsDomNodeHasFocus; - if (this._hadFocus !== focused) { - this._hadFocus = focused; - this._onChange.fire(undefined); - } - } - - public hasFocus(): boolean { - return this._hadFocus ?? false; - } - - public refreshState(): void { - this._domFocusTracker.refreshState(); - this._overflowWidgetsDomNode?.refreshState?.(); - } -} - -class EditorDecorationsCollection implements editorCommon.IEditorDecorationsCollection { - - private _decorationIds: string[] = []; - private _isChangingDecorations: boolean = false; - - public get length(): number { - return this._decorationIds.length; - } - - constructor( - private readonly _editor: editorBrowser.ICodeEditor, - decorations: IModelDeltaDecoration[] | undefined - ) { - if (Array.isArray(decorations) && decorations.length > 0) { - this.set(decorations); - } - } - - public onDidChange(listener: (e: IModelDecorationsChangedEvent) => any, thisArgs?: any, disposables?: IDisposable[] | DisposableStore): IDisposable { - return this._editor.onDidChangeModelDecorations((e) => { - if (this._isChangingDecorations) { - return; - } - listener.call(thisArgs, e); - }, disposables); - } - - public getRange(index: number): Range | null { - if (!this._editor.hasModel()) { - return null; - } - if (index >= this._decorationIds.length) { - return null; - } - return this._editor.getModel().getDecorationRange(this._decorationIds[index]); - } - - public getRanges(): Range[] { - if (!this._editor.hasModel()) { - return []; - } - const model = this._editor.getModel(); - const result: Range[] = []; - for (const decorationId of this._decorationIds) { - const range = model.getDecorationRange(decorationId); - if (range) { - result.push(range); - } - } - return result; - } - - public has(decoration: IModelDecoration): boolean { - return this._decorationIds.includes(decoration.id); - } - - public clear(): void { - if (this._decorationIds.length === 0) { - // nothing to do - return; - } - this.set([]); - } - - public set(newDecorations: readonly IModelDeltaDecoration[]): string[] { - try { - this._isChangingDecorations = true; - this._editor.changeDecorations((accessor) => { - this._decorationIds = accessor.deltaDecorations(this._decorationIds, newDecorations); - }); - } finally { - this._isChangingDecorations = false; - } - return this._decorationIds; - } - - public append(newDecorations: readonly IModelDeltaDecoration[]): string[] { - let newDecorationIds: string[] = []; - try { - this._isChangingDecorations = true; - this._editor.changeDecorations((accessor) => { - newDecorationIds = accessor.deltaDecorations([], newDecorations); - this._decorationIds = this._decorationIds.concat(newDecorationIds); - }); - } finally { - this._isChangingDecorations = false; - } - return newDecorationIds; - } -} - -const squigglyStart = encodeURIComponent(``); - -function getSquigglySVGData(color: Color) { - return squigglyStart + encodeURIComponent(color.toString()) + squigglyEnd; -} - -const dotdotdotStart = encodeURIComponent(``); - -function getDotDotDotSVGData(color: Color) { - return dotdotdotStart + encodeURIComponent(color.toString()) + dotdotdotEnd; -} - -registerThemingParticipant((theme, collector) => { - const errorForeground = theme.getColor(editorErrorForeground); - if (errorForeground) { - collector.addRule(`.monaco-editor .${ClassName.EditorErrorDecoration} { background: url("data:image/svg+xml,${getSquigglySVGData(errorForeground)}") repeat-x bottom left; }`); - } - const warningForeground = theme.getColor(editorWarningForeground); - if (warningForeground) { - collector.addRule(`.monaco-editor .${ClassName.EditorWarningDecoration} { background: url("data:image/svg+xml,${getSquigglySVGData(warningForeground)}") repeat-x bottom left; }`); - } - const infoForeground = theme.getColor(editorInfoForeground); - if (infoForeground) { - collector.addRule(`.monaco-editor .${ClassName.EditorInfoDecoration} { background: url("data:image/svg+xml,${getSquigglySVGData(infoForeground)}") repeat-x bottom left; }`); - } - const hintForeground = theme.getColor(editorHintForeground); - if (hintForeground) { - collector.addRule(`.monaco-editor .${ClassName.EditorHintDecoration} { background: url("data:image/svg+xml,${getDotDotDotSVGData(hintForeground)}") no-repeat bottom left; }`); - } - const unnecessaryForeground = theme.getColor(editorUnnecessaryCodeOpacity); - if (unnecessaryForeground) { - collector.addRule(`.monaco-editor.showUnused .${ClassName.EditorUnnecessaryInlineDecoration} { opacity: ${unnecessaryForeground.rgba.a}; }`); - } -}); diff --git a/src/vs/editor/contrib/colorPicker/browser/color.ts b/src/vs/editor/contrib/colorPicker/browser/color.ts deleted file mode 100644 index 3118b6d2383b8..0000000000000 --- a/src/vs/editor/contrib/colorPicker/browser/color.ts +++ /dev/null @@ -1,114 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { CancellationToken } from '../../../../base/common/cancellation.js'; -import { illegalArgument, onUnexpectedExternalError } from '../../../../base/common/errors.js'; -import { URI } from '../../../../base/common/uri.js'; -import { IRange } from '../../../common/core/range.js'; -import { ITextModel } from '../../../common/model.js'; -import { DocumentColorProvider, IColorInformation, IColorPresentation } from '../../../common/languages.js'; -import { IModelService } from '../../../common/services/model.js'; -import { ILanguageFeaturesService } from '../../../common/services/languageFeatures.js'; -import { LanguageFeatureRegistry } from '../../../common/languageFeatureRegistry.js'; -import { DefaultDocumentColorProvider } from './defaultDocumentColorProvider.js'; -import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js'; -import { ServicesAccessor } from '../../../browser/editorExtensions.js'; - -export async function getColors(colorProviderRegistry: LanguageFeatureRegistry, model: ITextModel, token: CancellationToken, defaultColorDecoratorsEnablement: 'auto' | 'always' | 'never' = 'auto'): Promise { - return _findColorData(new ColorDataCollector(), colorProviderRegistry, model, token, defaultColorDecoratorsEnablement); -} - -export function getColorPresentations(model: ITextModel, colorInfo: IColorInformation, provider: DocumentColorProvider, token: CancellationToken): Promise { - return Promise.resolve(provider.provideColorPresentations(model, colorInfo, token)); -} - -export interface IColorData { - colorInfo: IColorInformation; - provider: DocumentColorProvider; -} - -export interface IExtColorData { range: IRange; color: [number, number, number, number] } - -interface DataCollector { - compute(provider: DocumentColorProvider, model: ITextModel, token: CancellationToken, result: T[]): Promise; -} - -class ColorDataCollector implements DataCollector { - constructor() { } - async compute(provider: DocumentColorProvider, model: ITextModel, token: CancellationToken, colors: IColorData[]): Promise { - const documentColors = await provider.provideDocumentColors(model, token); - if (Array.isArray(documentColors)) { - for (const colorInfo of documentColors) { - colors.push({ colorInfo, provider }); - } - } - return Array.isArray(documentColors); - } -} - -export class ExtColorDataCollector implements DataCollector { - constructor() { } - async compute(provider: DocumentColorProvider, model: ITextModel, token: CancellationToken, colors: IExtColorData[]): Promise { - const documentColors = await provider.provideDocumentColors(model, token); - if (Array.isArray(documentColors)) { - for (const colorInfo of documentColors) { - colors.push({ range: colorInfo.range, color: [colorInfo.color.red, colorInfo.color.green, colorInfo.color.blue, colorInfo.color.alpha] }); - } - } - return Array.isArray(documentColors); - } - -} - -export class ColorPresentationsCollector implements DataCollector { - constructor(private colorInfo: IColorInformation) { } - async compute(provider: DocumentColorProvider, model: ITextModel, _token: CancellationToken, colors: IColorPresentation[]): Promise { - const documentColors = await provider.provideColorPresentations(model, this.colorInfo, CancellationToken.None); - if (Array.isArray(documentColors)) { - colors.push(...documentColors); - } - return Array.isArray(documentColors); - } -} - -export async function _findColorData(collector: DataCollector, colorProviderRegistry: LanguageFeatureRegistry, model: ITextModel, token: CancellationToken, defaultColorDecoratorsEnablement: 'auto' | 'always' | 'never'): Promise { - let validDocumentColorProviderFound = false; - let defaultProvider: DefaultDocumentColorProvider | undefined; - const colorData: T[] = []; - const documentColorProviders = colorProviderRegistry.ordered(model); - for (let i = documentColorProviders.length - 1; i >= 0; i--) { - const provider = documentColorProviders[i]; - if (defaultColorDecoratorsEnablement !== 'always' && provider instanceof DefaultDocumentColorProvider) { - defaultProvider = provider; - } else { - try { - if (await collector.compute(provider, model, token, colorData)) { - validDocumentColorProviderFound = true; - } - } catch (e) { - onUnexpectedExternalError(e); - } - } - } - if (validDocumentColorProviderFound) { - return colorData; - } - if (defaultProvider && defaultColorDecoratorsEnablement !== 'never') { - await collector.compute(defaultProvider, model, token, colorData); - return colorData; - } - return []; -} - -export function _setupColorCommand(accessor: ServicesAccessor, resource: URI): { model: ITextModel; colorProviderRegistry: LanguageFeatureRegistry; defaultColorDecoratorsEnablement: 'auto' | 'always' | 'never' } { - const { colorProvider: colorProviderRegistry } = accessor.get(ILanguageFeaturesService); - const model = accessor.get(IModelService).getModel(resource); - if (!model) { - throw illegalArgument(); - } - const defaultColorDecoratorsEnablement = accessor.get(IConfigurationService).getValue<'auto' | 'always' | 'never'>('editor.defaultColorDecorators', { resource }); - return { model, colorProviderRegistry, defaultColorDecoratorsEnablement }; -} - diff --git a/src/vs/editor/contrib/colorPicker/browser/colorPickerContribution.ts b/src/vs/editor/contrib/colorPicker/browser/colorPickerContribution.ts deleted file mode 100644 index 68f4e89edc8a2..0000000000000 --- a/src/vs/editor/contrib/colorPicker/browser/colorPickerContribution.ts +++ /dev/null @@ -1,53 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { CancellationToken } from '../../../../base/common/cancellation.js'; -import { illegalArgument } from '../../../../base/common/errors.js'; -import { URI } from '../../../../base/common/uri.js'; -import { registerAction2 } from '../../../../platform/actions/common/actions.js'; -import { CommandsRegistry } from '../../../../platform/commands/common/commands.js'; -import { EditorContributionInstantiation, registerEditorAction, registerEditorContribution } from '../../../browser/editorExtensions.js'; -import { registerEditorFeature } from '../../../common/editorFeatures.js'; -import { IColorPresentation } from '../../../common/languages.js'; -import { HoverParticipantRegistry } from '../../hover/browser/hoverTypes.js'; -import { _findColorData, _setupColorCommand, ColorPresentationsCollector, ExtColorDataCollector, IExtColorData } from './color.js'; -import { ColorDetector } from './colorDetector.js'; -import { DefaultDocumentColorProviderFeature } from './defaultDocumentColorProvider.js'; -import { HoverColorPickerContribution } from './hoverColorPicker/hoverColorPickerContribution.js'; -import { HoverColorPickerParticipant } from './hoverColorPicker/hoverColorPickerParticipant.js'; -import { HideStandaloneColorPicker, InsertColorWithStandaloneColorPicker, ShowOrFocusStandaloneColorPicker } from './standaloneColorPicker/standaloneColorPickerActions.js'; -import { StandaloneColorPickerController } from './standaloneColorPicker/standaloneColorPickerController.js'; -import { Range } from '../../../common/core/range.js'; - -registerEditorAction(HideStandaloneColorPicker); -registerEditorAction(InsertColorWithStandaloneColorPicker); -registerAction2(ShowOrFocusStandaloneColorPicker); - -registerEditorContribution(HoverColorPickerContribution.ID, HoverColorPickerContribution, EditorContributionInstantiation.BeforeFirstInteraction); -registerEditorContribution(StandaloneColorPickerController.ID, StandaloneColorPickerController, EditorContributionInstantiation.AfterFirstRender); -registerEditorContribution(ColorDetector.ID, ColorDetector, EditorContributionInstantiation.AfterFirstRender); -registerEditorFeature(DefaultDocumentColorProviderFeature); - -HoverParticipantRegistry.register(HoverColorPickerParticipant); - -CommandsRegistry.registerCommand('_executeDocumentColorProvider', function (accessor, ...args) { - const [resource] = args; - if (!(resource instanceof URI)) { - throw illegalArgument(); - } - const { model, colorProviderRegistry, defaultColorDecoratorsEnablement } = _setupColorCommand(accessor, resource); - return _findColorData(new ExtColorDataCollector(), colorProviderRegistry, model, CancellationToken.None, defaultColorDecoratorsEnablement); -}); - -CommandsRegistry.registerCommand('_executeColorPresentationProvider', function (accessor, ...args) { - const [color, context] = args; - const { uri, range } = context; - if (!(uri instanceof URI) || !Array.isArray(color) || color.length !== 4 || !Range.isIRange(range)) { - throw illegalArgument(); - } - const { model, colorProviderRegistry, defaultColorDecoratorsEnablement } = _setupColorCommand(accessor, uri); - const [red, green, blue, alpha] = color; - return _findColorData(new ColorPresentationsCollector({ range: range, color: { red, green, blue, alpha } }), colorProviderRegistry, model, CancellationToken.None, defaultColorDecoratorsEnablement); -}); diff --git a/src/vs/editor/contrib/find/browser/findController.ts b/src/vs/editor/contrib/find/browser/findController.ts deleted file mode 100644 index 128d89dc571f3..0000000000000 --- a/src/vs/editor/contrib/find/browser/findController.ts +++ /dev/null @@ -1,1136 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { Delayer } from '../../../../base/common/async.js'; -import { KeyCode, KeyMod } from '../../../../base/common/keyCodes.js'; -import { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js'; -import * as strings from '../../../../base/common/strings.js'; -import { ICodeEditor } from '../../../browser/editorBrowser.js'; -import { EditorAction, EditorCommand, EditorContributionInstantiation, MultiEditorAction, registerEditorAction, registerEditorCommand, registerEditorContribution, registerMultiEditorAction, ServicesAccessor } from '../../../browser/editorExtensions.js'; -import { EditorOption } from '../../../common/config/editorOptions.js'; -import { overviewRulerRangeHighlight } from '../../../common/core/editorColorRegistry.js'; -import { IRange } from '../../../common/core/range.js'; -import { IEditorContribution } from '../../../common/editorCommon.js'; -import { EditorContextKeys } from '../../../common/editorContextKeys.js'; -import { OverviewRulerLane } from '../../../common/model.js'; -import { CONTEXT_FIND_INPUT_FOCUSED, CONTEXT_FIND_WIDGET_VISIBLE, CONTEXT_REPLACE_INPUT_FOCUSED, FindModelBoundToEditorModel, FIND_IDS, ToggleCaseSensitiveKeybinding, TogglePreserveCaseKeybinding, ToggleRegexKeybinding, ToggleSearchScopeKeybinding, ToggleWholeWordKeybinding } from './findModel.js'; -import { FindOptionsWidget } from './findOptionsWidget.js'; -import { FindReplaceState, FindReplaceStateChangedEvent, INewFindReplaceState } from './findState.js'; -import { FindWidget, IFindController } from './findWidget.js'; -import * as nls from '../../../../nls.js'; -import { MenuId } from '../../../../platform/actions/common/actions.js'; -import { IClipboardService } from '../../../../platform/clipboard/common/clipboardService.js'; -import { ContextKeyExpr, IContextKey, IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js'; -import { IContextViewService } from '../../../../platform/contextview/browser/contextView.js'; -import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js'; -import { KeybindingWeight } from '../../../../platform/keybinding/common/keybindingsRegistry.js'; -import { INotificationService, Severity } from '../../../../platform/notification/common/notification.js'; -import { IQuickInputService } from '../../../../platform/quickinput/common/quickInput.js'; -import { IStorageService, StorageScope, StorageTarget } from '../../../../platform/storage/common/storage.js'; -import { IThemeService, themeColorFromId } from '../../../../platform/theme/common/themeService.js'; -import { Selection } from '../../../common/core/selection.js'; -import { IHoverService } from '../../../../platform/hover/browser/hover.js'; -import { FindWidgetSearchHistory } from './findWidgetSearchHistory.js'; - -const SEARCH_STRING_MAX_LENGTH = 524288; - -export function getSelectionSearchString(editor: ICodeEditor, seedSearchStringFromSelection: 'single' | 'multiple' = 'single', seedSearchStringFromNonEmptySelection: boolean = false): string | null { - if (!editor.hasModel()) { - return null; - } - - const selection = editor.getSelection(); - // if selection spans multiple lines, default search string to empty - - if ((seedSearchStringFromSelection === 'single' && selection.startLineNumber === selection.endLineNumber) - || seedSearchStringFromSelection === 'multiple') { - if (selection.isEmpty()) { - const wordAtPosition = editor.getConfiguredWordAtPosition(selection.getStartPosition()); - if (wordAtPosition && (false === seedSearchStringFromNonEmptySelection)) { - return wordAtPosition.word; - } - } else { - if (editor.getModel().getValueLengthInRange(selection) < SEARCH_STRING_MAX_LENGTH) { - return editor.getModel().getValueInRange(selection); - } - } - } - - return null; -} - -export const enum FindStartFocusAction { - NoFocusChange, - FocusFindInput, - FocusReplaceInput -} - -export interface IFindStartOptions { - forceRevealReplace: boolean; - seedSearchStringFromSelection: 'none' | 'single' | 'multiple'; - seedSearchStringFromNonEmptySelection: boolean; - seedSearchStringFromGlobalClipboard: boolean; - shouldFocus: FindStartFocusAction; - shouldAnimate: boolean; - updateSearchScope: boolean; - loop: boolean; -} - -export interface IFindStartArguments { - searchString?: string; - replaceString?: string; - isRegex?: boolean; - matchWholeWord?: boolean; - isCaseSensitive?: boolean; - preserveCase?: boolean; - findInSelection?: boolean; -} - -export class CommonFindController extends Disposable implements IEditorContribution { - - public static readonly ID = 'editor.contrib.findController'; - - protected _editor: ICodeEditor; - private readonly _findWidgetVisible: IContextKey; - protected _state: FindReplaceState; - protected _updateHistoryDelayer: Delayer; - private _model: FindModelBoundToEditorModel | null; - protected readonly _storageService: IStorageService; - private readonly _clipboardService: IClipboardService; - protected readonly _contextKeyService: IContextKeyService; - protected readonly _notificationService: INotificationService; - protected readonly _hoverService: IHoverService; - - get editor() { - return this._editor; - } - - public static get(editor: ICodeEditor): CommonFindController | null { - return editor.getContribution(CommonFindController.ID); - } - - constructor( - editor: ICodeEditor, - @IContextKeyService contextKeyService: IContextKeyService, - @IStorageService storageService: IStorageService, - @IClipboardService clipboardService: IClipboardService, - @INotificationService notificationService: INotificationService, - @IHoverService hoverService: IHoverService - ) { - super(); - this._editor = editor; - this._findWidgetVisible = CONTEXT_FIND_WIDGET_VISIBLE.bindTo(contextKeyService); - this._contextKeyService = contextKeyService; - this._storageService = storageService; - this._clipboardService = clipboardService; - this._notificationService = notificationService; - this._hoverService = hoverService; - - this._updateHistoryDelayer = new Delayer(500); - this._state = this._register(new FindReplaceState()); - this.loadQueryState(); - this._register(this._state.onFindReplaceStateChange((e) => this._onStateChanged(e))); - - this._model = null; - - this._register(this._editor.onDidChangeModel(() => { - const shouldRestartFind = (this._editor.getModel() && this._state.isRevealed); - - this.disposeModel(); - - this._state.change({ - searchScope: null, - matchCase: this._storageService.getBoolean('editor.matchCase', StorageScope.WORKSPACE, false), - wholeWord: this._storageService.getBoolean('editor.wholeWord', StorageScope.WORKSPACE, false), - isRegex: this._storageService.getBoolean('editor.isRegex', StorageScope.WORKSPACE, false), - preserveCase: this._storageService.getBoolean('editor.preserveCase', StorageScope.WORKSPACE, false) - }, false); - - if (shouldRestartFind) { - this._start({ - forceRevealReplace: false, - seedSearchStringFromSelection: 'none', - seedSearchStringFromNonEmptySelection: false, - seedSearchStringFromGlobalClipboard: false, - shouldFocus: FindStartFocusAction.NoFocusChange, - shouldAnimate: false, - updateSearchScope: false, - loop: this._editor.getOption(EditorOption.find).loop - }); - } - })); - } - - public override dispose(): void { - this.disposeModel(); - super.dispose(); - } - - private disposeModel(): void { - if (this._model) { - this._model.dispose(); - this._model = null; - } - } - - private _onStateChanged(e: FindReplaceStateChangedEvent): void { - this.saveQueryState(e); - - if (e.isRevealed) { - if (this._state.isRevealed) { - this._findWidgetVisible.set(true); - } else { - this._findWidgetVisible.reset(); - this.disposeModel(); - } - } - if (e.searchString) { - this.setGlobalBufferTerm(this._state.searchString); - } - } - - private saveQueryState(e: FindReplaceStateChangedEvent) { - if (e.isRegex) { - this._storageService.store('editor.isRegex', this._state.actualIsRegex, StorageScope.WORKSPACE, StorageTarget.MACHINE); - } - if (e.wholeWord) { - this._storageService.store('editor.wholeWord', this._state.actualWholeWord, StorageScope.WORKSPACE, StorageTarget.MACHINE); - } - if (e.matchCase) { - this._storageService.store('editor.matchCase', this._state.actualMatchCase, StorageScope.WORKSPACE, StorageTarget.MACHINE); - } - if (e.preserveCase) { - this._storageService.store('editor.preserveCase', this._state.actualPreserveCase, StorageScope.WORKSPACE, StorageTarget.MACHINE); - } - } - - private loadQueryState() { - this._state.change({ - matchCase: this._storageService.getBoolean('editor.matchCase', StorageScope.WORKSPACE, this._state.matchCase), - wholeWord: this._storageService.getBoolean('editor.wholeWord', StorageScope.WORKSPACE, this._state.wholeWord), - isRegex: this._storageService.getBoolean('editor.isRegex', StorageScope.WORKSPACE, this._state.isRegex), - preserveCase: this._storageService.getBoolean('editor.preserveCase', StorageScope.WORKSPACE, this._state.preserveCase) - }, false); - } - - public isFindInputFocused(): boolean { - return !!CONTEXT_FIND_INPUT_FOCUSED.getValue(this._contextKeyService); - } - - public getState(): FindReplaceState { - return this._state; - } - - public closeFindWidget(): void { - this._state.change({ - isRevealed: false, - searchScope: null - }, false); - this._editor.focus(); - } - - public toggleCaseSensitive(): void { - this._state.change({ matchCase: !this._state.matchCase }, false); - if (!this._state.isRevealed) { - this.highlightFindOptions(); - } - } - - public toggleWholeWords(): void { - this._state.change({ wholeWord: !this._state.wholeWord }, false); - if (!this._state.isRevealed) { - this.highlightFindOptions(); - } - } - - public toggleRegex(): void { - this._state.change({ isRegex: !this._state.isRegex }, false); - if (!this._state.isRevealed) { - this.highlightFindOptions(); - } - } - - public togglePreserveCase(): void { - this._state.change({ preserveCase: !this._state.preserveCase }, false); - if (!this._state.isRevealed) { - this.highlightFindOptions(); - } - } - - public toggleSearchScope(): void { - if (this._state.searchScope) { - this._state.change({ searchScope: null }, true); - } else { - if (this._editor.hasModel()) { - let selections = this._editor.getSelections(); - selections = selections.map(selection => { - if (selection.endColumn === 1 && selection.endLineNumber > selection.startLineNumber) { - selection = selection.setEndPosition( - selection.endLineNumber - 1, - this._editor.getModel()!.getLineMaxColumn(selection.endLineNumber - 1) - ); - } - if (!selection.isEmpty()) { - return selection; - } - return null; - }).filter((element): element is Selection => !!element); - - if (selections.length) { - this._state.change({ searchScope: selections }, true); - } - } - } - } - - public setSearchString(searchString: string): void { - if (this._state.isRegex) { - searchString = strings.escapeRegExpCharacters(searchString); - } - this._state.change({ searchString: searchString }, false); - } - - public highlightFindOptions(ignoreWhenVisible: boolean = false): void { - // overwritten in subclass - } - - protected async _start(opts: IFindStartOptions, newState?: INewFindReplaceState): Promise { - this.disposeModel(); - - if (!this._editor.hasModel()) { - // cannot do anything with an editor that doesn't have a model... - return; - } - - const stateChanges: INewFindReplaceState = { - ...newState, - isRevealed: true - }; - - if (opts.seedSearchStringFromSelection === 'single') { - const selectionSearchString = getSelectionSearchString(this._editor, opts.seedSearchStringFromSelection, opts.seedSearchStringFromNonEmptySelection); - if (selectionSearchString) { - if (this._state.isRegex) { - stateChanges.searchString = strings.escapeRegExpCharacters(selectionSearchString); - } else { - stateChanges.searchString = selectionSearchString; - } - } - } else if (opts.seedSearchStringFromSelection === 'multiple' && !opts.updateSearchScope) { - const selectionSearchString = getSelectionSearchString(this._editor, opts.seedSearchStringFromSelection); - if (selectionSearchString) { - stateChanges.searchString = selectionSearchString; - } - } - - if (!stateChanges.searchString && opts.seedSearchStringFromGlobalClipboard) { - const selectionSearchString = await this.getGlobalBufferTerm(); - - if (!this._editor.hasModel()) { - // the editor has lost its model in the meantime - return; - } - - if (selectionSearchString) { - stateChanges.searchString = selectionSearchString; - } - } - - // Overwrite isReplaceRevealed - if (opts.forceRevealReplace || stateChanges.isReplaceRevealed) { - stateChanges.isReplaceRevealed = true; - } else if (!this._findWidgetVisible.get()) { - stateChanges.isReplaceRevealed = false; - } - - if (opts.updateSearchScope) { - const currentSelections = this._editor.getSelections(); - if (currentSelections.some(selection => !selection.isEmpty())) { - stateChanges.searchScope = currentSelections; - } - } - - stateChanges.loop = opts.loop; - - this._state.change(stateChanges, false); - - if (!this._model) { - this._model = new FindModelBoundToEditorModel(this._editor, this._state); - } - } - - public start(opts: IFindStartOptions, newState?: INewFindReplaceState): Promise { - return this._start(opts, newState); - } - - public moveToNextMatch(): boolean { - if (this._model) { - this._model.moveToNextMatch(); - return true; - } - return false; - } - - public moveToPrevMatch(): boolean { - if (this._model) { - this._model.moveToPrevMatch(); - return true; - } - return false; - } - - public goToMatch(index: number): boolean { - if (this._model) { - this._model.moveToMatch(index); - return true; - } - return false; - } - - public replace(): boolean { - if (this._model) { - this._model.replace(); - return true; - } - return false; - } - - public replaceAll(): boolean { - if (this._model) { - if (this._editor.getModel()?.isTooLargeForHeapOperation()) { - this._notificationService.warn(nls.localize('too.large.for.replaceall', "The file is too large to perform a replace all operation.")); - return false; - } - this._model.replaceAll(); - return true; - } - return false; - } - - public selectAllMatches(): boolean { - if (this._model) { - this._model.selectAllMatches(); - this._editor.focus(); - return true; - } - return false; - } - - public async getGlobalBufferTerm(): Promise { - if (this._editor.getOption(EditorOption.find).globalFindClipboard - && this._editor.hasModel() - && !this._editor.getModel().isTooLargeForSyncing() - ) { - return this._clipboardService.readFindText(); - } - return ''; - } - - public setGlobalBufferTerm(text: string): void { - if (this._editor.getOption(EditorOption.find).globalFindClipboard - && this._editor.hasModel() - && !this._editor.getModel().isTooLargeForSyncing() - ) { - // intentionally not awaited - this._clipboardService.writeFindText(text); - } - } -} - -export class FindController extends CommonFindController implements IFindController { - - private _widget: FindWidget | null; - private _findOptionsWidget: FindOptionsWidget | null; - private _findWidgetSearchHistory: FindWidgetSearchHistory; - - constructor( - editor: ICodeEditor, - @IContextViewService private readonly _contextViewService: IContextViewService, - @IContextKeyService _contextKeyService: IContextKeyService, - @IKeybindingService private readonly _keybindingService: IKeybindingService, - @IThemeService private readonly _themeService: IThemeService, - @INotificationService notificationService: INotificationService, - @IStorageService _storageService: IStorageService, - @IClipboardService clipboardService: IClipboardService, - @IHoverService hoverService: IHoverService, - ) { - super(editor, _contextKeyService, _storageService, clipboardService, notificationService, hoverService); - this._widget = null; - this._findOptionsWidget = null; - this._findWidgetSearchHistory = FindWidgetSearchHistory.getOrCreate(_storageService); - } - - protected override async _start(opts: IFindStartOptions, newState?: INewFindReplaceState): Promise { - if (!this._widget) { - this._createFindWidget(); - } - - const selection = this._editor.getSelection(); - let updateSearchScope = false; - - switch (this._editor.getOption(EditorOption.find).autoFindInSelection) { - case 'always': - updateSearchScope = true; - break; - case 'never': - updateSearchScope = false; - break; - case 'multiline': { - const isSelectionMultipleLine = !!selection && selection.startLineNumber !== selection.endLineNumber; - updateSearchScope = isSelectionMultipleLine; - break; - } - default: - break; - } - - opts.updateSearchScope = opts.updateSearchScope || updateSearchScope; - - await super._start(opts, newState); - - if (this._widget) { - if (opts.shouldFocus === FindStartFocusAction.FocusReplaceInput) { - this._widget.focusReplaceInput(); - } else if (opts.shouldFocus === FindStartFocusAction.FocusFindInput) { - this._widget.focusFindInput(); - } - } - } - - public override highlightFindOptions(ignoreWhenVisible: boolean = false): void { - if (!this._widget) { - this._createFindWidget(); - } - if (this._state.isRevealed && !ignoreWhenVisible) { - this._widget!.highlightFindOptions(); - } else { - this._findOptionsWidget!.highlightFindOptions(); - } - } - - private _createFindWidget() { - this._widget = this._register(new FindWidget(this._editor, this, this._state, this._contextViewService, this._keybindingService, this._contextKeyService, this._themeService, this._storageService, this._notificationService, this._hoverService, this._findWidgetSearchHistory)); - this._findOptionsWidget = this._register(new FindOptionsWidget(this._editor, this._state, this._keybindingService)); - } - - saveViewState(): any { - return this._widget?.getViewState(); - } - - restoreViewState(state: any): void { - this._widget?.setViewState(state); - } -} - -export const StartFindAction = registerMultiEditorAction(new MultiEditorAction({ - id: FIND_IDS.StartFindAction, - label: nls.localize2('startFindAction', "Find"), - precondition: ContextKeyExpr.or(EditorContextKeys.focus, ContextKeyExpr.has('editorIsOpen')), - kbOpts: { - kbExpr: null, - primary: KeyMod.CtrlCmd | KeyCode.KeyF, - weight: KeybindingWeight.EditorContrib - }, - menuOpts: { - menuId: MenuId.MenubarEditMenu, - group: '3_find', - title: nls.localize({ key: 'miFind', comment: ['&& denotes a mnemonic'] }, "&&Find"), - order: 1 - } -})); - -StartFindAction.addImplementation(0, (accessor: ServicesAccessor, editor: ICodeEditor, args: any): boolean | Promise => { - const controller = CommonFindController.get(editor); - if (!controller) { - return false; - } - return controller.start({ - forceRevealReplace: false, - seedSearchStringFromSelection: editor.getOption(EditorOption.find).seedSearchStringFromSelection !== 'never' ? 'single' : 'none', - seedSearchStringFromNonEmptySelection: editor.getOption(EditorOption.find).seedSearchStringFromSelection === 'selection', - seedSearchStringFromGlobalClipboard: editor.getOption(EditorOption.find).globalFindClipboard, - shouldFocus: FindStartFocusAction.FocusFindInput, - shouldAnimate: true, - updateSearchScope: false, - loop: editor.getOption(EditorOption.find).loop - }); -}); - -const findArgDescription = { - description: 'Open a new In-Editor Find Widget.', - args: [{ - name: 'Open a new In-Editor Find Widget args', - schema: { - properties: { - searchString: { type: 'string' }, - replaceString: { type: 'string' }, - isRegex: { type: 'boolean' }, - matchWholeWord: { type: 'boolean' }, - isCaseSensitive: { type: 'boolean' }, - preserveCase: { type: 'boolean' }, - findInSelection: { type: 'boolean' }, - } - } - }] -} as const; - -export class StartFindWithArgsAction extends EditorAction { - - constructor() { - super({ - id: FIND_IDS.StartFindWithArgs, - label: nls.localize2('startFindWithArgsAction', "Find With Arguments"), - precondition: undefined, - kbOpts: { - kbExpr: null, - primary: 0, - weight: KeybindingWeight.EditorContrib - }, - metadata: findArgDescription - }); - } - - public async run(accessor: ServicesAccessor | null, editor: ICodeEditor, args?: IFindStartArguments): Promise { - const controller = CommonFindController.get(editor); - if (controller) { - const newState: INewFindReplaceState = args ? { - searchString: args.searchString, - replaceString: args.replaceString, - isReplaceRevealed: args.replaceString !== undefined, - isRegex: args.isRegex, - // isRegexOverride: args.regexOverride, - wholeWord: args.matchWholeWord, - // wholeWordOverride: args.wholeWordOverride, - matchCase: args.isCaseSensitive, - // matchCaseOverride: args.matchCaseOverride, - preserveCase: args.preserveCase, - // preserveCaseOverride: args.preserveCaseOverride, - } : {}; - - await controller.start({ - forceRevealReplace: false, - seedSearchStringFromSelection: (controller.getState().searchString.length === 0) && editor.getOption(EditorOption.find).seedSearchStringFromSelection !== 'never' ? 'single' : 'none', - seedSearchStringFromNonEmptySelection: editor.getOption(EditorOption.find).seedSearchStringFromSelection === 'selection', - seedSearchStringFromGlobalClipboard: true, - shouldFocus: FindStartFocusAction.FocusFindInput, - shouldAnimate: true, - updateSearchScope: args?.findInSelection || false, - loop: editor.getOption(EditorOption.find).loop - }, newState); - - controller.setGlobalBufferTerm(controller.getState().searchString); - } - } -} - -export class StartFindWithSelectionAction extends EditorAction { - - constructor() { - super({ - id: FIND_IDS.StartFindWithSelection, - label: nls.localize2('startFindWithSelectionAction', "Find With Selection"), - precondition: undefined, - kbOpts: { - kbExpr: null, - primary: 0, - mac: { - primary: KeyMod.CtrlCmd | KeyCode.KeyE, - }, - weight: KeybindingWeight.EditorContrib - } - }); - } - - public async run(accessor: ServicesAccessor | null, editor: ICodeEditor): Promise { - const controller = CommonFindController.get(editor); - if (controller) { - await controller.start({ - forceRevealReplace: false, - seedSearchStringFromSelection: 'multiple', - seedSearchStringFromNonEmptySelection: false, - seedSearchStringFromGlobalClipboard: false, - shouldFocus: FindStartFocusAction.NoFocusChange, - shouldAnimate: true, - updateSearchScope: false, - loop: editor.getOption(EditorOption.find).loop - }); - - controller.setGlobalBufferTerm(controller.getState().searchString); - } - } -} -export abstract class MatchFindAction extends EditorAction { - public async run(accessor: ServicesAccessor | null, editor: ICodeEditor): Promise { - const controller = CommonFindController.get(editor); - if (controller && !this._run(controller)) { - await controller.start({ - forceRevealReplace: false, - seedSearchStringFromSelection: (controller.getState().searchString.length === 0) && editor.getOption(EditorOption.find).seedSearchStringFromSelection !== 'never' ? 'single' : 'none', - seedSearchStringFromNonEmptySelection: editor.getOption(EditorOption.find).seedSearchStringFromSelection === 'selection', - seedSearchStringFromGlobalClipboard: true, - shouldFocus: FindStartFocusAction.NoFocusChange, - shouldAnimate: true, - updateSearchScope: false, - loop: editor.getOption(EditorOption.find).loop - }); - this._run(controller); - } - } - - protected abstract _run(controller: CommonFindController): boolean; -} - -export class NextMatchFindAction extends MatchFindAction { - - constructor() { - super({ - id: FIND_IDS.NextMatchFindAction, - label: nls.localize2('findNextMatchAction', "Find Next"), - precondition: undefined, - kbOpts: [{ - kbExpr: EditorContextKeys.focus, - primary: KeyCode.F3, - mac: { primary: KeyMod.CtrlCmd | KeyCode.KeyG, secondary: [KeyCode.F3] }, - weight: KeybindingWeight.EditorContrib - }, { - kbExpr: ContextKeyExpr.and(EditorContextKeys.focus, CONTEXT_FIND_INPUT_FOCUSED), - primary: KeyCode.Enter, - weight: KeybindingWeight.EditorContrib - }] - }); - } - - protected _run(controller: CommonFindController): boolean { - const result = controller.moveToNextMatch(); - if (result) { - controller.editor.pushUndoStop(); - return true; - } - - return false; - } -} - - -export class PreviousMatchFindAction extends MatchFindAction { - - constructor() { - super({ - id: FIND_IDS.PreviousMatchFindAction, - label: nls.localize2('findPreviousMatchAction', "Find Previous"), - precondition: undefined, - kbOpts: [{ - kbExpr: EditorContextKeys.focus, - primary: KeyMod.Shift | KeyCode.F3, - mac: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyG, secondary: [KeyMod.Shift | KeyCode.F3] }, - weight: KeybindingWeight.EditorContrib - }, { - kbExpr: ContextKeyExpr.and(EditorContextKeys.focus, CONTEXT_FIND_INPUT_FOCUSED), - primary: KeyMod.Shift | KeyCode.Enter, - weight: KeybindingWeight.EditorContrib - } - ] - }); - } - - protected _run(controller: CommonFindController): boolean { - return controller.moveToPrevMatch(); - } -} - -export class MoveToMatchFindAction extends EditorAction { - - private _highlightDecorations: string[] = []; - constructor() { - super({ - id: FIND_IDS.GoToMatchFindAction, - label: nls.localize2('findMatchAction.goToMatch', "Go to Match..."), - precondition: CONTEXT_FIND_WIDGET_VISIBLE - }); - } - - public run(accessor: ServicesAccessor, editor: ICodeEditor, args: any): void | Promise { - const controller = CommonFindController.get(editor); - if (!controller) { - return; - } - - const matchesCount = controller.getState().matchesCount; - if (matchesCount < 1) { - const notificationService = accessor.get(INotificationService); - notificationService.notify({ - severity: Severity.Warning, - message: nls.localize('findMatchAction.noResults', "No matches. Try searching for something else.") - }); - return; - } - - const quickInputService = accessor.get(IQuickInputService); - const disposables = new DisposableStore(); - const inputBox = disposables.add(quickInputService.createInputBox()); - inputBox.placeholder = nls.localize('findMatchAction.inputPlaceHolder', "Type a number to go to a specific match (between 1 and {0})", matchesCount); - - const toFindMatchIndex = (value: string): number | undefined => { - const index = parseInt(value); - if (isNaN(index)) { - return undefined; - } - - const matchCount = controller.getState().matchesCount; - if (index > 0 && index <= matchCount) { - return index - 1; // zero based - } else if (index < 0 && index >= -matchCount) { - return matchCount + index; - } - - return undefined; - }; - - const updatePickerAndEditor = (value: string) => { - const index = toFindMatchIndex(value); - if (typeof index === 'number') { - // valid - inputBox.validationMessage = undefined; - controller.goToMatch(index); - const currentMatch = controller.getState().currentMatch; - if (currentMatch) { - this.addDecorations(editor, currentMatch); - } - } else { - inputBox.validationMessage = nls.localize('findMatchAction.inputValidationMessage', "Please type a number between 1 and {0}", controller.getState().matchesCount); - this.clearDecorations(editor); - } - }; - disposables.add(inputBox.onDidChangeValue(value => { - updatePickerAndEditor(value); - })); - - disposables.add(inputBox.onDidAccept(() => { - const index = toFindMatchIndex(inputBox.value); - if (typeof index === 'number') { - controller.goToMatch(index); - inputBox.hide(); - } else { - inputBox.validationMessage = nls.localize('findMatchAction.inputValidationMessage', "Please type a number between 1 and {0}", controller.getState().matchesCount); - } - })); - - disposables.add(inputBox.onDidHide(() => { - this.clearDecorations(editor); - disposables.dispose(); - })); - - inputBox.show(); - } - - private clearDecorations(editor: ICodeEditor): void { - editor.changeDecorations(changeAccessor => { - this._highlightDecorations = changeAccessor.deltaDecorations(this._highlightDecorations, []); - }); - } - - private addDecorations(editor: ICodeEditor, range: IRange): void { - editor.changeDecorations(changeAccessor => { - this._highlightDecorations = changeAccessor.deltaDecorations(this._highlightDecorations, [ - { - range, - options: { - description: 'find-match-quick-access-range-highlight', - className: 'rangeHighlight', - isWholeLine: true - } - }, - { - range, - options: { - description: 'find-match-quick-access-range-highlight-overview', - overviewRuler: { - color: themeColorFromId(overviewRulerRangeHighlight), - position: OverviewRulerLane.Full - } - } - } - ]); - }); - } -} - -export abstract class SelectionMatchFindAction extends EditorAction { - public async run(accessor: ServicesAccessor | null, editor: ICodeEditor): Promise { - const controller = CommonFindController.get(editor); - if (!controller) { - return; - } - - const selectionSearchString = getSelectionSearchString(editor, 'single', false); - if (selectionSearchString) { - controller.setSearchString(selectionSearchString); - } - if (!this._run(controller)) { - await controller.start({ - forceRevealReplace: false, - seedSearchStringFromSelection: 'none', - seedSearchStringFromNonEmptySelection: false, - seedSearchStringFromGlobalClipboard: false, - shouldFocus: FindStartFocusAction.NoFocusChange, - shouldAnimate: true, - updateSearchScope: false, - loop: editor.getOption(EditorOption.find).loop - }); - this._run(controller); - } - } - - protected abstract _run(controller: CommonFindController): boolean; -} - -export class NextSelectionMatchFindAction extends SelectionMatchFindAction { - - constructor() { - super({ - id: FIND_IDS.NextSelectionMatchFindAction, - label: nls.localize2('nextSelectionMatchFindAction', "Find Next Selection"), - precondition: undefined, - kbOpts: { - kbExpr: EditorContextKeys.focus, - primary: KeyMod.CtrlCmd | KeyCode.F3, - weight: KeybindingWeight.EditorContrib - } - }); - } - - protected _run(controller: CommonFindController): boolean { - return controller.moveToNextMatch(); - } -} - -export class PreviousSelectionMatchFindAction extends SelectionMatchFindAction { - - constructor() { - super({ - id: FIND_IDS.PreviousSelectionMatchFindAction, - label: nls.localize2('previousSelectionMatchFindAction', "Find Previous Selection"), - precondition: undefined, - kbOpts: { - kbExpr: EditorContextKeys.focus, - primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.F3, - weight: KeybindingWeight.EditorContrib - } - }); - } - - protected _run(controller: CommonFindController): boolean { - return controller.moveToPrevMatch(); - } -} - -export const StartFindReplaceAction = registerMultiEditorAction(new MultiEditorAction({ - id: FIND_IDS.StartFindReplaceAction, - label: nls.localize2('startReplace', "Replace"), - precondition: ContextKeyExpr.or(EditorContextKeys.focus, ContextKeyExpr.has('editorIsOpen')), - kbOpts: { - kbExpr: null, - primary: KeyMod.CtrlCmd | KeyCode.KeyH, - mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyF }, - weight: KeybindingWeight.EditorContrib - }, - menuOpts: { - menuId: MenuId.MenubarEditMenu, - group: '3_find', - title: nls.localize({ key: 'miReplace', comment: ['&& denotes a mnemonic'] }, "&&Replace"), - order: 2 - } -})); - -StartFindReplaceAction.addImplementation(0, (accessor: ServicesAccessor, editor: ICodeEditor, args: any): boolean | Promise => { - if (!editor.hasModel() || editor.getOption(EditorOption.readOnly)) { - return false; - } - const controller = CommonFindController.get(editor); - if (!controller) { - return false; - } - - const currentSelection = editor.getSelection(); - const findInputFocused = controller.isFindInputFocused(); - // we only seed search string from selection when the current selection is single line and not empty, - // + the find input is not focused - const seedSearchStringFromSelection = !currentSelection.isEmpty() - && currentSelection.startLineNumber === currentSelection.endLineNumber - && (editor.getOption(EditorOption.find).seedSearchStringFromSelection !== 'never') - && !findInputFocused; - /* - * if the existing search string in find widget is empty and we don't seed search string from selection, it means the Find Input is still empty, so we should focus the Find Input instead of Replace Input. - - * findInputFocused true -> seedSearchStringFromSelection false, FocusReplaceInput - * findInputFocused false, seedSearchStringFromSelection true FocusReplaceInput - * findInputFocused false seedSearchStringFromSelection false FocusFindInput - */ - const shouldFocus = (findInputFocused || seedSearchStringFromSelection) ? - FindStartFocusAction.FocusReplaceInput : FindStartFocusAction.FocusFindInput; - - return controller.start({ - forceRevealReplace: true, - seedSearchStringFromSelection: seedSearchStringFromSelection ? 'single' : 'none', - seedSearchStringFromNonEmptySelection: editor.getOption(EditorOption.find).seedSearchStringFromSelection === 'selection', - seedSearchStringFromGlobalClipboard: editor.getOption(EditorOption.find).seedSearchStringFromSelection !== 'never', - shouldFocus: shouldFocus, - shouldAnimate: true, - updateSearchScope: false, - loop: editor.getOption(EditorOption.find).loop - }); -}); - -registerEditorContribution(CommonFindController.ID, FindController, EditorContributionInstantiation.Eager); // eager because it uses `saveViewState`/`restoreViewState` - -registerEditorAction(StartFindWithArgsAction); -registerEditorAction(StartFindWithSelectionAction); -registerEditorAction(NextMatchFindAction); -registerEditorAction(PreviousMatchFindAction); -registerEditorAction(MoveToMatchFindAction); -registerEditorAction(NextSelectionMatchFindAction); -registerEditorAction(PreviousSelectionMatchFindAction); - -const FindCommand = EditorCommand.bindToContribution(CommonFindController.get); - -registerEditorCommand(new FindCommand({ - id: FIND_IDS.CloseFindWidgetCommand, - precondition: CONTEXT_FIND_WIDGET_VISIBLE, - handler: x => x.closeFindWidget(), - kbOpts: { - weight: KeybindingWeight.EditorContrib + 5, - kbExpr: ContextKeyExpr.and(EditorContextKeys.focus, ContextKeyExpr.not('isComposing')), - primary: KeyCode.Escape, - secondary: [KeyMod.Shift | KeyCode.Escape] - } -})); - -registerEditorCommand(new FindCommand({ - id: FIND_IDS.ToggleCaseSensitiveCommand, - precondition: undefined, - handler: x => x.toggleCaseSensitive(), - kbOpts: { - weight: KeybindingWeight.EditorContrib + 5, - kbExpr: EditorContextKeys.focus, - primary: ToggleCaseSensitiveKeybinding.primary, - mac: ToggleCaseSensitiveKeybinding.mac, - win: ToggleCaseSensitiveKeybinding.win, - linux: ToggleCaseSensitiveKeybinding.linux - } -})); - -registerEditorCommand(new FindCommand({ - id: FIND_IDS.ToggleWholeWordCommand, - precondition: undefined, - handler: x => x.toggleWholeWords(), - kbOpts: { - weight: KeybindingWeight.EditorContrib + 5, - kbExpr: EditorContextKeys.focus, - primary: ToggleWholeWordKeybinding.primary, - mac: ToggleWholeWordKeybinding.mac, - win: ToggleWholeWordKeybinding.win, - linux: ToggleWholeWordKeybinding.linux - } -})); - -registerEditorCommand(new FindCommand({ - id: FIND_IDS.ToggleRegexCommand, - precondition: undefined, - handler: x => x.toggleRegex(), - kbOpts: { - weight: KeybindingWeight.EditorContrib + 5, - kbExpr: EditorContextKeys.focus, - primary: ToggleRegexKeybinding.primary, - mac: ToggleRegexKeybinding.mac, - win: ToggleRegexKeybinding.win, - linux: ToggleRegexKeybinding.linux - } -})); - -registerEditorCommand(new FindCommand({ - id: FIND_IDS.ToggleSearchScopeCommand, - precondition: undefined, - handler: x => x.toggleSearchScope(), - kbOpts: { - weight: KeybindingWeight.EditorContrib + 5, - kbExpr: EditorContextKeys.focus, - primary: ToggleSearchScopeKeybinding.primary, - mac: ToggleSearchScopeKeybinding.mac, - win: ToggleSearchScopeKeybinding.win, - linux: ToggleSearchScopeKeybinding.linux - } -})); - -registerEditorCommand(new FindCommand({ - id: FIND_IDS.TogglePreserveCaseCommand, - precondition: undefined, - handler: x => x.togglePreserveCase(), - kbOpts: { - weight: KeybindingWeight.EditorContrib + 5, - kbExpr: EditorContextKeys.focus, - primary: TogglePreserveCaseKeybinding.primary, - mac: TogglePreserveCaseKeybinding.mac, - win: TogglePreserveCaseKeybinding.win, - linux: TogglePreserveCaseKeybinding.linux - } -})); - -registerEditorCommand(new FindCommand({ - id: FIND_IDS.ReplaceOneAction, - precondition: CONTEXT_FIND_WIDGET_VISIBLE, - handler: x => x.replace(), - kbOpts: { - weight: KeybindingWeight.EditorContrib + 5, - kbExpr: EditorContextKeys.focus, - primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Digit1 - } -})); - -registerEditorCommand(new FindCommand({ - id: FIND_IDS.ReplaceOneAction, - precondition: CONTEXT_FIND_WIDGET_VISIBLE, - handler: x => x.replace(), - kbOpts: { - weight: KeybindingWeight.EditorContrib + 5, - kbExpr: ContextKeyExpr.and(EditorContextKeys.focus, CONTEXT_REPLACE_INPUT_FOCUSED), - primary: KeyCode.Enter - } -})); - -registerEditorCommand(new FindCommand({ - id: FIND_IDS.ReplaceAllAction, - precondition: CONTEXT_FIND_WIDGET_VISIBLE, - handler: x => x.replaceAll(), - kbOpts: { - weight: KeybindingWeight.EditorContrib + 5, - kbExpr: EditorContextKeys.focus, - primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Enter - } -})); - -registerEditorCommand(new FindCommand({ - id: FIND_IDS.ReplaceAllAction, - precondition: CONTEXT_FIND_WIDGET_VISIBLE, - handler: x => x.replaceAll(), - kbOpts: { - weight: KeybindingWeight.EditorContrib + 5, - kbExpr: ContextKeyExpr.and(EditorContextKeys.focus, CONTEXT_REPLACE_INPUT_FOCUSED), - primary: undefined, - mac: { - primary: KeyMod.CtrlCmd | KeyCode.Enter, - } - } -})); - -registerEditorCommand(new FindCommand({ - id: FIND_IDS.SelectAllMatchesAction, - precondition: CONTEXT_FIND_WIDGET_VISIBLE, - handler: x => x.selectAllMatches(), - kbOpts: { - weight: KeybindingWeight.EditorContrib + 5, - kbExpr: EditorContextKeys.focus, - primary: KeyMod.Alt | KeyCode.Enter - } -})); diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts deleted file mode 100644 index 96786676a39ca..0000000000000 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ /dev/null @@ -1,1422 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as dom from '../../../../base/browser/dom.js'; -import { IKeyboardEvent } from '../../../../base/browser/keyboardEvent.js'; -import { IMouseEvent } from '../../../../base/browser/mouseEvent.js'; -import { alert as alertFn } from '../../../../base/browser/ui/aria/aria.js'; -import { Toggle } from '../../../../base/browser/ui/toggle/toggle.js'; -import { IContextViewProvider } from '../../../../base/browser/ui/contextview/contextview.js'; -import { FindInput } from '../../../../base/browser/ui/findinput/findInput.js'; -import { ReplaceInput } from '../../../../base/browser/ui/findinput/replaceInput.js'; -import { IMessage as InputBoxMessage } from '../../../../base/browser/ui/inputbox/inputBox.js'; -import { ISashEvent, IVerticalSashLayoutProvider, Orientation, Sash } from '../../../../base/browser/ui/sash/sash.js'; -import { Widget } from '../../../../base/browser/ui/widget.js'; -import { Delayer } from '../../../../base/common/async.js'; -import { Codicon } from '../../../../base/common/codicons.js'; -import { onUnexpectedError } from '../../../../base/common/errors.js'; -import { KeyCode, KeyMod } from '../../../../base/common/keyCodes.js'; -import { toDisposable } from '../../../../base/common/lifecycle.js'; -import * as platform from '../../../../base/common/platform.js'; -import * as strings from '../../../../base/common/strings.js'; -import './findWidget.css'; -import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, IViewZone, OverlayWidgetPositionPreference } from '../../../browser/editorBrowser.js'; -import { ConfigurationChangedEvent, EditorOption } from '../../../common/config/editorOptions.js'; -import { Range } from '../../../common/core/range.js'; -import { CONTEXT_FIND_INPUT_FOCUSED, CONTEXT_REPLACE_INPUT_FOCUSED, FIND_IDS, MATCHES_LIMIT } from './findModel.js'; -import { FindReplaceState, FindReplaceStateChangedEvent } from './findState.js'; -import * as nls from '../../../../nls.js'; -import { AccessibilitySupport } from '../../../../platform/accessibility/common/accessibility.js'; -import { ContextScopedFindInput, ContextScopedReplaceInput } from '../../../../platform/history/browser/contextScopedHistoryWidget.js'; -import { showHistoryKeybindingHint } from '../../../../platform/history/browser/historyWidgetKeybindingHint.js'; -import { IContextKey, IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js'; -import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js'; -import { INotificationService } from '../../../../platform/notification/common/notification.js'; -import { IStorageService, StorageScope, StorageTarget } from '../../../../platform/storage/common/storage.js'; -import { asCssVariable, contrastBorder, editorFindMatchForeground, editorFindMatchHighlightBorder, editorFindMatchHighlightForeground, editorFindRangeHighlightBorder, inputActiveOptionBackground, inputActiveOptionBorder, inputActiveOptionForeground } from '../../../../platform/theme/common/colorRegistry.js'; -import { registerIcon, widgetClose } from '../../../../platform/theme/common/iconRegistry.js'; -import { IThemeService, registerThemingParticipant } from '../../../../platform/theme/common/themeService.js'; -import { ThemeIcon } from '../../../../base/common/themables.js'; -import { isHighContrast } from '../../../../platform/theme/common/theme.js'; -import { assertIsDefined } from '../../../../base/common/types.js'; -import { defaultInputBoxStyles, defaultToggleStyles } from '../../../../platform/theme/browser/defaultStyles.js'; -import { Selection } from '../../../common/core/selection.js'; -import { createInstantHoverDelegate, getDefaultHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegateFactory.js'; -import { IHoverDelegate } from '../../../../base/browser/ui/hover/hoverDelegate.js'; -import { IHoverService } from '../../../../platform/hover/browser/hover.js'; -import { IHistory } from '../../../../base/common/history.js'; - -const findCollapsedIcon = registerIcon('find-collapsed', Codicon.chevronRight, nls.localize('findCollapsedIcon', 'Icon to indicate that the editor find widget is collapsed.')); -const findExpandedIcon = registerIcon('find-expanded', Codicon.chevronDown, nls.localize('findExpandedIcon', 'Icon to indicate that the editor find widget is expanded.')); - -export const findSelectionIcon = registerIcon('find-selection', Codicon.selection, nls.localize('findSelectionIcon', 'Icon for \'Find in Selection\' in the editor find widget.')); -export const findReplaceIcon = registerIcon('find-replace', Codicon.replace, nls.localize('findReplaceIcon', 'Icon for \'Replace\' in the editor find widget.')); -export const findReplaceAllIcon = registerIcon('find-replace-all', Codicon.replaceAll, nls.localize('findReplaceAllIcon', 'Icon for \'Replace All\' in the editor find widget.')); -export const findPreviousMatchIcon = registerIcon('find-previous-match', Codicon.arrowUp, nls.localize('findPreviousMatchIcon', 'Icon for \'Find Previous\' in the editor find widget.')); -export const findNextMatchIcon = registerIcon('find-next-match', Codicon.arrowDown, nls.localize('findNextMatchIcon', 'Icon for \'Find Next\' in the editor find widget.')); - -export interface IFindController { - replace(): void; - replaceAll(): void; - getGlobalBufferTerm(): Promise; -} - -const NLS_FIND_DIALOG_LABEL = nls.localize('label.findDialog', "Find / Replace"); -const NLS_FIND_INPUT_LABEL = nls.localize('label.find', "Find"); -const NLS_FIND_INPUT_PLACEHOLDER = nls.localize('placeholder.find', "Find"); -const NLS_PREVIOUS_MATCH_BTN_LABEL = nls.localize('label.previousMatchButton', "Previous Match"); -const NLS_NEXT_MATCH_BTN_LABEL = nls.localize('label.nextMatchButton', "Next Match"); -const NLS_TOGGLE_SELECTION_FIND_TITLE = nls.localize('label.toggleSelectionFind', "Find in Selection"); -const NLS_CLOSE_BTN_LABEL = nls.localize('label.closeButton', "Close"); -const NLS_REPLACE_INPUT_LABEL = nls.localize('label.replace', "Replace"); -const NLS_REPLACE_INPUT_PLACEHOLDER = nls.localize('placeholder.replace', "Replace"); -const NLS_REPLACE_BTN_LABEL = nls.localize('label.replaceButton', "Replace"); -const NLS_REPLACE_ALL_BTN_LABEL = nls.localize('label.replaceAllButton', "Replace All"); -const NLS_TOGGLE_REPLACE_MODE_BTN_LABEL = nls.localize('label.toggleReplaceButton', "Toggle Replace"); -const NLS_MATCHES_COUNT_LIMIT_TITLE = nls.localize('title.matchesCountLimit', "Only the first {0} results are highlighted, but all find operations work on the entire text.", MATCHES_LIMIT); -export const NLS_MATCHES_LOCATION = nls.localize('label.matchesLocation', "{0} of {1}"); -export const NLS_NO_RESULTS = nls.localize('label.noResults', "No results"); - -const FIND_WIDGET_INITIAL_WIDTH = 419; -const PART_WIDTH = 275; -const FIND_INPUT_AREA_WIDTH = PART_WIDTH - 54; - -let MAX_MATCHES_COUNT_WIDTH = 69; -// let FIND_ALL_CONTROLS_WIDTH = 17/** Find Input margin-left */ + (MAX_MATCHES_COUNT_WIDTH + 3 + 1) /** Match Results */ + 23 /** Button */ * 4 + 2/** sash */; - -const FIND_INPUT_AREA_HEIGHT = 33; // The height of Find Widget when Replace Input is not visible. -const ctrlEnterReplaceAllWarningPromptedKey = 'ctrlEnterReplaceAll.windows.donotask'; - -const ctrlKeyMod = (platform.isMacintosh ? KeyMod.WinCtrl : KeyMod.CtrlCmd); -export class FindWidgetViewZone implements IViewZone { - public readonly afterLineNumber: number; - public heightInPx: number; - public readonly suppressMouseDown: boolean; - public readonly domNode: HTMLElement; - - constructor(afterLineNumber: number) { - this.afterLineNumber = afterLineNumber; - - this.heightInPx = FIND_INPUT_AREA_HEIGHT; - this.suppressMouseDown = false; - this.domNode = document.createElement('div'); - this.domNode.className = 'dock-find-viewzone'; - } -} - -function stopPropagationForMultiLineUpwards(event: IKeyboardEvent, value: string, textarea: HTMLTextAreaElement | null) { - const isMultiline = !!value.match(/\n/); - if (textarea && isMultiline && textarea.selectionStart > 0) { - event.stopPropagation(); - return; - } -} - -function stopPropagationForMultiLineDownwards(event: IKeyboardEvent, value: string, textarea: HTMLTextAreaElement | null) { - const isMultiline = !!value.match(/\n/); - if (textarea && isMultiline && textarea.selectionEnd < textarea.value.length) { - event.stopPropagation(); - return; - } -} - -export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashLayoutProvider { - private static readonly ID = 'editor.contrib.findWidget'; - private readonly _codeEditor: ICodeEditor; - private readonly _state: FindReplaceState; - private readonly _controller: IFindController; - private readonly _contextViewProvider: IContextViewProvider; - private readonly _keybindingService: IKeybindingService; - private readonly _contextKeyService: IContextKeyService; - private readonly _storageService: IStorageService; - private readonly _notificationService: INotificationService; - - private _domNode!: HTMLElement; - private _cachedHeight: number | null = null; - private _findInput!: FindInput; - private _replaceInput!: ReplaceInput; - - private _toggleReplaceBtn!: SimpleButton; - private _matchesCount!: HTMLElement; - private _prevBtn!: SimpleButton; - private _nextBtn!: SimpleButton; - private _toggleSelectionFind!: Toggle; - private _closeBtn!: SimpleButton; - private _replaceBtn!: SimpleButton; - private _replaceAllBtn!: SimpleButton; - - private _isVisible: boolean; - private _isReplaceVisible: boolean; - private _ignoreChangeEvent: boolean; - private _ctrlEnterReplaceAllWarningPrompted: boolean; - - private readonly _findFocusTracker: dom.IFocusTracker; - private readonly _findInputFocused: IContextKey; - private readonly _replaceFocusTracker: dom.IFocusTracker; - private readonly _replaceInputFocused: IContextKey; - private _viewZone?: FindWidgetViewZone; - private _viewZoneId?: string; - - private _resizeSash!: Sash; - private _resized!: boolean; - private readonly _updateHistoryDelayer: Delayer; - - constructor( - codeEditor: ICodeEditor, - controller: IFindController, - state: FindReplaceState, - contextViewProvider: IContextViewProvider, - keybindingService: IKeybindingService, - contextKeyService: IContextKeyService, - themeService: IThemeService, - storageService: IStorageService, - notificationService: INotificationService, - private readonly _hoverService: IHoverService, - private readonly _findWidgetSearchHistory: IHistory | undefined, - ) { - super(); - this._codeEditor = codeEditor; - this._controller = controller; - this._state = state; - this._contextViewProvider = contextViewProvider; - this._keybindingService = keybindingService; - this._contextKeyService = contextKeyService; - this._storageService = storageService; - this._notificationService = notificationService; - - this._ctrlEnterReplaceAllWarningPrompted = !!storageService.getBoolean(ctrlEnterReplaceAllWarningPromptedKey, StorageScope.PROFILE); - - this._isVisible = false; - this._isReplaceVisible = false; - this._ignoreChangeEvent = false; - - this._updateHistoryDelayer = new Delayer(500); - this._register(toDisposable(() => this._updateHistoryDelayer.cancel())); - this._register(this._state.onFindReplaceStateChange((e) => this._onStateChanged(e))); - this._buildDomNode(); - this._updateButtons(); - this._tryUpdateWidgetWidth(); - this._findInput.inputBox.layout(); - - this._register(this._codeEditor.onDidChangeConfiguration((e: ConfigurationChangedEvent) => { - if (e.hasChanged(EditorOption.readOnly)) { - if (this._codeEditor.getOption(EditorOption.readOnly)) { - // Hide replace part if editor becomes read only - this._state.change({ isReplaceRevealed: false }, false); - } - this._updateButtons(); - } - if (e.hasChanged(EditorOption.layoutInfo)) { - this._tryUpdateWidgetWidth(); - } - - if (e.hasChanged(EditorOption.accessibilitySupport)) { - this.updateAccessibilitySupport(); - } - - if (e.hasChanged(EditorOption.find)) { - const supportLoop = this._codeEditor.getOption(EditorOption.find).loop; - this._state.change({ loop: supportLoop }, false); - const addExtraSpaceOnTop = this._codeEditor.getOption(EditorOption.find).addExtraSpaceOnTop; - if (addExtraSpaceOnTop && !this._viewZone) { - this._viewZone = new FindWidgetViewZone(0); - this._showViewZone(); - } - if (!addExtraSpaceOnTop && this._viewZone) { - this._removeViewZone(); - } - } - })); - this.updateAccessibilitySupport(); - this._register(this._codeEditor.onDidChangeCursorSelection(() => { - if (this._isVisible) { - this._updateToggleSelectionFindButton(); - } - })); - this._register(this._codeEditor.onDidFocusEditorWidget(async () => { - if (this._isVisible) { - const globalBufferTerm = await this._controller.getGlobalBufferTerm(); - if (globalBufferTerm && globalBufferTerm !== this._state.searchString) { - this._state.change({ searchString: globalBufferTerm }, false); - this._findInput.select(); - } - } - })); - this._findInputFocused = CONTEXT_FIND_INPUT_FOCUSED.bindTo(contextKeyService); - this._findFocusTracker = this._register(dom.trackFocus(this._findInput.inputBox.inputElement)); - this._register(this._findFocusTracker.onDidFocus(() => { - this._findInputFocused.set(true); - this._updateSearchScope(); - })); - this._register(this._findFocusTracker.onDidBlur(() => { - this._findInputFocused.set(false); - })); - - this._replaceInputFocused = CONTEXT_REPLACE_INPUT_FOCUSED.bindTo(contextKeyService); - this._replaceFocusTracker = this._register(dom.trackFocus(this._replaceInput.inputBox.inputElement)); - this._register(this._replaceFocusTracker.onDidFocus(() => { - this._replaceInputFocused.set(true); - this._updateSearchScope(); - })); - this._register(this._replaceFocusTracker.onDidBlur(() => { - this._replaceInputFocused.set(false); - })); - - this._codeEditor.addOverlayWidget(this); - if (this._codeEditor.getOption(EditorOption.find).addExtraSpaceOnTop) { - this._viewZone = new FindWidgetViewZone(0); // Put it before the first line then users can scroll beyond the first line. - } - - this._register(this._codeEditor.onDidChangeModel(() => { - if (!this._isVisible) { - return; - } - this._viewZoneId = undefined; - })); - - - this._register(this._codeEditor.onDidScrollChange((e) => { - if (e.scrollTopChanged) { - this._layoutViewZone(); - return; - } - - // for other scroll changes, layout the viewzone in next tick to avoid ruining current rendering. - setTimeout(() => { - this._layoutViewZone(); - }, 0); - })); - } - - // ----- IOverlayWidget API - - public getId(): string { - return FindWidget.ID; - } - - public getDomNode(): HTMLElement { - return this._domNode; - } - - public getPosition(): IOverlayWidgetPosition | null { - if (this._isVisible) { - return { - preference: OverlayWidgetPositionPreference.TOP_RIGHT_CORNER - }; - } - return null; - } - - // ----- React to state changes - - private _onStateChanged(e: FindReplaceStateChangedEvent): void { - if (e.searchString) { - try { - this._ignoreChangeEvent = true; - this._findInput.setValue(this._state.searchString); - } finally { - this._ignoreChangeEvent = false; - } - this._updateButtons(); - } - if (e.replaceString) { - this._replaceInput.inputBox.value = this._state.replaceString; - } - if (e.isRevealed) { - if (this._state.isRevealed) { - this._reveal(); - } else { - this._hide(true); - } - } - if (e.isReplaceRevealed) { - if (this._state.isReplaceRevealed) { - if (!this._codeEditor.getOption(EditorOption.readOnly) && !this._isReplaceVisible) { - this._isReplaceVisible = true; - this._replaceInput.width = dom.getTotalWidth(this._findInput.domNode); - this._updateButtons(); - this._replaceInput.inputBox.layout(); - } - } else { - if (this._isReplaceVisible) { - this._isReplaceVisible = false; - this._updateButtons(); - } - } - } - if ((e.isRevealed || e.isReplaceRevealed) && (this._state.isRevealed || this._state.isReplaceRevealed)) { - if (this._tryUpdateHeight()) { - this._showViewZone(); - } - } - - if (e.isRegex) { - this._findInput.setRegex(this._state.isRegex); - } - if (e.wholeWord) { - this._findInput.setWholeWords(this._state.wholeWord); - } - if (e.matchCase) { - this._findInput.setCaseSensitive(this._state.matchCase); - } - if (e.preserveCase) { - this._replaceInput.setPreserveCase(this._state.preserveCase); - } - if (e.searchScope) { - if (this._state.searchScope) { - this._toggleSelectionFind.checked = true; - } else { - this._toggleSelectionFind.checked = false; - } - this._updateToggleSelectionFindButton(); - } - if (e.searchString || e.matchesCount || e.matchesPosition) { - const showRedOutline = (this._state.searchString.length > 0 && this._state.matchesCount === 0); - this._domNode.classList.toggle('no-results', showRedOutline); - - this._updateMatchesCount(); - this._updateButtons(); - } - if (e.searchString || e.currentMatch) { - this._layoutViewZone(); - } - if (e.updateHistory) { - this._delayedUpdateHistory(); - } - if (e.loop) { - this._updateButtons(); - } - } - - private _delayedUpdateHistory() { - this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(undefined, onUnexpectedError); - } - - private _updateHistory() { - if (this._state.searchString) { - this._findInput.inputBox.addToHistory(); - } - if (this._state.replaceString) { - this._replaceInput.inputBox.addToHistory(); - } - } - - private _updateMatchesCount(): void { - this._matchesCount.style.minWidth = MAX_MATCHES_COUNT_WIDTH + 'px'; - if (this._state.matchesCount >= MATCHES_LIMIT) { - this._matchesCount.title = NLS_MATCHES_COUNT_LIMIT_TITLE; - } else { - this._matchesCount.title = ''; - } - - // remove previous content - this._matchesCount.firstChild?.remove(); - - let label: string; - if (this._state.matchesCount > 0) { - let matchesCount: string = String(this._state.matchesCount); - if (this._state.matchesCount >= MATCHES_LIMIT) { - matchesCount += '+'; - } - let matchesPosition: string = String(this._state.matchesPosition); - if (matchesPosition === '0') { - matchesPosition = '?'; - } - label = strings.format(NLS_MATCHES_LOCATION, matchesPosition, matchesCount); - } else { - label = NLS_NO_RESULTS; - } - - this._matchesCount.appendChild(document.createTextNode(label)); - - alertFn(this._getAriaLabel(label, this._state.currentMatch, this._state.searchString)); - MAX_MATCHES_COUNT_WIDTH = Math.max(MAX_MATCHES_COUNT_WIDTH, this._matchesCount.clientWidth); - } - - // ----- actions - - private _getAriaLabel(label: string, currentMatch: Range | null, searchString: string): string { - if (label === NLS_NO_RESULTS) { - return searchString === '' - ? nls.localize('ariaSearchNoResultEmpty', "{0} found", label) - : nls.localize('ariaSearchNoResult', "{0} found for '{1}'", label, searchString); - } - if (currentMatch) { - const ariaLabel = nls.localize('ariaSearchNoResultWithLineNum', "{0} found for '{1}', at {2}", label, searchString, currentMatch.startLineNumber + ':' + currentMatch.startColumn); - const model = this._codeEditor.getModel(); - if (model && (currentMatch.startLineNumber <= model.getLineCount()) && (currentMatch.startLineNumber >= 1)) { - const lineContent = model.getLineContent(currentMatch.startLineNumber); - return `${lineContent}, ${ariaLabel}`; - } - - return ariaLabel; - } - - return nls.localize('ariaSearchNoResultWithLineNumNoCurrentMatch', "{0} found for '{1}'", label, searchString); - } - - /** - * If 'selection find' is ON we should not disable the button (its function is to cancel 'selection find'). - * If 'selection find' is OFF we enable the button only if there is a selection. - */ - private _updateToggleSelectionFindButton(): void { - const selection = this._codeEditor.getSelection(); - const isSelection = selection ? (selection.startLineNumber !== selection.endLineNumber || selection.startColumn !== selection.endColumn) : false; - const isChecked = this._toggleSelectionFind.checked; - - if (this._isVisible && (isChecked || isSelection)) { - this._toggleSelectionFind.enable(); - } else { - this._toggleSelectionFind.disable(); - } - } - - private _updateButtons(): void { - this._findInput.setEnabled(this._isVisible); - this._replaceInput.setEnabled(this._isVisible && this._isReplaceVisible); - this._updateToggleSelectionFindButton(); - this._closeBtn.setEnabled(this._isVisible); - - const findInputIsNonEmpty = (this._state.searchString.length > 0); - const matchesCount = this._state.matchesCount ? true : false; - this._prevBtn.setEnabled(this._isVisible && findInputIsNonEmpty && matchesCount && this._state.canNavigateBack()); - this._nextBtn.setEnabled(this._isVisible && findInputIsNonEmpty && matchesCount && this._state.canNavigateForward()); - this._replaceBtn.setEnabled(this._isVisible && this._isReplaceVisible && findInputIsNonEmpty); - this._replaceAllBtn.setEnabled(this._isVisible && this._isReplaceVisible && findInputIsNonEmpty); - - this._domNode.classList.toggle('replaceToggled', this._isReplaceVisible); - this._toggleReplaceBtn.setExpanded(this._isReplaceVisible); - - const canReplace = !this._codeEditor.getOption(EditorOption.readOnly); - this._toggleReplaceBtn.setEnabled(this._isVisible && canReplace); - } - - private _revealTimeouts: any[] = []; - - private _reveal(): void { - this._revealTimeouts.forEach(e => { - clearTimeout(e); - }); - - this._revealTimeouts = []; - - if (!this._isVisible) { - this._isVisible = true; - - const selection = this._codeEditor.getSelection(); - - switch (this._codeEditor.getOption(EditorOption.find).autoFindInSelection) { - case 'always': - this._toggleSelectionFind.checked = true; - break; - case 'never': - this._toggleSelectionFind.checked = false; - break; - case 'multiline': { - const isSelectionMultipleLine = !!selection && selection.startLineNumber !== selection.endLineNumber; - this._toggleSelectionFind.checked = isSelectionMultipleLine; - break; - } - default: - break; - } - - this._tryUpdateWidgetWidth(); - this._updateButtons(); - - this._revealTimeouts.push(setTimeout(() => { - this._domNode.classList.add('visible'); - this._domNode.setAttribute('aria-hidden', 'false'); - }, 0)); - - // validate query again as it's being dismissed when we hide the find widget. - this._revealTimeouts.push(setTimeout(() => { - this._findInput.validate(); - }, 200)); - - this._codeEditor.layoutOverlayWidget(this); - - let adjustEditorScrollTop = true; - if (this._codeEditor.getOption(EditorOption.find).seedSearchStringFromSelection && selection) { - const domNode = this._codeEditor.getDomNode(); - if (domNode) { - const editorCoords = dom.getDomNodePagePosition(domNode); - const startCoords = this._codeEditor.getScrolledVisiblePosition(selection.getStartPosition()); - const startLeft = editorCoords.left + (startCoords ? startCoords.left : 0); - const startTop = startCoords ? startCoords.top : 0; - - if (this._viewZone && startTop < this._viewZone.heightInPx) { - if (selection.endLineNumber > selection.startLineNumber) { - adjustEditorScrollTop = false; - } - - const leftOfFindWidget = dom.getTopLeftOffset(this._domNode).left; - if (startLeft > leftOfFindWidget) { - adjustEditorScrollTop = false; - } - const endCoords = this._codeEditor.getScrolledVisiblePosition(selection.getEndPosition()); - const endLeft = editorCoords.left + (endCoords ? endCoords.left : 0); - if (endLeft > leftOfFindWidget) { - adjustEditorScrollTop = false; - } - } - } - } - this._showViewZone(adjustEditorScrollTop); - } - } - - private _hide(focusTheEditor: boolean): void { - this._revealTimeouts.forEach(e => { - clearTimeout(e); - }); - - this._revealTimeouts = []; - - if (this._isVisible) { - this._isVisible = false; - - this._updateButtons(); - - this._domNode.classList.remove('visible'); - this._domNode.setAttribute('aria-hidden', 'true'); - this._findInput.clearMessage(); - if (focusTheEditor) { - this._codeEditor.focus(); - } - this._codeEditor.layoutOverlayWidget(this); - this._removeViewZone(); - } - } - - private _layoutViewZone(targetScrollTop?: number) { - const addExtraSpaceOnTop = this._codeEditor.getOption(EditorOption.find).addExtraSpaceOnTop; - - if (!addExtraSpaceOnTop) { - this._removeViewZone(); - return; - } - - if (!this._isVisible) { - return; - } - const viewZone = this._viewZone; - if (this._viewZoneId !== undefined || !viewZone) { - return; - } - - this._codeEditor.changeViewZones((accessor) => { - viewZone.heightInPx = this._getHeight(); - this._viewZoneId = accessor.addZone(viewZone); - // scroll top adjust to make sure the editor doesn't scroll when adding viewzone at the beginning. - this._codeEditor.setScrollTop(targetScrollTop || this._codeEditor.getScrollTop() + viewZone.heightInPx); - }); - } - - private _showViewZone(adjustScroll: boolean = true) { - if (!this._isVisible) { - return; - } - - const addExtraSpaceOnTop = this._codeEditor.getOption(EditorOption.find).addExtraSpaceOnTop; - - if (!addExtraSpaceOnTop) { - return; - } - - if (this._viewZone === undefined) { - this._viewZone = new FindWidgetViewZone(0); - } - - const viewZone = this._viewZone; - - this._codeEditor.changeViewZones((accessor) => { - if (this._viewZoneId !== undefined) { - // the view zone already exists, we need to update the height - const newHeight = this._getHeight(); - if (newHeight === viewZone.heightInPx) { - return; - } - - const scrollAdjustment = newHeight - viewZone.heightInPx; - viewZone.heightInPx = newHeight; - accessor.layoutZone(this._viewZoneId); - - if (adjustScroll) { - this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() + scrollAdjustment); - } - - return; - } else { - let scrollAdjustment = this._getHeight(); - - // if the editor has top padding, factor that into the zone height - scrollAdjustment -= this._codeEditor.getOption(EditorOption.padding).top; - if (scrollAdjustment <= 0) { - return; - } - - viewZone.heightInPx = scrollAdjustment; - this._viewZoneId = accessor.addZone(viewZone); - - if (adjustScroll) { - this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() + scrollAdjustment); - } - } - }); - } - - private _removeViewZone() { - this._codeEditor.changeViewZones((accessor) => { - if (this._viewZoneId !== undefined) { - accessor.removeZone(this._viewZoneId); - this._viewZoneId = undefined; - if (this._viewZone) { - this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() - this._viewZone.heightInPx); - this._viewZone = undefined; - } - } - }); - } - - private _tryUpdateWidgetWidth() { - if (!this._isVisible) { - return; - } - if (!this._domNode.isConnected) { - // the widget is not in the DOM - return; - } - - const layoutInfo = this._codeEditor.getLayoutInfo(); - const editorContentWidth = layoutInfo.contentWidth; - - if (editorContentWidth <= 0) { - // for example, diff view original editor - this._domNode.classList.add('hiddenEditor'); - return; - } else if (this._domNode.classList.contains('hiddenEditor')) { - this._domNode.classList.remove('hiddenEditor'); - } - - const editorWidth = layoutInfo.width; - const minimapWidth = layoutInfo.minimap.minimapWidth; - let collapsedFindWidget = false; - let reducedFindWidget = false; - let narrowFindWidget = false; - - if (this._resized) { - const widgetWidth = dom.getTotalWidth(this._domNode); - - if (widgetWidth > FIND_WIDGET_INITIAL_WIDTH) { - // as the widget is resized by users, we may need to change the max width of the widget as the editor width changes. - this._domNode.style.maxWidth = `${editorWidth - 28 - minimapWidth - 15}px`; - this._replaceInput.width = dom.getTotalWidth(this._findInput.domNode); - return; - } - } - - if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth >= editorWidth) { - reducedFindWidget = true; - } - if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth - MAX_MATCHES_COUNT_WIDTH >= editorWidth) { - narrowFindWidget = true; - } - if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth - MAX_MATCHES_COUNT_WIDTH >= editorWidth + 50) { - collapsedFindWidget = true; - } - this._domNode.classList.toggle('collapsed-find-widget', collapsedFindWidget); - this._domNode.classList.toggle('narrow-find-widget', narrowFindWidget); - this._domNode.classList.toggle('reduced-find-widget', reducedFindWidget); - - if (!narrowFindWidget && !collapsedFindWidget) { - // the minimal left offset of findwidget is 15px. - this._domNode.style.maxWidth = `${editorWidth - 28 - minimapWidth - 15}px`; - } - - this._findInput.layout({ collapsedFindWidget, narrowFindWidget, reducedFindWidget }); - if (this._resized) { - const findInputWidth = this._findInput.inputBox.element.clientWidth; - if (findInputWidth > 0) { - this._replaceInput.width = findInputWidth; - } - } else if (this._isReplaceVisible) { - this._replaceInput.width = dom.getTotalWidth(this._findInput.domNode); - } - } - - private _getHeight(): number { - let totalheight = 0; - - // find input margin top - totalheight += 4; - - // find input height - totalheight += this._findInput.inputBox.height + 2 /** input box border */; - - if (this._isReplaceVisible) { - // replace input margin - totalheight += 4; - - totalheight += this._replaceInput.inputBox.height + 2 /** input box border */; - } - - // margin bottom - totalheight += 4; - return totalheight; - } - - private _tryUpdateHeight(): boolean { - const totalHeight = this._getHeight(); - if (this._cachedHeight !== null && this._cachedHeight === totalHeight) { - return false; - } - - this._cachedHeight = totalHeight; - this._domNode.style.height = `${totalHeight}px`; - - return true; - } - - // ----- Public - - public focusFindInput(): void { - this._findInput.select(); - // Edge browser requires focus() in addition to select() - this._findInput.focus(); - } - - public focusReplaceInput(): void { - this._replaceInput.select(); - // Edge browser requires focus() in addition to select() - this._replaceInput.focus(); - } - - public highlightFindOptions(): void { - this._findInput.highlightFindOptions(); - } - - private _updateSearchScope(): void { - if (!this._codeEditor.hasModel()) { - return; - } - - if (this._toggleSelectionFind.checked) { - const selections = this._codeEditor.getSelections(); - - selections.map(selection => { - if (selection.endColumn === 1 && selection.endLineNumber > selection.startLineNumber) { - selection = selection.setEndPosition( - selection.endLineNumber - 1, - this._codeEditor.getModel()!.getLineMaxColumn(selection.endLineNumber - 1) - ); - } - const currentMatch = this._state.currentMatch; - if (selection.startLineNumber !== selection.endLineNumber) { - if (!Range.equalsRange(selection, currentMatch)) { - return selection; - } - } - return null; - }).filter(element => !!element); - - if (selections.length) { - this._state.change({ searchScope: selections as Range[] }, true); - } - } - } - - private _onFindInputMouseDown(e: IMouseEvent): void { - // on linux, middle key does pasting. - if (e.middleButton) { - e.stopPropagation(); - } - } - - private _onFindInputKeyDown(e: IKeyboardEvent): void { - if (e.equals(ctrlKeyMod | KeyCode.Enter)) { - if (this._keybindingService.dispatchEvent(e, e.target)) { - e.preventDefault(); - return; - } else { - this._findInput.inputBox.insertAtCursor('\n'); - e.preventDefault(); - return; - } - } - - if (e.equals(KeyCode.Tab)) { - if (this._isReplaceVisible) { - this._replaceInput.focus(); - } else { - this._findInput.focusOnCaseSensitive(); - } - e.preventDefault(); - return; - } - - if (e.equals(KeyMod.CtrlCmd | KeyCode.DownArrow)) { - this._codeEditor.focus(); - e.preventDefault(); - return; - } - - if (e.equals(KeyCode.UpArrow)) { - return stopPropagationForMultiLineUpwards(e, this._findInput.getValue(), this._findInput.domNode.querySelector('textarea')); - } - - if (e.equals(KeyCode.DownArrow)) { - return stopPropagationForMultiLineDownwards(e, this._findInput.getValue(), this._findInput.domNode.querySelector('textarea')); - } - } - - private _onReplaceInputKeyDown(e: IKeyboardEvent): void { - if (e.equals(ctrlKeyMod | KeyCode.Enter)) { - if (this._keybindingService.dispatchEvent(e, e.target)) { - e.preventDefault(); - return; - } else { - if (platform.isWindows && platform.isNative && !this._ctrlEnterReplaceAllWarningPrompted) { - // this is the first time when users press Ctrl + Enter to replace all - this._notificationService.info( - nls.localize('ctrlEnter.keybindingChanged', - 'Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.') - ); - - this._ctrlEnterReplaceAllWarningPrompted = true; - this._storageService.store(ctrlEnterReplaceAllWarningPromptedKey, true, StorageScope.PROFILE, StorageTarget.USER); - } - - this._replaceInput.inputBox.insertAtCursor('\n'); - e.preventDefault(); - return; - } - - } - - if (e.equals(KeyCode.Tab)) { - this._findInput.focusOnCaseSensitive(); - e.preventDefault(); - return; - } - - if (e.equals(KeyMod.Shift | KeyCode.Tab)) { - this._findInput.focus(); - e.preventDefault(); - return; - } - - if (e.equals(KeyMod.CtrlCmd | KeyCode.DownArrow)) { - this._codeEditor.focus(); - e.preventDefault(); - return; - } - - if (e.equals(KeyCode.UpArrow)) { - return stopPropagationForMultiLineUpwards(e, this._replaceInput.inputBox.value, this._replaceInput.inputBox.element.querySelector('textarea')); - } - - if (e.equals(KeyCode.DownArrow)) { - return stopPropagationForMultiLineDownwards(e, this._replaceInput.inputBox.value, this._replaceInput.inputBox.element.querySelector('textarea')); - } - } - - // ----- sash - public getVerticalSashLeft(_sash: Sash): number { - return 0; - } - // ----- initialization - - private _keybindingLabelFor(actionId: string): string { - const kb = this._keybindingService.lookupKeybinding(actionId); - if (!kb) { - return ''; - } - return ` (${kb.getLabel()})`; - } - - private _buildDomNode(): void { - const flexibleHeight = true; - const flexibleWidth = true; - // Find input - const findSearchHistoryConfig = this._codeEditor.getOption(EditorOption.find).history; - this._findInput = this._register(new ContextScopedFindInput(null, this._contextViewProvider, { - width: FIND_INPUT_AREA_WIDTH, - label: NLS_FIND_INPUT_LABEL, - placeholder: NLS_FIND_INPUT_PLACEHOLDER, - appendCaseSensitiveLabel: this._keybindingLabelFor(FIND_IDS.ToggleCaseSensitiveCommand), - appendWholeWordsLabel: this._keybindingLabelFor(FIND_IDS.ToggleWholeWordCommand), - appendRegexLabel: this._keybindingLabelFor(FIND_IDS.ToggleRegexCommand), - validation: (value: string): InputBoxMessage | null => { - if (value.length === 0 || !this._findInput.getRegex()) { - return null; - } - try { - // use `g` and `u` which are also used by the TextModel search - new RegExp(value, 'gu'); - return null; - } catch (e) { - return { content: e.message }; - } - }, - flexibleHeight, - flexibleWidth, - flexibleMaxHeight: 118, - showCommonFindToggles: true, - showHistoryHint: () => showHistoryKeybindingHint(this._keybindingService), - inputBoxStyles: defaultInputBoxStyles, - toggleStyles: defaultToggleStyles, - history: findSearchHistoryConfig === 'workspace' ? this._findWidgetSearchHistory : new Set([]), - }, this._contextKeyService)); - this._findInput.setRegex(!!this._state.isRegex); - this._findInput.setCaseSensitive(!!this._state.matchCase); - this._findInput.setWholeWords(!!this._state.wholeWord); - this._register(this._findInput.onKeyDown((e) => this._onFindInputKeyDown(e))); - this._register(this._findInput.inputBox.onDidChange(() => { - if (this._ignoreChangeEvent) { - return; - } - this._state.change({ searchString: this._findInput.getValue() }, true); - })); - this._register(this._findInput.onDidOptionChange(() => { - this._state.change({ - isRegex: this._findInput.getRegex(), - wholeWord: this._findInput.getWholeWords(), - matchCase: this._findInput.getCaseSensitive() - }, true); - })); - this._register(this._findInput.onCaseSensitiveKeyDown((e) => { - if (e.equals(KeyMod.Shift | KeyCode.Tab)) { - if (this._isReplaceVisible) { - this._replaceInput.focus(); - e.preventDefault(); - } - } - })); - this._register(this._findInput.onRegexKeyDown((e) => { - if (e.equals(KeyCode.Tab)) { - if (this._isReplaceVisible) { - this._replaceInput.focusOnPreserve(); - e.preventDefault(); - } - } - })); - this._register(this._findInput.inputBox.onDidHeightChange((e) => { - if (this._tryUpdateHeight()) { - this._showViewZone(); - } - })); - if (platform.isLinux) { - this._register(this._findInput.onMouseDown((e) => this._onFindInputMouseDown(e))); - } - - this._matchesCount = document.createElement('div'); - this._matchesCount.className = 'matchesCount'; - this._updateMatchesCount(); - - // Create a scoped hover delegate for all find related buttons - const hoverDelegate = this._register(createInstantHoverDelegate()); - - // Previous button - this._prevBtn = this._register(new SimpleButton({ - label: NLS_PREVIOUS_MATCH_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.PreviousMatchFindAction), - icon: findPreviousMatchIcon, - hoverDelegate, - onTrigger: () => { - assertIsDefined(this._codeEditor.getAction(FIND_IDS.PreviousMatchFindAction)).run().then(undefined, onUnexpectedError); - } - }, this._hoverService)); - - // Next button - this._nextBtn = this._register(new SimpleButton({ - label: NLS_NEXT_MATCH_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.NextMatchFindAction), - icon: findNextMatchIcon, - hoverDelegate, - onTrigger: () => { - assertIsDefined(this._codeEditor.getAction(FIND_IDS.NextMatchFindAction)).run().then(undefined, onUnexpectedError); - } - }, this._hoverService)); - - const findPart = document.createElement('div'); - findPart.className = 'find-part'; - findPart.appendChild(this._findInput.domNode); - const actionsContainer = document.createElement('div'); - actionsContainer.className = 'find-actions'; - findPart.appendChild(actionsContainer); - actionsContainer.appendChild(this._matchesCount); - actionsContainer.appendChild(this._prevBtn.domNode); - actionsContainer.appendChild(this._nextBtn.domNode); - - // Toggle selection button - this._toggleSelectionFind = this._register(new Toggle({ - icon: findSelectionIcon, - title: NLS_TOGGLE_SELECTION_FIND_TITLE + this._keybindingLabelFor(FIND_IDS.ToggleSearchScopeCommand), - isChecked: false, - hoverDelegate: hoverDelegate, - inputActiveOptionBackground: asCssVariable(inputActiveOptionBackground), - inputActiveOptionBorder: asCssVariable(inputActiveOptionBorder), - inputActiveOptionForeground: asCssVariable(inputActiveOptionForeground), - })); - - this._register(this._toggleSelectionFind.onChange(() => { - if (this._toggleSelectionFind.checked) { - if (this._codeEditor.hasModel()) { - let selections = this._codeEditor.getSelections(); - selections = selections.map(selection => { - if (selection.endColumn === 1 && selection.endLineNumber > selection.startLineNumber) { - selection = selection.setEndPosition(selection.endLineNumber - 1, this._codeEditor.getModel()!.getLineMaxColumn(selection.endLineNumber - 1)); - } - if (!selection.isEmpty()) { - return selection; - } - return null; - }).filter((element): element is Selection => !!element); - - if (selections.length) { - this._state.change({ searchScope: selections as Range[] }, true); - } - } - } else { - this._state.change({ searchScope: null }, true); - } - })); - - actionsContainer.appendChild(this._toggleSelectionFind.domNode); - - // Close button - this._closeBtn = this._register(new SimpleButton({ - label: NLS_CLOSE_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.CloseFindWidgetCommand), - icon: widgetClose, - hoverDelegate, - onTrigger: () => { - this._state.change({ isRevealed: false, searchScope: null }, false); - }, - onKeyDown: (e) => { - if (e.equals(KeyCode.Tab)) { - if (this._isReplaceVisible) { - if (this._replaceBtn.isEnabled()) { - this._replaceBtn.focus(); - } else { - this._codeEditor.focus(); - } - e.preventDefault(); - } - } - } - }, this._hoverService)); - - // Replace input - this._replaceInput = this._register(new ContextScopedReplaceInput(null, undefined, { - label: NLS_REPLACE_INPUT_LABEL, - placeholder: NLS_REPLACE_INPUT_PLACEHOLDER, - appendPreserveCaseLabel: this._keybindingLabelFor(FIND_IDS.TogglePreserveCaseCommand), - history: [], - flexibleHeight, - flexibleWidth, - flexibleMaxHeight: 118, - showHistoryHint: () => showHistoryKeybindingHint(this._keybindingService), - inputBoxStyles: defaultInputBoxStyles, - toggleStyles: defaultToggleStyles - }, this._contextKeyService, true)); - this._replaceInput.setPreserveCase(!!this._state.preserveCase); - this._register(this._replaceInput.onKeyDown((e) => this._onReplaceInputKeyDown(e))); - this._register(this._replaceInput.inputBox.onDidChange(() => { - this._state.change({ replaceString: this._replaceInput.inputBox.value }, false); - })); - this._register(this._replaceInput.inputBox.onDidHeightChange((e) => { - if (this._isReplaceVisible && this._tryUpdateHeight()) { - this._showViewZone(); - } - })); - this._register(this._replaceInput.onDidOptionChange(() => { - this._state.change({ - preserveCase: this._replaceInput.getPreserveCase() - }, true); - })); - this._register(this._replaceInput.onPreserveCaseKeyDown((e) => { - if (e.equals(KeyCode.Tab)) { - if (this._prevBtn.isEnabled()) { - this._prevBtn.focus(); - } else if (this._nextBtn.isEnabled()) { - this._nextBtn.focus(); - } else if (this._toggleSelectionFind.enabled) { - this._toggleSelectionFind.focus(); - } else if (this._closeBtn.isEnabled()) { - this._closeBtn.focus(); - } - - e.preventDefault(); - } - })); - - // Create scoped hover delegate for replace actions - const replaceHoverDelegate = this._register(createInstantHoverDelegate()); - - // Replace one button - this._replaceBtn = this._register(new SimpleButton({ - label: NLS_REPLACE_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.ReplaceOneAction), - icon: findReplaceIcon, - hoverDelegate: replaceHoverDelegate, - onTrigger: () => { - this._controller.replace(); - }, - onKeyDown: (e) => { - if (e.equals(KeyMod.Shift | KeyCode.Tab)) { - this._closeBtn.focus(); - e.preventDefault(); - } - } - }, this._hoverService)); - - // Replace all button - this._replaceAllBtn = this._register(new SimpleButton({ - label: NLS_REPLACE_ALL_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.ReplaceAllAction), - icon: findReplaceAllIcon, - hoverDelegate: replaceHoverDelegate, - onTrigger: () => { - this._controller.replaceAll(); - } - }, this._hoverService)); - - const replacePart = document.createElement('div'); - replacePart.className = 'replace-part'; - replacePart.appendChild(this._replaceInput.domNode); - - const replaceActionsContainer = document.createElement('div'); - replaceActionsContainer.className = 'replace-actions'; - replacePart.appendChild(replaceActionsContainer); - - replaceActionsContainer.appendChild(this._replaceBtn.domNode); - replaceActionsContainer.appendChild(this._replaceAllBtn.domNode); - - // Toggle replace button - this._toggleReplaceBtn = this._register(new SimpleButton({ - label: NLS_TOGGLE_REPLACE_MODE_BTN_LABEL, - className: 'codicon toggle left', - onTrigger: () => { - this._state.change({ isReplaceRevealed: !this._isReplaceVisible }, false); - if (this._isReplaceVisible) { - this._replaceInput.width = dom.getTotalWidth(this._findInput.domNode); - this._replaceInput.inputBox.layout(); - } - this._showViewZone(); - } - }, this._hoverService)); - this._toggleReplaceBtn.setExpanded(this._isReplaceVisible); - - // Widget - this._domNode = document.createElement('div'); - this._domNode.className = 'editor-widget find-widget'; - this._domNode.setAttribute('aria-hidden', 'true'); - this._domNode.ariaLabel = NLS_FIND_DIALOG_LABEL; - this._domNode.role = 'dialog'; - - // We need to set this explicitly, otherwise on IE11, the width inheritence of flex doesn't work. - this._domNode.style.width = `${FIND_WIDGET_INITIAL_WIDTH}px`; - - this._domNode.appendChild(this._toggleReplaceBtn.domNode); - this._domNode.appendChild(findPart); - this._domNode.appendChild(this._closeBtn.domNode); - this._domNode.appendChild(replacePart); - - this._resizeSash = this._register(new Sash(this._domNode, this, { orientation: Orientation.VERTICAL, size: 2 })); - this._resized = false; - let originalWidth = FIND_WIDGET_INITIAL_WIDTH; - - this._register(this._resizeSash.onDidStart(() => { - originalWidth = dom.getTotalWidth(this._domNode); - })); - - this._register(this._resizeSash.onDidChange((evt: ISashEvent) => { - this._resized = true; - const width = originalWidth + evt.startX - evt.currentX; - - if (width < FIND_WIDGET_INITIAL_WIDTH) { - // narrow down the find widget should be handled by CSS. - return; - } - - const maxWidth = parseFloat(dom.getComputedStyle(this._domNode).maxWidth) || 0; - if (width > maxWidth) { - return; - } - this._domNode.style.width = `${width}px`; - if (this._isReplaceVisible) { - this._replaceInput.width = dom.getTotalWidth(this._findInput.domNode); - } - - this._findInput.inputBox.layout(); - this._tryUpdateHeight(); - })); - - this._register(this._resizeSash.onDidReset(() => { - // users double click on the sash - const currentWidth = dom.getTotalWidth(this._domNode); - - if (currentWidth < FIND_WIDGET_INITIAL_WIDTH) { - // The editor is narrow and the width of the find widget is controlled fully by CSS. - return; - } - - let width = FIND_WIDGET_INITIAL_WIDTH; - - if (!this._resized || currentWidth === FIND_WIDGET_INITIAL_WIDTH) { - // 1. never resized before, double click should maximizes it - // 2. users resized it already but its width is the same as default - const layoutInfo = this._codeEditor.getLayoutInfo(); - width = layoutInfo.width - 28 - layoutInfo.minimap.minimapWidth - 15; - this._resized = true; - } else { - /** - * no op, the find widget should be shrinked to its default size. - */ - } - - - this._domNode.style.width = `${width}px`; - if (this._isReplaceVisible) { - this._replaceInput.width = dom.getTotalWidth(this._findInput.domNode); - } - - this._findInput.inputBox.layout(); - })); - } - - private updateAccessibilitySupport(): void { - const value = this._codeEditor.getOption(EditorOption.accessibilitySupport); - this._findInput.setFocusInputOnOptionClick(value !== AccessibilitySupport.Enabled); - } - - getViewState() { - let widgetViewZoneVisible = false; - if (this._viewZone && this._viewZoneId) { - widgetViewZoneVisible = this._viewZone.heightInPx > this._codeEditor.getScrollTop(); - } - - return { - widgetViewZoneVisible, - scrollTop: this._codeEditor.getScrollTop() - }; - } - - setViewState(state?: { widgetViewZoneVisible: boolean; scrollTop: number }) { - if (!state) { - return; - } - - if (state.widgetViewZoneVisible) { - // we should add the view zone - this._layoutViewZone(state.scrollTop); - } - } -} - -export interface ISimpleButtonOpts { - readonly label: string; - readonly className?: string; - readonly icon?: ThemeIcon; - readonly hoverDelegate?: IHoverDelegate; - readonly onTrigger: () => void; - readonly onKeyDown?: (e: IKeyboardEvent) => void; -} - -export class SimpleButton extends Widget { - - private readonly _opts: ISimpleButtonOpts; - private readonly _domNode: HTMLElement; - - constructor( - opts: ISimpleButtonOpts, - hoverService: IHoverService - ) { - super(); - this._opts = opts; - - let className = 'button'; - if (this._opts.className) { - className = className + ' ' + this._opts.className; - } - if (this._opts.icon) { - className = className + ' ' + ThemeIcon.asClassName(this._opts.icon); - } - - this._domNode = document.createElement('div'); - this._domNode.tabIndex = 0; - this._domNode.className = className; - this._domNode.setAttribute('role', 'button'); - this._domNode.setAttribute('aria-label', this._opts.label); - this._register(hoverService.setupManagedHover(opts.hoverDelegate ?? getDefaultHoverDelegate('element'), this._domNode, this._opts.label)); - - this.onclick(this._domNode, (e) => { - this._opts.onTrigger(); - e.preventDefault(); - }); - - this.onkeydown(this._domNode, (e) => { - if (e.equals(KeyCode.Space) || e.equals(KeyCode.Enter)) { - this._opts.onTrigger(); - e.preventDefault(); - return; - } - this._opts.onKeyDown?.(e); - }); - } - - public get domNode(): HTMLElement { - return this._domNode; - } - - public isEnabled(): boolean { - return (this._domNode.tabIndex >= 0); - } - - public focus(): void { - this._domNode.focus(); - } - - public setEnabled(enabled: boolean): void { - this._domNode.classList.toggle('disabled', !enabled); - this._domNode.setAttribute('aria-disabled', String(!enabled)); - this._domNode.tabIndex = enabled ? 0 : -1; - } - - public setExpanded(expanded: boolean): void { - this._domNode.setAttribute('aria-expanded', String(!!expanded)); - if (expanded) { - this._domNode.classList.remove(...ThemeIcon.asClassNameArray(findCollapsedIcon)); - this._domNode.classList.add(...ThemeIcon.asClassNameArray(findExpandedIcon)); - } else { - this._domNode.classList.remove(...ThemeIcon.asClassNameArray(findExpandedIcon)); - this._domNode.classList.add(...ThemeIcon.asClassNameArray(findCollapsedIcon)); - } - } -} - -// theming - -registerThemingParticipant((theme, collector) => { - const findMatchHighlightBorder = theme.getColor(editorFindMatchHighlightBorder); - if (findMatchHighlightBorder) { - collector.addRule(`.monaco-editor .findMatch { border: 1px ${isHighContrast(theme.type) ? 'dotted' : 'solid'} ${findMatchHighlightBorder}; box-sizing: border-box; }`); - } - - const findRangeHighlightBorder = theme.getColor(editorFindRangeHighlightBorder); - if (findRangeHighlightBorder) { - collector.addRule(`.monaco-editor .findScope { border: 1px ${isHighContrast(theme.type) ? 'dashed' : 'solid'} ${findRangeHighlightBorder}; }`); - } - - const hcBorder = theme.getColor(contrastBorder); - if (hcBorder) { - collector.addRule(`.monaco-editor .find-widget { border: 1px solid ${hcBorder}; }`); - } - const findMatchForeground = theme.getColor(editorFindMatchForeground); - if (findMatchForeground) { - collector.addRule(`.monaco-editor .findMatchInline { color: ${findMatchForeground}; }`); - } - const findMatchHighlightForeground = theme.getColor(editorFindMatchHighlightForeground); - if (findMatchHighlightForeground) { - collector.addRule(`.monaco-editor .currentFindMatchInline { color: ${findMatchHighlightForeground}; }`); - } -}); diff --git a/src/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.ts b/src/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.ts deleted file mode 100644 index 70c093ee9d8f3..0000000000000 --- a/src/vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition.ts +++ /dev/null @@ -1,323 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { IKeyboardEvent } from '../../../../../base/browser/keyboardEvent.js'; -import { CancelablePromise, createCancelablePromise } from '../../../../../base/common/async.js'; -import { CancellationToken } from '../../../../../base/common/cancellation.js'; -import { onUnexpectedError } from '../../../../../base/common/errors.js'; -import { MarkdownString } from '../../../../../base/common/htmlContent.js'; -import { DisposableStore } from '../../../../../base/common/lifecycle.js'; -import './goToDefinitionAtPosition.css'; -import { CodeEditorStateFlag, EditorState } from '../../../editorState/browser/editorState.js'; -import { ICodeEditor, MouseTargetType } from '../../../../browser/editorBrowser.js'; -import { EditorContributionInstantiation, registerEditorContribution } from '../../../../browser/editorExtensions.js'; -import { EditorOption } from '../../../../common/config/editorOptions.js'; -import { Position } from '../../../../common/core/position.js'; -import { IRange, Range } from '../../../../common/core/range.js'; -import { IEditorContribution, IEditorDecorationsCollection } from '../../../../common/editorCommon.js'; -import { IModelDeltaDecoration, ITextModel } from '../../../../common/model.js'; -import { LocationLink } from '../../../../common/languages.js'; -import { ILanguageService } from '../../../../common/languages/language.js'; -import { ITextModelService } from '../../../../common/services/resolverService.js'; -import { ClickLinkGesture, ClickLinkKeyboardEvent, ClickLinkMouseEvent } from './clickLinkGesture.js'; -import { PeekContext } from '../../../peekView/browser/peekView.js'; -import * as nls from '../../../../../nls.js'; -import { IContextKeyService } from '../../../../../platform/contextkey/common/contextkey.js'; -import { ServicesAccessor } from '../../../../../platform/instantiation/common/instantiation.js'; -import { DefinitionAction } from '../goToCommands.js'; -import { getDefinitionsAtPosition } from '../goToSymbol.js'; -import { IWordAtPosition } from '../../../../common/core/wordHelper.js'; -import { ILanguageFeaturesService } from '../../../../common/services/languageFeatures.js'; -import { ModelDecorationInjectedTextOptions } from '../../../../common/model/textModel.js'; - -export class GotoDefinitionAtPositionEditorContribution implements IEditorContribution { - - public static readonly ID = 'editor.contrib.gotodefinitionatposition'; - static readonly MAX_SOURCE_PREVIEW_LINES = 8; - - private readonly editor: ICodeEditor; - private readonly toUnhook = new DisposableStore(); - private readonly toUnhookForKeyboard = new DisposableStore(); - private readonly linkDecorations: IEditorDecorationsCollection; - private currentWordAtPosition: IWordAtPosition | null = null; - private previousPromise: CancelablePromise | null = null; - - constructor( - editor: ICodeEditor, - @ITextModelService private readonly textModelResolverService: ITextModelService, - @ILanguageService private readonly languageService: ILanguageService, - @ILanguageFeaturesService private readonly languageFeaturesService: ILanguageFeaturesService, - ) { - this.editor = editor; - this.linkDecorations = this.editor.createDecorationsCollection(); - - const linkGesture = new ClickLinkGesture(editor); - this.toUnhook.add(linkGesture); - - this.toUnhook.add(linkGesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, keyboardEvent]) => { - this.startFindDefinitionFromMouse(mouseEvent, keyboardEvent ?? undefined); - })); - - this.toUnhook.add(linkGesture.onExecute((mouseEvent: ClickLinkMouseEvent) => { - if (this.isEnabled(mouseEvent)) { - this.gotoDefinition(mouseEvent.target.position!, mouseEvent.hasSideBySideModifier) - .catch((error: Error) => { - onUnexpectedError(error); - }) - .finally(() => { - this.removeLinkDecorations(); - }); - } - })); - - this.toUnhook.add(linkGesture.onCancel(() => { - this.removeLinkDecorations(); - this.currentWordAtPosition = null; - })); - } - - static get(editor: ICodeEditor): GotoDefinitionAtPositionEditorContribution | null { - return editor.getContribution(GotoDefinitionAtPositionEditorContribution.ID); - } - - async startFindDefinitionFromCursor(position: Position) { - // For issue: https://github.com/microsoft/vscode/issues/46257 - // equivalent to mouse move with meta/ctrl key - - // First find the definition and add decorations - // to the editor to be shown with the content hover widget - await this.startFindDefinition(position); - // Add listeners for editor cursor move and key down events - // Dismiss the "extended" editor decorations when the user hides - // the hover widget. There is no event for the widget itself so these - // serve as a best effort. After removing the link decorations, the hover - // widget is clean and will only show declarations per next request. - this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(() => { - this.currentWordAtPosition = null; - this.removeLinkDecorations(); - this.toUnhookForKeyboard.clear(); - })); - this.toUnhookForKeyboard.add(this.editor.onKeyDown((e: IKeyboardEvent) => { - if (e) { - this.currentWordAtPosition = null; - this.removeLinkDecorations(); - this.toUnhookForKeyboard.clear(); - } - })); - } - - private startFindDefinitionFromMouse(mouseEvent: ClickLinkMouseEvent, withKey?: ClickLinkKeyboardEvent): void { - - // check if we are active and on a content widget - if (mouseEvent.target.type === MouseTargetType.CONTENT_WIDGET && this.linkDecorations.length > 0) { - return; - } - - if (!this.editor.hasModel() || !this.isEnabled(mouseEvent, withKey)) { - this.currentWordAtPosition = null; - this.removeLinkDecorations(); - return; - } - - const position = mouseEvent.target.position!; - - this.startFindDefinition(position); - } - - private async startFindDefinition(position: Position): Promise { - - // Dispose listeners for updating decorations when using keyboard to show definition hover - this.toUnhookForKeyboard.clear(); - - // Find word at mouse position - const word = position ? this.editor.getModel()?.getWordAtPosition(position) : null; - if (!word) { - this.currentWordAtPosition = null; - this.removeLinkDecorations(); - return; - } - - // Return early if word at position is still the same - if (this.currentWordAtPosition && this.currentWordAtPosition.startColumn === word.startColumn && this.currentWordAtPosition.endColumn === word.endColumn && this.currentWordAtPosition.word === word.word) { - return; - } - - this.currentWordAtPosition = word; - - // Find definition and decorate word if found - const state = new EditorState(this.editor, CodeEditorStateFlag.Position | CodeEditorStateFlag.Value | CodeEditorStateFlag.Selection | CodeEditorStateFlag.Scroll); - - if (this.previousPromise) { - this.previousPromise.cancel(); - this.previousPromise = null; - } - - this.previousPromise = createCancelablePromise(token => this.findDefinition(position, token)); - - let results: LocationLink[] | null; - try { - results = await this.previousPromise; - - } catch (error) { - onUnexpectedError(error); - return; - } - - if (!results || !results.length || !state.validate(this.editor)) { - this.removeLinkDecorations(); - return; - } - - const linkRange = results[0].originSelectionRange - ? Range.lift(results[0].originSelectionRange) - : new Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn); - - // Multiple results - if (results.length > 1) { - - let combinedRange = linkRange; - for (const { originSelectionRange } of results) { - if (originSelectionRange) { - combinedRange = Range.plusRange(combinedRange, originSelectionRange); - } - } - - this.addDecoration( - combinedRange, - new MarkdownString().appendText(nls.localize('multipleResults', "Click to show {0} definitions.", results.length)) - ); - } else { - // Single result - const result = results[0]; - - if (!result.uri) { - return; - } - - return this.textModelResolverService.createModelReference(result.uri).then(ref => { - - if (!ref.object || !ref.object.textEditorModel) { - ref.dispose(); - return; - } - - const { object: { textEditorModel } } = ref; - const { startLineNumber } = result.range; - - if (startLineNumber < 1 || startLineNumber > textEditorModel.getLineCount()) { - // invalid range - ref.dispose(); - return; - } - - const previewValue = this.getPreviewValue(textEditorModel, startLineNumber, result); - const languageId = this.languageService.guessLanguageIdByFilepathOrFirstLine(textEditorModel.uri); - this.addDecoration( - linkRange, - previewValue ? new MarkdownString().appendCodeblock(languageId ? languageId : '', previewValue) : undefined - ); - ref.dispose(); - }); - } - } - - private getPreviewValue(textEditorModel: ITextModel, startLineNumber: number, result: LocationLink) { - let rangeToUse = result.range; - const numberOfLinesInRange = rangeToUse.endLineNumber - rangeToUse.startLineNumber; - if (numberOfLinesInRange >= GotoDefinitionAtPositionEditorContribution.MAX_SOURCE_PREVIEW_LINES) { - rangeToUse = this.getPreviewRangeBasedOnIndentation(textEditorModel, startLineNumber); - } - - const previewValue = this.stripIndentationFromPreviewRange(textEditorModel, startLineNumber, rangeToUse); - return previewValue; - } - - private stripIndentationFromPreviewRange(textEditorModel: ITextModel, startLineNumber: number, previewRange: IRange) { - const startIndent = textEditorModel.getLineFirstNonWhitespaceColumn(startLineNumber); - let minIndent = startIndent; - - for (let endLineNumber = startLineNumber + 1; endLineNumber < previewRange.endLineNumber; endLineNumber++) { - const endIndent = textEditorModel.getLineFirstNonWhitespaceColumn(endLineNumber); - minIndent = Math.min(minIndent, endIndent); - } - - const previewValue = textEditorModel.getValueInRange(previewRange).replace(new RegExp(`^\\s{${minIndent - 1}}`, 'gm'), '').trim(); - return previewValue; - } - - private getPreviewRangeBasedOnIndentation(textEditorModel: ITextModel, startLineNumber: number) { - const startIndent = textEditorModel.getLineFirstNonWhitespaceColumn(startLineNumber); - const maxLineNumber = Math.min(textEditorModel.getLineCount(), startLineNumber + GotoDefinitionAtPositionEditorContribution.MAX_SOURCE_PREVIEW_LINES); - let endLineNumber = startLineNumber + 1; - - for (; endLineNumber < maxLineNumber; endLineNumber++) { - const endIndent = textEditorModel.getLineFirstNonWhitespaceColumn(endLineNumber); - - if (startIndent === endIndent) { - break; - } - } - - return new Range(startLineNumber, 1, endLineNumber + 1, 1); - } - - private addDecoration(range: Range, hoverMessage: MarkdownString | undefined): void { - - const newDecorations: IModelDeltaDecoration = { - range: range, - options: { - description: 'goto-definition-link', - inlineClassName: 'goto-definition-link', - hoverMessage - } - }; - - this.linkDecorations.set([newDecorations]); - } - - private removeLinkDecorations(): void { - this.linkDecorations.clear(); - } - - private isEnabled(mouseEvent: ClickLinkMouseEvent, withKey?: ClickLinkKeyboardEvent): boolean { - return this.editor.hasModel() - && mouseEvent.isLeftClick - && mouseEvent.isNoneOrSingleMouseDown - && mouseEvent.target.type === MouseTargetType.CONTENT_TEXT - && !(mouseEvent.target.detail.injectedText?.options instanceof ModelDecorationInjectedTextOptions) - && (mouseEvent.hasTriggerModifier || (withKey ? withKey.keyCodeIsTriggerKey : false)) - && this.languageFeaturesService.definitionProvider.has(this.editor.getModel()); - } - - private findDefinition(position: Position, token: CancellationToken): Promise { - const model = this.editor.getModel(); - if (!model) { - return Promise.resolve(null); - } - - return getDefinitionsAtPosition(this.languageFeaturesService.definitionProvider, model, position, false, token); - } - - private gotoDefinition(position: Position, openToSide: boolean): Promise { - this.editor.setPosition(position); - return this.editor.invokeWithinContext((accessor) => { - const canPeek = !openToSide && this.editor.getOption(EditorOption.definitionLinkOpensInPeek) && !this.isInPeekEditor(accessor); - const action = new DefinitionAction({ openToSide, openInPeek: canPeek, muteMessage: true }, { title: { value: '', original: '' }, id: '', precondition: undefined }); - return action.run(accessor); - }); - } - - private isInPeekEditor(accessor: ServicesAccessor): boolean | undefined { - const contextKeyService = accessor.get(IContextKeyService); - return PeekContext.inPeekEditor.getValue(contextKeyService); - } - - public dispose(): void { - this.toUnhook.dispose(); - this.toUnhookForKeyboard.dispose(); - } -} - -registerEditorContribution(GotoDefinitionAtPositionEditorContribution.ID, GotoDefinitionAtPositionEditorContribution, EditorContributionInstantiation.BeforeFirstInteraction); diff --git a/src/vs/editor/contrib/hover/browser/contentHoverController.ts b/src/vs/editor/contrib/hover/browser/contentHoverController.ts deleted file mode 100644 index 9b8252eec14cd..0000000000000 --- a/src/vs/editor/contrib/hover/browser/contentHoverController.ts +++ /dev/null @@ -1,390 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { DECREASE_HOVER_VERBOSITY_ACTION_ID, INCREASE_HOVER_VERBOSITY_ACTION_ID, SHOW_OR_FOCUS_HOVER_ACTION_ID } from './hoverActionIds.js'; -import { IKeyboardEvent } from '../../../../base/browser/keyboardEvent.js'; -import { KeyCode } from '../../../../base/common/keyCodes.js'; -import { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js'; -import { ICodeEditor, IEditorMouseEvent, IPartialEditorMouseEvent } from '../../../browser/editorBrowser.js'; -import { ConfigurationChangedEvent, EditorOption } from '../../../common/config/editorOptions.js'; -import { Range } from '../../../common/core/range.js'; -import { IEditorContribution, IScrollEvent } from '../../../common/editorCommon.js'; -import { HoverStartMode, HoverStartSource } from './hoverOperation.js'; -import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js'; -import { InlineSuggestionHintsContentWidget } from '../../inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.js'; -import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js'; -import { ResultKind } from '../../../../platform/keybinding/common/keybindingResolver.js'; -import { HoverVerbosityAction } from '../../../common/languages.js'; -import { RunOnceScheduler } from '../../../../base/common/async.js'; -import { isMousePositionWithinElement } from './hoverUtils.js'; -import { ContentHoverWidgetWrapper } from './contentHoverWidgetWrapper.js'; -import './hover.css'; -import { Emitter } from '../../../../base/common/event.js'; -import { isOnColorDecorator } from '../../colorPicker/browser/hoverColorPicker/hoverColorPickerContribution.js'; - -// sticky hover widget which doesn't disappear on focus out and such -const _sticky = false - // || Boolean("true") // done "weirdly" so that a lint warning prevents you from pushing this - ; - -interface IHoverSettings { - readonly enabled: boolean; - readonly sticky: boolean; - readonly hidingDelay: number; -} - -export class ContentHoverController extends Disposable implements IEditorContribution { - - private readonly _onHoverContentsChanged = this._register(new Emitter()); - public readonly onHoverContentsChanged = this._onHoverContentsChanged.event; - - public static readonly ID = 'editor.contrib.contentHover'; - - public shouldKeepOpenOnEditorMouseMoveOrLeave: boolean = false; - - private readonly _listenersStore = new DisposableStore(); - - private _contentWidget: ContentHoverWidgetWrapper | undefined; - - private _mouseMoveEvent: IEditorMouseEvent | undefined; - private _reactToEditorMouseMoveRunner: RunOnceScheduler; - - private _hoverSettings!: IHoverSettings; - private _isMouseDown: boolean = false; - - constructor( - private readonly _editor: ICodeEditor, - @IInstantiationService private readonly _instantiationService: IInstantiationService, - @IKeybindingService private readonly _keybindingService: IKeybindingService - ) { - super(); - this._reactToEditorMouseMoveRunner = this._register(new RunOnceScheduler( - () => this._reactToEditorMouseMove(this._mouseMoveEvent), 0 - )); - this._hookListeners(); - this._register(this._editor.onDidChangeConfiguration((e: ConfigurationChangedEvent) => { - if (e.hasChanged(EditorOption.hover)) { - this._unhookListeners(); - this._hookListeners(); - } - })); - } - - static get(editor: ICodeEditor): ContentHoverController | null { - return editor.getContribution(ContentHoverController.ID); - } - - private _hookListeners(): void { - const hoverOpts = this._editor.getOption(EditorOption.hover); - this._hoverSettings = { - enabled: hoverOpts.enabled, - sticky: hoverOpts.sticky, - hidingDelay: hoverOpts.hidingDelay - }; - if (hoverOpts.enabled) { - this._listenersStore.add(this._editor.onMouseDown((e: IEditorMouseEvent) => this._onEditorMouseDown(e))); - this._listenersStore.add(this._editor.onMouseUp(() => this._onEditorMouseUp())); - this._listenersStore.add(this._editor.onMouseMove((e: IEditorMouseEvent) => this._onEditorMouseMove(e))); - this._listenersStore.add(this._editor.onKeyDown((e: IKeyboardEvent) => this._onKeyDown(e))); - this._listenersStore.add(this._editor.onMouseLeave((e) => this._onEditorMouseLeave(e))); - this._listenersStore.add(this._editor.onDidChangeModel(() => this._cancelSchedulerAndHide())); - this._listenersStore.add(this._editor.onDidChangeModelContent(() => this._cancelScheduler())); - this._listenersStore.add(this._editor.onDidScrollChange((e: IScrollEvent) => this._onEditorScrollChanged(e))); - } else { - this._cancelSchedulerAndHide(); - } - } - - private _unhookListeners(): void { - this._listenersStore.clear(); - } - - private _cancelSchedulerAndHide(): void { - this._cancelScheduler(); - this.hideContentHover(); - } - - private _cancelScheduler() { - this._mouseMoveEvent = undefined; - this._reactToEditorMouseMoveRunner.cancel(); - } - - private _onEditorScrollChanged(e: IScrollEvent): void { - if (e.scrollTopChanged || e.scrollLeftChanged) { - this.hideContentHover(); - } - } - - private _onEditorMouseDown(mouseEvent: IEditorMouseEvent): void { - this._isMouseDown = true; - const shouldKeepHoverWidgetVisible = this._shouldKeepHoverWidgetVisible(mouseEvent); - if (shouldKeepHoverWidgetVisible) { - return; - } - this.hideContentHover(); - } - - private _shouldKeepHoverWidgetVisible(mouseEvent: IPartialEditorMouseEvent): boolean { - return this._isMouseOnContentHoverWidget(mouseEvent) || this._isContentWidgetResizing() || isOnColorDecorator(mouseEvent); - } - - private _isMouseOnContentHoverWidget(mouseEvent: IPartialEditorMouseEvent): boolean { - if (!this._contentWidget) { - return false; - } - return isMousePositionWithinElement(this._contentWidget.getDomNode(), mouseEvent.event.posx, mouseEvent.event.posy); - } - - private _onEditorMouseUp(): void { - this._isMouseDown = false; - } - - private _onEditorMouseLeave(mouseEvent: IPartialEditorMouseEvent): void { - if (this.shouldKeepOpenOnEditorMouseMoveOrLeave) { - return; - } - this._cancelScheduler(); - const shouldKeepHoverWidgetVisible = this._shouldKeepHoverWidgetVisible(mouseEvent); - if (shouldKeepHoverWidgetVisible) { - return; - } - if (_sticky) { - return; - } - this.hideContentHover(); - } - - private _shouldNotRecomputeCurrentHoverWidget(mouseEvent: IEditorMouseEvent): boolean { - - const isHoverSticky = this._hoverSettings.sticky; - - const isMouseOnStickyContentHoverWidget = (mouseEvent: IEditorMouseEvent, isHoverSticky: boolean): boolean => { - const isMouseOnContentHoverWidget = this._isMouseOnContentHoverWidget(mouseEvent); - return isHoverSticky && isMouseOnContentHoverWidget; - }; - const isMouseOnColorPicker = (mouseEvent: IEditorMouseEvent): boolean => { - const isMouseOnContentHoverWidget = this._isMouseOnContentHoverWidget(mouseEvent); - const isColorPickerVisible = this._contentWidget?.isColorPickerVisible ?? false; - return isMouseOnContentHoverWidget && isColorPickerVisible; - }; - // TODO@aiday-mar verify if the following is necessary code - const isTextSelectedWithinContentHoverWidget = (mouseEvent: IEditorMouseEvent, sticky: boolean): boolean => { - return (sticky - && this._contentWidget?.containsNode(mouseEvent.event.browserEvent.view?.document.activeElement) - && !mouseEvent.event.browserEvent.view?.getSelection()?.isCollapsed) ?? false; - }; - return isMouseOnStickyContentHoverWidget(mouseEvent, isHoverSticky) - || isMouseOnColorPicker(mouseEvent) - || isTextSelectedWithinContentHoverWidget(mouseEvent, isHoverSticky); - } - - private _onEditorMouseMove(mouseEvent: IEditorMouseEvent): void { - const shouldReactToEditorMouseMove = this._shouldReactToEditorMouseMove(mouseEvent); - if (!shouldReactToEditorMouseMove) { - return; - } - const shouldRescheduleHoverComputation = this._shouldRescheduleHoverComputation(); - if (shouldRescheduleHoverComputation) { - if (!this._reactToEditorMouseMoveRunner.isScheduled()) { - this._reactToEditorMouseMoveRunner.schedule(this._hoverSettings.hidingDelay); - } - return; - } - this._reactToEditorMouseMove(mouseEvent); - } - - private _shouldReactToEditorMouseMove(mouseEvent: IEditorMouseEvent): boolean { - if (this.shouldKeepOpenOnEditorMouseMoveOrLeave) { - return false; - } - this._mouseMoveEvent = mouseEvent; - if (this._contentWidget && (this._contentWidget.isFocused || this._contentWidget.isResizing || this._isMouseDown && this._contentWidget.isColorPickerVisible)) { - return false; - } - const sticky = this._hoverSettings.sticky; - if (sticky && this._contentWidget?.isVisibleFromKeyboard) { - // Sticky mode is on and the hover has been shown via keyboard - // so moving the mouse has no effect - return false; - } - const shouldNotRecomputeCurrentHoverWidget = this._shouldNotRecomputeCurrentHoverWidget(mouseEvent); - if (shouldNotRecomputeCurrentHoverWidget) { - this._reactToEditorMouseMoveRunner.cancel(); - return false; - } - return true; - } - - private _shouldRescheduleHoverComputation(): boolean { - const hidingDelay = this._hoverSettings.hidingDelay; - const isContentHoverWidgetVisible = this._contentWidget?.isVisible ?? false; - // If the mouse is not over the widget, and if sticky is on, - // then give it a grace period before reacting to the mouse event - return isContentHoverWidgetVisible && this._hoverSettings.sticky && hidingDelay > 0; - } - - private _reactToEditorMouseMove(mouseEvent: IEditorMouseEvent | undefined): void { - if (!mouseEvent) { - return; - } - const contentWidget: ContentHoverWidgetWrapper = this._getOrCreateContentWidget(); - if (contentWidget.showsOrWillShow(mouseEvent)) { - return; - } - if (_sticky) { - return; - } - this.hideContentHover(); - } - - private _onKeyDown(e: IKeyboardEvent): void { - if (!this._editor.hasModel()) { - return; - } - const isPotentialKeyboardShortcut = this._isPotentialKeyboardShortcut(e); - if (isPotentialKeyboardShortcut) { - return; - } - const isModifierKeyPressed = this._isModifierKeyPressed(e); - if (isModifierKeyPressed && this._mouseMoveEvent) { - const contentWidget: ContentHoverWidgetWrapper = this._getOrCreateContentWidget(); - if (contentWidget.showsOrWillShow(this._mouseMoveEvent)) { - return; - } - } - this.hideContentHover(); - } - - private _isPotentialKeyboardShortcut(e: IKeyboardEvent): boolean { - if (!this._editor.hasModel() || !this._contentWidget) { - return false; - } - const resolvedKeyboardEvent = this._keybindingService.softDispatch(e, this._editor.getDomNode()); - const moreChordsAreNeeded = resolvedKeyboardEvent.kind === ResultKind.MoreChordsNeeded; - const isHoverAction = resolvedKeyboardEvent.kind === ResultKind.KbFound - && (resolvedKeyboardEvent.commandId === SHOW_OR_FOCUS_HOVER_ACTION_ID - || resolvedKeyboardEvent.commandId === INCREASE_HOVER_VERBOSITY_ACTION_ID - || resolvedKeyboardEvent.commandId === DECREASE_HOVER_VERBOSITY_ACTION_ID) - && this._contentWidget.isVisible; - return moreChordsAreNeeded || isHoverAction; - } - - private _isModifierKeyPressed(e: IKeyboardEvent): boolean { - return e.keyCode === KeyCode.Ctrl - || e.keyCode === KeyCode.Alt - || e.keyCode === KeyCode.Meta - || e.keyCode === KeyCode.Shift; - } - - public hideContentHover(): void { - if (_sticky) { - return; - } - if (InlineSuggestionHintsContentWidget.dropDownVisible) { - return; - } - this._contentWidget?.hide(); - } - - private _getOrCreateContentWidget(): ContentHoverWidgetWrapper { - if (!this._contentWidget) { - this._contentWidget = this._instantiationService.createInstance(ContentHoverWidgetWrapper, this._editor); - this._listenersStore.add(this._contentWidget.onContentsChanged(() => this._onHoverContentsChanged.fire())); - } - return this._contentWidget; - } - - public showContentHover( - range: Range, - mode: HoverStartMode, - source: HoverStartSource, - focus: boolean - ): void { - this._getOrCreateContentWidget().startShowingAtRange(range, mode, source, focus); - } - - private _isContentWidgetResizing(): boolean { - return this._contentWidget?.widget.isResizing || false; - } - - public focusedHoverPartIndex(): number { - return this._getOrCreateContentWidget().focusedHoverPartIndex(); - } - - public doesHoverAtIndexSupportVerbosityAction(index: number, action: HoverVerbosityAction): boolean { - return this._getOrCreateContentWidget().doesHoverAtIndexSupportVerbosityAction(index, action); - } - - public updateHoverVerbosityLevel(action: HoverVerbosityAction, index: number, focus?: boolean): void { - this._getOrCreateContentWidget().updateHoverVerbosityLevel(action, index, focus); - } - - public focus(): void { - this._contentWidget?.focus(); - } - - public focusHoverPartWithIndex(index: number): void { - this._contentWidget?.focusHoverPartWithIndex(index); - } - - public scrollUp(): void { - this._contentWidget?.scrollUp(); - } - - public scrollDown(): void { - this._contentWidget?.scrollDown(); - } - - public scrollLeft(): void { - this._contentWidget?.scrollLeft(); - } - - public scrollRight(): void { - this._contentWidget?.scrollRight(); - } - - public pageUp(): void { - this._contentWidget?.pageUp(); - } - - public pageDown(): void { - this._contentWidget?.pageDown(); - } - - public goToTop(): void { - this._contentWidget?.goToTop(); - } - - public goToBottom(): void { - this._contentWidget?.goToBottom(); - } - - public getWidgetContent(): string | undefined { - return this._contentWidget?.getWidgetContent(); - } - - public getAccessibleWidgetContent(): string | undefined { - return this._contentWidget?.getAccessibleWidgetContent(); - } - - public getAccessibleWidgetContentAtIndex(index: number): string | undefined { - return this._contentWidget?.getAccessibleWidgetContentAtIndex(index); - } - - public get isColorPickerVisible(): boolean | undefined { - return this._contentWidget?.isColorPickerVisible; - } - - public get isHoverVisible(): boolean | undefined { - return this._contentWidget?.isVisible; - } - - public override dispose(): void { - super.dispose(); - this._unhookListeners(); - this._listenersStore.dispose(); - this._contentWidget?.dispose(); - } -} diff --git a/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.ts b/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.ts deleted file mode 100644 index 41499ed6f9f90..0000000000000 --- a/src/vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.ts +++ /dev/null @@ -1,297 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { alert } from '../../../../../base/browser/ui/aria/aria.js'; -import { timeout } from '../../../../../base/common/async.js'; -import { cancelOnDispose } from '../../../../../base/common/cancellation.js'; -import { createHotClass } from '../../../../../base/common/hotReloadHelpers.js'; -import { Disposable, toDisposable } from '../../../../../base/common/lifecycle.js'; -import { ITransaction, autorun, derived, derivedDisposable, derivedObservableWithCache, observableFromEvent, observableSignal, runOnChange, runOnChangeWithStore, transaction, waitForState } from '../../../../../base/common/observable.js'; -import { isUndefined } from '../../../../../base/common/types.js'; -import { localize } from '../../../../../nls.js'; -import { IAccessibilityService } from '../../../../../platform/accessibility/common/accessibility.js'; -import { AccessibilitySignal, IAccessibilitySignalService } from '../../../../../platform/accessibilitySignal/browser/accessibilitySignalService.js'; -import { ICommandService } from '../../../../../platform/commands/common/commands.js'; -import { IConfigurationService } from '../../../../../platform/configuration/common/configuration.js'; -import { IContextKeyService } from '../../../../../platform/contextkey/common/contextkey.js'; -import { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js'; -import { IKeybindingService } from '../../../../../platform/keybinding/common/keybinding.js'; -import { hotClassGetOriginalInstance } from '../../../../../platform/observable/common/wrapInHotClass.js'; -import { CoreEditingCommands } from '../../../../browser/coreCommands.js'; -import { ICodeEditor } from '../../../../browser/editorBrowser.js'; -import { observableCodeEditor } from '../../../../browser/observableCodeEditor.js'; -import { EditorOption } from '../../../../common/config/editorOptions.js'; -import { Position } from '../../../../common/core/position.js'; -import { Range } from '../../../../common/core/range.js'; -import { CursorChangeReason } from '../../../../common/cursorEvents.js'; -import { ILanguageFeatureDebounceService } from '../../../../common/services/languageFeatureDebounce.js'; -import { ILanguageFeaturesService } from '../../../../common/services/languageFeatures.js'; -import { InlineSuggestionHintsContentWidget } from '../hintsWidget/inlineCompletionsHintsWidget.js'; -import { TextModelChangeRecorder } from '../model/changeRecorder.js'; -import { InlineCompletionsModel } from '../model/inlineCompletionsModel.js'; -import { ObservableSuggestWidgetAdapter } from '../model/suggestWidgetAdapter.js'; -import { ObservableContextKeyService } from '../utils.js'; -import { inlineSuggestCommitId } from './commandIds.js'; -import { InlineCompletionContextKeys } from './inlineCompletionContextKeys.js'; -import { InlineCompletionsView } from '../view/inlineCompletionsView.js'; - -export class InlineCompletionsController extends Disposable { - public static hot = createHotClass(InlineCompletionsController); - public static ID = 'editor.contrib.inlineCompletionsController'; - - public static get(editor: ICodeEditor): InlineCompletionsController | null { - return hotClassGetOriginalInstance(editor.getContribution(InlineCompletionsController.ID)); - } - - private readonly _editorObs = observableCodeEditor(this.editor); - private readonly _positions = derived(this, reader => this._editorObs.selections.read(reader)?.map(s => s.getEndPosition()) ?? [new Position(1, 1)]); - - private readonly _suggestWidgetAdapter = this._register(new ObservableSuggestWidgetAdapter( - this._editorObs, - item => this.model.get()?.handleSuggestAccepted(item), - () => this.model.get()?.selectedInlineCompletion.get()?.toSingleTextEdit(undefined), - )); - - private readonly _enabledInConfig = observableFromEvent(this, this.editor.onDidChangeConfiguration, () => this.editor.getOption(EditorOption.inlineSuggest).enabled); - private readonly _isScreenReaderEnabled = observableFromEvent(this, this._accessibilityService.onDidChangeScreenReaderOptimized, () => this._accessibilityService.isScreenReaderOptimized()); - private readonly _editorDictationInProgress = observableFromEvent(this, - this._contextKeyService.onDidChangeContext, - () => this._contextKeyService.getContext(this.editor.getDomNode()).getValue('editorDictation.inProgress') === true - ); - private readonly _enabled = derived(this, reader => this._enabledInConfig.read(reader) && (!this._isScreenReaderEnabled.read(reader) || !this._editorDictationInProgress.read(reader))); - - private readonly _debounceValue = this._debounceService.for( - this._languageFeaturesService.inlineCompletionsProvider, - 'InlineCompletionsDebounce', - { min: 50, max: 50 } - ); - - private readonly _cursorIsInIndentation = derived(this, reader => { - const cursorPos = this._editorObs.cursorPosition.read(reader); - if (cursorPos === null) { return false; } - const model = this._editorObs.model.read(reader); - if (!model) { return false; } - this._editorObs.versionId.read(reader); - const indentMaxColumn = model.getLineIndentColumn(cursorPos.lineNumber); - return cursorPos.column <= indentMaxColumn; - }); - - public readonly model = derivedDisposable(this, reader => { - if (this._editorObs.isReadonly.read(reader)) { return undefined; } - const textModel = this._editorObs.model.read(reader); - if (!textModel) { return undefined; } - - const model: InlineCompletionsModel = this._instantiationService.createInstance( - InlineCompletionsModel, - textModel, - this._suggestWidgetAdapter.selectedItem, - this._editorObs.versionId, - this._positions, - this._debounceValue, - this._enabled, - this.editor, - ); - return model; - }).recomputeInitiallyAndOnChange(this._store); - - private readonly _playAccessibilitySignal = observableSignal(this); - - private readonly _hideInlineEditOnSelectionChange = this._editorObs.getOption(EditorOption.inlineSuggest).map(val => true); - - protected readonly _view = this._register(new InlineCompletionsView(this.editor, this.model, this._instantiationService)); - - constructor( - public readonly editor: ICodeEditor, - @IInstantiationService private readonly _instantiationService: IInstantiationService, - @IContextKeyService private readonly _contextKeyService: IContextKeyService, - @IConfigurationService private readonly _configurationService: IConfigurationService, - @ICommandService private readonly _commandService: ICommandService, - @ILanguageFeatureDebounceService private readonly _debounceService: ILanguageFeatureDebounceService, - @ILanguageFeaturesService private readonly _languageFeaturesService: ILanguageFeaturesService, - @IAccessibilitySignalService private readonly _accessibilitySignalService: IAccessibilitySignalService, - @IKeybindingService private readonly _keybindingService: IKeybindingService, - @IAccessibilityService private readonly _accessibilityService: IAccessibilityService, - ) { - super(); - - this._register(runOnChange(this._editorObs.onDidType, (_value, _changes) => { - if (this._enabled.get()) { - this.model.get()?.trigger(); - } - })); - - this._register(this._commandService.onDidExecuteCommand((e) => { - // These commands don't trigger onDidType. - const commands = new Set([ - CoreEditingCommands.Tab.id, - CoreEditingCommands.DeleteLeft.id, - CoreEditingCommands.DeleteRight.id, - inlineSuggestCommitId, - 'acceptSelectedSuggestion', - ]); - if (commands.has(e.commandId) && editor.hasTextFocus() && this._enabled.get()) { - this._editorObs.forceUpdate(tx => { - /** @description onDidExecuteCommand */ - this.model.get()?.trigger(tx); - }); - } - })); - - this._register(runOnChange(this._editorObs.selections, (_value, _, changes) => { - if (changes.some(e => e.reason === CursorChangeReason.Explicit || e.source === 'api')) { - if (!this._hideInlineEditOnSelectionChange.get() && this.model.get()?.state.get()?.kind === 'inlineEdit') { - return; - } - const m = this.model.get(); - if (!m) { return; } - if (m.inlineCompletionState.get()?.primaryGhostText) { - this.model.get()?.stop(); - } else if (m.state.get()?.inlineCompletion) { - this.model.get()?.collapseInlineEdit(); - } - } - })); - - this._register(this.editor.onDidBlurEditorWidget(() => { - // This is a hidden setting very useful for debugging - if (this._contextKeyService.getContextKeyValue('accessibleViewIsShown') - || this._configurationService.getValue('editor.inlineSuggest.keepOnBlur') - || editor.getOption(EditorOption.inlineSuggest).keepOnBlur - || InlineSuggestionHintsContentWidget.dropDownVisible) { - return; - } - - if (this.model.get()?.inlineEditAvailable.get()) { - // dont hide inline edits on blur - return; - } - - transaction(tx => { - /** @description InlineCompletionsController.onDidBlurEditorWidget */ - this.model.get()?.stop('automatic', tx); - }); - })); - - this._register(autorun(reader => { - /** @description InlineCompletionsController.forceRenderingAbove */ - const state = this.model.read(reader)?.inlineCompletionState.read(reader); - if (state?.suggestItem) { - if (state.primaryGhostText.lineCount >= 2) { - this._suggestWidgetAdapter.forceRenderingAbove(); - } - } else { - this._suggestWidgetAdapter.stopForceRenderingAbove(); - } - })); - this._register(toDisposable(() => { - this._suggestWidgetAdapter.stopForceRenderingAbove(); - })); - - const currentInlineCompletionBySemanticId = derivedObservableWithCache(this, (reader, last) => { - const model = this.model.read(reader); - const state = model?.inlineCompletionState.read(reader); - if (this._suggestWidgetAdapter.selectedItem.get()) { - return last; - } - return state?.inlineCompletion?.semanticId; - }); - this._register(runOnChangeWithStore(derived(reader => { - this._playAccessibilitySignal.read(reader); - currentInlineCompletionBySemanticId.read(reader); - return {}; - }), async (_value, _, _deltas, store) => { - /** @description InlineCompletionsController.playAccessibilitySignalAndReadSuggestion */ - const model = this.model.get(); - const state = model?.inlineCompletionState.get(); - if (!state || !model) { return; } - const lineText = model.textModel.getLineContent(state.primaryGhostText.lineNumber); - - await timeout(50, cancelOnDispose(store)); - await waitForState(this._suggestWidgetAdapter.selectedItem, isUndefined, () => false, cancelOnDispose(store)); - - await this._accessibilitySignalService.playSignal(AccessibilitySignal.inlineSuggestion); - if (this.editor.getOption(EditorOption.screenReaderAnnounceInlineSuggestion)) { - this._provideScreenReaderUpdate(state.primaryGhostText.renderForScreenReader(lineText)); - } - })); - - // TODO@hediet - this._register(this._configurationService.onDidChangeConfiguration(e => { - if (e.affectsConfiguration('accessibility.verbosity.inlineCompletions')) { - this.editor.updateOptions({ inlineCompletionsAccessibilityVerbose: this._configurationService.getValue('accessibility.verbosity.inlineCompletions') }); - } - })); - this.editor.updateOptions({ inlineCompletionsAccessibilityVerbose: this._configurationService.getValue('accessibility.verbosity.inlineCompletions') }); - - const contextKeySvcObs = new ObservableContextKeyService(this._contextKeyService); - - this._register(contextKeySvcObs.bind(InlineCompletionContextKeys.cursorInIndentation, this._cursorIsInIndentation)); - this._register(contextKeySvcObs.bind(InlineCompletionContextKeys.hasSelection, reader => !this._editorObs.cursorSelection.read(reader)?.isEmpty())); - this._register(contextKeySvcObs.bind(InlineCompletionContextKeys.cursorAtInlineEdit, this.model.map((m, reader) => m?.inlineEditState?.read(reader)?.cursorAtInlineEdit))); - this._register(contextKeySvcObs.bind(InlineCompletionContextKeys.tabShouldAcceptInlineEdit, this.model.map((m, r) => !!m?.tabShouldAcceptInlineEdit.read(r)))); - this._register(contextKeySvcObs.bind(InlineCompletionContextKeys.tabShouldJumpToInlineEdit, this.model.map((m, r) => !!m?.tabShouldJumpToInlineEdit.read(r)))); - this._register(contextKeySvcObs.bind(InlineCompletionContextKeys.inlineEditVisible, reader => this.model.read(reader)?.inlineEditState.read(reader) !== undefined)); - this._register(contextKeySvcObs.bind(InlineCompletionContextKeys.inlineSuggestionHasIndentation, - reader => this.model.read(reader)?.getIndentationInfo(reader)?.startsWithIndentation - )); - this._register(contextKeySvcObs.bind(InlineCompletionContextKeys.inlineSuggestionHasIndentationLessThanTabSize, - reader => this.model.read(reader)?.getIndentationInfo(reader)?.startsWithIndentationLessThanTabSize - )); - this._register(contextKeySvcObs.bind(InlineCompletionContextKeys.suppressSuggestions, reader => { - const model = this.model.read(reader); - const state = model?.inlineCompletionState.read(reader); - return state?.primaryGhostText && state?.inlineCompletion ? state.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions : undefined; - })); - this._register(contextKeySvcObs.bind(InlineCompletionContextKeys.inlineSuggestionVisible, reader => { - const model = this.model.read(reader); - const state = model?.inlineCompletionState.read(reader); - return !!state?.inlineCompletion && state?.primaryGhostText !== undefined && !state?.primaryGhostText.isEmpty(); - })); - - this._register(this._instantiationService.createInstance(TextModelChangeRecorder, this.editor)); - } - - public playAccessibilitySignal(tx: ITransaction) { - this._playAccessibilitySignal.trigger(tx); - } - - private _provideScreenReaderUpdate(content: string): void { - const accessibleViewShowing = this._contextKeyService.getContextKeyValue('accessibleViewIsShown'); - const accessibleViewKeybinding = this._keybindingService.lookupKeybinding('editor.action.accessibleView'); - let hint: string | undefined; - if (!accessibleViewShowing && accessibleViewKeybinding && this.editor.getOption(EditorOption.inlineCompletionsAccessibilityVerbose)) { - hint = localize('showAccessibleViewHint', "Inspect this in the accessible view ({0})", accessibleViewKeybinding.getAriaLabel()); - } - alert(hint ? content + ', ' + hint : content); - } - - public shouldShowHoverAt(range: Range) { - const ghostText = this.model.get()?.primaryGhostText.get(); - if (!ghostText) { - return false; - } - return ghostText.parts.some(p => range.containsPosition(new Position(ghostText.lineNumber, p.column))); - } - - public shouldShowHoverAtViewZone(viewZoneId: string): boolean { - return this._view.shouldShowHoverAtViewZone(viewZoneId); - } - - public reject(): void { - transaction(tx => { - const m = this.model.get(); - if (m) { - m.stop('explicitCancel', tx); - } - }); - } - - public jump(): void { - const m = this.model.get(); - if (m) { - m.jump(); - } - } -} diff --git a/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.ts b/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.ts deleted file mode 100644 index beff7f1b33261..0000000000000 --- a/src/vs/editor/contrib/inlineCompletions/browser/hintsWidget/inlineCompletionsHintsWidget.ts +++ /dev/null @@ -1,380 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { h } from '../../../../../base/browser/dom.js'; -import { ActionViewItem } from '../../../../../base/browser/ui/actionbar/actionViewItems.js'; -import { KeybindingLabel, unthemedKeybindingLabelOptions } from '../../../../../base/browser/ui/keybindingLabel/keybindingLabel.js'; -import { Action, IAction, Separator } from '../../../../../base/common/actions.js'; -import { equals } from '../../../../../base/common/arrays.js'; -import { RunOnceScheduler } from '../../../../../base/common/async.js'; -import { Codicon } from '../../../../../base/common/codicons.js'; -import { Disposable, toDisposable } from '../../../../../base/common/lifecycle.js'; -import { IObservable, autorun, autorunWithStore, derived, derivedObservableWithCache, derivedWithStore, observableFromEvent } from '../../../../../base/common/observable.js'; -import { OS } from '../../../../../base/common/platform.js'; -import { ThemeIcon } from '../../../../../base/common/themables.js'; -import { localize } from '../../../../../nls.js'; -import { MenuEntryActionViewItem, getActionBarActions } from '../../../../../platform/actions/browser/menuEntryActionViewItem.js'; -import { IMenuWorkbenchToolBarOptions, WorkbenchToolBar } from '../../../../../platform/actions/browser/toolbar.js'; -import { IMenuService, MenuId, MenuItemAction } from '../../../../../platform/actions/common/actions.js'; -import { ICommandService } from '../../../../../platform/commands/common/commands.js'; -import { IContextKeyService } from '../../../../../platform/contextkey/common/contextkey.js'; -import { IContextMenuService } from '../../../../../platform/contextview/browser/contextView.js'; -import { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js'; -import { IKeybindingService } from '../../../../../platform/keybinding/common/keybinding.js'; -import { ITelemetryService } from '../../../../../platform/telemetry/common/telemetry.js'; -import { registerIcon } from '../../../../../platform/theme/common/iconRegistry.js'; -import { ContentWidgetPositionPreference, ICodeEditor, IContentWidget, IContentWidgetPosition } from '../../../../browser/editorBrowser.js'; -import { EditorOption } from '../../../../common/config/editorOptions.js'; -import { Position } from '../../../../common/core/position.js'; -import { Command, InlineCompletionTriggerKind } from '../../../../common/languages.js'; -import { PositionAffinity } from '../../../../common/model.js'; -import { showNextInlineSuggestionActionId, showPreviousInlineSuggestionActionId } from '../controller/commandIds.js'; -import { InlineCompletionsModel } from '../model/inlineCompletionsModel.js'; -import './inlineCompletionsHintsWidget.css'; - -export class InlineCompletionsHintsWidget extends Disposable { - private readonly alwaysShowToolbar = observableFromEvent(this, this.editor.onDidChangeConfiguration, () => this.editor.getOption(EditorOption.inlineSuggest).showToolbar === 'always'); - - private sessionPosition: Position | undefined = undefined; - - private readonly position = derived(this, reader => { - const ghostText = this.model.read(reader)?.primaryGhostText.read(reader); - - if (!this.alwaysShowToolbar.read(reader) || !ghostText || ghostText.parts.length === 0) { - this.sessionPosition = undefined; - return null; - } - - const firstColumn = ghostText.parts[0].column; - if (this.sessionPosition && this.sessionPosition.lineNumber !== ghostText.lineNumber) { - this.sessionPosition = undefined; - } - - const position = new Position(ghostText.lineNumber, Math.min(firstColumn, this.sessionPosition?.column ?? Number.MAX_SAFE_INTEGER)); - this.sessionPosition = position; - return position; - }); - - constructor( - private readonly editor: ICodeEditor, - private readonly model: IObservable, - @IInstantiationService private readonly instantiationService: IInstantiationService, - ) { - super(); - - this._register(autorunWithStore((reader, store) => { - /** @description setup content widget */ - const model = this.model.read(reader); - if (!model || !this.alwaysShowToolbar.read(reader)) { - return; - } - - const contentWidgetValue = derivedWithStore((reader, store) => { - const contentWidget = store.add(this.instantiationService.createInstance( - InlineSuggestionHintsContentWidget, - this.editor, - true, - this.position, - model.selectedInlineCompletionIndex, - model.inlineCompletionsCount, - model.activeCommands, - )); - editor.addContentWidget(contentWidget); - store.add(toDisposable(() => editor.removeContentWidget(contentWidget))); - - store.add(autorun(reader => { - /** @description request explicit */ - const position = this.position.read(reader); - if (!position) { - return; - } - if (model.lastTriggerKind.read(reader) !== InlineCompletionTriggerKind.Explicit) { - model.triggerExplicitly(); - } - })); - return contentWidget; - }); - - const hadPosition = derivedObservableWithCache(this, (reader, lastValue) => !!this.position.read(reader) || !!lastValue); - store.add(autorun(reader => { - if (hadPosition.read(reader)) { - contentWidgetValue.read(reader); - } - })); - })); - } -} - -const inlineSuggestionHintsNextIcon = registerIcon('inline-suggestion-hints-next', Codicon.chevronRight, localize('parameterHintsNextIcon', 'Icon for show next parameter hint.')); -const inlineSuggestionHintsPreviousIcon = registerIcon('inline-suggestion-hints-previous', Codicon.chevronLeft, localize('parameterHintsPreviousIcon', 'Icon for show previous parameter hint.')); - -export class InlineSuggestionHintsContentWidget extends Disposable implements IContentWidget { - private static _dropDownVisible = false; - public static get dropDownVisible() { return this._dropDownVisible; } - - private static id = 0; - - private readonly id = `InlineSuggestionHintsContentWidget${InlineSuggestionHintsContentWidget.id++}`; - public readonly allowEditorOverflow = true; - public readonly suppressMouseDown = false; - - private readonly nodes = h('div.inlineSuggestionsHints', { className: this.withBorder ? '.withBorder' : '' }, [ - h('div@toolBar'), - ]); - - private createCommandAction(commandId: string, label: string, iconClassName: string): Action { - const action = new Action( - commandId, - label, - iconClassName, - true, - () => this._commandService.executeCommand(commandId), - ); - const kb = this.keybindingService.lookupKeybinding(commandId, this._contextKeyService); - let tooltip = label; - if (kb) { - tooltip = localize({ key: 'content', comment: ['A label', 'A keybinding'] }, '{0} ({1})', label, kb.getLabel()); - } - action.tooltip = tooltip; - return action; - } - - private readonly previousAction = this.createCommandAction(showPreviousInlineSuggestionActionId, localize('previous', 'Previous'), ThemeIcon.asClassName(inlineSuggestionHintsPreviousIcon)); - private readonly availableSuggestionCountAction = new Action('inlineSuggestionHints.availableSuggestionCount', '', undefined, false); - private readonly nextAction = this.createCommandAction(showNextInlineSuggestionActionId, localize('next', 'Next'), ThemeIcon.asClassName(inlineSuggestionHintsNextIcon)); - - private readonly toolBar: CustomizedMenuWorkbenchToolBar; - - // TODO@hediet: deprecate MenuId.InlineCompletionsActions - private readonly inlineCompletionsActionsMenus = this._register(this._menuService.createMenu( - MenuId.InlineCompletionsActions, - this._contextKeyService - )); - - private readonly clearAvailableSuggestionCountLabelDebounced = this._register(new RunOnceScheduler(() => { - this.availableSuggestionCountAction.label = ''; - }, 100)); - - private readonly disableButtonsDebounced = this._register(new RunOnceScheduler(() => { - this.previousAction.enabled = this.nextAction.enabled = false; - }, 100)); - - constructor( - private readonly editor: ICodeEditor, - private readonly withBorder: boolean, - private readonly _position: IObservable, - private readonly _currentSuggestionIdx: IObservable, - private readonly _suggestionCount: IObservable, - private readonly _extraCommands: IObservable, - - @ICommandService private readonly _commandService: ICommandService, - @IInstantiationService instantiationService: IInstantiationService, - @IKeybindingService private readonly keybindingService: IKeybindingService, - @IContextKeyService private readonly _contextKeyService: IContextKeyService, - @IMenuService private readonly _menuService: IMenuService, - ) { - super(); - - this.toolBar = this._register(instantiationService.createInstance(CustomizedMenuWorkbenchToolBar, this.nodes.toolBar, MenuId.InlineSuggestionToolbar, { - menuOptions: { renderShortTitle: true }, - toolbarOptions: { primaryGroup: g => g.startsWith('primary') }, - actionViewItemProvider: (action, options) => { - if (action instanceof MenuItemAction) { - return instantiationService.createInstance(StatusBarViewItem, action, undefined); - } - if (action === this.availableSuggestionCountAction) { - const a = new ActionViewItemWithClassName(undefined, action, { label: true, icon: false }); - a.setClass('availableSuggestionCount'); - return a; - } - return undefined; - }, - telemetrySource: 'InlineSuggestionToolbar', - })); - - this.toolBar.setPrependedPrimaryActions([ - this.previousAction, - this.availableSuggestionCountAction, - this.nextAction, - ]); - - this._register(this.toolBar.onDidChangeDropdownVisibility(e => { - InlineSuggestionHintsContentWidget._dropDownVisible = e; - })); - - this._register(autorun(reader => { - /** @description update position */ - this._position.read(reader); - this.editor.layoutContentWidget(this); - })); - - this._register(autorun(reader => { - /** @description counts */ - const suggestionCount = this._suggestionCount.read(reader); - const currentSuggestionIdx = this._currentSuggestionIdx.read(reader); - - if (suggestionCount !== undefined) { - this.clearAvailableSuggestionCountLabelDebounced.cancel(); - this.availableSuggestionCountAction.label = `${currentSuggestionIdx + 1}/${suggestionCount}`; - } else { - this.clearAvailableSuggestionCountLabelDebounced.schedule(); - } - - if (suggestionCount !== undefined && suggestionCount > 1) { - this.disableButtonsDebounced.cancel(); - this.previousAction.enabled = this.nextAction.enabled = true; - } else { - this.disableButtonsDebounced.schedule(); - } - })); - - this._register(autorun(reader => { - /** @description extra commands */ - const extraCommands = this._extraCommands.read(reader); - const extraActions = extraCommands.map(c => ({ - class: undefined, - id: c.id, - enabled: true, - tooltip: c.tooltip || '', - label: c.title, - run: (event) => { - return this._commandService.executeCommand(c.id); - }, - })); - - for (const [_, group] of this.inlineCompletionsActionsMenus.getActions()) { - for (const action of group) { - if (action instanceof MenuItemAction) { - extraActions.push(action); - } - } - } - - if (extraActions.length > 0) { - extraActions.unshift(new Separator()); - } - - this.toolBar.setAdditionalSecondaryActions(extraActions); - })); - } - - getId(): string { return this.id; } - - getDomNode(): HTMLElement { - return this.nodes.root; - } - - getPosition(): IContentWidgetPosition | null { - return { - position: this._position.get(), - preference: [ContentWidgetPositionPreference.ABOVE, ContentWidgetPositionPreference.BELOW], - positionAffinity: PositionAffinity.LeftOfInjectedText, - }; - } -} - -class ActionViewItemWithClassName extends ActionViewItem { - private _className: string | undefined = undefined; - - setClass(className: string | undefined): void { - this._className = className; - } - - override render(container: HTMLElement): void { - super.render(container); - if (this._className) { - container.classList.add(this._className); - } - } - - protected override updateTooltip(): void { - // NOOP, disable tooltip - } -} - -class StatusBarViewItem extends MenuEntryActionViewItem { - protected override updateLabel() { - const kb = this._keybindingService.lookupKeybinding(this._action.id, this._contextKeyService, true); - if (!kb) { - return super.updateLabel(); - } - if (this.label) { - const div = h('div.keybinding').root; - - const k = this._register(new KeybindingLabel(div, OS, { disableTitle: true, ...unthemedKeybindingLabelOptions })); - k.set(kb); - this.label.textContent = this._action.label; - this.label.appendChild(div); - this.label.classList.add('inlineSuggestionStatusBarItemLabel'); - } - } - - protected override updateTooltip(): void { - // NOOP, disable tooltip - } -} - -export class CustomizedMenuWorkbenchToolBar extends WorkbenchToolBar { - private readonly menu = this._store.add(this.menuService.createMenu(this.menuId, this.contextKeyService, { emitEventsForSubmenuChanges: true })); - private additionalActions: IAction[] = []; - private prependedPrimaryActions: IAction[] = []; - private additionalPrimaryActions: IAction[] = []; - - constructor( - container: HTMLElement, - private readonly menuId: MenuId, - private readonly options2: IMenuWorkbenchToolBarOptions | undefined, - @IMenuService private readonly menuService: IMenuService, - @IContextKeyService private readonly contextKeyService: IContextKeyService, - @IContextMenuService contextMenuService: IContextMenuService, - @IKeybindingService keybindingService: IKeybindingService, - @ICommandService commandService: ICommandService, - @ITelemetryService telemetryService: ITelemetryService, - ) { - super(container, { resetMenu: menuId, ...options2 }, menuService, contextKeyService, contextMenuService, keybindingService, commandService, telemetryService); - - this._store.add(this.menu.onDidChange(() => this.updateToolbar())); - this.updateToolbar(); - } - - private updateToolbar(): void { - const { primary, secondary } = getActionBarActions( - this.menu.getActions(this.options2?.menuOptions), - this.options2?.toolbarOptions?.primaryGroup, this.options2?.toolbarOptions?.shouldInlineSubmenu, this.options2?.toolbarOptions?.useSeparatorsInPrimaryActions - ); - - secondary.push(...this.additionalActions); - primary.unshift(...this.prependedPrimaryActions); - primary.push(...this.additionalPrimaryActions); - this.setActions(primary, secondary); - } - - setPrependedPrimaryActions(actions: IAction[]): void { - if (equals(this.prependedPrimaryActions, actions, (a, b) => a === b)) { - return; - } - - this.prependedPrimaryActions = actions; - this.updateToolbar(); - } - - setAdditionalPrimaryActions(actions: IAction[]): void { - if (equals(this.additionalPrimaryActions, actions, (a, b) => a === b)) { - return; - } - - this.additionalPrimaryActions = actions; - this.updateToolbar(); - } - - setAdditionalSecondaryActions(actions: IAction[]): void { - if (equals(this.additionalActions, actions, (a, b) => a === b)) { - return; - } - - this.additionalActions = actions; - this.updateToolbar(); - } -} diff --git a/src/vs/editor/contrib/inlineCompletions/browser/model/suggestWidgetAdapter.ts b/src/vs/editor/contrib/inlineCompletions/browser/model/suggestWidgetAdapter.ts deleted file mode 100644 index 88df0a98a528e..0000000000000 --- a/src/vs/editor/contrib/inlineCompletions/browser/model/suggestWidgetAdapter.ts +++ /dev/null @@ -1,275 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { compareBy, numberComparator } from '../../../../../base/common/arrays.js'; -import { findFirstMax } from '../../../../../base/common/arraysFind.js'; -import { Emitter, Event } from '../../../../../base/common/event.js'; -import { Disposable } from '../../../../../base/common/lifecycle.js'; -import { ICodeEditor } from '../../../../browser/editorBrowser.js'; -import { Position } from '../../../../common/core/position.js'; -import { Range } from '../../../../common/core/range.js'; -import { SingleTextEdit } from '../../../../common/core/textEdit.js'; -import { CompletionItemInsertTextRule, CompletionItemKind, SelectedSuggestionInfo } from '../../../../common/languages.js'; -import { ITextModel } from '../../../../common/model.js'; -import { singleTextEditAugments, singleTextRemoveCommonPrefix } from './singleTextEditHelpers.js'; -import { SnippetParser } from '../../../snippet/browser/snippetParser.js'; -import { SnippetSession } from '../../../snippet/browser/snippetSession.js'; -import { CompletionItem } from '../../../suggest/browser/suggest.js'; -import { SuggestController } from '../../../suggest/browser/suggestController.js'; -import { ObservableCodeEditor } from '../../../../browser/observableCodeEditor.js'; -import { observableFromEvent } from '../../../../../base/common/observable.js'; - -export class SuggestWidgetAdaptor extends Disposable { - private isSuggestWidgetVisible: boolean = false; - private isShiftKeyPressed = false; - private _isActive = false; - private _currentSuggestItemInfo: SuggestItemInfo | undefined = undefined; - public get selectedItem(): SuggestItemInfo | undefined { - return this._currentSuggestItemInfo; - } - private _onDidSelectedItemChange = this._register(new Emitter()); - public readonly onDidSelectedItemChange: Event = this._onDidSelectedItemChange.event; - - constructor( - private readonly editor: ICodeEditor, - private readonly suggestControllerPreselector: () => SingleTextEdit | undefined, - private readonly onWillAccept: (item: SuggestItemInfo) => void, - ) { - super(); - - // See the command acceptAlternativeSelectedSuggestion that is bound to shift+tab - this._register(editor.onKeyDown(e => { - if (e.shiftKey && !this.isShiftKeyPressed) { - this.isShiftKeyPressed = true; - this.update(this._isActive); - } - })); - this._register(editor.onKeyUp(e => { - if (e.shiftKey && this.isShiftKeyPressed) { - this.isShiftKeyPressed = false; - this.update(this._isActive); - } - })); - - const suggestController = SuggestController.get(this.editor); - if (suggestController) { - this._register(suggestController.registerSelector({ - priority: 100, - select: (model, pos, suggestItems) => { - const textModel = this.editor.getModel(); - if (!textModel) { - // Should not happen - return -1; - } - - const i = this.suggestControllerPreselector(); - const itemToPreselect = i ? singleTextRemoveCommonPrefix(i, textModel) : undefined; - if (!itemToPreselect) { - return -1; - } - const position = Position.lift(pos); - - const candidates = suggestItems - .map((suggestItem, index) => { - const suggestItemInfo = SuggestItemInfo.fromSuggestion(suggestController, textModel, position, suggestItem, this.isShiftKeyPressed); - const suggestItemTextEdit = singleTextRemoveCommonPrefix(suggestItemInfo.toSingleTextEdit(), textModel); - const valid = singleTextEditAugments(itemToPreselect, suggestItemTextEdit); - return { index, valid, prefixLength: suggestItemTextEdit.text.length, suggestItem }; - }) - .filter(item => item && item.valid && item.prefixLength > 0); - - const result = findFirstMax( - candidates, - compareBy(s => s!.prefixLength, numberComparator) - ); - return result ? result.index : - 1; - } - })); - - let isBoundToSuggestWidget = false; - const bindToSuggestWidget = () => { - if (isBoundToSuggestWidget) { - return; - } - isBoundToSuggestWidget = true; - - this._register(suggestController.widget.value.onDidShow(() => { - this.isSuggestWidgetVisible = true; - this.update(true); - })); - this._register(suggestController.widget.value.onDidHide(() => { - this.isSuggestWidgetVisible = false; - this.update(false); - })); - this._register(suggestController.widget.value.onDidFocus(() => { - this.isSuggestWidgetVisible = true; - this.update(true); - })); - }; - - this._register(Event.once(suggestController.model.onDidTrigger)(e => { - bindToSuggestWidget(); - })); - - this._register(suggestController.onWillInsertSuggestItem(e => { - const position = this.editor.getPosition(); - const model = this.editor.getModel(); - if (!position || !model) { return undefined; } - - const suggestItemInfo = SuggestItemInfo.fromSuggestion( - suggestController, - model, - position, - e.item, - this.isShiftKeyPressed - ); - - this.onWillAccept(suggestItemInfo); - })); - } - this.update(this._isActive); - } - - private update(newActive: boolean): void { - const newInlineCompletion = this.getSuggestItemInfo(); - - if (this._isActive !== newActive || !suggestItemInfoEquals(this._currentSuggestItemInfo, newInlineCompletion)) { - this._isActive = newActive; - this._currentSuggestItemInfo = newInlineCompletion; - - this._onDidSelectedItemChange.fire(); - } - } - - private getSuggestItemInfo(): SuggestItemInfo | undefined { - const suggestController = SuggestController.get(this.editor); - if (!suggestController || !this.isSuggestWidgetVisible) { - return undefined; - } - - const focusedItem = suggestController.widget.value.getFocusedItem(); - const position = this.editor.getPosition(); - const model = this.editor.getModel(); - - if (!focusedItem || !position || !model) { - return undefined; - } - - return SuggestItemInfo.fromSuggestion( - suggestController, - model, - position, - focusedItem.item, - this.isShiftKeyPressed - ); - } - - public stopForceRenderingAbove(): void { - const suggestController = SuggestController.get(this.editor); - suggestController?.stopForceRenderingAbove(); - } - - public forceRenderingAbove(): void { - const suggestController = SuggestController.get(this.editor); - suggestController?.forceRenderingAbove(); - } -} - -export class SuggestItemInfo { - public static fromSuggestion(suggestController: SuggestController, model: ITextModel, position: Position, item: CompletionItem, toggleMode: boolean): SuggestItemInfo { - let { insertText } = item.completion; - let isSnippetText = false; - if (item.completion.insertTextRules! & CompletionItemInsertTextRule.InsertAsSnippet) { - const snippet = new SnippetParser().parse(insertText); - - if (snippet.children.length < 100) { - // Adjust whitespace is expensive. - SnippetSession.adjustWhitespace(model, position, true, snippet); - } - - insertText = snippet.toString(); - isSnippetText = true; - } - - const info = suggestController.getOverwriteInfo(item, toggleMode); - - return new SuggestItemInfo( - Range.fromPositions( - position.delta(0, -info.overwriteBefore), - position.delta(0, Math.max(info.overwriteAfter, 0)) - ), - insertText, - item.completion.kind, - isSnippetText, - ); - } - - private constructor( - public readonly range: Range, - public readonly insertText: string, - public readonly completionItemKind: CompletionItemKind, - public readonly isSnippetText: boolean, - ) { } - - public equals(other: SuggestItemInfo): boolean { - return this.range.equalsRange(other.range) - && this.insertText === other.insertText - && this.completionItemKind === other.completionItemKind - && this.isSnippetText === other.isSnippetText; - } - - public toSelectedSuggestionInfo(): SelectedSuggestionInfo { - return new SelectedSuggestionInfo(this.range, this.insertText, this.completionItemKind, this.isSnippetText); - } - - public toSingleTextEdit(): SingleTextEdit { - return new SingleTextEdit(this.range, this.insertText); - } -} - -function suggestItemInfoEquals(a: SuggestItemInfo | undefined, b: SuggestItemInfo | undefined): boolean { - if (a === b) { - return true; - } - if (!a || !b) { - return false; - } - return a.equals(b); -} - -export class ObservableSuggestWidgetAdapter extends Disposable { - private readonly _suggestWidgetAdaptor = this._register(new SuggestWidgetAdaptor( - this._editorObs.editor, - () => { - this._editorObs.forceUpdate(); - return this._suggestControllerPreselector(); - }, - (item) => this._editorObs.forceUpdate(_tx => { - /** @description InlineCompletionsController.handleSuggestAccepted */ - this._handleSuggestAccepted(item); - }) - )); - - public readonly selectedItem = observableFromEvent(this, cb => this._suggestWidgetAdaptor.onDidSelectedItemChange(() => { - this._editorObs.forceUpdate(_tx => cb(undefined)); - }), () => this._suggestWidgetAdaptor.selectedItem); - - constructor( - private readonly _editorObs: ObservableCodeEditor, - - private readonly _handleSuggestAccepted: (item: SuggestItemInfo) => void, - private readonly _suggestControllerPreselector: () => SingleTextEdit | undefined, - ) { - super(); - } - - public stopForceRenderingAbove(): void { - this._suggestWidgetAdaptor.stopForceRenderingAbove(); - } - - public forceRenderingAbove(): void { - this._suggestWidgetAdaptor.forceRenderingAbove(); - } -} diff --git a/src/vs/platform/configuration/test/common/policyConfiguration.test.ts b/src/vs/platform/configuration/test/common/policyConfiguration.test.ts deleted file mode 100644 index ee69975cd244d..0000000000000 --- a/src/vs/platform/configuration/test/common/policyConfiguration.test.ts +++ /dev/null @@ -1,266 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import assert from 'assert'; -import { Event } from '../../../../base/common/event.js'; -import { URI } from '../../../../base/common/uri.js'; -import { DefaultConfiguration, PolicyConfiguration } from '../../common/configurations.js'; -import { IFileService } from '../../../files/common/files.js'; -import { FileService } from '../../../files/common/fileService.js'; -import { InMemoryFileSystemProvider } from '../../../files/common/inMemoryFilesystemProvider.js'; -import { NullLogService } from '../../../log/common/log.js'; -import { Extensions, IConfigurationNode, IConfigurationRegistry } from '../../common/configurationRegistry.js'; -import { Registry } from '../../../registry/common/platform.js'; -import { VSBuffer } from '../../../../base/common/buffer.js'; -import { deepClone } from '../../../../base/common/objects.js'; -import { IPolicyService } from '../../../policy/common/policy.js'; -import { FilePolicyService } from '../../../policy/common/filePolicyService.js'; -import { runWithFakedTimers } from '../../../../base/test/common/timeTravelScheduler.js'; -import { ensureNoDisposablesAreLeakedInTestSuite } from '../../../../base/test/common/utils.js'; - -suite('PolicyConfiguration', () => { - - const disposables = ensureNoDisposablesAreLeakedInTestSuite(); - - let testObject: PolicyConfiguration; - let fileService: IFileService; - let policyService: IPolicyService; - const policyFile = URI.file('policyFile').with({ scheme: 'vscode-tests' }); - const policyConfigurationNode: IConfigurationNode = { - 'id': 'policyConfiguration', - 'order': 1, - 'title': 'a', - 'type': 'object', - 'properties': { - 'policy.settingA': { - 'type': 'string', - 'default': 'defaultValueA', - policy: { - name: 'PolicySettingA', - minimumVersion: '1.0.0', - } - }, - 'policy.settingB': { - 'type': 'string', - 'default': 'defaultValueB', - policy: { - name: 'PolicySettingB', - minimumVersion: '1.0.0', - } - }, - 'policy.objectSetting': { - 'type': 'object', - 'default': {}, - policy: { - name: 'PolicyObjectSetting', - minimumVersion: '1.0.0', - } - }, - 'policy.arraySetting': { - 'type': 'object', - 'default': [], - policy: { - name: 'PolicyArraySetting', - minimumVersion: '1.0.0', - } - }, - 'nonPolicy.setting': { - 'type': 'boolean', - 'default': true - } - } - }; - - suiteSetup(() => Registry.as(Extensions.Configuration).registerConfiguration(policyConfigurationNode)); - suiteTeardown(() => Registry.as(Extensions.Configuration).deregisterConfigurations([policyConfigurationNode])); - - setup(async () => { - const defaultConfiguration = disposables.add(new DefaultConfiguration(new NullLogService())); - await defaultConfiguration.initialize(); - fileService = disposables.add(new FileService(new NullLogService())); - const diskFileSystemProvider = disposables.add(new InMemoryFileSystemProvider()); - disposables.add(fileService.registerProvider(policyFile.scheme, diskFileSystemProvider)); - policyService = disposables.add(new FilePolicyService(policyFile, fileService, new NullLogService())); - testObject = disposables.add(new PolicyConfiguration(defaultConfiguration, policyService, new NullLogService())); - }); - - test('initialize: with policies', async () => { - await fileService.writeFile(policyFile, VSBuffer.fromString(JSON.stringify({ 'PolicySettingA': 'policyValueA' }))); - - await testObject.initialize(); - const acutal = testObject.configurationModel; - - assert.strictEqual(acutal.getValue('policy.settingA'), 'policyValueA'); - assert.strictEqual(acutal.getValue('policy.settingB'), undefined); - assert.strictEqual(acutal.getValue('nonPolicy.setting'), undefined); - assert.deepStrictEqual(acutal.keys, ['policy.settingA']); - assert.deepStrictEqual(acutal.overrides, []); - }); - - test('initialize: no policies', async () => { - await testObject.initialize(); - const acutal = testObject.configurationModel; - - assert.deepStrictEqual(acutal.keys, []); - assert.deepStrictEqual(acutal.overrides, []); - assert.strictEqual(acutal.getValue('policy.settingA'), undefined); - assert.strictEqual(acutal.getValue('policy.settingB'), undefined); - assert.strictEqual(acutal.getValue('nonPolicy.setting'), undefined); - }); - - test('initialize: with policies but not registered', async () => { - await fileService.writeFile(policyFile, VSBuffer.fromString(JSON.stringify({ 'PolicySettingA': 'policyValueA', 'PolicySettingB': 'policyValueB', 'PolicySettingC': 'policyValueC' }))); - - await testObject.initialize(); - const acutal = testObject.configurationModel; - - assert.strictEqual(acutal.getValue('policy.settingA'), 'policyValueA'); - assert.strictEqual(acutal.getValue('policy.settingB'), 'policyValueB'); - assert.strictEqual(acutal.getValue('nonPolicy.setting'), undefined); - assert.deepStrictEqual(acutal.keys, ['policy.settingA', 'policy.settingB']); - assert.deepStrictEqual(acutal.overrides, []); - }); - - test('initialize: with object type policy', async () => { - const expected = { - 'microsoft': true, - 'github': 'stable', - 'other': 1, - 'complex': { - 'key': 'value' - }, - 'array': [1, 2, 3] - }; - await fileService.writeFile(policyFile, VSBuffer.fromString(JSON.stringify({ 'PolicyObjectSetting': JSON.stringify(expected) }))); - - await testObject.initialize(); - const acutal = testObject.configurationModel; - - assert.deepStrictEqual(acutal.getValue('policy.objectSetting'), expected); - }); - - test('initialize: with array type policy', async () => { - await fileService.writeFile(policyFile, VSBuffer.fromString(JSON.stringify({ 'PolicyArraySetting': JSON.stringify([1]) }))); - - await testObject.initialize(); - const acutal = testObject.configurationModel; - - assert.deepStrictEqual(acutal.getValue('policy.arraySetting'), [1]); - }); - - test('initialize: with object type policy ignores policy if value is not valid', async () => { - await fileService.writeFile(policyFile, VSBuffer.fromString(JSON.stringify({ 'PolicyObjectSetting': '{"a": "b", "hello": }' }))); - - await testObject.initialize(); - const acutal = testObject.configurationModel; - - assert.deepStrictEqual(acutal.getValue('policy.objectSetting'), undefined); - }); - - test('initialize: with object type policy ignores policy if there are duplicate keys', async () => { - await fileService.writeFile(policyFile, VSBuffer.fromString(JSON.stringify({ 'PolicyObjectSetting': '{"microsoft": true, "microsoft": false }' }))); - - await testObject.initialize(); - const acutal = testObject.configurationModel; - - assert.deepStrictEqual(acutal.getValue('policy.objectSetting'), undefined); - }); - - test('change: when policy is added', async () => { - await fileService.writeFile(policyFile, VSBuffer.fromString(JSON.stringify({ 'PolicySettingA': 'policyValueA' }))); - await testObject.initialize(); - - await runWithFakedTimers({ useFakeTimers: true }, async () => { - const promise = Event.toPromise(testObject.onDidChangeConfiguration); - await fileService.writeFile(policyFile, VSBuffer.fromString(JSON.stringify({ 'PolicySettingA': 'policyValueA', 'PolicySettingB': 'policyValueB', 'PolicySettingC': 'policyValueC' }))); - await promise; - }); - - const acutal = testObject.configurationModel; - assert.strictEqual(acutal.getValue('policy.settingA'), 'policyValueA'); - assert.strictEqual(acutal.getValue('policy.settingB'), 'policyValueB'); - assert.strictEqual(acutal.getValue('nonPolicy.setting'), undefined); - assert.deepStrictEqual(acutal.keys, ['policy.settingA', 'policy.settingB']); - assert.deepStrictEqual(acutal.overrides, []); - }); - - test('change: when policy is updated', async () => { - await fileService.writeFile(policyFile, VSBuffer.fromString(JSON.stringify({ 'PolicySettingA': 'policyValueA' }))); - await testObject.initialize(); - - await runWithFakedTimers({ useFakeTimers: true }, async () => { - const promise = Event.toPromise(testObject.onDidChangeConfiguration); - await fileService.writeFile(policyFile, VSBuffer.fromString(JSON.stringify({ 'PolicySettingA': 'policyValueAChanged' }))); - await promise; - }); - - const acutal = testObject.configurationModel; - assert.strictEqual(acutal.getValue('policy.settingA'), 'policyValueAChanged'); - assert.strictEqual(acutal.getValue('policy.settingB'), undefined); - assert.strictEqual(acutal.getValue('nonPolicy.setting'), undefined); - assert.deepStrictEqual(acutal.keys, ['policy.settingA']); - assert.deepStrictEqual(acutal.overrides, []); - }); - - test('change: when policy is removed', async () => { - await fileService.writeFile(policyFile, VSBuffer.fromString(JSON.stringify({ 'PolicySettingA': 'policyValueA' }))); - await testObject.initialize(); - - await runWithFakedTimers({ useFakeTimers: true }, async () => { - const promise = Event.toPromise(testObject.onDidChangeConfiguration); - await fileService.writeFile(policyFile, VSBuffer.fromString(JSON.stringify({}))); - await promise; - }); - - const acutal = testObject.configurationModel; - assert.strictEqual(acutal.getValue('policy.settingA'), undefined); - assert.strictEqual(acutal.getValue('policy.settingB'), undefined); - assert.strictEqual(acutal.getValue('nonPolicy.setting'), undefined); - assert.deepStrictEqual(acutal.keys, []); - assert.deepStrictEqual(acutal.overrides, []); - }); - - test('change: when policy setting is registered', async () => { - await fileService.writeFile(policyFile, VSBuffer.fromString(JSON.stringify({ 'PolicySettingC': 'policyValueC' }))); - await testObject.initialize(); - - const promise = Event.toPromise(testObject.onDidChangeConfiguration); - policyConfigurationNode.properties!['policy.settingC'] = { - 'type': 'string', - 'default': 'defaultValueC', - policy: { - name: 'PolicySettingC', - minimumVersion: '1.0.0', - } - }; - Registry.as(Extensions.Configuration).registerConfiguration(deepClone(policyConfigurationNode)); - await promise; - - const acutal = testObject.configurationModel; - assert.strictEqual(acutal.getValue('policy.settingC'), 'policyValueC'); - assert.strictEqual(acutal.getValue('policy.settingA'), undefined); - assert.strictEqual(acutal.getValue('policy.settingB'), undefined); - assert.strictEqual(acutal.getValue('nonPolicy.setting'), undefined); - assert.deepStrictEqual(acutal.keys, ['policy.settingC']); - assert.deepStrictEqual(acutal.overrides, []); - }); - - test('change: when policy setting is deregistered', async () => { - await fileService.writeFile(policyFile, VSBuffer.fromString(JSON.stringify({ 'PolicySettingA': 'policyValueA' }))); - await testObject.initialize(); - - const promise = Event.toPromise(testObject.onDidChangeConfiguration); - Registry.as(Extensions.Configuration).deregisterConfigurations([policyConfigurationNode]); - await promise; - - const acutal = testObject.configurationModel; - assert.strictEqual(acutal.getValue('policy.settingA'), undefined); - assert.strictEqual(acutal.getValue('policy.settingB'), undefined); - assert.strictEqual(acutal.getValue('nonPolicy.setting'), undefined); - assert.deepStrictEqual(acutal.keys, []); - assert.deepStrictEqual(acutal.overrides, []); - }); - -}); diff --git a/src/vs/platform/extensionManagement/test/common/allowedExtensionsService.test.ts b/src/vs/platform/extensionManagement/test/common/allowedExtensionsService.test.ts deleted file mode 100644 index 72491b4011090..0000000000000 --- a/src/vs/platform/extensionManagement/test/common/allowedExtensionsService.test.ts +++ /dev/null @@ -1,232 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as assert from 'assert'; -import { AllowedExtensionsService } from '../../common/allowedExtensionsService.js'; -import { ensureNoDisposablesAreLeakedInTestSuite } from '../../../../base/test/common/utils.js'; -import { IProductService } from '../../../product/common/productService.js'; -import { TestConfigurationService } from '../../../configuration/test/common/testConfigurationService.js'; -import { AllowedExtensionsConfigKey, IGalleryExtension, ILocalExtension } from '../../common/extensionManagement.js'; -import { ExtensionType, IExtensionManifest, TargetPlatform } from '../../../extensions/common/extensions.js'; -import { Event } from '../../../../base/common/event.js'; -import { ConfigurationTarget } from '../../../configuration/common/configuration.js'; -import { getGalleryExtensionId } from '../../common/extensionManagementUtil.js'; -import { generateUuid } from '../../../../base/common/uuid.js'; -import { URI } from '../../../../base/common/uri.js'; - -suite('AllowedExtensionsService', () => { - - const disposables = ensureNoDisposablesAreLeakedInTestSuite(); - - const configurationService = new TestConfigurationService(); - - setup(() => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, '*'); - }); - - test('should allow all extensions if no allowed extensions are configured', () => { - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined }) === true, true); - }); - - test('should not allow specific extension if not in allowed list', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'test.extension': false }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined }) === true, false); - }); - - test('should allow specific extension if in allowed list', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'test.extension': true }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined }) === true, true); - }); - - test('should not allow pre-release extension if only stable is allowed', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'test.extension': 'stable' }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined, prerelease: true }) === true, false); - }); - - test('should allow pre-release extension if pre-release is allowed', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'test.extension': true }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined, prerelease: true }) === true, true); - }); - - test('should allow specific version of an extension when configured to that version', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'test.extension': ['1.2.3'] }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined, version: '1.2.3' }) === true, true); - }); - - test('should allow any version of an extension when a specific version is configured', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'test.extension': ['1.2.3'] }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined }) === true, true); - }); - - test('should allow any version of an extension when stable is configured', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'test.extension': 'stable' }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined }) === true, true); - }); - - test('should allow a version of an extension when stable is configured', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'test.extension': 'stable' }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined, version: '1.2.3' }) === true, true); - }); - - test('should allow a pre-release version of an extension when stable is configured', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'test.extension': 'stable' }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined, version: '1.2.3', prerelease: true }) === true, false); - }); - - test('should allow specific version of an extension when configured to multiple versions', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'test.extension': ['1.2.3', '2.0.1', '3.1.2'] }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined, version: '1.2.3' }) === true, true); - }); - - test('should allow platform specific version of an extension when configured to platform specific version', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'test.extension': ['1.2.3@darwin-x64'] }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined, version: '1.2.3', targetPlatform: TargetPlatform.DARWIN_X64 }) === true, true); - }); - - test('should allow universal platform specific version of an extension when configured to platform specific version', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'test.extension': ['1.2.3@darwin-x64'] }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined, version: '1.2.3', targetPlatform: TargetPlatform.UNIVERSAL }) === true, true); - }); - - test('should allow specific version of an extension when configured to platform specific version', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'test.extension': ['1.2.3@darwin-x64'] }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined, version: '1.2.3' }) === true, true); - }); - - test('should allow platform specific version of an extension when configured to multiple versions', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'test.extension': ['1.0.0', '1.2.3@darwin-x64', '1.2.3@darwin-arm64'] }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined, version: '1.2.3', targetPlatform: TargetPlatform.DARWIN_X64 }) === true, true); - }); - - test('should not allow platform specific version of an extension when configured to different platform specific version', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'test.extension': ['1.2.3@darwin-x64'] }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined, version: '1.2.3', targetPlatform: TargetPlatform.DARWIN_ARM64 }) === true, false); - }); - - test('should specific version of an extension when configured to different versions', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'test.extension': ['1.0.0', '1.2.3@darwin-x64', '1.2.3@darwin-arm64'] }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined, version: '1.0.1' }) === true, false); - }); - - test('should allow extension if publisher is in allowed list', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'test': true }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined }), true); - }); - - test('should allow extension if publisher is not in allowed list and has publisher mapping', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'hello': true }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(['hello']), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: 'Hello' }), true); - }); - - test('should allow extension if publisher is not in allowed list and has different publisher mapping', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'hello': true }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(['bar']), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: 'Hello' }) === true, false); - }); - - test('should not allow extension if publisher is not in allowed list', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'test': false }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined }) === true, false); - }); - - test('should not allow prerelease extension if publisher is allowed only to stable', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'test': 'stable' }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined, prerelease: true }) === true, false); - }); - - test('should allow extension if publisher is set to random value', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'test': 'hello' }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined, prerelease: true }) === true, true); - }); - - test('should allow extension if only wildcard is in allowed list', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { '*': true }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined }), true); - }); - - test('should allow extension if wildcard is in allowed list', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { '*': true, 'hello': false }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined }), true); - }); - - test('should not allow extension if wildcard is not in allowed list', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { '*': false, 'hello': true }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed({ id: 'test.extension', publisherDisplayName: undefined }) === true, false); - }); - - test('should allow a gallery extension', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'pub': true }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed(aGalleryExtension('name')) === true, true); - }); - - test('should allow a local extension', () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { 'pub': true }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - assert.strictEqual(testObject.isAllowed(aLocalExtension('pub.name')) === true, true); - }); - - test('should trigger change event when allowed list change', async () => { - configurationService.setUserConfiguration(AllowedExtensionsConfigKey, { '*': false }); - const testObject = disposables.add(new AllowedExtensionsService(aProductService(), configurationService)); - const promise = Event.toPromise(testObject.onDidChangeAllowedExtensions); - configurationService.onDidChangeConfigurationEmitter.fire({ affectsConfiguration: () => true, affectedKeys: new Set([AllowedExtensionsConfigKey]), change: { keys: [], overrides: [] }, source: ConfigurationTarget.USER }); - await promise; - }); - - function aProductService(extensionPublisherOrgs?: string[]): IProductService { - return { - _serviceBrand: undefined, - extensionPublisherOrgs - } as IProductService; - } - - function aGalleryExtension(name: string, properties: any = {}, galleryExtensionProperties: any = {}): IGalleryExtension { - const galleryExtension = Object.create({ type: 'gallery', name, publisher: 'pub', publisherDisplayName: 'Pub', version: '1.0.0', allTargetPlatforms: [TargetPlatform.UNIVERSAL], properties: {}, assets: {}, isSigned: true, ...properties }); - galleryExtension.properties = { ...galleryExtension.properties, dependencies: [], ...galleryExtensionProperties }; - galleryExtension.identifier = { id: getGalleryExtensionId(galleryExtension.publisher, galleryExtension.name), uuid: generateUuid() }; - return galleryExtension; - } - - function aLocalExtension(id: string, manifest: Partial = {}, properties: any = {}): ILocalExtension { - const [publisher, name] = id.split('.'); - manifest = { name, publisher, ...manifest }; - properties = { - identifier: { id }, - location: URI.file(`pub.${name}`), - galleryIdentifier: { id, uuid: undefined }, - type: ExtensionType.User, - ...properties, - isValid: properties.isValid ?? true, - }; - properties.isBuiltin = properties.type === ExtensionType.System; - return Object.create({ manifest, ...properties }); - } -}); diff --git a/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.ts b/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.ts deleted file mode 100644 index 992229b91b760..0000000000000 --- a/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.ts +++ /dev/null @@ -1,435 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { Event } from '../../../base/common/event.js'; -import { combinedDisposable, DisposableStore, DisposableMap } from '../../../base/common/lifecycle.js'; -import { ICodeEditor, isCodeEditor, isDiffEditor, IActiveCodeEditor } from '../../../editor/browser/editorBrowser.js'; -import { ICodeEditorService } from '../../../editor/browser/services/codeEditorService.js'; -import { IEditor } from '../../../editor/common/editorCommon.js'; -import { ITextModel, shouldSynchronizeModel } from '../../../editor/common/model.js'; -import { IModelService } from '../../../editor/common/services/model.js'; -import { ITextModelService } from '../../../editor/common/services/resolverService.js'; -import { IFileService } from '../../../platform/files/common/files.js'; -import { extHostCustomer, IExtHostContext } from '../../services/extensions/common/extHostCustomers.js'; -import { MainThreadDocuments } from './mainThreadDocuments.js'; -import { MainThreadTextEditor } from './mainThreadEditor.js'; -import { MainThreadTextEditors } from './mainThreadEditors.js'; -import { ExtHostContext, ExtHostDocumentsAndEditorsShape, IDocumentsAndEditorsDelta, IModelAddedData, ITextEditorAddData, MainContext } from '../common/extHost.protocol.js'; -import { AbstractTextEditor } from '../../browser/parts/editor/textEditor.js'; -import { IEditorPane } from '../../common/editor.js'; -import { EditorGroupColumn, editorGroupToColumn } from '../../services/editor/common/editorGroupColumn.js'; -import { IEditorService } from '../../services/editor/common/editorService.js'; -import { IEditorGroupsService } from '../../services/editor/common/editorGroupsService.js'; -import { ITextFileService } from '../../services/textfile/common/textfiles.js'; -import { IWorkbenchEnvironmentService } from '../../services/environment/common/environmentService.js'; -import { IWorkingCopyFileService } from '../../services/workingCopy/common/workingCopyFileService.js'; -import { IUriIdentityService } from '../../../platform/uriIdentity/common/uriIdentity.js'; -import { IClipboardService } from '../../../platform/clipboard/common/clipboardService.js'; -import { IPathService } from '../../services/path/common/pathService.js'; -import { diffSets, diffMaps } from '../../../base/common/collections.js'; -import { IPaneCompositePartService } from '../../services/panecomposite/browser/panecomposite.js'; -import { ViewContainerLocation } from '../../common/views.js'; -import { IConfigurationService } from '../../../platform/configuration/common/configuration.js'; -import { IDirtyDiffModelService } from '../../contrib/scm/browser/dirtyDiffModel.js'; - - -class TextEditorSnapshot { - - readonly id: string; - - constructor( - readonly editor: IActiveCodeEditor, - ) { - this.id = `${editor.getId()},${editor.getModel().id}`; - } -} - -class DocumentAndEditorStateDelta { - - readonly isEmpty: boolean; - - constructor( - readonly removedDocuments: ITextModel[], - readonly addedDocuments: ITextModel[], - readonly removedEditors: TextEditorSnapshot[], - readonly addedEditors: TextEditorSnapshot[], - readonly oldActiveEditor: string | null | undefined, - readonly newActiveEditor: string | null | undefined, - ) { - this.isEmpty = this.removedDocuments.length === 0 - && this.addedDocuments.length === 0 - && this.removedEditors.length === 0 - && this.addedEditors.length === 0 - && oldActiveEditor === newActiveEditor; - } - - toString(): string { - let ret = 'DocumentAndEditorStateDelta\n'; - ret += `\tRemoved Documents: [${this.removedDocuments.map(d => d.uri.toString(true)).join(', ')}]\n`; - ret += `\tAdded Documents: [${this.addedDocuments.map(d => d.uri.toString(true)).join(', ')}]\n`; - ret += `\tRemoved Editors: [${this.removedEditors.map(e => e.id).join(', ')}]\n`; - ret += `\tAdded Editors: [${this.addedEditors.map(e => e.id).join(', ')}]\n`; - ret += `\tNew Active Editor: ${this.newActiveEditor}\n`; - return ret; - } -} - -class DocumentAndEditorState { - - static compute(before: DocumentAndEditorState | undefined, after: DocumentAndEditorState): DocumentAndEditorStateDelta { - if (!before) { - return new DocumentAndEditorStateDelta( - [], [...after.documents.values()], - [], [...after.textEditors.values()], - undefined, after.activeEditor - ); - } - const documentDelta = diffSets(before.documents, after.documents); - const editorDelta = diffMaps(before.textEditors, after.textEditors); - const oldActiveEditor = before.activeEditor !== after.activeEditor ? before.activeEditor : undefined; - const newActiveEditor = before.activeEditor !== after.activeEditor ? after.activeEditor : undefined; - - return new DocumentAndEditorStateDelta( - documentDelta.removed, documentDelta.added, - editorDelta.removed, editorDelta.added, - oldActiveEditor, newActiveEditor - ); - } - - constructor( - readonly documents: Set, - readonly textEditors: Map, - readonly activeEditor: string | null | undefined, - ) { - // - } -} - -const enum ActiveEditorOrder { - Editor, Panel -} - -class MainThreadDocumentAndEditorStateComputer { - - private readonly _toDispose = new DisposableStore(); - private readonly _toDisposeOnEditorRemove = new DisposableMap(); - private _currentState?: DocumentAndEditorState; - private _activeEditorOrder: ActiveEditorOrder = ActiveEditorOrder.Editor; - - constructor( - private readonly _onDidChangeState: (delta: DocumentAndEditorStateDelta) => void, - @IModelService private readonly _modelService: IModelService, - @ICodeEditorService private readonly _codeEditorService: ICodeEditorService, - @IEditorService private readonly _editorService: IEditorService, - @IPaneCompositePartService private readonly _paneCompositeService: IPaneCompositePartService, - ) { - this._modelService.onModelAdded(this._updateStateOnModelAdd, this, this._toDispose); - this._modelService.onModelRemoved(_ => this._updateState(), this, this._toDispose); - this._editorService.onDidActiveEditorChange(_ => this._updateState(), this, this._toDispose); - - this._codeEditorService.onCodeEditorAdd(this._onDidAddEditor, this, this._toDispose); - this._codeEditorService.onCodeEditorRemove(this._onDidRemoveEditor, this, this._toDispose); - this._codeEditorService.listCodeEditors().forEach(this._onDidAddEditor, this); - - Event.filter(this._paneCompositeService.onDidPaneCompositeOpen, event => event.viewContainerLocation === ViewContainerLocation.Panel)(_ => this._activeEditorOrder = ActiveEditorOrder.Panel, undefined, this._toDispose); - Event.filter(this._paneCompositeService.onDidPaneCompositeClose, event => event.viewContainerLocation === ViewContainerLocation.Panel)(_ => this._activeEditorOrder = ActiveEditorOrder.Editor, undefined, this._toDispose); - this._editorService.onDidVisibleEditorsChange(_ => this._activeEditorOrder = ActiveEditorOrder.Editor, undefined, this._toDispose); - - this._updateState(); - } - - dispose(): void { - this._toDispose.dispose(); - this._toDisposeOnEditorRemove.dispose(); - } - - private _onDidAddEditor(e: ICodeEditor): void { - this._toDisposeOnEditorRemove.set(e.getId(), combinedDisposable( - e.onDidChangeModel(() => this._updateState()), - e.onDidFocusEditorText(() => this._updateState()), - e.onDidFocusEditorWidget(() => this._updateState(e)) - )); - this._updateState(); - } - - private _onDidRemoveEditor(e: ICodeEditor): void { - const id = e.getId(); - if (this._toDisposeOnEditorRemove.has(id)) { - this._toDisposeOnEditorRemove.deleteAndDispose(id); - this._updateState(); - } - } - - private _updateStateOnModelAdd(model: ITextModel): void { - if (!shouldSynchronizeModel(model)) { - // ignore - return; - } - - if (!this._currentState) { - // too early - this._updateState(); - return; - } - - // small (fast) delta - this._currentState = new DocumentAndEditorState( - this._currentState.documents.add(model), - this._currentState.textEditors, - this._currentState.activeEditor - ); - - this._onDidChangeState(new DocumentAndEditorStateDelta( - [], [model], - [], [], - undefined, undefined - )); - } - - private _updateState(widgetFocusCandidate?: ICodeEditor): void { - - // models: ignore too large models - const models = new Set(); - for (const model of this._modelService.getModels()) { - if (shouldSynchronizeModel(model)) { - models.add(model); - } - } - - // editor: only take those that have a not too large model - const editors = new Map(); - let activeEditor: string | null = null; // Strict null work. This doesn't like being undefined! - - for (const editor of this._codeEditorService.listCodeEditors()) { - if (editor.isSimpleWidget) { - continue; - } - const model = editor.getModel(); - if (editor.hasModel() && model && shouldSynchronizeModel(model) - && !model.isDisposed() // model disposed - && Boolean(this._modelService.getModel(model.uri)) // model disposing, the flag didn't flip yet but the model service already removed it - ) { - const apiEditor = new TextEditorSnapshot(editor); - editors.set(apiEditor.id, apiEditor); - if (editor.hasTextFocus() || (widgetFocusCandidate === editor && editor.hasWidgetFocus())) { - // text focus has priority, widget focus is tricky because multiple - // editors might claim widget focus at the same time. therefore we use a - // candidate (which is the editor that has raised an widget focus event) - // in addition to the widget focus check - activeEditor = apiEditor.id; - } - } - } - - // active editor: if none of the previous editors had focus we try - // to match output panels or the active workbench editor with - // one of editor we have just computed - if (!activeEditor) { - let candidate: IEditor | undefined; - if (this._activeEditorOrder === ActiveEditorOrder.Editor) { - candidate = this._getActiveEditorFromEditorPart() || this._getActiveEditorFromPanel(); - } else { - candidate = this._getActiveEditorFromPanel() || this._getActiveEditorFromEditorPart(); - } - - if (candidate) { - for (const snapshot of editors.values()) { - if (candidate === snapshot.editor) { - activeEditor = snapshot.id; - } - } - } - } - - // compute new state and compare against old - const newState = new DocumentAndEditorState(models, editors, activeEditor); - const delta = DocumentAndEditorState.compute(this._currentState, newState); - if (!delta.isEmpty) { - this._currentState = newState; - this._onDidChangeState(delta); - } - } - - private _getActiveEditorFromPanel(): IEditor | undefined { - const panel = this._paneCompositeService.getActivePaneComposite(ViewContainerLocation.Panel); - if (panel instanceof AbstractTextEditor) { - const control = panel.getControl(); - if (isCodeEditor(control)) { - return control; - } - } - - return undefined; - } - - private _getActiveEditorFromEditorPart(): IEditor | undefined { - let activeTextEditorControl = this._editorService.activeTextEditorControl; - if (isDiffEditor(activeTextEditorControl)) { - activeTextEditorControl = activeTextEditorControl.getModifiedEditor(); - } - return activeTextEditorControl; - } -} - -@extHostCustomer -export class MainThreadDocumentsAndEditors { - - private readonly _toDispose = new DisposableStore(); - private readonly _proxy: ExtHostDocumentsAndEditorsShape; - private readonly _mainThreadDocuments: MainThreadDocuments; - private readonly _mainThreadEditors: MainThreadTextEditors; - private readonly _textEditors = new Map(); - - constructor( - extHostContext: IExtHostContext, - @IModelService private readonly _modelService: IModelService, - @ITextFileService private readonly _textFileService: ITextFileService, - @IEditorService private readonly _editorService: IEditorService, - @ICodeEditorService codeEditorService: ICodeEditorService, - @IFileService fileService: IFileService, - @ITextModelService textModelResolverService: ITextModelService, - @IEditorGroupsService private readonly _editorGroupService: IEditorGroupsService, - @IPaneCompositePartService paneCompositeService: IPaneCompositePartService, - @IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService, - @IWorkingCopyFileService workingCopyFileService: IWorkingCopyFileService, - @IUriIdentityService uriIdentityService: IUriIdentityService, - @IClipboardService private readonly _clipboardService: IClipboardService, - @IPathService pathService: IPathService, - @IConfigurationService configurationService: IConfigurationService, - @IDirtyDiffModelService dirtyDiffModelService: IDirtyDiffModelService - ) { - this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostDocumentsAndEditors); - - this._mainThreadDocuments = this._toDispose.add(new MainThreadDocuments(extHostContext, this._modelService, this._textFileService, fileService, textModelResolverService, environmentService, uriIdentityService, workingCopyFileService, pathService)); - extHostContext.set(MainContext.MainThreadDocuments, this._mainThreadDocuments); - - this._mainThreadEditors = this._toDispose.add(new MainThreadTextEditors(this, extHostContext, codeEditorService, this._editorService, this._editorGroupService, configurationService, dirtyDiffModelService, uriIdentityService)); - extHostContext.set(MainContext.MainThreadTextEditors, this._mainThreadEditors); - - // It is expected that the ctor of the state computer calls our `_onDelta`. - this._toDispose.add(new MainThreadDocumentAndEditorStateComputer(delta => this._onDelta(delta), _modelService, codeEditorService, this._editorService, paneCompositeService)); - } - - dispose(): void { - this._toDispose.dispose(); - } - - private _onDelta(delta: DocumentAndEditorStateDelta): void { - - const removedEditors: string[] = []; - const addedEditors: MainThreadTextEditor[] = []; - - // removed models - const removedDocuments = delta.removedDocuments.map(m => m.uri); - - // added editors - for (const apiEditor of delta.addedEditors) { - const mainThreadEditor = new MainThreadTextEditor(apiEditor.id, apiEditor.editor.getModel(), - apiEditor.editor, { onGainedFocus() { }, onLostFocus() { } }, this._mainThreadDocuments, this._modelService, this._clipboardService); - - this._textEditors.set(apiEditor.id, mainThreadEditor); - addedEditors.push(mainThreadEditor); - } - - // removed editors - for (const { id } of delta.removedEditors) { - const mainThreadEditor = this._textEditors.get(id); - if (mainThreadEditor) { - mainThreadEditor.dispose(); - this._textEditors.delete(id); - removedEditors.push(id); - } - } - - const extHostDelta: IDocumentsAndEditorsDelta = Object.create(null); - let empty = true; - if (delta.newActiveEditor !== undefined) { - empty = false; - extHostDelta.newActiveEditor = delta.newActiveEditor; - } - if (removedDocuments.length > 0) { - empty = false; - extHostDelta.removedDocuments = removedDocuments; - } - if (removedEditors.length > 0) { - empty = false; - extHostDelta.removedEditors = removedEditors; - } - if (delta.addedDocuments.length > 0) { - empty = false; - extHostDelta.addedDocuments = delta.addedDocuments.map(m => this._toModelAddData(m)); - } - if (delta.addedEditors.length > 0) { - empty = false; - extHostDelta.addedEditors = addedEditors.map(e => this._toTextEditorAddData(e)); - } - - if (!empty) { - // first update ext host - this._proxy.$acceptDocumentsAndEditorsDelta(extHostDelta); - - // second update dependent document/editor states - removedDocuments.forEach(this._mainThreadDocuments.handleModelRemoved, this._mainThreadDocuments); - delta.addedDocuments.forEach(this._mainThreadDocuments.handleModelAdded, this._mainThreadDocuments); - - removedEditors.forEach(this._mainThreadEditors.handleTextEditorRemoved, this._mainThreadEditors); - addedEditors.forEach(this._mainThreadEditors.handleTextEditorAdded, this._mainThreadEditors); - } - } - - private _toModelAddData(model: ITextModel): IModelAddedData { - return { - uri: model.uri, - versionId: model.getVersionId(), - lines: model.getLinesContent(), - EOL: model.getEOL(), - languageId: model.getLanguageId(), - isDirty: this._textFileService.isDirty(model.uri) - }; - } - - private _toTextEditorAddData(textEditor: MainThreadTextEditor): ITextEditorAddData { - const props = textEditor.getProperties(); - return { - id: textEditor.getId(), - documentUri: textEditor.getModel().uri, - options: props.options, - selections: props.selections, - visibleRanges: props.visibleRanges, - editorPosition: this._findEditorPosition(textEditor) - }; - } - - private _findEditorPosition(editor: MainThreadTextEditor): EditorGroupColumn | undefined { - for (const editorPane of this._editorService.visibleEditorPanes) { - if (editor.matches(editorPane)) { - return editorGroupToColumn(this._editorGroupService, editorPane.group); - } - } - return undefined; - } - - findTextEditorIdFor(editorPane: IEditorPane): string | undefined { - for (const [id, editor] of this._textEditors) { - if (editor.matches(editorPane)) { - return id; - } - } - return undefined; - } - - getIdOfCodeEditor(codeEditor: ICodeEditor): string | undefined { - for (const [id, editor] of this._textEditors) { - if (editor.getCodeEditor() === codeEditor) { - return id; - } - } - return undefined; - } - - getEditor(id: string): MainThreadTextEditor | undefined { - return this._textEditors.get(id); - } -} diff --git a/src/vs/workbench/api/test/browser/mainThreadDocumentsAndEditors.test.ts b/src/vs/workbench/api/test/browser/mainThreadDocumentsAndEditors.test.ts deleted file mode 100644 index 230fc9d2126cc..0000000000000 --- a/src/vs/workbench/api/test/browser/mainThreadDocumentsAndEditors.test.ts +++ /dev/null @@ -1,277 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import assert from 'assert'; -import { MainThreadDocumentsAndEditors } from '../../browser/mainThreadDocumentsAndEditors.js'; -import { SingleProxyRPCProtocol } from '../common/testRPCProtocol.js'; -import { TestConfigurationService } from '../../../../platform/configuration/test/common/testConfigurationService.js'; -import { ModelService } from '../../../../editor/common/services/modelService.js'; -import { TestCodeEditorService } from '../../../../editor/test/browser/editorTestServices.js'; -import { ITextFileService } from '../../../services/textfile/common/textfiles.js'; -import { IDocumentsAndEditorsDelta } from '../../common/extHost.protocol.js'; -import { createTestCodeEditor, ITestCodeEditor } from '../../../../editor/test/browser/testCodeEditor.js'; -import { mock } from '../../../../base/test/common/mock.js'; -import { TestEditorService, TestEditorGroupsService, TestEnvironmentService, TestPathService } from '../../../test/browser/workbenchTestServices.js'; -import { Event } from '../../../../base/common/event.js'; -import { ITextModel } from '../../../../editor/common/model.js'; -import { ServiceCollection } from '../../../../platform/instantiation/common/serviceCollection.js'; -import { ICodeEditorService } from '../../../../editor/browser/services/codeEditorService.js'; -import { IFileService } from '../../../../platform/files/common/files.js'; -import { TestThemeService } from '../../../../platform/theme/test/common/testThemeService.js'; -import { UndoRedoService } from '../../../../platform/undoRedo/common/undoRedoService.js'; -import { TestDialogService } from '../../../../platform/dialogs/test/common/testDialogService.js'; -import { TestNotificationService } from '../../../../platform/notification/test/common/testNotificationService.js'; -import { TestTextResourcePropertiesService, TestWorkingCopyFileService } from '../../../test/common/workbenchTestServices.js'; -import { UriIdentityService } from '../../../../platform/uriIdentity/common/uriIdentityService.js'; -import { IClipboardService } from '../../../../platform/clipboard/common/clipboardService.js'; -import { IPaneCompositePartService } from '../../../services/panecomposite/browser/panecomposite.js'; -import { TextModel } from '../../../../editor/common/model/textModel.js'; -import { DisposableStore } from '../../../../base/common/lifecycle.js'; -import { ensureNoDisposablesAreLeakedInTestSuite } from '../../../../base/test/common/utils.js'; -import { TestInstantiationService } from '../../../../platform/instantiation/test/common/instantiationServiceMock.js'; -import { ILanguageService } from '../../../../editor/common/languages/language.js'; -import { LanguageService } from '../../../../editor/common/services/languageService.js'; -import { ILanguageConfigurationService } from '../../../../editor/common/languages/languageConfigurationRegistry.js'; -import { TestLanguageConfigurationService } from '../../../../editor/test/common/modes/testLanguageConfigurationService.js'; -import { IUndoRedoService } from '../../../../platform/undoRedo/common/undoRedo.js'; -import { IDirtyDiffModelService } from '../../../contrib/scm/browser/dirtyDiffModel.js'; -import { ITextEditorDiffInformation } from '../../../../platform/editor/common/editor.js'; - -suite('MainThreadDocumentsAndEditors', () => { - - let disposables: DisposableStore; - - let modelService: ModelService; - let codeEditorService: TestCodeEditorService; - let textFileService: ITextFileService; - const deltas: IDocumentsAndEditorsDelta[] = []; - - function myCreateTestCodeEditor(model: ITextModel | undefined): ITestCodeEditor { - return createTestCodeEditor(model, { - hasTextFocus: false, - serviceCollection: new ServiceCollection( - [ICodeEditorService, codeEditorService] - ) - }); - } - - setup(() => { - disposables = new DisposableStore(); - - deltas.length = 0; - const configService = new TestConfigurationService(); - configService.setUserConfiguration('editor', { 'detectIndentation': false }); - const dialogService = new TestDialogService(); - const notificationService = new TestNotificationService(); - const undoRedoService = new UndoRedoService(dialogService, notificationService); - const themeService = new TestThemeService(); - const instantiationService = new TestInstantiationService(); - instantiationService.set(ILanguageService, disposables.add(new LanguageService())); - instantiationService.set(ILanguageConfigurationService, new TestLanguageConfigurationService()); - instantiationService.set(IUndoRedoService, undoRedoService); - modelService = new ModelService( - configService, - new TestTextResourcePropertiesService(configService), - undoRedoService, - instantiationService - ); - codeEditorService = new TestCodeEditorService(themeService); - textFileService = new class extends mock() { - override isDirty() { return false; } - override files = { - onDidSave: Event.None, - onDidRevert: Event.None, - onDidChangeDirty: Event.None - }; - }; - const workbenchEditorService = disposables.add(new TestEditorService()); - const editorGroupService = new TestEditorGroupsService(); - - const fileService = new class extends mock() { - override onDidRunOperation = Event.None; - override onDidChangeFileSystemProviderCapabilities = Event.None; - override onDidChangeFileSystemProviderRegistrations = Event.None; - }; - - new MainThreadDocumentsAndEditors( - SingleProxyRPCProtocol({ - $acceptDocumentsAndEditorsDelta: (delta: IDocumentsAndEditorsDelta) => { deltas.push(delta); }, - $acceptEditorDiffInformation: (id: string, diffInformation: ITextEditorDiffInformation | undefined) => { } - }), - modelService, - textFileService, - workbenchEditorService, - codeEditorService, - fileService, - null!, - editorGroupService, - new class extends mock() implements IPaneCompositePartService { - override onDidPaneCompositeOpen = Event.None; - override onDidPaneCompositeClose = Event.None; - override getActivePaneComposite() { - return undefined; - } - }, - TestEnvironmentService, - new TestWorkingCopyFileService(), - new UriIdentityService(fileService), - new class extends mock() { - override readText() { - return Promise.resolve('clipboard_contents'); - } - }, - new TestPathService(), - new TestConfigurationService(), - new class extends mock() { - override getDirtyDiffModel() { - return undefined; - } - override getDiffModel() { - return undefined; - } - } - ); - }); - - teardown(() => { - disposables.dispose(); - }); - - ensureNoDisposablesAreLeakedInTestSuite(); - - test('Model#add', () => { - deltas.length = 0; - - disposables.add(modelService.createModel('farboo', null)); - - assert.strictEqual(deltas.length, 1); - const [delta] = deltas; - - assert.strictEqual(delta.addedDocuments!.length, 1); - assert.strictEqual(delta.removedDocuments, undefined); - assert.strictEqual(delta.addedEditors, undefined); - assert.strictEqual(delta.removedEditors, undefined); - assert.strictEqual(delta.newActiveEditor, undefined); - }); - - test('ignore huge model', function () { - - const oldLimit = TextModel._MODEL_SYNC_LIMIT; - try { - const largeModelString = 'abc'.repeat(1024); - TextModel._MODEL_SYNC_LIMIT = largeModelString.length / 2; - - const model = modelService.createModel(largeModelString, null); - disposables.add(model); - assert.ok(model.isTooLargeForSyncing()); - - assert.strictEqual(deltas.length, 1); - const [delta] = deltas; - assert.strictEqual(delta.newActiveEditor, null); - assert.strictEqual(delta.addedDocuments, undefined); - assert.strictEqual(delta.removedDocuments, undefined); - assert.strictEqual(delta.addedEditors, undefined); - assert.strictEqual(delta.removedEditors, undefined); - - } finally { - TextModel._MODEL_SYNC_LIMIT = oldLimit; - } - }); - - test('ignore huge model from editor', function () { - - const oldLimit = TextModel._MODEL_SYNC_LIMIT; - try { - const largeModelString = 'abc'.repeat(1024); - TextModel._MODEL_SYNC_LIMIT = largeModelString.length / 2; - - const model = modelService.createModel(largeModelString, null); - const editor = myCreateTestCodeEditor(model); - - assert.strictEqual(deltas.length, 1); - deltas.length = 0; - assert.strictEqual(deltas.length, 0); - editor.dispose(); - model.dispose(); - - } finally { - TextModel._MODEL_SYNC_LIMIT = oldLimit; - } - }); - - test('ignore simple widget model', function () { - this.timeout(1000 * 60); // increase timeout for this one test - - const model = modelService.createModel('test', null, undefined, true); - disposables.add(model); - assert.ok(model.isForSimpleWidget); - - assert.strictEqual(deltas.length, 1); - const [delta] = deltas; - assert.strictEqual(delta.newActiveEditor, null); - assert.strictEqual(delta.addedDocuments, undefined); - assert.strictEqual(delta.removedDocuments, undefined); - assert.strictEqual(delta.addedEditors, undefined); - assert.strictEqual(delta.removedEditors, undefined); - }); - - test('ignore editor w/o model', () => { - const editor = myCreateTestCodeEditor(undefined); - assert.strictEqual(deltas.length, 1); - const [delta] = deltas; - assert.strictEqual(delta.newActiveEditor, null); - assert.strictEqual(delta.addedDocuments, undefined); - assert.strictEqual(delta.removedDocuments, undefined); - assert.strictEqual(delta.addedEditors, undefined); - assert.strictEqual(delta.removedEditors, undefined); - - editor.dispose(); - }); - - test('editor with model', () => { - deltas.length = 0; - - const model = modelService.createModel('farboo', null); - const editor = myCreateTestCodeEditor(model); - - assert.strictEqual(deltas.length, 2); - const [first, second] = deltas; - assert.strictEqual(first.addedDocuments!.length, 1); - assert.strictEqual(first.newActiveEditor, undefined); - assert.strictEqual(first.removedDocuments, undefined); - assert.strictEqual(first.addedEditors, undefined); - assert.strictEqual(first.removedEditors, undefined); - - assert.strictEqual(second.addedEditors!.length, 1); - assert.strictEqual(second.addedDocuments, undefined); - assert.strictEqual(second.removedDocuments, undefined); - assert.strictEqual(second.removedEditors, undefined); - assert.strictEqual(second.newActiveEditor, undefined); - - editor.dispose(); - model.dispose(); - }); - - test('editor with dispos-ed/-ing model', () => { - const model = modelService.createModel('farboo', null); - const editor = myCreateTestCodeEditor(model); - - // ignore things until now - deltas.length = 0; - - modelService.destroyModel(model.uri); - assert.strictEqual(deltas.length, 1); - const [first] = deltas; - - assert.strictEqual(first.newActiveEditor, undefined); - assert.strictEqual(first.removedEditors!.length, 1); - assert.strictEqual(first.removedDocuments!.length, 1); - assert.strictEqual(first.addedDocuments, undefined); - assert.strictEqual(first.addedEditors, undefined); - - editor.dispose(); - model.dispose(); - }); -}); diff --git a/src/vs/workbench/browser/parts/titlebar/media/titlebarpart.css b/src/vs/workbench/browser/parts/titlebar/media/titlebarpart.css deleted file mode 100644 index 0264e5460d4d3..0000000000000 --- a/src/vs/workbench/browser/parts/titlebar/media/titlebarpart.css +++ /dev/null @@ -1,476 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -/* Part Element */ -.monaco-workbench .part.titlebar { - display: flex; - flex-direction: row; -} - -.monaco-workbench.mac .part.titlebar { - flex-direction: row-reverse; -} - -/* Root Container */ -.monaco-workbench .part.titlebar > .titlebar-container { - box-sizing: border-box; - overflow: hidden; - flex-shrink: 1; - flex-grow: 1; - align-items: center; - justify-content: space-between; - user-select: none; - -webkit-user-select: none; - display: flex; - height: 100%; - width: 100%; -} - -/* Account for zooming */ -.monaco-workbench .part.titlebar > .titlebar-container.counter-zoom { - zoom: calc(1.0 / var(--zoom-factor)); -} - -/* Platform specific root element */ -.monaco-workbench.mac .part.titlebar > .titlebar-container { - line-height: 22px; -} - -.monaco-workbench.web .part.titlebar > .titlebar-container, -.monaco-workbench.windows .part.titlebar > .titlebar-container, -.monaco-workbench.linux .part.titlebar > .titlebar-container { - line-height: 22px; - justify-content: left; -} - -.monaco-workbench.web.safari .part.titlebar, -.monaco-workbench.web.safari .part.titlebar > .titlebar-container { - /* Must be scoped to safari due to #148851 */ - /* Is required in safari due to #149476 */ - overflow: visible; -} - -/* Draggable region */ -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-drag-region { - top: 0; - left: 0; - display: block; - position: absolute; - width: 100%; - height: 100%; - -webkit-app-region: drag; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-left, -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center, -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right { - display: flex; - height: 100%; - align-items: center; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-left { - order: 0; - width: 20%; - flex-grow: 2; - justify-content: flex-start; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center { - order: 1; - width: 60%; - max-width: fit-content; - min-width: 0px; - margin: 0 10px; - /* flex-shrink: 10; */ - justify-content: center; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right { - order: 2; - width: 20%; - min-width: min-content; - flex-grow: 2; - justify-content: flex-end; -} - - - -/* Window title text */ -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title { - flex: 0 1 auto; - font-size: 12px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - margin-left: auto; - margin-right: auto; -} - -.monaco-workbench.web .part.titlebar > .titlebar-container > .titlebar-center > .window-title, -.monaco-workbench.windows .part.titlebar > .titlebar-container > .titlebar-center > .window-title, -.monaco-workbench.linux .part.titlebar > .titlebar-container > .titlebar-center > .window-title { - cursor: default; -} - -.monaco-workbench.linux .part.titlebar > .titlebar-container > .titlebar-center > .window-title { - font-size: inherit; - /* see #55435 */ -} - -.monaco-workbench .part.titlebar > .titlebar-container .monaco-toolbar .actions-container { - gap: 4px; -} - -/* Window Title Menu */ -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center { - z-index: 2500; - -webkit-app-region: no-drag; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center.hide { - visibility: hidden; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center > .monaco-toolbar > .monaco-action-bar > .actions-container > .action-item > .action-label, -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center > .monaco-toolbar > .monaco-action-bar > .actions-container > .action-item.monaco-dropdown-with-primary .action-label { - color: var(--vscode-titleBar-activeForeground); -} - -.monaco-workbench .part.titlebar.inactive > .titlebar-container > .titlebar-center > .window-title > .command-center > .monaco-toolbar > .monaco-action-bar > .actions-container > .action-item > .action-label, -.monaco-workbench .part.titlebar.inactive > .titlebar-container > .titlebar-center > .window-title > .command-center > .monaco-toolbar > .monaco-action-bar > .actions-container > .action-item.monaco-dropdown-with-primary .action-label { - color: var(--vscode-titleBar-inactiveForeground); -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center > .monaco-toolbar > .monaco-action-bar > .actions-container > .action-item > .action-label { - color: inherit; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center .action-item.command-center-center { - display: flex; - align-items: stretch; - color: var(--vscode-commandCenter-foreground); - background-color: var(--vscode-commandCenter-background); - border: 1px solid var(--vscode-commandCenter-border); - overflow: hidden; - margin: 0 6px; - border-top-left-radius: 6px; - border-bottom-left-radius: 6px; - border-top-right-radius: 6px; - border-bottom-right-radius: 6px; - height: 22px; - width: 38vw; - max-width: 600px; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center .action-item.command-center-center .action-item.command-center-quick-pick { - display: flex; - justify-content: start; - overflow: hidden; - margin: auto; - max-width: 600px; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center .action-item.command-center-center .action-item.command-center-quick-pick .search-icon { - font-size: 14px; - opacity: .8; - margin: auto 3px; - color: var(--vscode-commandCenter-foreground); -} - -.monaco-workbench .part.titlebar.inactive > .titlebar-container > .titlebar-center > .window-title > .command-center .action-item.command-center-center .action-item.command-center-quick-pick .search-icon { - color: var(--vscode-titleBar-inactiveForeground); -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center .action-item.command-center-center .action-item.command-center-quick-pick .search-label { - overflow: hidden; - text-overflow: ellipsis; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center .action-item.command-center-center.multiple { - justify-content: flex-start; - padding: 0 12px; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center .action-item.command-center-center.multiple.active .action-label { - background-color: inherit; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center .action-item.command-center-center:only-child { - margin-left: 0; /* no margin if there is only the command center, without nav buttons */ -} - -.monaco-workbench .part.titlebar.inactive > .titlebar-container > .titlebar-center > .window-title > .command-center .action-item.command-center-center { - color: var(--vscode-titleBar-inactiveForeground); - border-color: var(--vscode-commandCenter-inactiveBorder) !important; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-center > .window-title > .command-center .action-item.command-center-center:HOVER { - color: var(--vscode-commandCenter-activeForeground); - background-color: var(--vscode-commandCenter-activeBackground); - border-color: var(--vscode-commandCenter-activeBorder); -} - -/* Menubar */ -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-left > .menubar { - /* move menubar above drag region as negative z-index on drag region cause greyscale AA */ - z-index: 2500; - min-width: 36px; - flex-wrap: nowrap; - order: 2; -} - -.monaco-workbench.web .part.titlebar > .titlebar-container > .titlebar-left > .menubar { - margin-left: 4px; -} - -.monaco-workbench .part.titlebar > .titlebar-container.counter-zoom .menubar .menubar-menu-button > .menubar-menu-items-holder.monaco-menu-container, -.monaco-workbench .part.titlebar > .titlebar-container.counter-zoom .monaco-toolbar .dropdown-action-container { - zoom: var(--zoom-factor); /* helps to position the menu properly when counter zooming */ -} - -/* Resizer */ -.monaco-workbench.windows .part.titlebar > .titlebar-container > .resizer, -.monaco-workbench.linux .part.titlebar > .titlebar-container > .resizer { - -webkit-app-region: no-drag; - position: absolute; - top: 0; - width: 100%; - height: 4px; -} - -.monaco-workbench.windows.fullscreen .part.titlebar > .titlebar-container > .resizer, -.monaco-workbench.linux.fullscreen .part.titlebar > .titlebar-container > .resizer { - display: none; -} - -/* App Icon */ -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-left > .window-appicon { - width: 35px; - height: 100%; - position: relative; - z-index: 2500; - flex-shrink: 0; - order: 1; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-left > .window-appicon:not(.codicon) { - background-image: url('../../../media/code-icon.svg'); - background-repeat: no-repeat; - background-position: center center; - background-size: 16px; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-left > .window-appicon.codicon { - line-height: 30px; -} - -.monaco-workbench.fullscreen .part.titlebar > .titlebar-container > .titlebar-left > .window-appicon { - display: none; -} - -.monaco-workbench .part.titlebar > .titlebar-container .window-appicon > .home-bar-icon-badge { - position: absolute; - right: 9px; - bottom: 6px; - width: 8px; - height: 8px; - z-index: 1; - /* on top of home indicator */ - background-image: url('../../../media/code-icon.svg'); - background-repeat: no-repeat; - background-position: center center; - background-size: 8px; - pointer-events: none; - border-top: 1px solid transparent; - border-left: 1px solid transparent; -} - -/* Window Controls Container */ -.monaco-workbench .part.titlebar .window-controls-container { - display: flex; - flex-grow: 0; - flex-shrink: 0; - text-align: center; - z-index: 3000; - -webkit-app-region: no-drag; - width: 0px; - height: 100%; -} - -.monaco-workbench.fullscreen .part.titlebar .window-controls-container { - display: none; - background-color: transparent; -} - -/* Window Controls Container Web: Apply WCO environment variables (https://developer.mozilla.org/en-US/docs/Web/CSS/env#titlebar-area-x) */ -.monaco-workbench.web .part.titlebar .titlebar-right .window-controls-container { - width: calc(100vw - env(titlebar-area-width, 100vw) - env(titlebar-area-x, 0px)); - height: env(titlebar-area-height, 35px); -} - -.monaco-workbench.web .part.titlebar .titlebar-left .window-controls-container { - width: env(titlebar-area-x, 0px); - height: env(titlebar-area-height, 35px); -} - -.monaco-workbench.web.mac .part.titlebar .titlebar-left .window-controls-container { - order: 0; -} - -.monaco-workbench.web.mac .part.titlebar .titlebar-right .window-controls-container { - order: 1; -} - -/* Window Controls Container Desktop: apply zoom friendly size */ -.monaco-workbench:not(.web):not(.mac) .part.titlebar .window-controls-container { - width: calc(138px / var(--zoom-factor, 1)); -} - -.monaco-workbench:not(.web):not(.mac) .part.titlebar .titlebar-container.counter-zoom .window-controls-container { - width: 138px; -} - -.monaco-workbench.linux:not(.web) .part.titlebar .window-controls-container.wco-enabled { - width: calc(100vw - env(titlebar-area-width, 100vw) - env(titlebar-area-x, 0px)); -} - -.monaco-workbench.linux:not(.web) .part.titlebar .titlebar-container.counter-zoom .window-controls-container.wco-enabled { - width: calc(100vw - env(titlebar-area-width, 100vw) - env(titlebar-area-x, 0px)); -} - -.monaco-workbench:not(.web):not(.mac) .part.titlebar .titlebar-container:not(.counter-zoom) .window-controls-container * { - zoom: calc(1 / var(--zoom-factor, 1)); -} - -.monaco-workbench:not(.web).mac .part.titlebar .window-controls-container { - width: 70px; -} - -/* Window Control Icons */ -.monaco-workbench .part.titlebar .window-controls-container > .window-icon { - display: flex; - justify-content: center; - align-items: center; - height: 100%; - width: 46px; - font-size: 16px; - color: var(--vscode-titleBar-activeForeground); -} - -.monaco-workbench .part.titlebar.inactive .window-controls-container > .window-icon { - color: var(--vscode-titleBar-inactiveForeground); -} - -.monaco-workbench .part.titlebar .window-controls-container > .window-icon::before { - height: 16px; - line-height: 16px; -} - -.monaco-workbench .part.titlebar .window-controls-container > .window-icon:hover { - background-color: rgba(255, 255, 255, 0.1); -} - -.monaco-workbench .part.titlebar.light .window-controls-container > .window-icon:hover { - background-color: rgba(0, 0, 0, 0.1); -} - -.monaco-workbench .part.titlebar .window-controls-container > .window-icon.window-close:hover { - background-color: rgba(232, 17, 35, 0.9); -} - -.monaco-workbench .part.titlebar .window-controls-container .window-icon.window-close:hover { - color: white; -} - -/* Action Tool Bar Controls */ -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container { - display: none; - padding-right: 4px; - flex-grow: 0; - flex-shrink: 0; - text-align: center; - position: relative; - z-index: 2500; - -webkit-app-region: no-drag; - height: 100%; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container { - margin-left: auto; -} - -.monaco-workbench.mac:not(.web) .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container { - right: 8px; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container:not(.has-no-actions) { - display: flex; - justify-content: center; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container .codicon { - color: inherit; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container .monaco-action-bar .action-item { - display: flex; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container .monaco-action-bar .badge { - margin-left: 8px; - display: flex; - align-items: center; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container .monaco-action-bar .action-item.icon .badge { - margin-left: 0px; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container .monaco-action-bar .badge .badge-content { - padding: 3px 5px; - border-radius: 11px; - font-size: 9px; - min-width: 11px; - height: 16px; - line-height: 11px; - font-weight: normal; - text-align: center; - display: inline-block; - box-sizing: border-box; - position: relative; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container .monaco-action-bar .action-item.icon .badge.compact { - position: absolute; - top: 0; - bottom: 0; - margin: auto; - left: 0; - overflow: hidden; - width: 100%; - height: 100%; - z-index: 2; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container .monaco-action-bar .action-item.icon .badge.compact .badge-content::before { - mask-size: 12px; - -webkit-mask-size: 12px; - top: 2px; -} - -.monaco-workbench .part.titlebar > .titlebar-container > .titlebar-right > .action-toolbar-container .monaco-action-bar .action-item.icon .badge.compact .badge-content { - position: absolute; - top: 10px; - right: 0px; - font-size: 9px; - font-weight: 600; - min-width: 12px; - height: 12px; - line-height: 12px; - padding: 0 2px; - border-radius: 16px; - text-align: center; -} diff --git a/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTaskContentPart.ts b/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTaskContentPart.ts deleted file mode 100644 index 8510cb1350790..0000000000000 --- a/src/vs/workbench/contrib/chat/browser/chatContentParts/chatTaskContentPart.ts +++ /dev/null @@ -1,54 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as dom from '../../../../../base/browser/dom.js'; -import { Event } from '../../../../../base/common/event.js'; -import { Disposable, IDisposable } from '../../../../../base/common/lifecycle.js'; -import { MarkdownRenderer } from '../../../../../editor/browser/widget/markdownRenderer/browser/markdownRenderer.js'; -import { IInstantiationService } from '../../../../../platform/instantiation/common/instantiation.js'; -import { IChatProgressRenderableResponseContent } from '../../common/chatModel.js'; -import { IChatTask } from '../../common/chatService.js'; -import { IChatContentPart, IChatContentPartRenderContext } from './chatContentParts.js'; -import { ChatProgressContentPart } from './chatProgressContentPart.js'; -import { ChatCollapsibleListContentPart, CollapsibleListPool } from './chatReferencesContentPart.js'; - -export class ChatTaskContentPart extends Disposable implements IChatContentPart { - public readonly domNode: HTMLElement; - public readonly onDidChangeHeight: Event; - - constructor( - private readonly task: IChatTask, - contentReferencesListPool: CollapsibleListPool, - renderer: MarkdownRenderer, - context: IChatContentPartRenderContext, - @IInstantiationService instantiationService: IInstantiationService, - ) { - super(); - - if (task.progress.length) { - const refsPart = this._register(instantiationService.createInstance(ChatCollapsibleListContentPart, task.progress, task.content.value, context, contentReferencesListPool)); - this.domNode = dom.$('.chat-progress-task'); - this.domNode.appendChild(refsPart.domNode); - this.onDidChangeHeight = refsPart.onDidChangeHeight; - } else { - // #217645 - const isSettled = task.isSettled?.() ?? true; - const showSpinner = !isSettled && !context.element.isComplete; - const progressPart = this._register(instantiationService.createInstance(ChatProgressContentPart, task, renderer, context, showSpinner, true)); - this.domNode = progressPart.domNode; - this.onDidChangeHeight = Event.None; - } - } - - hasSameContent(other: IChatProgressRenderableResponseContent): boolean { - return other.kind === 'progressTask' - && other.progress.length === this.task.progress.length - && other.isSettled() === this.task.isSettled(); - } - - addDisposable(disposable: IDisposable): void { - this._register(disposable); - } -} diff --git a/src/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions.ts b/src/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions.ts deleted file mode 100644 index 20d034033706c..0000000000000 --- a/src/vs/workbench/contrib/codeEditor/browser/simpleEditorOptions.ts +++ /dev/null @@ -1,99 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { IEditorOptions } from '../../../../editor/common/config/editorOptions.js'; -import { ICodeEditorWidgetOptions } from '../../../../editor/browser/widget/codeEditor/codeEditorWidget.js'; -import { ContextMenuController } from '../../../../editor/contrib/contextmenu/browser/contextmenu.js'; -import { SnippetController2 } from '../../../../editor/contrib/snippet/browser/snippetController2.js'; -import { SuggestController } from '../../../../editor/contrib/suggest/browser/suggestController.js'; -import { MenuPreventer } from './menuPreventer.js'; -import { SelectionClipboardContributionID } from './selectionClipboard.js'; -import { TabCompletionController } from '../../snippets/browser/tabCompletion.js'; -import { EditorExtensionsRegistry } from '../../../../editor/browser/editorExtensions.js'; -import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js'; -import { registerThemingParticipant } from '../../../../platform/theme/common/themeService.js'; -import { IDisposable } from '../../../../base/common/lifecycle.js'; -import { selectionBackground, inputBackground, inputForeground, editorSelectionBackground } from '../../../../platform/theme/common/colorRegistry.js'; - -export function getSimpleEditorOptions(configurationService: IConfigurationService): IEditorOptions { - return { - wordWrap: 'on', - overviewRulerLanes: 0, - glyphMargin: false, - lineNumbers: 'off', - folding: false, - selectOnLineNumbers: false, - hideCursorInOverviewRuler: true, - selectionHighlight: false, - scrollbar: { - horizontal: 'hidden', - alwaysConsumeMouseWheel: false - }, - lineDecorationsWidth: 0, - overviewRulerBorder: false, - scrollBeyondLastLine: false, - renderLineHighlight: 'none', - fixedOverflowWidgets: true, - acceptSuggestionOnEnter: 'smart', - dragAndDrop: false, - revealHorizontalRightPadding: 5, - minimap: { - enabled: false - }, - guides: { - indentation: false - }, - accessibilitySupport: configurationService.getValue<'auto' | 'off' | 'on'>('editor.accessibilitySupport'), - cursorBlinking: configurationService.getValue<'blink' | 'smooth' | 'phase' | 'expand' | 'solid'>('editor.cursorBlinking'), - experimentalEditContextEnabled: configurationService.getValue('editor.experimentalEditContextEnabled'), - defaultColorDecorators: 'never', - }; -} - -export function getSimpleCodeEditorWidgetOptions(): ICodeEditorWidgetOptions { - return { - isSimpleWidget: true, - contributions: EditorExtensionsRegistry.getSomeEditorContributions([ - MenuPreventer.ID, - SelectionClipboardContributionID, - ContextMenuController.ID, - SuggestController.ID, - SnippetController2.ID, - TabCompletionController.ID, - ]) - }; -} - -/** - * Should be called to set the styling on editors that are appearing as just input boxes - * @param editorContainerSelector An element selector that will match the container of the editor - */ -export function setupSimpleEditorSelectionStyling(editorContainerSelector: string): IDisposable { - // Override styles in selections.ts - return registerThemingParticipant((theme, collector) => { - const selectionBackgroundColor = theme.getColor(selectionBackground); - - if (selectionBackgroundColor) { - // Override inactive selection bg - const inputBackgroundColor = theme.getColor(inputBackground); - if (inputBackgroundColor) { - collector.addRule(`${editorContainerSelector} .monaco-editor-background { background-color: ${inputBackgroundColor}; } `); - collector.addRule(`${editorContainerSelector} .monaco-editor .selected-text { background-color: ${inputBackgroundColor.transparent(0.4)}; }`); - } - - // Override selected fg - const inputForegroundColor = theme.getColor(inputForeground); - if (inputForegroundColor) { - collector.addRule(`${editorContainerSelector} .monaco-editor .view-line span.inline-selected-text { color: ${inputForegroundColor}; }`); - } - - collector.addRule(`${editorContainerSelector} .monaco-editor .focused .selected-text { background-color: ${selectionBackgroundColor}; }`); - } else { - // Use editor selection color if theme has not set a selection background color - collector.addRule(`${editorContainerSelector} .monaco-editor .focused .selected-text { background-color: ${theme.getColor(editorSelectionBackground)}; }`); - } - }); - -} diff --git a/src/vs/workbench/contrib/inlineChat/test/browser/inlineChatController.test.ts b/src/vs/workbench/contrib/inlineChat/test/browser/inlineChatController.test.ts deleted file mode 100644 index 7d07547770ee6..0000000000000 --- a/src/vs/workbench/contrib/inlineChat/test/browser/inlineChatController.test.ts +++ /dev/null @@ -1,1009 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import assert from 'assert'; -import { equals } from '../../../../../base/common/arrays.js'; -import { DeferredPromise, raceCancellation, timeout } from '../../../../../base/common/async.js'; -import { Emitter, Event } from '../../../../../base/common/event.js'; -import { DisposableStore } from '../../../../../base/common/lifecycle.js'; -import { mock } from '../../../../../base/test/common/mock.js'; -import { runWithFakedTimers } from '../../../../../base/test/common/timeTravelScheduler.js'; -import { IActiveCodeEditor } from '../../../../../editor/browser/editorBrowser.js'; -import { IDiffProviderFactoryService } from '../../../../../editor/browser/widget/diffEditor/diffProviderFactoryService.js'; -import { EditOperation } from '../../../../../editor/common/core/editOperation.js'; -import { Range } from '../../../../../editor/common/core/range.js'; -import { EndOfLineSequence, ITextModel } from '../../../../../editor/common/model.js'; -import { IEditorWorkerService } from '../../../../../editor/common/services/editorWorker.js'; -import { IModelService } from '../../../../../editor/common/services/model.js'; -import { TestDiffProviderFactoryService } from '../../../../../editor/test/browser/diff/testDiffProviderFactoryService.js'; -import { instantiateTestCodeEditor } from '../../../../../editor/test/browser/testCodeEditor.js'; -import { IConfigurationService } from '../../../../../platform/configuration/common/configuration.js'; -import { TestConfigurationService } from '../../../../../platform/configuration/test/common/testConfigurationService.js'; -import { IContextKeyService } from '../../../../../platform/contextkey/common/contextkey.js'; -import { SyncDescriptor } from '../../../../../platform/instantiation/common/descriptors.js'; -import { ServiceCollection } from '../../../../../platform/instantiation/common/serviceCollection.js'; -import { TestInstantiationService } from '../../../../../platform/instantiation/test/common/instantiationServiceMock.js'; -import { MockContextKeyService } from '../../../../../platform/keybinding/test/common/mockKeybindingService.js'; -import { IEditorProgressService, IProgressRunner } from '../../../../../platform/progress/common/progress.js'; -import { IView, IViewDescriptorService } from '../../../../common/views.js'; -import { AccessibilityVerbositySettingId } from '../../../accessibility/browser/accessibilityConfiguration.js'; -import { IAccessibleViewService } from '../../../../../platform/accessibility/browser/accessibleView.js'; -import { IChatAccessibilityService, IChatWidget, IChatWidgetService } from '../../../chat/browser/chat.js'; -import { ChatAgentLocation, ChatAgentService, IChatAgentData, IChatAgentNameService, IChatAgentService } from '../../../chat/common/chatAgents.js'; -import { IChatResponseViewModel } from '../../../chat/common/chatViewModel.js'; -import { InlineChatController, State } from '../../browser/inlineChatController.js'; -import { Session } from '../../browser/inlineChatSession.js'; -import { CTX_INLINE_CHAT_RESPONSE_TYPE, CTX_INLINE_CHAT_USER_DID_EDIT, EditMode, InlineChatConfigKeys, InlineChatResponseType } from '../../common/inlineChat.js'; -import { TestViewsService, workbenchInstantiationService } from '../../../../test/browser/workbenchTestServices.js'; -import { IExtensionService, nullExtensionDescription } from '../../../../services/extensions/common/extensions.js'; -import { IChatProgress, IChatService } from '../../../chat/common/chatService.js'; -import { ChatService } from '../../../chat/common/chatServiceImpl.js'; -import { IChatVariablesService } from '../../../chat/common/chatVariables.js'; -import { ILogService, NullLogService } from '../../../../../platform/log/common/log.js'; -import { ITelemetryService } from '../../../../../platform/telemetry/common/telemetry.js'; -import { NullTelemetryService } from '../../../../../platform/telemetry/common/telemetryUtils.js'; -import { TestContextService, TestExtensionService } from '../../../../test/common/workbenchTestServices.js'; -import { IWorkspaceContextService } from '../../../../../platform/workspace/common/workspace.js'; -import { IViewsService } from '../../../../services/views/common/viewsService.js'; -import { ChatSlashCommandService, IChatSlashCommandService } from '../../../chat/common/chatSlashCommands.js'; -import { ChatWidgetService } from '../../../chat/browser/chatWidget.js'; -import { ChatWidgetHistoryService, IChatWidgetHistoryService } from '../../../chat/common/chatWidgetHistoryService.js'; -import { IHoverService } from '../../../../../platform/hover/browser/hover.js'; -import { NullHoverService } from '../../../../../platform/hover/test/browser/nullHoverService.js'; -import { ChatVariablesService } from '../../../chat/browser/chatVariables.js'; -import { ICommandService } from '../../../../../platform/commands/common/commands.js'; -import { TestCommandService } from '../../../../../editor/test/browser/editorTestServices.js'; -import { INotebookEditorService } from '../../../notebook/browser/services/notebookEditorService.js'; -import { RerunAction } from '../../browser/inlineChatActions.js'; -import { CancellationToken } from '../../../../../base/common/cancellation.js'; -import { assertType } from '../../../../../base/common/types.js'; -import { IWorkbenchAssignmentService } from '../../../../services/assignment/common/assignmentService.js'; -import { NullWorkbenchAssignmentService } from '../../../../services/assignment/test/common/nullAssignmentService.js'; -import { IInlineChatSavingService } from '../../browser/inlineChatSavingService.js'; -import { IInlineChatSessionService } from '../../browser/inlineChatSessionService.js'; -import { InlineChatSessionServiceImpl } from '../../browser/inlineChatSessionServiceImpl.js'; -import { TestWorkerService } from './testWorkerService.js'; -import { ILanguageModelsService, LanguageModelsService } from '../../../chat/common/languageModels.js'; -import { IChatEditingService, IChatEditingSession } from '../../../chat/common/chatEditingService.js'; -import { ITextModelService } from '../../../../../editor/common/services/resolverService.js'; -import { TextModelResolverService } from '../../../../services/textmodelResolver/common/textModelResolverService.js'; -import { ChatInputBoxContentProvider } from '../../../chat/browser/chatEdinputInputContentProvider.js'; -import { IObservable, observableValue } from '../../../../../base/common/observable.js'; - -suite('InlineChatController', function () { - - const agentData = { - extensionId: nullExtensionDescription.identifier, - publisherDisplayName: '', - extensionDisplayName: '', - extensionPublisherId: '', - // id: 'testEditorAgent', - name: 'testEditorAgent', - isDefault: true, - locations: [ChatAgentLocation.Editor], - metadata: {}, - slashCommands: [], - disambiguation: [], - }; - - class TestController extends InlineChatController { - - static INIT_SEQUENCE: readonly State[] = [State.CREATE_SESSION, State.INIT_UI, State.WAIT_FOR_INPUT]; - static INIT_SEQUENCE_AUTO_SEND: readonly State[] = [...this.INIT_SEQUENCE, State.SHOW_REQUEST, State.WAIT_FOR_INPUT]; - - - readonly onDidChangeState: Event = this._onDidEnterState.event; - - readonly states: readonly State[] = []; - - awaitStates(states: readonly State[]): Promise { - const actual: State[] = []; - - return new Promise((resolve, reject) => { - const d = this.onDidChangeState(state => { - actual.push(state); - if (equals(states, actual)) { - d.dispose(); - resolve(undefined); - } - }); - - setTimeout(() => { - d.dispose(); - resolve(`[${states.join(',')}] <> [${actual.join(',')}]`); - }, 1000); - }); - } - } - - const store = new DisposableStore(); - let configurationService: TestConfigurationService; - let editor: IActiveCodeEditor; - let model: ITextModel; - let ctrl: TestController; - let contextKeyService: MockContextKeyService; - let chatService: IChatService; - let chatAgentService: IChatAgentService; - let inlineChatSessionService: IInlineChatSessionService; - let instaService: TestInstantiationService; - - let chatWidget: IChatWidget; - - setup(function () { - - const serviceCollection = new ServiceCollection( - [IConfigurationService, new TestConfigurationService()], - [IChatVariablesService, new SyncDescriptor(ChatVariablesService)], - [ILogService, new NullLogService()], - [ITelemetryService, NullTelemetryService], - [IHoverService, NullHoverService], - [IExtensionService, new TestExtensionService()], - [IContextKeyService, new MockContextKeyService()], - [IViewsService, new class extends TestViewsService { - override async openView(id: string, focus?: boolean | undefined): Promise { - return { widget: chatWidget ?? null } as any; - } - }()], - [IWorkspaceContextService, new TestContextService()], - [IChatWidgetHistoryService, new SyncDescriptor(ChatWidgetHistoryService)], - [IChatWidgetService, new SyncDescriptor(ChatWidgetService)], - [IChatSlashCommandService, new SyncDescriptor(ChatSlashCommandService)], - [IChatService, new SyncDescriptor(ChatService)], - [IChatAgentNameService, new class extends mock() { - override getAgentNameRestriction(chatAgentData: IChatAgentData): boolean { - return false; - } - }], - [IEditorWorkerService, new SyncDescriptor(TestWorkerService)], - [IContextKeyService, contextKeyService], - [IChatAgentService, new SyncDescriptor(ChatAgentService)], - [IDiffProviderFactoryService, new SyncDescriptor(TestDiffProviderFactoryService)], - [IInlineChatSessionService, new SyncDescriptor(InlineChatSessionServiceImpl)], - [ICommandService, new SyncDescriptor(TestCommandService)], - [IChatEditingService, new class extends mock() { - override currentEditingSessionObs: IObservable = observableValue(this, null); - }], - [IInlineChatSavingService, new class extends mock() { - override markChanged(session: Session): void { - // noop - } - }], - [IEditorProgressService, new class extends mock() { - override show(total: unknown, delay?: unknown): IProgressRunner { - return { - total() { }, - worked(value) { }, - done() { }, - }; - } - }], - [IChatAccessibilityService, new class extends mock() { - override acceptResponse(response: IChatResponseViewModel | undefined, requestId: number): void { } - override acceptRequest(): number { return -1; } - }], - [IAccessibleViewService, new class extends mock() { - override getOpenAriaHint(verbositySettingKey: AccessibilityVerbositySettingId): string | null { - return null; - } - }], - [IConfigurationService, configurationService], - [IViewDescriptorService, new class extends mock() { - override onDidChangeLocation = Event.None; - }], - [INotebookEditorService, new class extends mock() { - override listNotebookEditors() { return []; } - }], - [IWorkbenchAssignmentService, new NullWorkbenchAssignmentService()], - [ILanguageModelsService, new SyncDescriptor(LanguageModelsService)], - [ITextModelService, new SyncDescriptor(TextModelResolverService)], - ); - - instaService = store.add((store.add(workbenchInstantiationService(undefined, store))).createChild(serviceCollection)); - - configurationService = instaService.get(IConfigurationService) as TestConfigurationService; - configurationService.setUserConfiguration('chat', { editor: { fontSize: 14, fontFamily: 'default' } }); - configurationService.setUserConfiguration('inlineChat', { mode: EditMode.Live }); - configurationService.setUserConfiguration('editor', {}); - - contextKeyService = instaService.get(IContextKeyService) as MockContextKeyService; - chatService = instaService.get(IChatService); - chatAgentService = instaService.get(IChatAgentService); - - inlineChatSessionService = store.add(instaService.get(IInlineChatSessionService)); - - store.add(instaService.get(ILanguageModelsService) as LanguageModelsService); - - store.add(instaService.createInstance(ChatInputBoxContentProvider)); - - model = store.add(instaService.get(IModelService).createModel('Hello\nWorld\nHello Again\nHello World\n', null)); - model.setEOL(EndOfLineSequence.LF); - editor = store.add(instantiateTestCodeEditor(instaService, model)); - - store.add(chatAgentService.registerDynamicAgent({ id: 'testEditorAgent', ...agentData, }, { - async invoke(request, progress, history, token) { - progress({ - kind: 'textEdit', - uri: model.uri, - edits: [{ - range: new Range(1, 1, 1, 1), - text: request.message - }] - }); - return {}; - }, - })); - - }); - - teardown(function () { - store.clear(); - ctrl?.dispose(); - }); - - // TODO@jrieken re-enable, looks like List/ChatWidget is leaking - // ensureNoDisposablesAreLeakedInTestSuite(); - - test('creation, not showing anything', function () { - ctrl = instaService.createInstance(TestController, editor); - assert.ok(ctrl); - assert.strictEqual(ctrl.getWidgetPosition(), undefined); - }); - - test('run (show/hide)', async function () { - ctrl = instaService.createInstance(TestController, editor); - const actualStates = ctrl.awaitStates(TestController.INIT_SEQUENCE_AUTO_SEND); - const run = ctrl.run({ message: 'Hello', autoSend: true }); - assert.strictEqual(await actualStates, undefined); - assert.ok(ctrl.getWidgetPosition() !== undefined); - await ctrl.cancelSession(); - - await run; - - assert.ok(ctrl.getWidgetPosition() === undefined); - }); - - test('wholeRange does not expand to whole lines, editor selection default', async function () { - - editor.setSelection(new Range(1, 1, 1, 3)); - ctrl = instaService.createInstance(TestController, editor); - - ctrl.run({}); - await Event.toPromise(Event.filter(ctrl.onDidChangeState, e => e === State.WAIT_FOR_INPUT)); - - const session = inlineChatSessionService.getSession(editor, editor.getModel()!.uri); - assert.ok(session); - assert.deepStrictEqual(session.wholeRange.value, new Range(1, 1, 1, 3)); - - await ctrl.cancelSession(); - }); - - test('typing outside of wholeRange finishes session', async function () { - - configurationService.setUserConfiguration(InlineChatConfigKeys.FinishOnType, true); - - ctrl = instaService.createInstance(TestController, editor); - const actualStates = ctrl.awaitStates(TestController.INIT_SEQUENCE_AUTO_SEND); - const r = ctrl.run({ message: 'Hello', autoSend: true }); - - assert.strictEqual(await actualStates, undefined); - - const session = inlineChatSessionService.getSession(editor, editor.getModel()!.uri); - assert.ok(session); - assert.deepStrictEqual(session.wholeRange.value, new Range(1, 1, 1, 11 /* line length */)); - - editor.setSelection(new Range(2, 1, 2, 1)); - editor.trigger('test', 'type', { text: 'a' }); - - assert.strictEqual(await ctrl.awaitStates([State.ACCEPT]), undefined); - await r; - }); - - test('\'whole range\' isn\'t updated for edits outside whole range #4346', async function () { - - editor.setSelection(new Range(3, 1, 3, 3)); - - store.add(chatAgentService.registerDynamicAgent({ - id: 'testEditorAgent2', - ...agentData - }, { - async invoke(request, progress, history, token) { - progress({ - kind: 'textEdit', - uri: editor.getModel().uri, - edits: [{ - range: new Range(1, 1, 1, 1), // EDIT happens outside of whole range - text: `${request.message}\n${request.message}` - }] - }); - - return {}; - }, - })); - - ctrl = instaService.createInstance(TestController, editor); - const p = ctrl.awaitStates(TestController.INIT_SEQUENCE); - const r = ctrl.run({ message: 'GENGEN', autoSend: false }); - - assert.strictEqual(await p, undefined); - - - const session = inlineChatSessionService.getSession(editor, editor.getModel()!.uri); - assert.ok(session); - assert.deepStrictEqual(session.wholeRange.value, new Range(3, 1, 3, 3)); // initial - - ctrl.chatWidget.setInput('GENGEN'); - ctrl.acceptInput(); - assert.strictEqual(await ctrl.awaitStates([State.SHOW_REQUEST, State.WAIT_FOR_INPUT]), undefined); - - assert.deepStrictEqual(session.wholeRange.value, new Range(1, 1, 4, 3)); - - await ctrl.cancelSession(); - await r; - }); - - test('Stuck inline chat widget #211', async function () { - - store.add(chatAgentService.registerDynamicAgent({ - id: 'testEditorAgent2', - ...agentData - }, { - async invoke(request, progress, history, token) { - return new Promise(() => { }); - }, - })); - - ctrl = instaService.createInstance(TestController, editor); - const p = ctrl.awaitStates([...TestController.INIT_SEQUENCE, State.SHOW_REQUEST]); - const r = ctrl.run({ message: 'Hello', autoSend: true }); - - assert.strictEqual(await p, undefined); - - ctrl.acceptSession(); - - await r; - assert.strictEqual(ctrl.getWidgetPosition(), undefined); - }); - - test('[Bug] Inline Chat\'s streaming pushed broken iterations to the undo stack #2403', async function () { - - store.add(chatAgentService.registerDynamicAgent({ - id: 'testEditorAgent2', - ...agentData - }, { - async invoke(request, progress, history, token) { - - progress({ kind: 'textEdit', uri: model.uri, edits: [{ range: new Range(1, 1, 1, 1), text: 'hEllo1\n' }] }); - progress({ kind: 'textEdit', uri: model.uri, edits: [{ range: new Range(2, 1, 2, 1), text: 'hEllo2\n' }] }); - progress({ kind: 'textEdit', uri: model.uri, edits: [{ range: new Range(1, 1, 1000, 1), text: 'Hello1\nHello2\n' }] }); - - return {}; - }, - })); - - const valueThen = editor.getModel().getValue(); - - ctrl = instaService.createInstance(TestController, editor); - const p = ctrl.awaitStates([...TestController.INIT_SEQUENCE, State.SHOW_REQUEST, State.WAIT_FOR_INPUT]); - const r = ctrl.run({ message: 'Hello', autoSend: true }); - assert.strictEqual(await p, undefined); - ctrl.acceptSession(); - await r; - - assert.strictEqual(editor.getModel().getValue(), 'Hello1\nHello2\n'); - - editor.getModel().undo(); - assert.strictEqual(editor.getModel().getValue(), valueThen); - }); - - - - test.skip('UI is streaming edits minutes after the response is finished #3345', async function () { - - configurationService.setUserConfiguration(InlineChatConfigKeys.Mode, EditMode.Live); - - return runWithFakedTimers({ maxTaskCount: Number.MAX_SAFE_INTEGER }, async () => { - - store.add(chatAgentService.registerDynamicAgent({ - id: 'testEditorAgent2', - ...agentData - }, { - async invoke(request, progress, history, token) { - - const text = '${CSI}#a\n${CSI}#b\n${CSI}#c\n'; - - await timeout(10); - progress({ kind: 'textEdit', uri: model.uri, edits: [{ range: new Range(1, 1, 1, 1), text: text }] }); - - await timeout(10); - progress({ kind: 'textEdit', uri: model.uri, edits: [{ range: new Range(1, 1, 1, 1), text: text.repeat(1000) + 'DONE' }] }); - - throw new Error('Too long'); - }, - })); - - - // let modelChangeCounter = 0; - // store.add(editor.getModel().onDidChangeContent(() => { modelChangeCounter++; })); - - ctrl = instaService.createInstance(TestController, editor); - const p = ctrl.awaitStates([...TestController.INIT_SEQUENCE, State.SHOW_REQUEST, State.WAIT_FOR_INPUT]); - const r = ctrl.run({ message: 'Hello', autoSend: true }); - assert.strictEqual(await p, undefined); - - // assert.ok(modelChangeCounter > 0, modelChangeCounter.toString()); // some changes have been made - // const modelChangeCounterNow = modelChangeCounter; - - assert.ok(!editor.getModel().getValue().includes('DONE')); - await timeout(10); - - // assert.strictEqual(modelChangeCounterNow, modelChangeCounter); - assert.ok(!editor.getModel().getValue().includes('DONE')); - - await ctrl.cancelSession(); - await r; - }); - }); - - test('escape doesn\'t remove code added from inline editor chat #3523 1/2', async function () { - - - // NO manual edits -> cancel - ctrl = instaService.createInstance(TestController, editor); - const p = ctrl.awaitStates([...TestController.INIT_SEQUENCE, State.SHOW_REQUEST, State.WAIT_FOR_INPUT]); - const r = ctrl.run({ message: 'GENERATED', autoSend: true }); - assert.strictEqual(await p, undefined); - - assert.ok(model.getValue().includes('GENERATED')); - assert.strictEqual(contextKeyService.getContextKeyValue(CTX_INLINE_CHAT_USER_DID_EDIT.key), undefined); - ctrl.cancelSession(); - await r; - assert.ok(!model.getValue().includes('GENERATED')); - - }); - - test('escape doesn\'t remove code added from inline editor chat #3523, 2/2', async function () { - - // manual edits -> finish - ctrl = instaService.createInstance(TestController, editor); - const p = ctrl.awaitStates([...TestController.INIT_SEQUENCE, State.SHOW_REQUEST, State.WAIT_FOR_INPUT]); - const r = ctrl.run({ message: 'GENERATED', autoSend: true }); - assert.strictEqual(await p, undefined); - - assert.ok(model.getValue().includes('GENERATED')); - - editor.executeEdits('test', [EditOperation.insert(model.getFullModelRange().getEndPosition(), 'MANUAL')]); - assert.strictEqual(contextKeyService.getContextKeyValue(CTX_INLINE_CHAT_USER_DID_EDIT.key), true); - - ctrl.finishExistingSession(); - await r; - assert.ok(model.getValue().includes('GENERATED')); - assert.ok(model.getValue().includes('MANUAL')); - - }); - - test('re-run should discard pending edits', async function () { - - let count = 1; - - store.add(chatAgentService.registerDynamicAgent({ - id: 'testEditorAgent2', - ...agentData - }, { - async invoke(request, progress, history, token) { - progress({ kind: 'textEdit', uri: model.uri, edits: [{ range: new Range(1, 1, 1, 1), text: request.message + (count++) }] }); - return {}; - }, - })); - - ctrl = instaService.createInstance(TestController, editor); - const rerun = new RerunAction(); - - model.setValue(''); - - const p = ctrl.awaitStates([...TestController.INIT_SEQUENCE, State.SHOW_REQUEST, State.WAIT_FOR_INPUT]); - const r = ctrl.run({ message: 'PROMPT_', autoSend: true }); - assert.strictEqual(await p, undefined); - - - assert.strictEqual(model.getValue(), 'PROMPT_1'); - - const p2 = ctrl.awaitStates([State.SHOW_REQUEST, State.WAIT_FOR_INPUT]); - await instaService.invokeFunction(rerun.runInlineChatCommand, ctrl, editor); - - assert.strictEqual(await p2, undefined); - - assert.strictEqual(model.getValue(), 'PROMPT_2'); - ctrl.finishExistingSession(); - await r; - }); - - test('Retry undoes all changes, not just those from the request#5736', async function () { - - const text = [ - 'eins-', - 'zwei-', - 'drei-' - ]; - - store.add(chatAgentService.registerDynamicAgent({ - id: 'testEditorAgent2', - ...agentData - }, { - async invoke(request, progress, history, token) { - progress({ kind: 'textEdit', uri: model.uri, edits: [{ range: new Range(1, 1, 1, 1), text: text.shift() ?? '' }] }); - return {}; - }, - })); - - ctrl = instaService.createInstance(TestController, editor); - const rerun = new RerunAction(); - - model.setValue(''); - - // REQUEST 1 - const p = ctrl.awaitStates([...TestController.INIT_SEQUENCE, State.SHOW_REQUEST, State.WAIT_FOR_INPUT]); - const r = ctrl.run({ message: '1', autoSend: true }); - assert.strictEqual(await p, undefined); - - assert.strictEqual(model.getValue(), 'eins-'); - - // REQUEST 2 - const p2 = ctrl.awaitStates([State.SHOW_REQUEST, State.WAIT_FOR_INPUT]); - ctrl.chatWidget.setInput('1'); - await ctrl.acceptInput(); - assert.strictEqual(await p2, undefined); - - assert.strictEqual(model.getValue(), 'zwei-eins-'); - - // REQUEST 2 - RERUN - const p3 = ctrl.awaitStates([State.SHOW_REQUEST, State.WAIT_FOR_INPUT]); - await instaService.invokeFunction(rerun.runInlineChatCommand, ctrl, editor); - assert.strictEqual(await p3, undefined); - - assert.strictEqual(model.getValue(), 'drei-eins-'); - - ctrl.finishExistingSession(); - await r; - - }); - - test('moving inline chat to another model undoes changes', async function () { - const text = [ - 'eins\n', - 'zwei\n' - ]; - - store.add(chatAgentService.registerDynamicAgent({ - id: 'testEditorAgent2', - ...agentData - }, { - async invoke(request, progress, history, token) { - progress({ kind: 'textEdit', uri: model.uri, edits: [{ range: new Range(1, 1, 1, 1), text: text.shift() ?? '' }] }); - return {}; - }, - })); - ctrl = instaService.createInstance(TestController, editor); - - // REQUEST 1 - const p = ctrl.awaitStates([...TestController.INIT_SEQUENCE, State.SHOW_REQUEST, State.WAIT_FOR_INPUT]); - ctrl.run({ message: '1', autoSend: true }); - assert.strictEqual(await p, undefined); - - assert.strictEqual(model.getValue(), 'eins\nHello\nWorld\nHello Again\nHello World\n'); - - const targetModel = chatService.startSession(ChatAgentLocation.Editor, CancellationToken.None)!; - store.add(targetModel); - chatWidget = new class extends mock() { - override get viewModel() { - return { model: targetModel } as any; - } - override focusLastMessage() { } - }; - - const r = ctrl.joinCurrentRun(); - await ctrl.viewInChat(); - - assert.strictEqual(model.getValue(), 'Hello\nWorld\nHello Again\nHello World\n'); - await r; - }); - - test('moving inline chat to another model undoes changes (2 requests)', async function () { - const text = [ - 'eins\n', - 'zwei\n' - ]; - - store.add(chatAgentService.registerDynamicAgent({ - id: 'testEditorAgent2', - ...agentData - }, { - async invoke(request, progress, history, token) { - progress({ kind: 'textEdit', uri: model.uri, edits: [{ range: new Range(1, 1, 1, 1), text: text.shift() ?? '' }] }); - return {}; - }, - })); - ctrl = instaService.createInstance(TestController, editor); - - // REQUEST 1 - const p = ctrl.awaitStates([...TestController.INIT_SEQUENCE, State.SHOW_REQUEST, State.WAIT_FOR_INPUT]); - ctrl.run({ message: '1', autoSend: true }); - assert.strictEqual(await p, undefined); - - assert.strictEqual(model.getValue(), 'eins\nHello\nWorld\nHello Again\nHello World\n'); - - // REQUEST 2 - const p2 = ctrl.awaitStates([State.SHOW_REQUEST, State.WAIT_FOR_INPUT]); - ctrl.chatWidget.setInput('1'); - await ctrl.acceptInput(); - assert.strictEqual(await p2, undefined); - - assert.strictEqual(model.getValue(), 'zwei\neins\nHello\nWorld\nHello Again\nHello World\n'); - - const targetModel = chatService.startSession(ChatAgentLocation.Editor, CancellationToken.None)!; - store.add(targetModel); - chatWidget = new class extends mock() { - override get viewModel() { - return { model: targetModel } as any; - } - override focusLastMessage() { } - }; - - const r = ctrl.joinCurrentRun(); - - await ctrl.viewInChat(); - - assert.strictEqual(model.getValue(), 'Hello\nWorld\nHello Again\nHello World\n'); - - await r; - }); - - test('Clicking "re-run without /doc" while a request is in progress closes the widget #5997', async function () { - - model.setValue(''); - - let count = 0; - const commandDetection: (boolean | undefined)[] = []; - - const onDidInvoke = new Emitter(); - - store.add(chatAgentService.registerDynamicAgent({ - id: 'testEditorAgent2', - ...agentData - }, { - async invoke(request, progress, history, token) { - queueMicrotask(() => onDidInvoke.fire()); - commandDetection.push(request.enableCommandDetection); - progress({ kind: 'textEdit', uri: model.uri, edits: [{ range: new Range(1, 1, 1, 1), text: request.message + (count++) }] }); - - if (count === 1) { - // FIRST call waits for cancellation - await raceCancellation(new Promise(() => { }), token); - } else { - await timeout(10); - } - - return {}; - }, - })); - ctrl = instaService.createInstance(TestController, editor); - - // REQUEST 1 - // const p = ctrl.awaitStates([...TestController.INIT_SEQUENCE, State.SHOW_REQUEST]); - const p = Event.toPromise(onDidInvoke.event); - ctrl.run({ message: 'Hello-', autoSend: true }); - - await p; - - // assert.strictEqual(await p, undefined); - - // resend pending request without command detection - const request = ctrl.chatWidget.viewModel?.model.getRequests().at(-1); - assertType(request); - const p2 = Event.toPromise(onDidInvoke.event); - const p3 = ctrl.awaitStates([State.SHOW_REQUEST, State.WAIT_FOR_INPUT]); - chatService.resendRequest(request, { noCommandDetection: true, attempt: request.attempt + 1, location: ChatAgentLocation.Editor }); - - await p2; - assert.strictEqual(await p3, undefined); - - assert.deepStrictEqual(commandDetection, [true, false]); - assert.strictEqual(model.getValue(), 'Hello-1'); - }); - - test('Re-run without after request is done', async function () { - - model.setValue(''); - - let count = 0; - const commandDetection: (boolean | undefined)[] = []; - - store.add(chatAgentService.registerDynamicAgent({ - id: 'testEditorAgent2', - ...agentData - }, { - async invoke(request, progress, history, token) { - commandDetection.push(request.enableCommandDetection); - progress({ kind: 'textEdit', uri: model.uri, edits: [{ range: new Range(1, 1, 1, 1), text: request.message + (count++) }] }); - return {}; - }, - })); - ctrl = instaService.createInstance(TestController, editor); - - // REQUEST 1 - const p = ctrl.awaitStates([...TestController.INIT_SEQUENCE, State.SHOW_REQUEST, State.WAIT_FOR_INPUT]); - ctrl.run({ message: 'Hello-', autoSend: true }); - assert.strictEqual(await p, undefined); - - // resend pending request without command detection - const request = ctrl.chatWidget.viewModel?.model.getRequests().at(-1); - assertType(request); - const p2 = ctrl.awaitStates([State.SHOW_REQUEST, State.WAIT_FOR_INPUT]); - chatService.resendRequest(request, { noCommandDetection: true, attempt: request.attempt + 1, location: ChatAgentLocation.Editor }); - - assert.strictEqual(await p2, undefined); - - assert.deepStrictEqual(commandDetection, [true, false]); - assert.strictEqual(model.getValue(), 'Hello-1'); - }); - - - test('Inline: Pressing Rerun request while the response streams breaks the response #5442', async function () { - - model.setValue('two\none\n'); - - const attempts: (number | undefined)[] = []; - - const deferred = new DeferredPromise(); - - store.add(chatAgentService.registerDynamicAgent({ - id: 'testEditorAgent2', - ...agentData - }, { - async invoke(request, progress, history, token) { - - attempts.push(request.attempt); - - progress({ kind: 'textEdit', uri: model.uri, edits: [{ range: new Range(1, 1, 1, 1), text: `TRY:${request.attempt}\n` }] }); - await raceCancellation(deferred.p, token); - deferred.complete(); - await timeout(10); - return {}; - }, - })); - - ctrl = instaService.createInstance(TestController, editor); - - // REQUEST 1 - const p = ctrl.awaitStates([...TestController.INIT_SEQUENCE, State.SHOW_REQUEST]); - ctrl.run({ message: 'Hello-', autoSend: true }); - assert.strictEqual(await p, undefined); - await timeout(10); - assert.deepStrictEqual(attempts, [0]); - - // RERUN (cancel, undo, redo) - const p2 = ctrl.awaitStates([State.SHOW_REQUEST, State.WAIT_FOR_INPUT]); - const rerun = new RerunAction(); - await instaService.invokeFunction(rerun.runInlineChatCommand, ctrl, editor); - assert.strictEqual(await p2, undefined); - - assert.deepStrictEqual(attempts, [0, 1]); - - assert.strictEqual(model.getValue(), 'TRY:1\ntwo\none\n'); - - }); - - test('Stopping/cancelling a request should NOT undo its changes', async function () { - - model.setValue('World'); - - const deferred = new DeferredPromise(); - let progress: ((part: IChatProgress) => void) | undefined; - - store.add(chatAgentService.registerDynamicAgent({ - id: 'testEditorAgent2', - ...agentData - }, { - async invoke(request, _progress, history, token) { - - progress = _progress; - await deferred.p; - return {}; - }, - })); - - ctrl = instaService.createInstance(TestController, editor); - - // REQUEST 1 - const p = ctrl.awaitStates([...TestController.INIT_SEQUENCE, State.SHOW_REQUEST]); - ctrl.run({ message: 'Hello', autoSend: true }); - await timeout(10); - assert.strictEqual(await p, undefined); - - assertType(progress); - - const modelChange = new Promise(resolve => model.onDidChangeContent(() => resolve())); - - progress({ kind: 'textEdit', uri: model.uri, edits: [{ range: new Range(1, 1, 1, 1), text: 'Hello-Hello' }] }); - - await modelChange; - assert.strictEqual(model.getValue(), 'HelloWorld'); // first word has been streamed - - const p2 = ctrl.awaitStates([State.WAIT_FOR_INPUT]); - chatService.cancelCurrentRequestForSession(ctrl.chatWidget.viewModel!.model.sessionId); - assert.strictEqual(await p2, undefined); - - assert.strictEqual(model.getValue(), 'HelloWorld'); // CANCEL just stops the request and progressive typing but doesn't undo - - }); - - test('Apply Edits from existing session w/ edits', async function () { - - model.setValue(''); - - const newSession = await inlineChatSessionService.createSession(editor, { editMode: EditMode.Live }, CancellationToken.None); - assertType(newSession); - - await chatService.sendRequest(newSession.chatModel.sessionId, 'Existing', { location: ChatAgentLocation.Editor }); - - - assert.strictEqual(newSession.chatModel.requestInProgress, true); - - const response = newSession.chatModel.lastRequest?.response; - assertType(response); - - await new Promise(resolve => { - if (response.isComplete) { - resolve(undefined); - } - const d = response.onDidChange(() => { - if (response.isComplete) { - d.dispose(); - resolve(undefined); - } - }); - }); - - ctrl = instaService.createInstance(TestController, editor); - const p = ctrl.awaitStates([...TestController.INIT_SEQUENCE]); - ctrl.run({ existingSession: newSession }); - - assert.strictEqual(await p, undefined); - - assert.strictEqual(model.getValue(), 'Existing'); - - }); - - test('Undo on error (2 rounds)', async function () { - - return runWithFakedTimers({}, async () => { - - - store.add(chatAgentService.registerDynamicAgent({ id: 'testEditorAgent', ...agentData, }, { - async invoke(request, progress, history, token) { - - progress({ - kind: 'textEdit', - uri: model.uri, - edits: [{ - range: new Range(1, 1, 1, 1), - text: request.message - }] - }); - - if (request.message === 'two') { - await timeout(100); // give edit a chance - return { - errorDetails: { message: 'FAILED' } - }; - } - return {}; - }, - })); - - model.setValue(''); - - // ROUND 1 - - ctrl = instaService.createInstance(TestController, editor); - const p = ctrl.awaitStates([...TestController.INIT_SEQUENCE, State.SHOW_REQUEST, State.WAIT_FOR_INPUT]); - ctrl.run({ autoSend: true, message: 'one' }); - assert.strictEqual(await p, undefined); - assert.strictEqual(model.getValue(), 'one'); - - - // ROUND 2 - - const p2 = ctrl.awaitStates([State.SHOW_REQUEST, State.WAIT_FOR_INPUT]); - const values = new Set(); - store.add(model.onDidChangeContent(() => values.add(model.getValue()))); - ctrl.chatWidget.acceptInput('two'); // WILL Trigger a failure - assert.strictEqual(await p2, undefined); - assert.strictEqual(model.getValue(), 'one'); // undone - assert.ok(values.has('twoone')); // we had but the change got undone - }); - }); - - test('Inline chat "discard" button does not always appear if response is stopped #228030', async function () { - - model.setValue('World'); - - const deferred = new DeferredPromise(); - - store.add(chatAgentService.registerDynamicAgent({ - id: 'testEditorAgent2', - ...agentData - }, { - async invoke(request, progress, history, token) { - - progress({ kind: 'textEdit', uri: model.uri, edits: [{ range: new Range(1, 1, 1, 1), text: 'Hello-Hello' }] }); - await deferred.p; - return {}; - }, - })); - - ctrl = instaService.createInstance(TestController, editor); - - // REQUEST 1 - const p = ctrl.awaitStates([...TestController.INIT_SEQUENCE, State.SHOW_REQUEST]); - ctrl.run({ message: 'Hello', autoSend: true }); - - - assert.strictEqual(await p, undefined); - - const p2 = ctrl.awaitStates([State.WAIT_FOR_INPUT]); - chatService.cancelCurrentRequestForSession(ctrl.chatWidget.viewModel!.model.sessionId); - assert.strictEqual(await p2, undefined); - - - const value = contextKeyService.getContextKeyValue(CTX_INLINE_CHAT_RESPONSE_TYPE.key); - assert.notStrictEqual(value, InlineChatResponseType.None); - }); - - test('Restore doesn\'t edit on errored result', async function () { - return runWithFakedTimers({ useFakeTimers: true }, async () => { - - const model2 = store.add(instaService.get(IModelService).createModel('ABC', null)); - - model.setValue('World'); - - store.add(chatAgentService.registerDynamicAgent({ - id: 'testEditorAgent2', - ...agentData - }, { - async invoke(request, progress, history, token) { - - progress({ kind: 'textEdit', uri: model.uri, edits: [{ range: new Range(1, 1, 1, 1), text: 'Hello1' }] }); - await timeout(100); - progress({ kind: 'textEdit', uri: model.uri, edits: [{ range: new Range(1, 1, 1, 1), text: 'Hello2' }] }); - await timeout(100); - progress({ kind: 'textEdit', uri: model.uri, edits: [{ range: new Range(1, 1, 1, 1), text: 'Hello3' }] }); - await timeout(100); - - return { - errorDetails: { message: 'FAILED' } - }; - }, - })); - - ctrl = instaService.createInstance(TestController, editor); - - // REQUEST 1 - const p = ctrl.awaitStates([...TestController.INIT_SEQUENCE, State.SHOW_REQUEST, State.WAIT_FOR_INPUT]); - ctrl.run({ message: 'Hello', autoSend: true }); - - assert.strictEqual(await p, undefined); - - const p2 = ctrl.awaitStates([State.PAUSE]); - editor.setModel(model2); - assert.strictEqual(await p2, undefined); - - const p3 = ctrl.awaitStates([...TestController.INIT_SEQUENCE]); - editor.setModel(model); - assert.strictEqual(await p3, undefined); - - assert.strictEqual(model.getValue(), 'World'); - }); - }); -}); diff --git a/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.ts b/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.ts deleted file mode 100644 index c8706e4aeb5a8..0000000000000 --- a/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.ts +++ /dev/null @@ -1,1273 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { localize } from '../../../../../../nls.js'; -import { Emitter, Event } from '../../../../../../base/common/event.js'; -import { KeyCode, KeyMod } from '../../../../../../base/common/keyCodes.js'; -import { Disposable, DisposableStore } from '../../../../../../base/common/lifecycle.js'; -import { ResourceMap } from '../../../../../../base/common/map.js'; -import { URI } from '../../../../../../base/common/uri.js'; -import { EditorConfiguration } from '../../../../../../editor/browser/config/editorConfiguration.js'; -import { CoreEditingCommands } from '../../../../../../editor/browser/coreCommands.js'; -import { ICodeEditor, PastePayload } from '../../../../../../editor/browser/editorBrowser.js'; -import { RedoCommand, UndoCommand } from '../../../../../../editor/browser/editorExtensions.js'; -import { CodeEditorWidget } from '../../../../../../editor/browser/widget/codeEditor/codeEditorWidget.js'; -import { IEditorConfiguration } from '../../../../../../editor/common/config/editorConfiguration.js'; -import { cursorBlinkingStyleFromString, cursorStyleFromString, TextEditorCursorBlinkingStyle, TextEditorCursorStyle } from '../../../../../../editor/common/config/editorOptions.js'; -import { Position } from '../../../../../../editor/common/core/position.js'; -import { Range } from '../../../../../../editor/common/core/range.js'; -import { Selection, SelectionDirection } from '../../../../../../editor/common/core/selection.js'; -import { IWordAtPosition, USUAL_WORD_SEPARATORS } from '../../../../../../editor/common/core/wordHelper.js'; -import { CommandExecutor, CursorsController } from '../../../../../../editor/common/cursor/cursor.js'; -import { DeleteOperations } from '../../../../../../editor/common/cursor/cursorDeleteOperations.js'; -import { CursorConfiguration, ICursorSimpleModel } from '../../../../../../editor/common/cursorCommon.js'; -import { CursorChangeReason } from '../../../../../../editor/common/cursorEvents.js'; -import { CompositionTypePayload, Handler, ReplacePreviousCharPayload } from '../../../../../../editor/common/editorCommon.js'; -import { ILanguageConfigurationService } from '../../../../../../editor/common/languages/languageConfigurationRegistry.js'; -import { IModelDeltaDecoration, ITextModel, PositionAffinity } from '../../../../../../editor/common/model.js'; -import { indentOfLine } from '../../../../../../editor/common/model/textModel.js'; -import { ITextModelService } from '../../../../../../editor/common/services/resolverService.js'; -import { ICoordinatesConverter } from '../../../../../../editor/common/viewModel.js'; -import { ViewModelEventsCollector } from '../../../../../../editor/common/viewModelEventDispatcher.js'; -import { WordHighlighterContribution } from '../../../../../../editor/contrib/wordHighlighter/browser/wordHighlighter.js'; -import { IAccessibilityService } from '../../../../../../platform/accessibility/common/accessibility.js'; -import { MenuId, registerAction2 } from '../../../../../../platform/actions/common/actions.js'; -import { IConfigurationService } from '../../../../../../platform/configuration/common/configuration.js'; -import { ContextKeyExpr, IContextKeyService, RawContextKey } from '../../../../../../platform/contextkey/common/contextkey.js'; -import { ServicesAccessor } from '../../../../../../platform/instantiation/common/instantiation.js'; -import { KeybindingWeight } from '../../../../../../platform/keybinding/common/keybindingsRegistry.js'; -import { IPastFutureElements, IUndoRedoElement, IUndoRedoService, UndoRedoElementType } from '../../../../../../platform/undoRedo/common/undoRedo.js'; -import { registerWorkbenchContribution2, WorkbenchPhase } from '../../../../../common/contributions.js'; -import { IEditorService } from '../../../../../services/editor/common/editorService.js'; -import { KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED, NOTEBOOK_CELL_EDITOR_FOCUSED, NOTEBOOK_IS_ACTIVE_EDITOR } from '../../../common/notebookContextKeys.js'; -import { INotebookActionContext, NotebookAction } from '../../controller/coreActions.js'; -import { CellFindMatchWithIndex, getNotebookEditorFromEditorPane, ICellViewModel, INotebookEditor, INotebookEditorContribution } from '../../notebookBrowser.js'; -import { registerNotebookContribution } from '../../notebookEditorExtensions.js'; -import { CellEditorOptions } from '../../view/cellParts/cellEditorOptions.js'; -import { NotebookFindContrib } from '../find/notebookFindWidget.js'; -import { NotebookTextModel } from '../../../common/model/notebookTextModel.js'; -import { NotebookCellTextModel } from '../../../common/model/notebookCellTextModel.js'; - -const NOTEBOOK_ADD_FIND_MATCH_TO_SELECTION_ID = 'notebook.addFindMatchToSelection'; -const NOTEBOOK_SELECT_ALL_FIND_MATCHES_ID = 'notebook.selectAllFindMatches'; - -export enum NotebookMultiCursorState { - Idle, - Selecting, - Editing, -} - -interface NotebookCursorConfig { - cursorStyle: TextEditorCursorStyle; - cursorBlinking: TextEditorCursorBlinkingStyle; - cursorSmoothCaretAnimation: 'off' | 'explicit' | 'on'; -} - -interface SelectionTranslation { - deltaStartCol: number; - deltaStartLine: number; - deltaEndCol: number; - deltaEndLine: number; -} - -interface TrackedCell { - cellViewModel: ICellViewModel; - initialSelection: Selection; - matchSelections: Selection[]; - editorConfig: IEditorConfiguration; - cursorConfig: NotebookCursorConfig; - decorationIds: string[]; - undoRedoHistory: IPastFutureElements; -} - -export const NOTEBOOK_MULTI_CURSOR_CONTEXT = { - IsNotebookMultiCursor: new RawContextKey('isNotebookMultiSelect', false), - NotebookMultiSelectCursorState: new RawContextKey('notebookMultiSelectCursorState', NotebookMultiCursorState.Idle), -}; - -export class NotebookMultiCursorController extends Disposable implements INotebookEditorContribution { - - static readonly id: string = 'notebook.multiCursorController'; - - private word: string = ''; - private startPosition: { - cellIndex: number; - position: Position; - } | undefined; - private trackedCells: TrackedCell[] = []; - - private readonly _onDidChangeAnchorCell = this._register(new Emitter()); - readonly onDidChangeAnchorCell: Event = this._onDidChangeAnchorCell.event; - private anchorCell: [ICellViewModel, ICodeEditor] | undefined; - - private readonly anchorDisposables = this._register(new DisposableStore()); - private readonly cursorsDisposables = this._register(new DisposableStore()); - private cursorsControllers: ResourceMap = new ResourceMap(); - - private state: NotebookMultiCursorState = NotebookMultiCursorState.Idle; - public getState(): NotebookMultiCursorState { - return this.state; - } - - private _nbIsMultiSelectSession = NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor.bindTo(this.contextKeyService); - private _nbMultiSelectState = NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.bindTo(this.contextKeyService); - - constructor( - private readonly notebookEditor: INotebookEditor, - @IContextKeyService private readonly contextKeyService: IContextKeyService, - @ITextModelService private readonly textModelService: ITextModelService, - @ILanguageConfigurationService private readonly languageConfigurationService: ILanguageConfigurationService, - @IAccessibilityService private readonly accessibilityService: IAccessibilityService, - @IConfigurationService private readonly configurationService: IConfigurationService, - @IUndoRedoService private readonly undoRedoService: IUndoRedoService, - ) { - super(); - - this.anchorCell = this.notebookEditor.activeCellAndCodeEditor; - - // anchor cell will catch and relay all type, cut, paste events to the cursors controllers - // need to create new controllers when the anchor cell changes, then update their listeners - // ** cursor controllers need to happen first, because anchor listeners relay to them - this._register(this.onDidChangeAnchorCell(async () => { - await this.syncCursorsControllers(); - this.syncAnchorListeners(); - })); - } - - private syncAnchorListeners() { - this.anchorDisposables.clear(); - - if (!this.anchorCell) { - throw new Error('Anchor cell is undefined'); - } - - // typing - this.anchorDisposables.add(this.anchorCell[1].onWillType((input) => { - const collector = new ViewModelEventsCollector(); - this.trackedCells.forEach(cell => { - const controller = this.cursorsControllers.get(cell.cellViewModel.uri); - if (!controller) { - // should not happen - return; - } - if (cell.cellViewModel.handle !== this.anchorCell?.[0].handle) { // don't relay to active cell, already has a controller for typing - controller.type(collector, input, 'keyboard'); - } - }); - })); - - this.anchorDisposables.add(this.anchorCell[1].onDidType(() => { - this.state = NotebookMultiCursorState.Editing; // typing will continue to work as normal across ranges, just preps for another cmd+d - this._nbMultiSelectState.set(NotebookMultiCursorState.Editing); - - const anchorController = this.cursorsControllers.get(this.anchorCell![0].uri); - if (!anchorController) { - return; - } - const activeSelections = this.notebookEditor.activeCodeEditor?.getSelections(); - if (!activeSelections) { - return; - } - - // need to keep anchor cursor controller in sync manually (for delete usage), since we don't relay type event to it - anchorController.setSelections(new ViewModelEventsCollector(), 'keyboard', activeSelections, CursorChangeReason.Explicit); - - this.trackedCells.forEach(cell => { - const controller = this.cursorsControllers.get(cell.cellViewModel.uri); - if (!controller) { - return; - } - - // this is used upon exiting the multicursor session to set the selections back to the correct cursor state - cell.initialSelection = controller.getSelection(); - // clear tracked selection data as it is invalid once typing begins - cell.matchSelections = []; - }); - - this.updateLazyDecorations(); - })); - - // arrow key navigation - this.anchorDisposables.add(this.anchorCell[1].onDidChangeCursorSelection((e) => { - if (e.source === 'mouse') { - this.resetToIdleState(); - return; - } - - // ignore this event if it was caused by a typing event or a delete (NotSet and RecoverFromMarkers respectively) - if (!e.oldSelections || e.reason === CursorChangeReason.NotSet || e.reason === CursorChangeReason.RecoverFromMarkers) { - return; - } - - const translation: SelectionTranslation = { - deltaStartCol: e.selection.startColumn - e.oldSelections[0].startColumn, - deltaStartLine: e.selection.startLineNumber - e.oldSelections[0].startLineNumber, - deltaEndCol: e.selection.endColumn - e.oldSelections[0].endColumn, - deltaEndLine: e.selection.endLineNumber - e.oldSelections[0].endLineNumber, - }; - const translationDir = e.selection.getDirection(); - - this.trackedCells.forEach(cell => { - const controller = this.cursorsControllers.get(cell.cellViewModel.uri); - if (!controller) { - return; - } - - const newSelections = controller.getSelections().map(selection => { - const newStartCol = selection.startColumn + translation.deltaStartCol; - const newStartLine = selection.startLineNumber + translation.deltaStartLine; - const newEndCol = selection.endColumn + translation.deltaEndCol; - const newEndLine = selection.endLineNumber + translation.deltaEndLine; - return Selection.createWithDirection(newStartLine, newStartCol, newEndLine, newEndCol, translationDir); - }); - - controller.setSelections(new ViewModelEventsCollector(), e.source, newSelections, CursorChangeReason.Explicit); - }); - - this.updateLazyDecorations(); - })); - - // core actions - this.anchorDisposables.add(this.anchorCell[1].onWillTriggerEditorOperationEvent((e) => { - this.handleEditorOperationEvent(e); - })); - - // exit mode - this.anchorDisposables.add(this.anchorCell[1].onDidBlurEditorWidget(() => { - if (this.state === NotebookMultiCursorState.Selecting || this.state === NotebookMultiCursorState.Editing) { - this.resetToIdleState(); - } - })); - } - - private async syncCursorsControllers() { - this.cursorsDisposables.clear(); // TODO: dial this back for perf and just update the relevant controllers - await Promise.all(this.trackedCells.map(async cell => { - const controller = await this.createCursorController(cell); - if (!controller) { - return; - } - this.cursorsControllers.set(cell.cellViewModel.uri, controller); - - const selections = cell.matchSelections; - controller.setSelections(new ViewModelEventsCollector(), undefined, selections, CursorChangeReason.Explicit); - })); - - this.updateLazyDecorations(); - } - - private async createCursorController(cell: TrackedCell): Promise { - const textModelRef = await this.textModelService.createModelReference(cell.cellViewModel.uri); - const textModel = textModelRef.object.textEditorModel; - if (!textModel) { - return undefined; - } - - const cursorSimpleModel = this.constructCursorSimpleModel(cell.cellViewModel); - const converter = this.constructCoordinatesConverter(); - const editorConfig = cell.editorConfig; - - const controller = this.cursorsDisposables.add(new CursorsController( - textModel, - cursorSimpleModel, - converter, - new CursorConfiguration(textModel.getLanguageId(), textModel.getOptions(), editorConfig, this.languageConfigurationService) - )); - - controller.setSelections(new ViewModelEventsCollector(), undefined, cell.matchSelections, CursorChangeReason.Explicit); - return controller; - } - - private constructCoordinatesConverter(): ICoordinatesConverter { - return { - convertViewPositionToModelPosition(viewPosition: Position): Position { - return viewPosition; - }, - convertViewRangeToModelRange(viewRange: Range): Range { - return viewRange; - }, - validateViewPosition(viewPosition: Position, expectedModelPosition: Position): Position { - return viewPosition; - }, - validateViewRange(viewRange: Range, expectedModelRange: Range): Range { - return viewRange; - }, - convertModelPositionToViewPosition(modelPosition: Position, affinity?: PositionAffinity, allowZeroLineNumber?: boolean, belowHiddenRanges?: boolean): Position { - return modelPosition; - }, - convertModelRangeToViewRange(modelRange: Range, affinity?: PositionAffinity): Range { - return modelRange; - }, - modelPositionIsVisible(modelPosition: Position): boolean { - return true; - }, - getModelLineViewLineCount(modelLineNumber: number): number { - return 1; - }, - getViewLineNumberOfModelPosition(modelLineNumber: number, modelColumn: number): number { - return modelLineNumber; - } - }; - } - - private constructCursorSimpleModel(cell: ICellViewModel): ICursorSimpleModel { - return { - getLineCount(): number { - return cell.textBuffer.getLineCount(); - }, - getLineContent(lineNumber: number): string { - return cell.textBuffer.getLineContent(lineNumber); - }, - getLineMinColumn(lineNumber: number): number { - return cell.textBuffer.getLineMinColumn(lineNumber); - }, - getLineMaxColumn(lineNumber: number): number { - return cell.textBuffer.getLineMaxColumn(lineNumber); - }, - getLineFirstNonWhitespaceColumn(lineNumber: number): number { - return cell.textBuffer.getLineFirstNonWhitespaceColumn(lineNumber); - }, - getLineLastNonWhitespaceColumn(lineNumber: number): number { - return cell.textBuffer.getLineLastNonWhitespaceColumn(lineNumber); - }, - normalizePosition(position: Position, affinity: PositionAffinity): Position { - return position; - }, - getLineIndentColumn(lineNumber: number): number { - return indentOfLine(cell.textBuffer.getLineContent(lineNumber)) + 1; - } - }; - } - - private async handleEditorOperationEvent(e: any) { - this.trackedCells.forEach(cell => { - if (cell.cellViewModel.handle === this.anchorCell?.[0].handle) { - return; - } - - const eventsCollector = new ViewModelEventsCollector(); - const controller = this.cursorsControllers.get(cell.cellViewModel.uri); - if (!controller) { - return; - } - this.executeEditorOperation(controller, eventsCollector, e); - }); - } - - private executeEditorOperation(controller: CursorsController, eventsCollector: ViewModelEventsCollector, e: any) { - switch (e.handlerId) { - case Handler.CompositionStart: - controller.startComposition(eventsCollector); - break; - case Handler.CompositionEnd: - controller.endComposition(eventsCollector, e.source); - break; - case Handler.ReplacePreviousChar: { - const args = >e.payload; - controller.compositionType(eventsCollector, args.text || '', args.replaceCharCnt || 0, 0, 0, e.source); - break; - } - case Handler.CompositionType: { - const args = >e.payload; - controller.compositionType(eventsCollector, args.text || '', args.replacePrevCharCnt || 0, args.replaceNextCharCnt || 0, args.positionDelta || 0, e.source); - break; - } - case Handler.Paste: { - const args = >e.payload; - controller.paste(eventsCollector, args.text || '', args.pasteOnNewLine || false, args.multicursorText || null, e.source); - break; - } - case Handler.Cut: - controller.cut(eventsCollector, e.source); - break; - } - } - - private updateViewModelSelections() { - for (const cell of this.trackedCells) { - const controller = this.cursorsControllers.get(cell.cellViewModel.uri); - if (!controller) { - // should not happen - return; - } - - cell.cellViewModel.setSelections(controller.getSelections()); - } - } - - private updateFinalUndoRedo() { - const anchorCellModel = this.anchorCell?.[1].getModel(); - if (!anchorCellModel) { - // should not happen - return; - } - - const newElementsMap: ResourceMap = new ResourceMap(); - const resources: URI[] = []; - - this.trackedCells.forEach(trackedMatch => { - const undoRedoState = trackedMatch.undoRedoHistory; - if (!undoRedoState) { - return; - } - - resources.push(trackedMatch.cellViewModel.uri); - - const currentPastElements = this.undoRedoService.getElements(trackedMatch.cellViewModel.uri).past.slice(); - const oldPastElements = trackedMatch.undoRedoHistory.past.slice(); - const newElements = currentPastElements.slice(oldPastElements.length); - if (newElements.length === 0) { - return; - } - - newElementsMap.set(trackedMatch.cellViewModel.uri, newElements); - - this.undoRedoService.removeElements(trackedMatch.cellViewModel.uri); - oldPastElements.forEach(element => { - this.undoRedoService.pushElement(element); - }); - }); - - this.undoRedoService.pushElement({ - type: UndoRedoElementType.Workspace, - resources: resources, - label: 'Multi Cursor Edit', - code: 'multiCursorEdit', - confirmBeforeUndo: false, - undo: async () => { - newElementsMap.forEach(async value => { - value.reverse().forEach(async element => { - await element.undo(); - }); - }); - }, - redo: async () => { - newElementsMap.forEach(async value => { - value.forEach(async element => { - await element.redo(); - }); - }); - } - }); - } - - public resetToIdleState() { - this.state = NotebookMultiCursorState.Idle; - this._nbMultiSelectState.set(NotebookMultiCursorState.Idle); - this._nbIsMultiSelectSession.set(false); - this.updateFinalUndoRedo(); - - this.trackedCells.forEach(cell => { - this.clearDecorations(cell); - cell.cellViewModel.setSelections([cell.initialSelection]); // correct cursor placement upon exiting cmd-d session - }); - - this.anchorDisposables.clear(); - this.anchorCell = undefined; - this.cursorsDisposables.clear(); - this.cursorsControllers.clear(); - this.trackedCells = []; - this.startPosition = undefined; - this.word = ''; - } - - public async findAndTrackNextSelection(focusedCell: ICellViewModel): Promise { - if (this.state === NotebookMultiCursorState.Idle) { // move cursor to end of the symbol + track it, transition to selecting state - const textModel = focusedCell.textModel; - if (!textModel) { - return; - } - - const inputSelection = focusedCell.getSelections()[0]; - const word = this.getWord(inputSelection, textModel); - if (!word) { - return; - } - this.word = word.word; - - const index = this.notebookEditor.getCellIndex(focusedCell); - if (index === undefined) { - return; - } - - this.startPosition = { - cellIndex: index, - position: new Position(inputSelection.startLineNumber, word.startColumn), - }; - - const newSelection = new Selection( - inputSelection.startLineNumber, - word.startColumn, - inputSelection.startLineNumber, - word.endColumn - ); - focusedCell.setSelections([newSelection]); - - this.anchorCell = this.notebookEditor.activeCellAndCodeEditor; - if (!this.anchorCell || this.anchorCell[0].handle !== focusedCell.handle) { - throw new Error('Active cell is not the same as the cell passed as context'); - } - if (!(this.anchorCell[1] instanceof CodeEditorWidget)) { - throw new Error('Active cell is not an instance of CodeEditorWidget'); - } - - await this.updateTrackedCell(focusedCell, [newSelection]); - - this._nbIsMultiSelectSession.set(true); - this.state = NotebookMultiCursorState.Selecting; - this._nbMultiSelectState.set(NotebookMultiCursorState.Selecting); - - this._onDidChangeAnchorCell.fire(); - - } else if (this.state === NotebookMultiCursorState.Selecting) { // use the word we stored from idle state transition to find next match, track it - const notebookTextModel = this.notebookEditor.textModel; - if (!notebookTextModel) { - return; // should not happen - } - - const index = this.notebookEditor.getCellIndex(focusedCell); - if (index === undefined) { - return; // should not happen - } - - if (!this.startPosition) { - return; // should not happen - } - - const findResult = notebookTextModel.findNextMatch( - this.word, - { cellIndex: index, position: focusedCell.getSelections()[focusedCell.getSelections().length - 1].getEndPosition() }, - false, - true, - USUAL_WORD_SEPARATORS, - this.startPosition, - ); - if (!findResult) { - return; - } - - const findResultCellViewModel = this.notebookEditor.getCellByHandle(findResult.cell.handle); - if (!findResultCellViewModel) { - return; - } - - if (findResult.cell.handle === focusedCell.handle) { // match is in the same cell, find tracked entry, update and set selections in viewmodel and cursorController - const selections = [...focusedCell.getSelections(), Selection.fromRange(findResult.match.range, SelectionDirection.LTR)]; - const trackedCell = await this.updateTrackedCell(focusedCell, selections); - findResultCellViewModel.setSelections(trackedCell.matchSelections); - - - } else if (findResult.cell.handle !== focusedCell.handle) { // result is in a different cell, move focus there and apply selection, then update anchor - await this.notebookEditor.revealRangeInViewAsync(findResultCellViewModel, findResult.match.range); - await this.notebookEditor.focusNotebookCell(findResultCellViewModel, 'editor'); - - const trackedCell = await this.updateTrackedCell(findResultCellViewModel, [Selection.fromRange(findResult.match.range, SelectionDirection.LTR)]); - findResultCellViewModel.setSelections(trackedCell.matchSelections); - - this.anchorCell = this.notebookEditor.activeCellAndCodeEditor; - if (!this.anchorCell || !(this.anchorCell[1] instanceof CodeEditorWidget)) { - throw new Error('Active cell is not an instance of CodeEditorWidget'); - } - - this._onDidChangeAnchorCell.fire(); - - // we set the decorations manually for the cell we have just departed, since it blurs - // we can find the match with the handle that the find and track request originated - this.initializeMultiSelectDecorations(this.trackedCells.find(trackedCell => trackedCell.cellViewModel.handle === focusedCell.handle)); - } - } - } - - public async selectAllMatches(focusedCell: ICellViewModel, matches?: CellFindMatchWithIndex[]): Promise { - const notebookTextModel = this.notebookEditor.textModel; - if (!notebookTextModel) { - return; // should not happen - } - - if (matches) { - await this.handleFindWidgetSelectAllMatches(matches); - } else { - await this.handleCellEditorSelectAllMatches(notebookTextModel, focusedCell); - } - - await this.syncCursorsControllers(); - this.syncAnchorListeners(); - this.updateLazyDecorations(); - } - - private async handleFindWidgetSelectAllMatches(matches: CellFindMatchWithIndex[]) { - // TODO: support selecting state maybe. UX could get confusing since selecting state could be hit via ctrl+d which would have different filters (case sensetive + whole word) - if (this.state !== NotebookMultiCursorState.Idle) { - return; - } - - if (!matches.length) { - return; - } - - await this.notebookEditor.focusNotebookCell(matches[0].cell, 'editor'); - this.anchorCell = this.notebookEditor.activeCellAndCodeEditor; - - this.trackedCells = []; - for (const match of matches) { - this.updateTrackedCell(match.cell, match.contentMatches.map(match => Selection.fromRange(match.range, SelectionDirection.LTR))); - - if (this.anchorCell && match.cell.handle === this.anchorCell[0].handle) { - // only explicitly set the focused cell's selections, the rest are handled by cursor controllers + decorations - match.cell.setSelections(match.contentMatches.map(match => Selection.fromRange(match.range, SelectionDirection.LTR))); - } - } - - this._nbIsMultiSelectSession.set(true); - this.state = NotebookMultiCursorState.Selecting; - this._nbMultiSelectState.set(NotebookMultiCursorState.Selecting); - } - - private async handleCellEditorSelectAllMatches(notebookTextModel: NotebookTextModel, focusedCell: ICellViewModel) { - // can be triggered mid multiselect session, or from idle state - if (this.state === NotebookMultiCursorState.Idle) { - // get word from current selection + rest of notebook objects - const textModel = focusedCell.textModel; - if (!textModel) { - return; - } - const inputSelection = focusedCell.getSelections()[0]; - const word = this.getWord(inputSelection, textModel); - if (!word) { - return; - } - this.word = word.word; - const index = this.notebookEditor.getCellIndex(focusedCell); - if (index === undefined) { - return; - } - this.startPosition = { - cellIndex: index, - position: new Position(inputSelection.startLineNumber, word.startColumn), - }; - - this.anchorCell = this.notebookEditor.activeCellAndCodeEditor; - if (!this.anchorCell || this.anchorCell[0].handle !== focusedCell.handle) { - throw new Error('Active cell is not the same as the cell passed as context'); - } - if (!(this.anchorCell[1] instanceof CodeEditorWidget)) { - throw new Error('Active cell is not an instance of CodeEditorWidget'); - } - - // get all matches in the notebook - const findResults = notebookTextModel.findMatches(this.word, false, true, USUAL_WORD_SEPARATORS); - - // create the tracked matches for every result, needed for cursor controllers - this.trackedCells = []; - for (const res of findResults) { - await this.updateTrackedCell(res.cell, res.matches.map(match => Selection.fromRange(match.range, SelectionDirection.LTR))); - - if (res.cell.handle === focusedCell.handle) { - const cellViewModel = this.notebookEditor.getCellByHandle(res.cell.handle); - if (cellViewModel) { - cellViewModel.setSelections(res.matches.map(match => Selection.fromRange(match.range, SelectionDirection.LTR))); - } - } - } - - this._nbIsMultiSelectSession.set(true); - this.state = NotebookMultiCursorState.Selecting; - this._nbMultiSelectState.set(NotebookMultiCursorState.Selecting); - - } else if (this.state === NotebookMultiCursorState.Selecting) { - // we will already have a word + some number of tracked matches, need to update them with the rest given findAllMatches result - const findResults = notebookTextModel.findMatches(this.word, false, true, USUAL_WORD_SEPARATORS); - - // update existing tracked matches with new selections and create new tracked matches for cells that aren't tracked yet - for (const res of findResults) { - await this.updateTrackedCell(res.cell, res.matches.map(match => Selection.fromRange(match.range, SelectionDirection.LTR))); - } - } - } - - private async updateTrackedCell(cell: ICellViewModel | NotebookCellTextModel, selections: Selection[]) { - const cellViewModel = cell instanceof NotebookCellTextModel ? this.notebookEditor.getCellByHandle(cell.handle) : cell; - if (!cellViewModel) { - throw new Error('Cell not found'); - } - - let trackedMatch = this.trackedCells.find(trackedCell => trackedCell.cellViewModel.handle === cellViewModel.handle); - - if (trackedMatch) { - this.clearDecorations(trackedMatch); // need this to avoid leaking decorations -- TODO: just optimize the lazy decorations fn - trackedMatch.matchSelections = selections; - } else { - const initialSelection = cellViewModel.getSelections()[0]; - const textModel = await cellViewModel.resolveTextModel(); - textModel.pushStackElement(); - - const editorConfig = this.constructCellEditorOptions(cellViewModel); - const rawEditorOptions = editorConfig.getRawOptions(); - const cursorConfig: NotebookCursorConfig = { - cursorStyle: cursorStyleFromString(rawEditorOptions.cursorStyle!), - cursorBlinking: cursorBlinkingStyleFromString(rawEditorOptions.cursorBlinking!), - cursorSmoothCaretAnimation: rawEditorOptions.cursorSmoothCaretAnimation! - }; - - trackedMatch = { - cellViewModel: cellViewModel, - initialSelection: initialSelection, - matchSelections: selections, - editorConfig: editorConfig, - cursorConfig: cursorConfig, - decorationIds: [], - undoRedoHistory: this.undoRedoService.getElements(cellViewModel.uri) - }; - this.trackedCells.push(trackedMatch); - } - return trackedMatch; - } - - public async deleteLeft(): Promise { - this.trackedCells.forEach(cell => { - const controller = this.cursorsControllers.get(cell.cellViewModel.uri); - if (!controller) { - // should not happen - return; - } - - const [, commands] = DeleteOperations.deleteLeft( - controller.getPrevEditOperationType(), - controller.context.cursorConfig, - controller.context.model, - controller.getSelections(), - controller.getAutoClosedCharacters(), - ); - - const delSelections = CommandExecutor.executeCommands(controller.context.model, controller.getSelections(), commands); - if (!delSelections) { - return; - } - controller.setSelections(new ViewModelEventsCollector(), undefined, delSelections, CursorChangeReason.Explicit); - }); - this.updateLazyDecorations(); - } - - public async deleteRight(): Promise { - this.trackedCells.forEach(cell => { - const controller = this.cursorsControllers.get(cell.cellViewModel.uri); - if (!controller) { - // should not happen - return; - } - - const [, commands] = DeleteOperations.deleteRight( - controller.getPrevEditOperationType(), - controller.context.cursorConfig, - controller.context.model, - controller.getSelections(), - ); - - if (cell.cellViewModel.handle !== this.anchorCell?.[0].handle) { - const delSelections = CommandExecutor.executeCommands(controller.context.model, controller.getSelections(), commands); - if (!delSelections) { - return; - } - controller.setSelections(new ViewModelEventsCollector(), undefined, delSelections, CursorChangeReason.Explicit); - } else { - // get the selections from the viewmodel since we run the command manually (for cursor decoration reasons) - controller.setSelections(new ViewModelEventsCollector(), undefined, cell.cellViewModel.getSelections(), CursorChangeReason.Explicit); - } - - }); - this.updateLazyDecorations(); - } - - async undo() { - const models: ITextModel[] = []; - for (const cell of this.trackedCells) { - const model = await cell.cellViewModel.resolveTextModel(); - if (model) { - models.push(model); - } - } - - await Promise.all(models.map(model => model.undo())); - this.updateViewModelSelections(); - this.updateLazyDecorations(); - } - - async redo() { - const models: ITextModel[] = []; - for (const cell of this.trackedCells) { - const model = await cell.cellViewModel.resolveTextModel(); - if (model) { - models.push(model); - } - } - - await Promise.all(models.map(model => model.redo())); - this.updateViewModelSelections(); - this.updateLazyDecorations(); - } - - private constructCellEditorOptions(cell: ICellViewModel): EditorConfiguration { - const cellEditorOptions = new CellEditorOptions(this.notebookEditor.getBaseCellEditorOptions(cell.language), this.notebookEditor.notebookOptions, this.configurationService); - const options = cellEditorOptions.getUpdatedValue(cell.internalMetadata, cell.uri); - return new EditorConfiguration(false, MenuId.EditorContent, options, null, this.accessibilityService); - } - - /** - * Updates the multicursor selection decorations for a specific matched cell - * - * @param cell -- match object containing the viewmodel + selections - */ - private initializeMultiSelectDecorations(cell: TrackedCell | undefined) { - if (!cell) { - return; - } - - const decorations: IModelDeltaDecoration[] = []; - cell.matchSelections.forEach(selection => { - // mock cursor at the end of the selection - decorations.push({ - range: Selection.fromPositions(selection.getEndPosition()), - options: { - description: '', - className: this.getClassName(cell.cursorConfig, true), - } - }); - }); - - cell.decorationIds = cell.cellViewModel.deltaModelDecorations( - cell.decorationIds, - decorations - ); - } - - private updateLazyDecorations() { - this.trackedCells.forEach(cell => { - if (cell.cellViewModel.handle === this.anchorCell?.[0].handle) { - return; - } - - const controller = this.cursorsControllers.get(cell.cellViewModel.uri); - if (!controller) { - // should not happen - return; - } - const selections = controller.getSelections(); - - const newDecorations: IModelDeltaDecoration[] = []; - selections?.map(selection => { - const isEmpty = selection.isEmpty(); - - if (!isEmpty) { - // selection decoration (shift+arrow, etc) - newDecorations.push({ - range: selection, - options: { - description: '', - className: this.getClassName(cell.cursorConfig, false), - } - }); - } - - // mock cursor at the end of the selection - newDecorations.push({ - range: Selection.fromPositions(selection.getPosition()), - options: { - description: '', - zIndex: 10000, - className: this.getClassName(cell.cursorConfig, true), - } - }); - }); - - cell.decorationIds = cell.cellViewModel.deltaModelDecorations( - cell.decorationIds, - newDecorations - ); - - /** - * TODO: @Yoyokrazy debt - * goal: draw decorations for occurrence higlight on the cursor blink cycle - * - * Trigger WH with delay: x ms (x = cursor blink cycle) - * -> start = Date() - * -> WordHighlighter -> compute - * -> end = Date() - * -> delay = x - ((end - start) % x) - */ - const matchingEditor = this.notebookEditor.codeEditors.find(cellEditor => cellEditor[0] === cell.cellViewModel); - if (matchingEditor) { - WordHighlighterContribution.get(matchingEditor[1])?.wordHighlighter?.trigger(); - } - }); - } - - private clearDecorations(cell: TrackedCell) { - cell.decorationIds = cell.cellViewModel.deltaModelDecorations( - cell.decorationIds, - [] - ); - } - - private getWord(selection: Selection, model: ITextModel): IWordAtPosition | null { - const lineNumber = selection.startLineNumber; - const startColumn = selection.startColumn; - - if (model.isDisposed()) { - return null; - } - - return model.getWordAtPosition({ - lineNumber: lineNumber, - column: startColumn - }); - } - - private getClassName(cursorConfig: NotebookCursorConfig, isCursor?: boolean): string { - let result = isCursor ? '.nb-multicursor-cursor' : '.nb-multicursor-selection'; - - if (isCursor) { - // handle base style - switch (cursorConfig.cursorStyle) { - case TextEditorCursorStyle.Line: - break; // default style, no additional class needed (handled by base css style) - case TextEditorCursorStyle.Block: - result += '.nb-cursor-block-style'; - break; - case TextEditorCursorStyle.Underline: - result += '.nb-cursor-underline-style'; - break; - case TextEditorCursorStyle.LineThin: - result += '.nb-cursor-line-thin-style'; - break; - case TextEditorCursorStyle.BlockOutline: - result += '.nb-cursor-block-outline-style'; - break; - case TextEditorCursorStyle.UnderlineThin: - result += '.nb-cursor-underline-thin-style'; - break; - default: - break; - } - - // handle animation style - switch (cursorConfig.cursorBlinking) { - case TextEditorCursorBlinkingStyle.Blink: - result += '.nb-blink'; - break; - case TextEditorCursorBlinkingStyle.Smooth: - result += '.nb-smooth'; - break; - case TextEditorCursorBlinkingStyle.Phase: - result += '.nb-phase'; - break; - case TextEditorCursorBlinkingStyle.Expand: - result += '.nb-expand'; - break; - case TextEditorCursorBlinkingStyle.Solid: - result += '.nb-solid'; - break; - default: - result += '.nb-solid'; - break; - } - - // handle caret animation style - if (cursorConfig.cursorSmoothCaretAnimation === 'on' || cursorConfig.cursorSmoothCaretAnimation === 'explicit') { - result += '.nb-smooth-caret-animation'; - } - - } - return result; - } - - override dispose(): void { - super.dispose(); - this.anchorDisposables.dispose(); - this.cursorsDisposables.dispose(); - - this.trackedCells.forEach(cell => { - this.clearDecorations(cell); - }); - this.trackedCells = []; - } - -} - -class NotebookSelectAllFindMatches extends NotebookAction { - constructor() { - super({ - id: NOTEBOOK_SELECT_ALL_FIND_MATCHES_ID, - title: localize('selectAllFindMatches', "Select All Occurrences of Find Match"), - precondition: ContextKeyExpr.and( - ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), - ), - keybinding: { - when: ContextKeyExpr.or( - ContextKeyExpr.and( - ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), - NOTEBOOK_IS_ACTIVE_EDITOR, - NOTEBOOK_CELL_EDITOR_FOCUSED, - ), - ContextKeyExpr.and( - ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), - KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED - ), - ), - primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyL, - weight: KeybindingWeight.WorkbenchContrib - } - }); - } - - override async runWithContext(accessor: ServicesAccessor, context: INotebookActionContext): Promise { - const editorService = accessor.get(IEditorService); - - const editor = getNotebookEditorFromEditorPane(editorService.activeEditorPane); - if (!editor) { - return; - } - - if (!context.cell) { - return; - } - - const cursorController = editor.getContribution(NotebookMultiCursorController.id); - const findController = editor.getContribution(NotebookFindContrib.id); - - if (findController.widget.isFocused) { - const findModel = findController.widget.findModel; - cursorController.selectAllMatches(context.cell, findModel.findMatches); - } else { - cursorController.selectAllMatches(context.cell); - } - - } -} - -class NotebookAddMatchToMultiSelectionAction extends NotebookAction { - constructor() { - super({ - id: NOTEBOOK_ADD_FIND_MATCH_TO_SELECTION_ID, - title: localize('addFindMatchToSelection', "Add Selection To Next Find Match"), - precondition: ContextKeyExpr.and( - ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), - NOTEBOOK_IS_ACTIVE_EDITOR, - NOTEBOOK_CELL_EDITOR_FOCUSED, - ), - keybinding: { - when: ContextKeyExpr.and( - ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), - NOTEBOOK_IS_ACTIVE_EDITOR, - NOTEBOOK_CELL_EDITOR_FOCUSED, - ), - primary: KeyMod.CtrlCmd | KeyCode.KeyD, - weight: KeybindingWeight.WorkbenchContrib - } - }); - } - - override async runWithContext(accessor: ServicesAccessor, context: INotebookActionContext): Promise { - const editorService = accessor.get(IEditorService); - const editor = getNotebookEditorFromEditorPane(editorService.activeEditorPane); - - if (!editor) { - return; - } - - if (!context.cell) { - return; - } - - const controller = editor.getContribution(NotebookMultiCursorController.id); - controller.findAndTrackNextSelection(context.cell); - } -} - -class NotebookExitMultiSelectionAction extends NotebookAction { - constructor() { - super({ - id: 'noteMultiCursor.exit', - title: localize('exitMultiSelection', "Exit Multi Cursor Mode"), - precondition: ContextKeyExpr.and( - ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), - NOTEBOOK_IS_ACTIVE_EDITOR, - NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor, - ), - keybinding: { - when: ContextKeyExpr.and( - ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), - NOTEBOOK_IS_ACTIVE_EDITOR, - NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor, - ), - primary: KeyCode.Escape, - weight: KeybindingWeight.WorkbenchContrib - } - }); - } - - override async runWithContext(accessor: ServicesAccessor, context: INotebookActionContext): Promise { - const editorService = accessor.get(IEditorService); - const editor = getNotebookEditorFromEditorPane(editorService.activeEditorPane); - - if (!editor) { - return; - } - - const controller = editor.getContribution(NotebookMultiCursorController.id); - controller.resetToIdleState(); - } -} - -class NotebookDeleteLeftMultiSelectionAction extends NotebookAction { - constructor() { - super({ - id: 'noteMultiCursor.deleteLeft', - title: localize('deleteLeftMultiSelection', "Delete Left"), - precondition: ContextKeyExpr.and( - ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), - NOTEBOOK_IS_ACTIVE_EDITOR, - NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor, - ContextKeyExpr.or( - NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Selecting), - NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Editing) - ) - ), - keybinding: { - when: ContextKeyExpr.and( - ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), - NOTEBOOK_IS_ACTIVE_EDITOR, - NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor, - ContextKeyExpr.or( - NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Selecting), - NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Editing) - ) - ), - primary: KeyCode.Backspace, - weight: KeybindingWeight.WorkbenchContrib - } - }); - } - - override async runWithContext(accessor: ServicesAccessor, context: INotebookActionContext): Promise { - const editorService = accessor.get(IEditorService); - const editor = getNotebookEditorFromEditorPane(editorService.activeEditorPane); - - if (!editor) { - return; - } - - const controller = editor.getContribution(NotebookMultiCursorController.id); - controller.deleteLeft(); - } -} - -class NotebookDeleteRightMultiSelectionAction extends NotebookAction { - constructor() { - super({ - id: 'noteMultiCursor.deleteRight', - title: localize('deleteRightMultiSelection', "Delete Right"), - precondition: ContextKeyExpr.and( - ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), - NOTEBOOK_IS_ACTIVE_EDITOR, - NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor, - ContextKeyExpr.or( - NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Selecting), - NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Editing) - ) - ), - keybinding: { - when: ContextKeyExpr.and( - ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), - NOTEBOOK_IS_ACTIVE_EDITOR, - NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor, - ContextKeyExpr.or( - NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Selecting), - NOTEBOOK_MULTI_CURSOR_CONTEXT.NotebookMultiSelectCursorState.isEqualTo(NotebookMultiCursorState.Editing) - ) - ), - primary: KeyCode.Delete, - weight: KeybindingWeight.WorkbenchContrib - } - }); - } - - override async runWithContext(accessor: ServicesAccessor, context: INotebookActionContext): Promise { - const editorService = accessor.get(IEditorService); - const nbEditor = getNotebookEditorFromEditorPane(editorService.activeEditorPane); - if (!nbEditor) { - return; - } - const cellEditor = nbEditor.activeCodeEditor; - if (!cellEditor) { - return; - } - - // need to run the command manually since we are overriding the command, this ensures proper cursor animation behavior - CoreEditingCommands.DeleteRight.runEditorCommand(accessor, cellEditor, null); - - const controller = nbEditor.getContribution(NotebookMultiCursorController.id); - controller.deleteRight(); - } -} - -class NotebookMultiCursorUndoRedoContribution extends Disposable { - - static readonly ID = 'workbench.contrib.notebook.multiCursorUndoRedo'; - - constructor(@IEditorService private readonly _editorService: IEditorService, @IConfigurationService private readonly configurationService: IConfigurationService) { - super(); - - if (!this.configurationService.getValue('notebook.multiCursor.enabled')) { - return; - } - - const PRIORITY = 10005; - this._register(UndoCommand.addImplementation(PRIORITY, 'notebook-multicursor-undo-redo', () => { - const editor = getNotebookEditorFromEditorPane(this._editorService.activeEditorPane); - if (!editor) { - return false; - } - - if (!editor.hasModel()) { - return false; - } - - const controller = editor.getContribution(NotebookMultiCursorController.id); - - return controller.undo(); - }, ContextKeyExpr.and( - ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), - NOTEBOOK_IS_ACTIVE_EDITOR, - NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor, - ))); - - this._register(RedoCommand.addImplementation(PRIORITY, 'notebook-multicursor-undo-redo', () => { - const editor = getNotebookEditorFromEditorPane(this._editorService.activeEditorPane); - if (!editor) { - return false; - } - - if (!editor.hasModel()) { - return false; - } - - const controller = editor.getContribution(NotebookMultiCursorController.id); - return controller.redo(); - }, ContextKeyExpr.and( - ContextKeyExpr.equals('config.notebook.multiCursor.enabled', true), - NOTEBOOK_IS_ACTIVE_EDITOR, - NOTEBOOK_MULTI_CURSOR_CONTEXT.IsNotebookMultiCursor, - ))); - } -} - -registerNotebookContribution(NotebookMultiCursorController.id, NotebookMultiCursorController); -registerWorkbenchContribution2(NotebookMultiCursorUndoRedoContribution.ID, NotebookMultiCursorUndoRedoContribution, WorkbenchPhase.BlockRestore); - -registerAction2(NotebookSelectAllFindMatches); -registerAction2(NotebookAddMatchToMultiSelectionAction); -registerAction2(NotebookExitMultiSelectionAction); -registerAction2(NotebookDeleteLeftMultiSelectionAction); -registerAction2(NotebookDeleteRightMultiSelectionAction); diff --git a/src/vs/workbench/contrib/notebook/browser/controller/foldingController.ts b/src/vs/workbench/contrib/notebook/browser/controller/foldingController.ts deleted file mode 100644 index 113649657b247..0000000000000 --- a/src/vs/workbench/contrib/notebook/browser/controller/foldingController.ts +++ /dev/null @@ -1,311 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { Disposable, DisposableStore } from '../../../../../base/common/lifecycle.js'; -import { NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_IS_ACTIVE_EDITOR } from '../../common/notebookContextKeys.js'; -import { INotebookEditor, INotebookEditorMouseEvent, INotebookEditorContribution, getNotebookEditorFromEditorPane, CellFoldingState } from '../notebookBrowser.js'; -import { FoldingModel } from '../viewModel/foldingModel.js'; import { CellKind } from '../../common/notebookCommon.js'; -import { ICellRange } from '../../common/notebookRange.js'; -import { registerNotebookContribution } from '../notebookEditorExtensions.js'; -import { registerAction2, Action2 } from '../../../../../platform/actions/common/actions.js'; -import { ContextKeyExpr } from '../../../../../platform/contextkey/common/contextkey.js'; -import { InputFocusedContextKey } from '../../../../../platform/contextkey/common/contextkeys.js'; -import { KeyCode, KeyMod } from '../../../../../base/common/keyCodes.js'; -import { KeybindingWeight } from '../../../../../platform/keybinding/common/keybindingsRegistry.js'; -import { ServicesAccessor } from '../../../../../platform/instantiation/common/instantiation.js'; -import { IEditorService } from '../../../../services/editor/common/editorService.js'; -import { NOTEBOOK_ACTIONS_CATEGORY } from './coreActions.js'; -import { localize, localize2 } from '../../../../../nls.js'; -import { FoldingRegion } from '../../../../../editor/contrib/folding/browser/foldingRanges.js'; -import { ICommandMetadata } from '../../../../../platform/commands/common/commands.js'; -import { NotebookViewModel } from '../viewModel/notebookViewModelImpl.js'; - -export class FoldingController extends Disposable implements INotebookEditorContribution { - static id: string = 'workbench.notebook.foldingController'; - - private _foldingModel: FoldingModel | null = null; - private readonly _localStore = this._register(new DisposableStore()); - - constructor(private readonly _notebookEditor: INotebookEditor) { - super(); - - this._register(this._notebookEditor.onMouseUp(e => { this.onMouseUp(e); })); - - this._register(this._notebookEditor.onDidChangeModel(() => { - this._localStore.clear(); - - if (!this._notebookEditor.hasModel()) { - return; - } - - this._localStore.add(this._notebookEditor.onDidChangeCellState(e => { - if (e.source.editStateChanged && e.cell.cellKind === CellKind.Markup) { - this._foldingModel?.recompute(); - } - })); - - this._foldingModel = new FoldingModel(); - this._localStore.add(this._foldingModel); - this._foldingModel.attachViewModel(this._notebookEditor.getViewModel()); - - this._localStore.add(this._foldingModel.onDidFoldingRegionChanged(() => { - this._updateEditorFoldingRanges(); - })); - })); - } - - saveViewState(): ICellRange[] { - return this._foldingModel?.getMemento() || []; - } - - restoreViewState(state: ICellRange[] | undefined) { - this._foldingModel?.applyMemento(state || []); - this._updateEditorFoldingRanges(); - } - - setFoldingStateDown(index: number, state: CellFoldingState, levels: number) { - const doCollapse = state === CellFoldingState.Collapsed; - const region = this._foldingModel!.getRegionAtLine(index + 1); - const regions: FoldingRegion[] = []; - if (region) { - if (region.isCollapsed !== doCollapse) { - regions.push(region); - } - if (levels > 1) { - const regionsInside = this._foldingModel!.getRegionsInside(region, (r, level: number) => r.isCollapsed !== doCollapse && level < levels); - regions.push(...regionsInside); - } - } - - regions.forEach(r => this._foldingModel!.setCollapsed(r.regionIndex, state === CellFoldingState.Collapsed)); - this._updateEditorFoldingRanges(); - } - - setFoldingStateUp(index: number, state: CellFoldingState, levels: number) { - if (!this._foldingModel) { - return; - } - - const regions = this._foldingModel.getAllRegionsAtLine(index + 1, (region, level) => region.isCollapsed !== (state === CellFoldingState.Collapsed) && level <= levels); - regions.forEach(r => this._foldingModel!.setCollapsed(r.regionIndex, state === CellFoldingState.Collapsed)); - this._updateEditorFoldingRanges(); - } - - private _updateEditorFoldingRanges() { - if (!this._foldingModel) { - return; - } - - if (!this._notebookEditor.hasModel()) { - return; - } - - const vm = this._notebookEditor.getViewModel() as NotebookViewModel; - - vm.updateFoldingRanges(this._foldingModel.regions); - const hiddenRanges = vm.getHiddenRanges(); - this._notebookEditor.setHiddenAreas(hiddenRanges); - } - - onMouseUp(e: INotebookEditorMouseEvent) { - if (!e.event.target) { - return; - } - - if (!this._notebookEditor.hasModel()) { - return; - } - - const viewModel = this._notebookEditor.getViewModel() as NotebookViewModel; - const target = e.event.target as HTMLElement; - - if (target.classList.contains('codicon-notebook-collapsed') || target.classList.contains('codicon-notebook-expanded')) { - const parent = target.parentElement as HTMLElement; - - if (!parent.classList.contains('notebook-folding-indicator')) { - return; - } - - // folding icon - - const cellViewModel = e.target; - const modelIndex = viewModel.getCellIndex(cellViewModel); - const state = viewModel.getFoldingState(modelIndex); - - if (state === CellFoldingState.None) { - return; - } - - this.setFoldingStateUp(modelIndex, state === CellFoldingState.Collapsed ? CellFoldingState.Expanded : CellFoldingState.Collapsed, 1); - this._notebookEditor.focusElement(cellViewModel); - } - - return; - } - - recompute() { - this._foldingModel?.recompute(); - } -} - -registerNotebookContribution(FoldingController.id, FoldingController); - - -const NOTEBOOK_FOLD_COMMAND_LABEL = localize('fold.cell', "Fold Cell"); -const NOTEBOOK_UNFOLD_COMMAND_LABEL = localize2('unfold.cell', "Unfold Cell"); - -const FOLDING_COMMAND_ARGS: Pick = { - args: [{ - isOptional: true, - name: 'index', - description: 'The cell index', - schema: { - 'type': 'object', - 'required': ['index', 'direction'], - 'properties': { - 'index': { - 'type': 'number' - }, - 'direction': { - 'type': 'string', - 'enum': ['up', 'down'], - 'default': 'down' - }, - 'levels': { - 'type': 'number', - 'default': 1 - }, - } - } - }] -}; - -registerAction2(class extends Action2 { - constructor() { - super({ - id: 'notebook.fold', - title: localize2('fold.cell', "Fold Cell"), - category: NOTEBOOK_ACTIONS_CATEGORY, - keybinding: { - when: ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)), - primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.BracketLeft, - mac: { - primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.BracketLeft, - secondary: [KeyCode.LeftArrow], - }, - secondary: [KeyCode.LeftArrow], - weight: KeybindingWeight.WorkbenchContrib - }, - metadata: { - description: NOTEBOOK_FOLD_COMMAND_LABEL, - args: FOLDING_COMMAND_ARGS.args - }, - precondition: NOTEBOOK_IS_ACTIVE_EDITOR, - f1: true - }); - } - - async run(accessor: ServicesAccessor, args?: { index: number; levels: number; direction: 'up' | 'down' }): Promise { - const editorService = accessor.get(IEditorService); - - const editor = getNotebookEditorFromEditorPane(editorService.activeEditorPane); - if (!editor) { - return; - } - - if (!editor.hasModel()) { - return; - } - - const levels = args && args.levels || 1; - const direction = args && args.direction === 'up' ? 'up' : 'down'; - let index: number | undefined = undefined; - - if (args) { - index = args.index; - } else { - const activeCell = editor.getActiveCell(); - if (!activeCell) { - return; - } - index = editor.getCellIndex(activeCell); - } - - const controller = editor.getContribution(FoldingController.id); - if (index !== undefined) { - const targetCell = (index < 0 || index >= editor.getLength()) ? undefined : editor.cellAt(index); - if (targetCell?.cellKind === CellKind.Code && direction === 'down') { - return; - } - - if (direction === 'up') { - controller.setFoldingStateUp(index, CellFoldingState.Collapsed, levels); - } else { - controller.setFoldingStateDown(index, CellFoldingState.Collapsed, levels); - } - - const viewIndex = editor.getViewModel().getNearestVisibleCellIndexUpwards(index); - editor.focusElement(editor.cellAt(viewIndex)); - } - } -}); - -registerAction2(class extends Action2 { - constructor() { - super({ - id: 'notebook.unfold', - title: NOTEBOOK_UNFOLD_COMMAND_LABEL, - category: NOTEBOOK_ACTIONS_CATEGORY, - keybinding: { - when: ContextKeyExpr.and(NOTEBOOK_EDITOR_FOCUSED, ContextKeyExpr.not(InputFocusedContextKey)), - primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.BracketRight, - mac: { - primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.BracketRight, - secondary: [KeyCode.RightArrow], - }, - secondary: [KeyCode.RightArrow], - weight: KeybindingWeight.WorkbenchContrib - }, - metadata: { - description: NOTEBOOK_UNFOLD_COMMAND_LABEL, - args: FOLDING_COMMAND_ARGS.args - }, - precondition: NOTEBOOK_IS_ACTIVE_EDITOR, - f1: true - }); - } - - async run(accessor: ServicesAccessor, args?: { index: number; levels: number; direction: 'up' | 'down' }): Promise { - const editorService = accessor.get(IEditorService); - - const editor = getNotebookEditorFromEditorPane(editorService.activeEditorPane); - if (!editor) { - return; - } - - const levels = args && args.levels || 1; - const direction = args && args.direction === 'up' ? 'up' : 'down'; - let index: number | undefined = undefined; - - if (args) { - index = args.index; - } else { - const activeCell = editor.getActiveCell(); - if (!activeCell) { - return; - } - index = editor.getCellIndex(activeCell); - } - - const controller = editor.getContribution(FoldingController.id); - if (index !== undefined) { - if (direction === 'up') { - controller.setFoldingStateUp(index, CellFoldingState.Expanded, levels); - } else { - controller.setFoldingStateDown(index, CellFoldingState.Expanded, levels); - } - } - } -}); diff --git a/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.ts b/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.ts deleted file mode 100644 index b532e04ebe696..0000000000000 --- a/src/vs/workbench/contrib/notebook/browser/controller/sectionActions.ts +++ /dev/null @@ -1,248 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { localize, localize2 } from '../../../../../nls.js'; -import { Action2, MenuId, registerAction2 } from '../../../../../platform/actions/common/actions.js'; -import { ContextKeyExpr } from '../../../../../platform/contextkey/common/contextkey.js'; -import { ServicesAccessor } from '../../../../../platform/instantiation/common/instantiation.js'; -import { NotebookOutlineContext } from '../contrib/outline/notebookOutline.js'; -import { FoldingController } from './foldingController.js'; -import { CellEditState, CellFoldingState, ICellViewModel, INotebookEditor } from '../notebookBrowser.js'; -import * as icons from '../notebookIcons.js'; -import { OutlineEntry } from '../viewModel/OutlineEntry.js'; -import { CellKind } from '../../common/notebookCommon.js'; -import { OutlineTarget } from '../../../../services/outline/browser/outline.js'; -import { CELL_TITLE_CELL_GROUP_ID, CellToolbarOrder } from './coreActions.js'; -import { executeSectionCondition } from './executeActions.js'; - -export type NotebookOutlineEntryArgs = { - notebookEditor: INotebookEditor; - outlineEntry: OutlineEntry; -}; - -export type NotebookCellArgs = { - notebookEditor: INotebookEditor; - cell: ICellViewModel; -}; - -export class NotebookRunSingleCellInSection extends Action2 { - constructor() { - super({ - id: 'notebook.section.runSingleCell', - title: { - ...localize2('runCell', "Run Cell"), - mnemonicTitle: localize({ key: 'mirunCell', comment: ['&& denotes a mnemonic'] }, "&&Run Cell"), - }, - shortTitle: localize('runCell', "Run Cell"), - icon: icons.executeIcon, - menu: [ - { - id: MenuId.NotebookOutlineActionMenu, - group: 'inline', - order: 1, - when: ContextKeyExpr.and( - NotebookOutlineContext.CellKind.isEqualTo(CellKind.Code), - NotebookOutlineContext.OutlineElementTarget.isEqualTo(OutlineTarget.OutlinePane), - NotebookOutlineContext.CellHasChildren.toNegated(), - NotebookOutlineContext.CellHasHeader.toNegated(), - ) - } - ] - }); - } - - override async run(_accessor: ServicesAccessor, context: any): Promise { - if (!checkOutlineEntryContext(context)) { - return; - } - - context.notebookEditor.executeNotebookCells([context.outlineEntry.cell]); - } -} - -export class NotebookRunCellsInSection extends Action2 { - constructor() { - super({ - id: 'notebook.section.runCells', - title: { - ...localize2('runCellsInSection', "Run Cells In Section"), - mnemonicTitle: localize({ key: 'mirunCellsInSection', comment: ['&& denotes a mnemonic'] }, "&&Run Cells In Section"), - }, - shortTitle: localize('runCellsInSection', "Run Cells In Section"), - icon: icons.executeIcon, // TODO @Yoyokrazy replace this with new icon later - menu: [ - { - id: MenuId.NotebookStickyScrollContext, - group: 'notebookExecution', - order: 1 - }, - { - id: MenuId.NotebookOutlineActionMenu, - group: 'inline', - order: 1, - when: ContextKeyExpr.and( - NotebookOutlineContext.CellKind.isEqualTo(CellKind.Markup), - NotebookOutlineContext.OutlineElementTarget.isEqualTo(OutlineTarget.OutlinePane), - NotebookOutlineContext.CellHasChildren, - NotebookOutlineContext.CellHasHeader, - ) - }, - { - id: MenuId.NotebookCellTitle, - order: CellToolbarOrder.RunSection, - group: CELL_TITLE_CELL_GROUP_ID, - when: executeSectionCondition - } - ] - }); - } - - override async run(_accessor: ServicesAccessor, context: any): Promise { - let cell: ICellViewModel; - if (checkOutlineEntryContext(context)) { - cell = context.outlineEntry.cell; - } else if (checkNotebookCellContext(context)) { - cell = context.cell; - } else { - return; - } - - if (cell.getEditState() === CellEditState.Editing) { - const foldingController = context.notebookEditor.getContribution(FoldingController.id); - foldingController.recompute(); - } - - const cellIdx = context.notebookEditor.getViewModel()?.getCellIndex(cell); - if (cellIdx === undefined) { - return; - } - const sectionIdx = context.notebookEditor.getViewModel()?.getFoldingStartIndex(cellIdx); - if (sectionIdx === undefined) { - return; - } - const length = context.notebookEditor.getViewModel()?.getFoldedLength(sectionIdx); - if (length === undefined) { - return; - } - - const cells = context.notebookEditor.getCellsInRange({ start: sectionIdx, end: sectionIdx + length + 1 }); - context.notebookEditor.executeNotebookCells(cells); - } -} - -export class NotebookFoldSection extends Action2 { - constructor() { - super({ - id: 'notebook.section.foldSection', - title: { - ...localize2('foldSection', "Fold Section"), - mnemonicTitle: localize({ key: 'mifoldSection', comment: ['&& denotes a mnemonic'] }, "&&Fold Section"), - }, - shortTitle: localize('foldSection', "Fold Section"), - menu: [ - { - id: MenuId.NotebookOutlineActionMenu, - group: 'notebookFolding', - order: 2, - when: ContextKeyExpr.and( - NotebookOutlineContext.CellKind.isEqualTo(CellKind.Markup), - NotebookOutlineContext.OutlineElementTarget.isEqualTo(OutlineTarget.OutlinePane), - NotebookOutlineContext.CellHasChildren, - NotebookOutlineContext.CellHasHeader, - NotebookOutlineContext.CellFoldingState.isEqualTo(CellFoldingState.Expanded) - ) - } - ] - }); - } - - override async run(_accessor: ServicesAccessor, context: any): Promise { - if (!checkOutlineEntryContext(context)) { - return; - } - - this.toggleFoldRange(context.outlineEntry, context.notebookEditor); - } - - private toggleFoldRange(entry: OutlineEntry, notebookEditor: INotebookEditor) { - const foldingController = notebookEditor.getContribution(FoldingController.id); - const index = entry.index; - const headerLevel = entry.level; - const newFoldingState = CellFoldingState.Collapsed; - - foldingController.setFoldingStateDown(index, newFoldingState, headerLevel); - } -} - -export class NotebookExpandSection extends Action2 { - constructor() { - super({ - id: 'notebook.section.expandSection', - title: { - ...localize2('expandSection', "Expand Section"), - mnemonicTitle: localize({ key: 'miexpandSection', comment: ['&& denotes a mnemonic'] }, "&&Expand Section"), - }, - shortTitle: localize('expandSection', "Expand Section"), - menu: [ - { - id: MenuId.NotebookOutlineActionMenu, - group: 'notebookFolding', - order: 2, - when: ContextKeyExpr.and( - NotebookOutlineContext.CellKind.isEqualTo(CellKind.Markup), - NotebookOutlineContext.OutlineElementTarget.isEqualTo(OutlineTarget.OutlinePane), - NotebookOutlineContext.CellHasChildren, - NotebookOutlineContext.CellHasHeader, - NotebookOutlineContext.CellFoldingState.isEqualTo(CellFoldingState.Collapsed) - ) - } - ] - }); - } - - override async run(_accessor: ServicesAccessor, context: any): Promise { - if (!checkOutlineEntryContext(context)) { - return; - } - - this.toggleFoldRange(context.outlineEntry, context.notebookEditor); - } - - private toggleFoldRange(entry: OutlineEntry, notebookEditor: INotebookEditor) { - const foldingController = notebookEditor.getContribution(FoldingController.id); - const index = entry.index; - const headerLevel = entry.level; - const newFoldingState = CellFoldingState.Expanded; - - foldingController.setFoldingStateDown(index, newFoldingState, headerLevel); - } -} - -/** - * Take in context args and check if they exist. True if action is run from notebook sticky scroll context menu or - * notebook outline context menu. - * - * @param context - Notebook Outline Context containing a notebook editor and outline entry - * @returns true if context is valid, false otherwise - */ -function checkOutlineEntryContext(context: any): context is NotebookOutlineEntryArgs { - return !!(context && context.notebookEditor && context.outlineEntry); -} - -/** - * Take in context args and check if they exist. True if action is run from a cell toolbar menu (potentially from the - * notebook cell container or cell editor context menus, but not tested or implemented atm) - * - * @param context - Notebook Outline Context containing a notebook editor and outline entry - * @returns true if context is valid, false otherwise - */ -function checkNotebookCellContext(context: any): context is NotebookCellArgs { - return !!(context && context.notebookEditor && context.cell); -} - -registerAction2(NotebookRunSingleCellInSection); -registerAction2(NotebookRunCellsInSection); -registerAction2(NotebookFoldSection); -registerAction2(NotebookExpandSection); diff --git a/src/vs/workbench/contrib/remote/browser/remoteExplorer.ts b/src/vs/workbench/contrib/remote/browser/remoteExplorer.ts deleted file mode 100644 index ef741a340d307..0000000000000 --- a/src/vs/workbench/contrib/remote/browser/remoteExplorer.ts +++ /dev/null @@ -1,805 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -import * as nls from '../../../../nls.js'; -import { Disposable, IDisposable, MutableDisposable } from '../../../../base/common/lifecycle.js'; -import { IWorkbenchContribution } from '../../../common/contributions.js'; -import { Extensions, IViewContainersRegistry, IViewsRegistry, ViewContainer, ViewContainerLocation } from '../../../common/views.js'; -import { IRemoteExplorerService, PORT_AUTO_FALLBACK_SETTING, PORT_AUTO_FORWARD_SETTING, PORT_AUTO_SOURCE_SETTING, PORT_AUTO_SOURCE_SETTING_HYBRID, PORT_AUTO_SOURCE_SETTING_OUTPUT, PORT_AUTO_SOURCE_SETTING_PROCESS, PortsEnablement, TUNNEL_VIEW_CONTAINER_ID, TUNNEL_VIEW_ID } from '../../../services/remote/common/remoteExplorerService.js'; -import { Attributes, AutoTunnelSource, forwardedPortsFeaturesEnabled, forwardedPortsViewEnabled, makeAddress, mapHasAddressLocalhostOrAllInterfaces, OnPortForward, Tunnel, TunnelCloseReason, TunnelSource } from '../../../services/remote/common/tunnelModel.js'; -import { ForwardPortAction, OpenPortInBrowserAction, TunnelPanel, TunnelPanelDescriptor, TunnelViewModel, OpenPortInPreviewAction, openPreviewEnabledContext } from './tunnelView.js'; -import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js'; -import { IWorkbenchEnvironmentService } from '../../../services/environment/common/environmentService.js'; -import { Registry } from '../../../../platform/registry/common/platform.js'; -import { IStatusbarEntry, IStatusbarEntryAccessor, IStatusbarService, StatusbarAlignment } from '../../../services/statusbar/browser/statusbar.js'; -import { UrlFinder } from './urlFinder.js'; -import Severity from '../../../../base/common/severity.js'; -import { ConfigurationTarget, IConfigurationService } from '../../../../platform/configuration/common/configuration.js'; -import { INotificationHandle, INotificationService, IPromptChoice } from '../../../../platform/notification/common/notification.js'; -import { IOpenerService } from '../../../../platform/opener/common/opener.js'; -import { ITerminalService } from '../../terminal/browser/terminal.js'; -import { IDebugService } from '../../debug/common/debug.js'; -import { IRemoteAgentService } from '../../../services/remote/common/remoteAgentService.js'; -import { isWeb, OperatingSystem } from '../../../../base/common/platform.js'; -import { ITunnelService, RemoteTunnel, TunnelPrivacyId } from '../../../../platform/tunnel/common/tunnel.js'; -import { SyncDescriptor } from '../../../../platform/instantiation/common/descriptors.js'; -import { ViewPaneContainer } from '../../../browser/parts/views/viewPaneContainer.js'; -import { IActivityService, NumberBadge } from '../../../services/activity/common/activity.js'; -import { portsViewIcon } from './remoteIcons.js'; -import { Event } from '../../../../base/common/event.js'; -import { IExternalUriOpenerService } from '../../externalUriOpener/common/externalUriOpenerService.js'; -import { IHostService } from '../../../services/host/browser/host.js'; -import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from '../../../../platform/configuration/common/configurationRegistry.js'; -import { ILogService } from '../../../../platform/log/common/log.js'; -import { IWorkbenchConfigurationService } from '../../../services/configuration/common/configuration.js'; -import { IRemoteAgentEnvironment } from '../../../../platform/remote/common/remoteAgentEnvironment.js'; -import { Action } from '../../../../base/common/actions.js'; -import { IPreferencesService } from '../../../services/preferences/common/preferences.js'; -import { IStorageService, StorageScope } from '../../../../platform/storage/common/storage.js'; - -export const VIEWLET_ID = 'workbench.view.remote'; - -export class ForwardedPortsView extends Disposable implements IWorkbenchContribution { - private readonly contextKeyListener = this._register(new MutableDisposable()); - private readonly activityBadge = this._register(new MutableDisposable()); - private entryAccessor: IStatusbarEntryAccessor | undefined; - - constructor( - @IContextKeyService private readonly contextKeyService: IContextKeyService, - @IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService, - @IRemoteExplorerService private readonly remoteExplorerService: IRemoteExplorerService, - @ITunnelService private readonly tunnelService: ITunnelService, - @IActivityService private readonly activityService: IActivityService, - @IStatusbarService private readonly statusbarService: IStatusbarService, - ) { - super(); - this._register(Registry.as(Extensions.ViewsRegistry).registerViewWelcomeContent(TUNNEL_VIEW_ID, { - content: this.environmentService.remoteAuthority ? nls.localize('remoteNoPorts', "No forwarded ports. Forward a port to access your running services locally.\n[Forward a Port]({0})", `command:${ForwardPortAction.INLINE_ID}`) - : nls.localize('noRemoteNoPorts', "No forwarded ports. Forward a port to access your locally running services over the internet.\n[Forward a Port]({0})", `command:${ForwardPortAction.INLINE_ID}`), - })); - this.enableBadgeAndStatusBar(); - this.enableForwardedPortsFeatures(); - } - - private async getViewContainer(): Promise { - return Registry.as(Extensions.ViewContainersRegistry).registerViewContainer({ - id: TUNNEL_VIEW_CONTAINER_ID, - title: nls.localize2('ports', "Ports"), - icon: portsViewIcon, - ctorDescriptor: new SyncDescriptor(ViewPaneContainer, [TUNNEL_VIEW_CONTAINER_ID, { mergeViewWithContainerWhenSingleView: true }]), - storageId: TUNNEL_VIEW_CONTAINER_ID, - hideIfEmpty: true, - order: 5 - }, ViewContainerLocation.Panel); - } - - private async enableForwardedPortsFeatures() { - this.contextKeyListener.clear(); - - const featuresEnabled: boolean = !!forwardedPortsFeaturesEnabled.getValue(this.contextKeyService); - const viewEnabled: boolean = !!forwardedPortsViewEnabled.getValue(this.contextKeyService); - - if (featuresEnabled || viewEnabled) { - // Also enable the view if it isn't already. - if (!viewEnabled) { - this.contextKeyService.createKey(forwardedPortsViewEnabled.key, true); - } - const viewContainer = await this.getViewContainer(); - const tunnelPanelDescriptor = new TunnelPanelDescriptor(new TunnelViewModel(this.remoteExplorerService, this.tunnelService), this.environmentService); - const viewsRegistry = Registry.as(Extensions.ViewsRegistry); - if (viewContainer) { - this.remoteExplorerService.enablePortsFeatures(!featuresEnabled); - viewsRegistry.registerViews([tunnelPanelDescriptor], viewContainer); - } - } else { - this.contextKeyListener.value = this.contextKeyService.onDidChangeContext(e => { - if (e.affectsSome(new Set([...forwardedPortsFeaturesEnabled.keys(), ...forwardedPortsViewEnabled.keys()]))) { - this.enableForwardedPortsFeatures(); - } - }); - } - } - - private enableBadgeAndStatusBar() { - const disposable = Registry.as(Extensions.ViewsRegistry).onViewsRegistered(e => { - if (e.find(view => view.views.find(viewDescriptor => viewDescriptor.id === TUNNEL_VIEW_ID))) { - this._register(Event.debounce(this.remoteExplorerService.tunnelModel.onForwardPort, (_last, e) => e, 50)(() => { - this.updateActivityBadge(); - this.updateStatusBar(); - })); - this._register(Event.debounce(this.remoteExplorerService.tunnelModel.onClosePort, (_last, e) => e, 50)(() => { - this.updateActivityBadge(); - this.updateStatusBar(); - })); - - this.updateActivityBadge(); - this.updateStatusBar(); - disposable.dispose(); - } - }); - } - - private async updateActivityBadge() { - if (this.remoteExplorerService.tunnelModel.forwarded.size > 0) { - this.activityBadge.value = this.activityService.showViewActivity(TUNNEL_VIEW_ID, { - badge: new NumberBadge(this.remoteExplorerService.tunnelModel.forwarded.size, n => n === 1 ? nls.localize('1forwardedPort', "1 forwarded port") : nls.localize('nForwardedPorts', "{0} forwarded ports", n)) - }); - } else { - this.activityBadge.clear(); - } - } - - private updateStatusBar() { - if (!this.entryAccessor) { - this._register(this.entryAccessor = this.statusbarService.addEntry(this.entry, 'status.forwardedPorts', StatusbarAlignment.LEFT, 40)); - } else { - this.entryAccessor.update(this.entry); - } - } - - private get entry(): IStatusbarEntry { - let tooltip: string; - const count = this.remoteExplorerService.tunnelModel.forwarded.size + this.remoteExplorerService.tunnelModel.detected.size; - const text = `${count}`; - if (count === 0) { - tooltip = nls.localize('remote.forwardedPorts.statusbarTextNone', "No Ports Forwarded"); - } else { - const allTunnels = Array.from(this.remoteExplorerService.tunnelModel.forwarded.values()); - allTunnels.push(...Array.from(this.remoteExplorerService.tunnelModel.detected.values())); - tooltip = nls.localize('remote.forwardedPorts.statusbarTooltip', "Forwarded Ports: {0}", - allTunnels.map(forwarded => forwarded.remotePort).join(', ')); - } - return { - name: nls.localize('status.forwardedPorts', "Forwarded Ports"), - text: `$(radio-tower) ${text}`, - ariaLabel: tooltip, - tooltip, - command: `${TUNNEL_VIEW_ID}.focus` - }; - } -} - -export class PortRestore implements IWorkbenchContribution { - constructor( - @IRemoteExplorerService private readonly remoteExplorerService: IRemoteExplorerService, - @ILogService private readonly logService: ILogService - ) { - if (!this.remoteExplorerService.tunnelModel.environmentTunnelsSet) { - Event.once(this.remoteExplorerService.tunnelModel.onEnvironmentTunnelsSet)(async () => { - await this.restore(); - }); - } else { - this.restore(); - } - } - - private async restore() { - this.logService.trace('ForwardedPorts: Doing first restore.'); - return this.remoteExplorerService.restore(); - } -} - - -export class AutomaticPortForwarding extends Disposable implements IWorkbenchContribution { - private procForwarder: ProcAutomaticPortForwarding | undefined; - private outputForwarder: OutputAutomaticPortForwarding | undefined; - private portListener: IDisposable | undefined; - - constructor( - @ITerminalService private readonly terminalService: ITerminalService, - @INotificationService private readonly notificationService: INotificationService, - @IOpenerService private readonly openerService: IOpenerService, - @IExternalUriOpenerService private readonly externalOpenerService: IExternalUriOpenerService, - @IRemoteExplorerService private readonly remoteExplorerService: IRemoteExplorerService, - @IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService, - @IContextKeyService private readonly contextKeyService: IContextKeyService, - @IWorkbenchConfigurationService private readonly configurationService: IWorkbenchConfigurationService, - @IDebugService private readonly debugService: IDebugService, - @IRemoteAgentService remoteAgentService: IRemoteAgentService, - @ITunnelService private readonly tunnelService: ITunnelService, - @IHostService private readonly hostService: IHostService, - @ILogService private readonly logService: ILogService, - @IStorageService private readonly storageService: IStorageService, - @IPreferencesService private readonly preferencesService: IPreferencesService, - ) { - super(); - if (!environmentService.remoteAuthority) { - return; - } - - configurationService.whenRemoteConfigurationLoaded().then(() => remoteAgentService.getEnvironment()).then(environment => { - this.setup(environment); - this._register(configurationService.onDidChangeConfiguration(e => { - if (e.affectsConfiguration(PORT_AUTO_SOURCE_SETTING)) { - this.setup(environment); - } else if (e.affectsConfiguration(PORT_AUTO_FALLBACK_SETTING) && !this.portListener) { - this.listenForPorts(); - } - })); - }); - - if (!this.storageService.getBoolean('processPortForwardingFallback', StorageScope.WORKSPACE, true)) { - this.configurationService.updateValue(PORT_AUTO_FALLBACK_SETTING, 0, ConfigurationTarget.WORKSPACE); - } - } - - private getPortAutoFallbackNumber(): number { - const fallbackAt = this.configurationService.inspect(PORT_AUTO_FALLBACK_SETTING); - if ((fallbackAt.value !== undefined) && (fallbackAt.value === 0 || (fallbackAt.value !== fallbackAt.defaultValue))) { - return fallbackAt.value; - } - const inspectSource = this.configurationService.inspect(PORT_AUTO_SOURCE_SETTING); - if (inspectSource.applicationValue === PORT_AUTO_SOURCE_SETTING_PROCESS || - inspectSource.userValue === PORT_AUTO_SOURCE_SETTING_PROCESS || - inspectSource.userLocalValue === PORT_AUTO_SOURCE_SETTING_PROCESS || - inspectSource.userRemoteValue === PORT_AUTO_SOURCE_SETTING_PROCESS || - inspectSource.workspaceFolderValue === PORT_AUTO_SOURCE_SETTING_PROCESS || - inspectSource.workspaceValue === PORT_AUTO_SOURCE_SETTING_PROCESS) { - return 0; - } - return fallbackAt.value ?? 20; - } - - private listenForPorts() { - let fallbackAt = this.getPortAutoFallbackNumber(); - if (fallbackAt === 0) { - this.portListener?.dispose(); - return; - } - - if (this.procForwarder && !this.portListener && (this.configurationService.getValue(PORT_AUTO_SOURCE_SETTING) === PORT_AUTO_SOURCE_SETTING_PROCESS)) { - this.portListener = this._register(this.remoteExplorerService.tunnelModel.onForwardPort(async () => { - fallbackAt = this.getPortAutoFallbackNumber(); - if (fallbackAt === 0) { - this.portListener?.dispose(); - return; - } - if (Array.from(this.remoteExplorerService.tunnelModel.forwarded.values()).filter(tunnel => tunnel.source.source === TunnelSource.Auto).length > fallbackAt) { - await this.configurationService.updateValue(PORT_AUTO_SOURCE_SETTING, PORT_AUTO_SOURCE_SETTING_HYBRID); - this.notificationService.notify({ - message: nls.localize('remote.autoForwardPortsSource.fallback', "Over 20 ports have been automatically forwarded. The `process` based automatic port forwarding has been switched to `hybrid` in settings. Some ports may no longer be detected."), - severity: Severity.Warning, - actions: { - primary: [ - new Action('switchBack', nls.localize('remote.autoForwardPortsSource.fallback.switchBack', "Undo"), undefined, true, async () => { - await this.configurationService.updateValue(PORT_AUTO_SOURCE_SETTING, PORT_AUTO_SOURCE_SETTING_PROCESS); - await this.configurationService.updateValue(PORT_AUTO_FALLBACK_SETTING, 0, ConfigurationTarget.WORKSPACE); - this.portListener?.dispose(); - this.portListener = undefined; - }), - new Action('showPortSourceSetting', nls.localize('remote.autoForwardPortsSource.fallback.showPortSourceSetting', "Show Setting"), undefined, true, async () => { - await this.preferencesService.openSettings({ - query: 'remote.autoForwardPortsSource' - }); - }) - ] - } - }); - } - })); - } else { - this.portListener?.dispose(); - this.portListener = undefined; - } - } - - - private setup(environment: IRemoteAgentEnvironment | null) { - const alreadyForwarded = this.procForwarder?.forwarded; - const isSwitch = this.outputForwarder || this.procForwarder; - this.procForwarder?.dispose(); - this.procForwarder = undefined; - this.outputForwarder?.dispose(); - this.outputForwarder = undefined; - if (environment?.os !== OperatingSystem.Linux) { - if (this.configurationService.inspect(PORT_AUTO_SOURCE_SETTING).default?.value !== PORT_AUTO_SOURCE_SETTING_OUTPUT) { - Registry.as(ConfigurationExtensions.Configuration) - .registerDefaultConfigurations([{ overrides: { 'remote.autoForwardPortsSource': PORT_AUTO_SOURCE_SETTING_OUTPUT } }]); - } - this.outputForwarder = this._register(new OutputAutomaticPortForwarding(this.terminalService, this.notificationService, this.openerService, this.externalOpenerService, - this.remoteExplorerService, this.configurationService, this.debugService, this.tunnelService, this.hostService, this.logService, this.contextKeyService, () => false)); - } else { - const useProc = () => (this.configurationService.getValue(PORT_AUTO_SOURCE_SETTING) === PORT_AUTO_SOURCE_SETTING_PROCESS); - if (useProc()) { - this.procForwarder = this._register(new ProcAutomaticPortForwarding(false, alreadyForwarded, !isSwitch, this.configurationService, this.remoteExplorerService, this.notificationService, - this.openerService, this.externalOpenerService, this.tunnelService, this.hostService, this.logService, this.contextKeyService)); - } else if (this.configurationService.getValue(PORT_AUTO_SOURCE_SETTING) === PORT_AUTO_SOURCE_SETTING_HYBRID) { - this.procForwarder = this._register(new ProcAutomaticPortForwarding(true, alreadyForwarded, !isSwitch, this.configurationService, this.remoteExplorerService, this.notificationService, - this.openerService, this.externalOpenerService, this.tunnelService, this.hostService, this.logService, this.contextKeyService)); - } - this.outputForwarder = this._register(new OutputAutomaticPortForwarding(this.terminalService, this.notificationService, this.openerService, this.externalOpenerService, - this.remoteExplorerService, this.configurationService, this.debugService, this.tunnelService, this.hostService, this.logService, this.contextKeyService, useProc)); - } - this.listenForPorts(); - } -} - -class OnAutoForwardedAction extends Disposable { - private lastNotifyTime: Date; - private static NOTIFY_COOL_DOWN = 5000; // milliseconds - private lastNotification: INotificationHandle | undefined; - private lastShownPort: number | undefined; - private doActionTunnels: RemoteTunnel[] | undefined; - private alreadyOpenedOnce: Set = new Set(); - - constructor(private readonly notificationService: INotificationService, - private readonly remoteExplorerService: IRemoteExplorerService, - private readonly openerService: IOpenerService, - private readonly externalOpenerService: IExternalUriOpenerService, - private readonly tunnelService: ITunnelService, - private readonly hostService: IHostService, - private readonly logService: ILogService, - private readonly contextKeyService: IContextKeyService) { - super(); - this.lastNotifyTime = new Date(); - this.lastNotifyTime.setFullYear(this.lastNotifyTime.getFullYear() - 1); - } - - public async doAction(tunnels: RemoteTunnel[]): Promise { - this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) Starting action for ${tunnels[0]?.tunnelRemotePort}`); - this.doActionTunnels = tunnels; - const tunnel = await this.portNumberHeuristicDelay(); - this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) Heuristic chose ${tunnel?.tunnelRemotePort}`); - if (tunnel) { - const allAttributes = await this.remoteExplorerService.tunnelModel.getAttributes([{ port: tunnel.tunnelRemotePort, host: tunnel.tunnelRemoteHost }]); - const attributes = allAttributes?.get(tunnel.tunnelRemotePort)?.onAutoForward; - this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) onAutoForward action is ${attributes}`); - switch (attributes) { - case OnPortForward.OpenBrowserOnce: { - if (this.alreadyOpenedOnce.has(tunnel.localAddress)) { - break; - } - this.alreadyOpenedOnce.add(tunnel.localAddress); - // Intentionally do not break so that the open browser path can be run. - } - case OnPortForward.OpenBrowser: { - const address = makeAddress(tunnel.tunnelRemoteHost, tunnel.tunnelRemotePort); - await OpenPortInBrowserAction.run(this.remoteExplorerService.tunnelModel, this.openerService, address); - break; - } - case OnPortForward.OpenPreview: { - const address = makeAddress(tunnel.tunnelRemoteHost, tunnel.tunnelRemotePort); - await OpenPortInPreviewAction.run(this.remoteExplorerService.tunnelModel, this.openerService, this.externalOpenerService, address); - break; - } - case OnPortForward.Silent: break; - default: { - const elapsed = new Date().getTime() - this.lastNotifyTime.getTime(); - this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) time elapsed since last notification ${elapsed} ms`); - if (elapsed > OnAutoForwardedAction.NOTIFY_COOL_DOWN) { - await this.showNotification(tunnel); - } - } - } - } - } - - public hide(removedPorts: number[]) { - if (this.doActionTunnels) { - this.doActionTunnels = this.doActionTunnels.filter(value => !removedPorts.includes(value.tunnelRemotePort)); - } - if (this.lastShownPort && removedPorts.indexOf(this.lastShownPort) >= 0) { - this.lastNotification?.close(); - } - } - - private newerTunnel: RemoteTunnel | undefined; - private async portNumberHeuristicDelay(): Promise { - this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) Starting heuristic delay`); - if (!this.doActionTunnels || this.doActionTunnels.length === 0) { - return; - } - this.doActionTunnels = this.doActionTunnels.sort((a, b) => a.tunnelRemotePort - b.tunnelRemotePort); - const firstTunnel = this.doActionTunnels.shift()!; - // Heuristic. - if (firstTunnel.tunnelRemotePort % 1000 === 0) { - this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) Heuristic chose tunnel because % 1000: ${firstTunnel.tunnelRemotePort}`); - this.newerTunnel = firstTunnel; - return firstTunnel; - // 9229 is the node inspect port - } else if (firstTunnel.tunnelRemotePort < 10000 && firstTunnel.tunnelRemotePort !== 9229) { - this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) Heuristic chose tunnel because < 10000: ${firstTunnel.tunnelRemotePort}`); - this.newerTunnel = firstTunnel; - return firstTunnel; - } - - this.logService.trace(`ForwardedPorts: (OnAutoForwardedAction) Waiting for "better" tunnel than ${firstTunnel.tunnelRemotePort}`); - this.newerTunnel = undefined; - return new Promise(resolve => { - setTimeout(() => { - if (this.newerTunnel) { - resolve(undefined); - } else if (this.doActionTunnels?.includes(firstTunnel)) { - resolve(firstTunnel); - } else { - resolve(undefined); - } - }, 3000); - }); - } - - private async basicMessage(tunnel: RemoteTunnel) { - const properties = await this.remoteExplorerService.tunnelModel.getAttributes([{ host: tunnel.tunnelRemoteHost, port: tunnel.tunnelRemotePort }], false); - const label = properties?.get(tunnel.tunnelRemotePort)?.label; - return nls.localize('remote.tunnelsView.automaticForward', "Your application{0} running on port {1} is available. ", - label ? ` (${label})` : '', - tunnel.tunnelRemotePort); - } - - private linkMessage() { - return nls.localize( - { key: 'remote.tunnelsView.notificationLink2', comment: ['[See all forwarded ports]({0}) is a link. Only translate `See all forwarded ports`. Do not change brackets and parentheses or {0}'] }, - "[See all forwarded ports]({0})", `command:${TunnelPanel.ID}.focus`); - } - - private async showNotification(tunnel: RemoteTunnel) { - if (!await this.hostService.hadLastFocus()) { - return; - } - - this.lastNotification?.close(); - let message = await this.basicMessage(tunnel); - const choices = [this.openBrowserChoice(tunnel)]; - if (!isWeb || openPreviewEnabledContext.getValue(this.contextKeyService)) { - choices.push(this.openPreviewChoice(tunnel)); - } - - if ((tunnel.tunnelLocalPort !== tunnel.tunnelRemotePort) && this.tunnelService.canElevate && this.tunnelService.isPortPrivileged(tunnel.tunnelRemotePort)) { - // Privileged ports are not on Windows, so it's safe to use "superuser" - message += nls.localize('remote.tunnelsView.elevationMessage', "You'll need to run as superuser to use port {0} locally. ", tunnel.tunnelRemotePort); - choices.unshift(this.elevateChoice(tunnel)); - } - - if (tunnel.privacy === TunnelPrivacyId.Private && isWeb && this.tunnelService.canChangePrivacy) { - choices.push(this.makePublicChoice(tunnel)); - } - - message += this.linkMessage(); - - this.lastNotification = this.notificationService.prompt(Severity.Info, message, choices, { neverShowAgain: { id: 'remote.tunnelsView.autoForwardNeverShow', isSecondary: true } }); - this.lastShownPort = tunnel.tunnelRemotePort; - this.lastNotifyTime = new Date(); - this.lastNotification.onDidClose(() => { - this.lastNotification = undefined; - this.lastShownPort = undefined; - }); - } - - private makePublicChoice(tunnel: RemoteTunnel): IPromptChoice { - return { - label: nls.localize('remote.tunnelsView.makePublic', "Make Public"), - run: async () => { - const oldTunnelDetails = mapHasAddressLocalhostOrAllInterfaces(this.remoteExplorerService.tunnelModel.forwarded, tunnel.tunnelRemoteHost, tunnel.tunnelRemotePort); - await this.remoteExplorerService.close({ host: tunnel.tunnelRemoteHost, port: tunnel.tunnelRemotePort }, TunnelCloseReason.Other); - return this.remoteExplorerService.forward({ - remote: { host: tunnel.tunnelRemoteHost, port: tunnel.tunnelRemotePort }, - local: tunnel.tunnelLocalPort, - name: oldTunnelDetails?.name, - elevateIfNeeded: true, - privacy: TunnelPrivacyId.Public, - source: oldTunnelDetails?.source - }); - } - }; - } - - private openBrowserChoice(tunnel: RemoteTunnel): IPromptChoice { - const address = makeAddress(tunnel.tunnelRemoteHost, tunnel.tunnelRemotePort); - return { - label: OpenPortInBrowserAction.LABEL, - run: () => OpenPortInBrowserAction.run(this.remoteExplorerService.tunnelModel, this.openerService, address) - }; - } - - private openPreviewChoice(tunnel: RemoteTunnel): IPromptChoice { - const address = makeAddress(tunnel.tunnelRemoteHost, tunnel.tunnelRemotePort); - return { - label: OpenPortInPreviewAction.LABEL, - run: () => OpenPortInPreviewAction.run(this.remoteExplorerService.tunnelModel, this.openerService, this.externalOpenerService, address) - }; - } - - private elevateChoice(tunnel: RemoteTunnel): IPromptChoice { - return { - // Privileged ports are not on Windows, so it's ok to stick to just "sudo". - label: nls.localize('remote.tunnelsView.elevationButton', "Use Port {0} as Sudo...", tunnel.tunnelRemotePort), - run: async () => { - await this.remoteExplorerService.close({ host: tunnel.tunnelRemoteHost, port: tunnel.tunnelRemotePort }, TunnelCloseReason.Other); - const newTunnel = await this.remoteExplorerService.forward({ - remote: { host: tunnel.tunnelRemoteHost, port: tunnel.tunnelRemotePort }, - local: tunnel.tunnelRemotePort, - elevateIfNeeded: true, - source: AutoTunnelSource - }); - if (!newTunnel || (typeof newTunnel === 'string')) { - return; - } - this.lastNotification?.close(); - this.lastShownPort = newTunnel.tunnelRemotePort; - this.lastNotification = this.notificationService.prompt(Severity.Info, - await this.basicMessage(newTunnel) + this.linkMessage(), - [this.openBrowserChoice(newTunnel), this.openPreviewChoice(tunnel)], - { neverShowAgain: { id: 'remote.tunnelsView.autoForwardNeverShow', isSecondary: true } }); - this.lastNotification.onDidClose(() => { - this.lastNotification = undefined; - this.lastShownPort = undefined; - }); - } - }; - } -} - -class OutputAutomaticPortForwarding extends Disposable { - private portsFeatures?: IDisposable; - private urlFinder?: UrlFinder; - private notifier: OnAutoForwardedAction; - - constructor( - private readonly terminalService: ITerminalService, - readonly notificationService: INotificationService, - readonly openerService: IOpenerService, - readonly externalOpenerService: IExternalUriOpenerService, - private readonly remoteExplorerService: IRemoteExplorerService, - private readonly configurationService: IConfigurationService, - private readonly debugService: IDebugService, - readonly tunnelService: ITunnelService, - readonly hostService: IHostService, - readonly logService: ILogService, - readonly contextKeyService: IContextKeyService, - readonly privilegedOnly: () => boolean - ) { - super(); - this.notifier = new OnAutoForwardedAction(notificationService, remoteExplorerService, openerService, externalOpenerService, tunnelService, hostService, logService, contextKeyService); - this._register(configurationService.onDidChangeConfiguration((e) => { - if (e.affectsConfiguration(PORT_AUTO_FORWARD_SETTING)) { - this.tryStartStopUrlFinder(); - } - })); - - this.portsFeatures = this._register(this.remoteExplorerService.onEnabledPortsFeatures(() => { - this.tryStartStopUrlFinder(); - })); - this.tryStartStopUrlFinder(); - - if (configurationService.getValue(PORT_AUTO_SOURCE_SETTING) === PORT_AUTO_SOURCE_SETTING_HYBRID) { - this._register(this.tunnelService.onTunnelClosed(tunnel => this.notifier.hide([tunnel.port]))); - } - } - - private tryStartStopUrlFinder() { - if (this.configurationService.getValue(PORT_AUTO_FORWARD_SETTING)) { - this.startUrlFinder(); - } else { - this.stopUrlFinder(); - } - } - - private startUrlFinder() { - if (!this.urlFinder && (this.remoteExplorerService.portsFeaturesEnabled !== PortsEnablement.AdditionalFeatures)) { - return; - } - this.portsFeatures?.dispose(); - this.urlFinder = this._register(new UrlFinder(this.terminalService, this.debugService)); - this._register(this.urlFinder.onDidMatchLocalUrl(async (localUrl) => { - if (mapHasAddressLocalhostOrAllInterfaces(this.remoteExplorerService.tunnelModel.detected, localUrl.host, localUrl.port)) { - return; - } - const attributes = (await this.remoteExplorerService.tunnelModel.getAttributes([localUrl]))?.get(localUrl.port); - if (attributes?.onAutoForward === OnPortForward.Ignore) { - return; - } - if (this.privilegedOnly() && !this.tunnelService.isPortPrivileged(localUrl.port)) { - return; - } - const forwarded = await this.remoteExplorerService.forward({ remote: localUrl, source: AutoTunnelSource }, attributes ?? null); - if (forwarded && (typeof forwarded !== 'string')) { - this.notifier.doAction([forwarded]); - } - })); - } - - private stopUrlFinder() { - if (this.urlFinder) { - this.urlFinder.dispose(); - this.urlFinder = undefined; - } - } -} - -class ProcAutomaticPortForwarding extends Disposable { - private candidateListener: IDisposable | undefined; - private autoForwarded: Set = new Set(); - private notifiedOnly: Set = new Set(); - private notifier: OnAutoForwardedAction; - private initialCandidates: Set = new Set(); - private portsFeatures: IDisposable | undefined; - - constructor( - private readonly unforwardOnly: boolean, - readonly alreadyAutoForwarded: Set | undefined, - private readonly needsInitialCandidates: boolean, - private readonly configurationService: IConfigurationService, - readonly remoteExplorerService: IRemoteExplorerService, - readonly notificationService: INotificationService, - readonly openerService: IOpenerService, - readonly externalOpenerService: IExternalUriOpenerService, - readonly tunnelService: ITunnelService, - readonly hostService: IHostService, - readonly logService: ILogService, - readonly contextKeyService: IContextKeyService, - ) { - super(); - this.notifier = new OnAutoForwardedAction(notificationService, remoteExplorerService, openerService, externalOpenerService, tunnelService, hostService, logService, contextKeyService); - alreadyAutoForwarded?.forEach(port => this.autoForwarded.add(port)); - this.initialize(); - } - - get forwarded(): Set { - return this.autoForwarded; - } - - private async initialize() { - if (!this.remoteExplorerService.tunnelModel.environmentTunnelsSet) { - await new Promise(resolve => this.remoteExplorerService.tunnelModel.onEnvironmentTunnelsSet(() => resolve())); - } - - this._register(this.configurationService.onDidChangeConfiguration(async (e) => { - if (e.affectsConfiguration(PORT_AUTO_FORWARD_SETTING)) { - await this.startStopCandidateListener(); - } - })); - - this.portsFeatures = this._register(this.remoteExplorerService.onEnabledPortsFeatures(async () => { - await this.startStopCandidateListener(); - })); - - this.startStopCandidateListener(); - } - - private async startStopCandidateListener() { - if (this.configurationService.getValue(PORT_AUTO_FORWARD_SETTING)) { - await this.startCandidateListener(); - } else { - this.stopCandidateListener(); - } - } - - private stopCandidateListener() { - if (this.candidateListener) { - this.candidateListener.dispose(); - this.candidateListener = undefined; - } - } - - private async startCandidateListener() { - if (this.candidateListener || (this.remoteExplorerService.portsFeaturesEnabled !== PortsEnablement.AdditionalFeatures)) { - return; - } - this.portsFeatures?.dispose(); - - // Capture list of starting candidates so we don't auto forward them later. - await this.setInitialCandidates(); - - // Need to check the setting again, since it may have changed while we waited for the initial candidates to be set. - if (this.configurationService.getValue(PORT_AUTO_FORWARD_SETTING)) { - this.candidateListener = this._register(this.remoteExplorerService.tunnelModel.onCandidatesChanged(this.handleCandidateUpdate, this)); - } - } - - private async setInitialCandidates() { - if (!this.needsInitialCandidates) { - this.logService.debug(`ForwardedPorts: (ProcForwarding) Not setting initial candidates`); - return; - } - let startingCandidates = this.remoteExplorerService.tunnelModel.candidatesOrUndefined; - if (!startingCandidates) { - await new Promise(resolve => this.remoteExplorerService.tunnelModel.onCandidatesChanged(() => resolve())); - startingCandidates = this.remoteExplorerService.tunnelModel.candidates; - } - - for (const value of startingCandidates) { - this.initialCandidates.add(makeAddress(value.host, value.port)); - } - this.logService.debug(`ForwardedPorts: (ProcForwarding) Initial candidates set to ${startingCandidates.map(candidate => candidate.port).join(', ')}`); - } - - private async forwardCandidates(): Promise { - let attributes: Map | undefined; - const allTunnels: RemoteTunnel[] = []; - this.logService.trace(`ForwardedPorts: (ProcForwarding) Attempting to forward ${this.remoteExplorerService.tunnelModel.candidates.length} candidates`); - for (const value of this.remoteExplorerService.tunnelModel.candidates) { - if (!value.detail) { - this.logService.trace(`ForwardedPorts: (ProcForwarding) Port ${value.port} missing detail`); - continue; - } - - if (!attributes) { - attributes = await this.remoteExplorerService.tunnelModel.getAttributes(this.remoteExplorerService.tunnelModel.candidates); - } - - const portAttributes = attributes?.get(value.port); - - const address = makeAddress(value.host, value.port); - if (this.initialCandidates.has(address) && (portAttributes?.onAutoForward === undefined)) { - continue; - } - if (this.notifiedOnly.has(address) || this.autoForwarded.has(address)) { - continue; - } - const alreadyForwarded = mapHasAddressLocalhostOrAllInterfaces(this.remoteExplorerService.tunnelModel.forwarded, value.host, value.port); - if (mapHasAddressLocalhostOrAllInterfaces(this.remoteExplorerService.tunnelModel.detected, value.host, value.port)) { - continue; - } - - if (portAttributes?.onAutoForward === OnPortForward.Ignore) { - this.logService.trace(`ForwardedPorts: (ProcForwarding) Port ${value.port} is ignored`); - continue; - } - const forwarded = await this.remoteExplorerService.forward({ remote: value, source: AutoTunnelSource }, portAttributes ?? null); - if (!alreadyForwarded && forwarded) { - this.logService.trace(`ForwardedPorts: (ProcForwarding) Port ${value.port} has been forwarded`); - this.autoForwarded.add(address); - } else if (forwarded) { - this.logService.trace(`ForwardedPorts: (ProcForwarding) Port ${value.port} has been notified`); - this.notifiedOnly.add(address); - } - if (forwarded && (typeof forwarded !== 'string')) { - allTunnels.push(forwarded); - } - } - this.logService.trace(`ForwardedPorts: (ProcForwarding) Forwarded ${allTunnels.length} candidates`); - if (allTunnels.length === 0) { - return undefined; - } - return allTunnels; - } - - private async handleCandidateUpdate(removed: Map) { - const removedPorts: number[] = []; - let autoForwarded: Map; - if (this.unforwardOnly) { - autoForwarded = new Map(); - for (const entry of this.remoteExplorerService.tunnelModel.forwarded.entries()) { - if (entry[1].source.source === TunnelSource.Auto) { - autoForwarded.set(entry[0], entry[1]); - } - } - } else { - autoForwarded = new Map(this.autoForwarded.entries()); - } - - for (const removedPort of removed) { - const key = removedPort[0]; - let value = removedPort[1]; - const forwardedValue = mapHasAddressLocalhostOrAllInterfaces(autoForwarded, value.host, value.port); - if (forwardedValue) { - if (typeof forwardedValue === 'string') { - this.autoForwarded.delete(key); - } else { - value = { host: forwardedValue.remoteHost, port: forwardedValue.remotePort }; - } - await this.remoteExplorerService.close(value, TunnelCloseReason.AutoForwardEnd); - removedPorts.push(value.port); - } else if (this.notifiedOnly.has(key)) { - this.notifiedOnly.delete(key); - removedPorts.push(value.port); - } else if (this.initialCandidates.has(key)) { - this.initialCandidates.delete(key); - } - } - - if (this.unforwardOnly) { - return; - } - - if (removedPorts.length > 0) { - await this.notifier.hide(removedPorts); - } - - const tunnels = await this.forwardCandidates(); - if (tunnels) { - await this.notifier.doAction(tunnels); - } - } -} diff --git a/src/vs/workbench/contrib/scm/browser/scm.contribution.ts b/src/vs/workbench/contrib/scm/browser/scm.contribution.ts deleted file mode 100644 index d7e997d29ff5c..0000000000000 --- a/src/vs/workbench/contrib/scm/browser/scm.contribution.ts +++ /dev/null @@ -1,600 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { localize, localize2 } from '../../../../nls.js'; -import { Registry } from '../../../../platform/registry/common/platform.js'; -import { IWorkbenchContributionsRegistry, registerWorkbenchContribution2, Extensions as WorkbenchExtensions, WorkbenchPhase } from '../../../common/contributions.js'; -import { DirtyDiffWorkbenchController } from './dirtydiffDecorator.js'; -import { VIEWLET_ID, ISCMService, VIEW_PANE_ID, ISCMProvider, ISCMViewService, REPOSITORIES_VIEW_PANE_ID, HISTORY_VIEW_PANE_ID } from '../common/scm.js'; -import { KeyMod, KeyCode } from '../../../../base/common/keyCodes.js'; -import { MenuRegistry, MenuId } from '../../../../platform/actions/common/actions.js'; -import { SCMActiveResourceContextKeyController, SCMActiveRepositoryController } from './activity.js'; -import { LifecyclePhase } from '../../../services/lifecycle/common/lifecycle.js'; -import { IConfigurationRegistry, Extensions as ConfigurationExtensions, ConfigurationScope } from '../../../../platform/configuration/common/configurationRegistry.js'; -import { IContextKeyService, ContextKeyExpr } from '../../../../platform/contextkey/common/contextkey.js'; -import { CommandsRegistry, ICommandService } from '../../../../platform/commands/common/commands.js'; -import { KeybindingsRegistry, KeybindingWeight } from '../../../../platform/keybinding/common/keybindingsRegistry.js'; -import { InstantiationType, registerSingleton } from '../../../../platform/instantiation/common/extensions.js'; -import { SCMService } from '../common/scmService.js'; -import { IViewContainersRegistry, ViewContainerLocation, Extensions as ViewContainerExtensions, IViewsRegistry } from '../../../common/views.js'; -import { SCMViewPaneContainer } from './scmViewPaneContainer.js'; -import { SyncDescriptor } from '../../../../platform/instantiation/common/descriptors.js'; -import { ModesRegistry } from '../../../../editor/common/languages/modesRegistry.js'; -import { Codicon } from '../../../../base/common/codicons.js'; -import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js'; -import { ContextKeys, SCMViewPane } from './scmViewPane.js'; -import { SCMViewService } from './scmViewService.js'; -import { SCMRepositoriesViewPane } from './scmRepositoriesViewPane.js'; -import { ServicesAccessor } from '../../../../platform/instantiation/common/instantiation.js'; -import { Context as SuggestContext } from '../../../../editor/contrib/suggest/browser/suggest.js'; -import { MANAGE_TRUST_COMMAND_ID, WorkspaceTrustContext } from '../../workspace/common/workspace.js'; -import { IQuickDiffService } from '../common/quickDiff.js'; -import { QuickDiffService } from '../common/quickDiffService.js'; -import { getActiveElement, isActiveElement } from '../../../../base/browser/dom.js'; -import { SCMWorkingSetController } from './workingSet.js'; -import { IViewsService } from '../../../services/views/common/viewsService.js'; -import { IListService, WorkbenchList } from '../../../../platform/list/browser/listService.js'; -import { isSCMRepository } from './util.js'; -import { SCMHistoryViewPane } from './scmHistoryViewPane.js'; -import { IsWebContext } from '../../../../platform/contextkey/common/contextkeys.js'; -import { RemoteNameContext } from '../../../common/contextkeys.js'; -import { DirtyDiffModelService, IDirtyDiffModelService } from './dirtyDiffModel.js'; - -ModesRegistry.registerLanguage({ - id: 'scminput', - extensions: [], - aliases: [], // hide from language selector - mimetypes: ['text/x-scm-input'] -}); - -Registry.as(WorkbenchExtensions.Workbench) - .registerWorkbenchContribution(DirtyDiffWorkbenchController, LifecyclePhase.Restored); - -const sourceControlViewIcon = registerIcon('source-control-view-icon', Codicon.sourceControl, localize('sourceControlViewIcon', 'View icon of the Source Control view.')); - -const viewContainer = Registry.as(ViewContainerExtensions.ViewContainersRegistry).registerViewContainer({ - id: VIEWLET_ID, - title: localize2('source control', 'Source Control'), - ctorDescriptor: new SyncDescriptor(SCMViewPaneContainer), - storageId: 'workbench.scm.views.state', - icon: sourceControlViewIcon, - alwaysUseContainerInfo: true, - order: 2, - hideIfEmpty: true, -}, ViewContainerLocation.Sidebar, { doNotRegisterOpenCommand: true }); - -const viewsRegistry = Registry.as(ViewContainerExtensions.ViewsRegistry); - -viewsRegistry.registerViewWelcomeContent(VIEW_PANE_ID, { - content: localize('no open repo', "No source control providers registered."), - when: 'default' -}); - -viewsRegistry.registerViewWelcomeContent(VIEW_PANE_ID, { - content: localize('no open repo in an untrusted workspace', "None of the registered source control providers work in Restricted Mode."), - when: ContextKeyExpr.and(ContextKeyExpr.equals('scm.providerCount', 0), WorkspaceTrustContext.IsEnabled, WorkspaceTrustContext.IsTrusted.toNegated()) -}); - -viewsRegistry.registerViewWelcomeContent(VIEW_PANE_ID, { - content: `[${localize('manageWorkspaceTrustAction', "Manage Workspace Trust")}](command:${MANAGE_TRUST_COMMAND_ID})`, - when: ContextKeyExpr.and(ContextKeyExpr.equals('scm.providerCount', 0), WorkspaceTrustContext.IsEnabled, WorkspaceTrustContext.IsTrusted.toNegated()) -}); - -viewsRegistry.registerViewWelcomeContent(HISTORY_VIEW_PANE_ID, { - content: localize('no history items', "The selected source control provider does not have any source control history items."), - when: ContextKeys.SCMHistoryItemCount.isEqualTo(0) -}); - -viewsRegistry.registerViews([{ - id: REPOSITORIES_VIEW_PANE_ID, - name: localize2('source control repositories', "Source Control Repositories"), - ctorDescriptor: new SyncDescriptor(SCMRepositoriesViewPane), - canToggleVisibility: true, - hideByDefault: true, - canMoveView: true, - weight: 20, - order: 0, - when: ContextKeyExpr.and(ContextKeyExpr.has('scm.providerCount'), ContextKeyExpr.notEquals('scm.providerCount', 0)), - // readonly when = ContextKeyExpr.or(ContextKeyExpr.equals('config.scm.alwaysShowProviders', true), ContextKeyExpr.and(ContextKeyExpr.notEquals('scm.providerCount', 0), ContextKeyExpr.notEquals('scm.providerCount', 1))); - containerIcon: sourceControlViewIcon -}], viewContainer); - -viewsRegistry.registerViews([{ - id: VIEW_PANE_ID, - name: localize2('source control', 'Source Control'), - ctorDescriptor: new SyncDescriptor(SCMViewPane), - canToggleVisibility: true, - canMoveView: true, - weight: 40, - order: 1, - containerIcon: sourceControlViewIcon, - openCommandActionDescriptor: { - id: viewContainer.id, - mnemonicTitle: localize({ key: 'miViewSCM', comment: ['&& denotes a mnemonic'] }, "Source &&Control"), - keybindings: { - primary: 0, - win: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyG }, - linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyG }, - mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KeyG }, - }, - order: 2, - } -}], viewContainer); - -viewsRegistry.registerViews([{ - id: HISTORY_VIEW_PANE_ID, - name: localize2('source control history', "Source Control Graph"), - ctorDescriptor: new SyncDescriptor(SCMHistoryViewPane), - canToggleVisibility: true, - canMoveView: true, - weight: 40, - order: 2, - when: ContextKeyExpr.and( - // Repository Count - ContextKeyExpr.and( - ContextKeyExpr.has('scm.providerCount'), - ContextKeyExpr.notEquals('scm.providerCount', 0)), - // Not Serverless - ContextKeyExpr.and( - IsWebContext, - RemoteNameContext.isEqualTo(''))?.negate() - ), - containerIcon: sourceControlViewIcon -}], viewContainer); - -Registry.as(WorkbenchExtensions.Workbench) - .registerWorkbenchContribution(SCMActiveRepositoryController, LifecyclePhase.Restored); - -Registry.as(WorkbenchExtensions.Workbench) - .registerWorkbenchContribution(SCMActiveResourceContextKeyController, LifecyclePhase.Restored); - -registerWorkbenchContribution2( - SCMWorkingSetController.ID, - SCMWorkingSetController, - WorkbenchPhase.AfterRestored -); - -Registry.as(ConfigurationExtensions.Configuration).registerConfiguration({ - id: 'scm', - order: 5, - title: localize('scmConfigurationTitle', "Source Control"), - type: 'object', - scope: ConfigurationScope.RESOURCE, - properties: { - 'scm.diffDecorations': { - type: 'string', - enum: ['all', 'gutter', 'overview', 'minimap', 'none'], - enumDescriptions: [ - localize('scm.diffDecorations.all', "Show the diff decorations in all available locations."), - localize('scm.diffDecorations.gutter', "Show the diff decorations only in the editor gutter."), - localize('scm.diffDecorations.overviewRuler', "Show the diff decorations only in the overview ruler."), - localize('scm.diffDecorations.minimap', "Show the diff decorations only in the minimap."), - localize('scm.diffDecorations.none', "Do not show the diff decorations.") - ], - default: 'all', - description: localize('diffDecorations', "Controls diff decorations in the editor.") - }, - 'scm.diffDecorationsGutterWidth': { - type: 'number', - enum: [1, 2, 3, 4, 5], - default: 3, - description: localize('diffGutterWidth', "Controls the width(px) of diff decorations in gutter (added & modified).") - }, - 'scm.diffDecorationsGutterVisibility': { - type: 'string', - enum: ['always', 'hover'], - enumDescriptions: [ - localize('scm.diffDecorationsGutterVisibility.always', "Show the diff decorator in the gutter at all times."), - localize('scm.diffDecorationsGutterVisibility.hover', "Show the diff decorator in the gutter only on hover.") - ], - description: localize('scm.diffDecorationsGutterVisibility', "Controls the visibility of the Source Control diff decorator in the gutter."), - default: 'always' - }, - 'scm.diffDecorationsGutterAction': { - type: 'string', - enum: ['diff', 'none'], - enumDescriptions: [ - localize('scm.diffDecorationsGutterAction.diff', "Show the inline diff Peek view on click."), - localize('scm.diffDecorationsGutterAction.none', "Do nothing.") - ], - description: localize('scm.diffDecorationsGutterAction', "Controls the behavior of Source Control diff gutter decorations."), - default: 'diff' - }, - 'scm.diffDecorationsGutterPattern': { - type: 'object', - description: localize('diffGutterPattern', "Controls whether a pattern is used for the diff decorations in gutter."), - additionalProperties: false, - properties: { - 'added': { - type: 'boolean', - description: localize('diffGutterPatternAdded', "Use pattern for the diff decorations in gutter for added lines."), - }, - 'modified': { - type: 'boolean', - description: localize('diffGutterPatternModifed', "Use pattern for the diff decorations in gutter for modified lines."), - }, - }, - default: { - 'added': false, - 'modified': true - } - }, - 'scm.diffDecorationsIgnoreTrimWhitespace': { - type: 'string', - enum: ['true', 'false', 'inherit'], - enumDescriptions: [ - localize('scm.diffDecorationsIgnoreTrimWhitespace.true', "Ignore leading and trailing whitespace."), - localize('scm.diffDecorationsIgnoreTrimWhitespace.false', "Do not ignore leading and trailing whitespace."), - localize('scm.diffDecorationsIgnoreTrimWhitespace.inherit', "Inherit from `diffEditor.ignoreTrimWhitespace`.") - ], - description: localize('diffDecorationsIgnoreTrimWhitespace', "Controls whether leading and trailing whitespace is ignored in Source Control diff gutter decorations."), - default: 'false' - }, - 'scm.alwaysShowActions': { - type: 'boolean', - description: localize('alwaysShowActions', "Controls whether inline actions are always visible in the Source Control view."), - default: false - }, - 'scm.countBadge': { - type: 'string', - enum: ['all', 'focused', 'off'], - enumDescriptions: [ - localize('scm.countBadge.all', "Show the sum of all Source Control Provider count badges."), - localize('scm.countBadge.focused', "Show the count badge of the focused Source Control Provider."), - localize('scm.countBadge.off', "Disable the Source Control count badge.") - ], - description: localize('scm.countBadge', "Controls the count badge on the Source Control icon on the Activity Bar."), - default: 'all' - }, - 'scm.providerCountBadge': { - type: 'string', - enum: ['hidden', 'auto', 'visible'], - enumDescriptions: [ - localize('scm.providerCountBadge.hidden', "Hide Source Control Provider count badges."), - localize('scm.providerCountBadge.auto', "Only show count badge for Source Control Provider when non-zero."), - localize('scm.providerCountBadge.visible', "Show Source Control Provider count badges.") - ], - markdownDescription: localize('scm.providerCountBadge', "Controls the count badges on Source Control Provider headers. These headers appear in the Source Control view when there is more than one provider or when the {0} setting is enabled, and in the Source Control Repositories view.", '\`#scm.alwaysShowRepositories#\`'), - default: 'hidden' - }, - 'scm.defaultViewMode': { - type: 'string', - enum: ['tree', 'list'], - enumDescriptions: [ - localize('scm.defaultViewMode.tree', "Show the repository changes as a tree."), - localize('scm.defaultViewMode.list', "Show the repository changes as a list.") - ], - description: localize('scm.defaultViewMode', "Controls the default Source Control repository view mode."), - default: 'list' - }, - 'scm.defaultViewSortKey': { - type: 'string', - enum: ['name', 'path', 'status'], - enumDescriptions: [ - localize('scm.defaultViewSortKey.name', "Sort the repository changes by file name."), - localize('scm.defaultViewSortKey.path', "Sort the repository changes by path."), - localize('scm.defaultViewSortKey.status', "Sort the repository changes by Source Control status.") - ], - description: localize('scm.defaultViewSortKey', "Controls the default Source Control repository changes sort order when viewed as a list."), - default: 'path' - }, - 'scm.autoReveal': { - type: 'boolean', - description: localize('autoReveal', "Controls whether the Source Control view should automatically reveal and select files when opening them."), - default: true - }, - 'scm.inputFontFamily': { - type: 'string', - markdownDescription: localize('inputFontFamily', "Controls the font for the input message. Use `default` for the workbench user interface font family, `editor` for the `#editor.fontFamily#`'s value, or a custom font family."), - default: 'default' - }, - 'scm.inputFontSize': { - type: 'number', - markdownDescription: localize('inputFontSize', "Controls the font size for the input message in pixels."), - default: 13 - }, - 'scm.inputMaxLineCount': { - type: 'number', - markdownDescription: localize('inputMaxLines', "Controls the maximum number of lines that the input will auto-grow to."), - minimum: 1, - maximum: 50, - default: 10 - }, - 'scm.inputMinLineCount': { - type: 'number', - markdownDescription: localize('inputMinLines', "Controls the minimum number of lines that the input will auto-grow from."), - minimum: 1, - maximum: 50, - default: 1 - }, - 'scm.alwaysShowRepositories': { - type: 'boolean', - markdownDescription: localize('alwaysShowRepository', "Controls whether repositories should always be visible in the Source Control view."), - default: false - }, - 'scm.repositories.sortOrder': { - type: 'string', - enum: ['discovery time', 'name', 'path'], - enumDescriptions: [ - localize('scm.repositoriesSortOrder.discoveryTime', "Repositories in the Source Control Repositories view are sorted by discovery time. Repositories in the Source Control view are sorted in the order that they were selected."), - localize('scm.repositoriesSortOrder.name', "Repositories in the Source Control Repositories and Source Control views are sorted by repository name."), - localize('scm.repositoriesSortOrder.path', "Repositories in the Source Control Repositories and Source Control views are sorted by repository path.") - ], - description: localize('repositoriesSortOrder', "Controls the sort order of the repositories in the source control repositories view."), - default: 'discovery time' - }, - 'scm.repositories.visible': { - type: 'number', - description: localize('providersVisible', "Controls how many repositories are visible in the Source Control Repositories section. Set to 0, to be able to manually resize the view."), - default: 10 - }, - 'scm.showActionButton': { - type: 'boolean', - markdownDescription: localize('showActionButton', "Controls whether an action button can be shown in the Source Control view."), - default: true - }, - 'scm.showInputActionButton': { - type: 'boolean', - markdownDescription: localize('showInputActionButton', "Controls whether an action button can be shown in the Source Control input."), - default: true - }, - 'scm.workingSets.enabled': { - type: 'boolean', - description: localize('scm.workingSets.enabled', "Controls whether to store editor working sets when switching between source control history item groups."), - default: false - }, - 'scm.workingSets.default': { - type: 'string', - enum: ['empty', 'current'], - enumDescriptions: [ - localize('scm.workingSets.default.empty', "Use an empty working set when switching to a source control history item group that does not have a working set."), - localize('scm.workingSets.default.current', "Use the current working set when switching to a source control history item group that does not have a working set.") - ], - description: localize('scm.workingSets.default', "Controls the default working set to use when switching to a source control history item group that does not have a working set."), - default: 'current' - }, - 'scm.compactFolders': { - type: 'boolean', - description: localize('scm.compactFolders', "Controls whether the Source Control view should render folders in a compact form. In such a form, single child folders will be compressed in a combined tree element."), - default: true - }, - 'scm.graph.pageOnScroll': { - type: 'boolean', - description: localize('scm.graph.pageOnScroll', "Controls whether the Source Control Graph view will load the next page of items when you scroll to the end of the list."), - default: true - }, - 'scm.graph.pageSize': { - type: 'number', - description: localize('scm.graph.pageSize', "The number of items to show in the Source Control Graph view by default and when loading more items."), - minimum: 1, - maximum: 1000, - default: 50 - }, - 'scm.graph.badges': { - type: 'string', - enum: ['all', 'filter'], - enumDescriptions: [ - localize('scm.graph.badges.all', "Show badges of all history item groups in the Source Control Graph view."), - localize('scm.graph.badges.filter', "Show only the badges of history item groups used as a filter in the Source Control Graph view.") - ], - description: localize('scm.graph.badges', "Controls which badges are shown in the Source Control Graph view. The badges are shown on the right side of the graph indicating the names of history item groups."), - default: 'filter' - } - } -}); - -KeybindingsRegistry.registerCommandAndKeybindingRule({ - id: 'scm.acceptInput', - metadata: { description: localize('scm accept', "Source Control: Accept Input"), args: [] }, - weight: KeybindingWeight.WorkbenchContrib, - when: ContextKeyExpr.has('scmRepository'), - primary: KeyMod.CtrlCmd | KeyCode.Enter, - handler: accessor => { - const contextKeyService = accessor.get(IContextKeyService); - const context = contextKeyService.getContext(getActiveElement()); - const repositoryId = context.getValue('scmRepository'); - - if (!repositoryId) { - return Promise.resolve(null); - } - - const scmService = accessor.get(ISCMService); - const repository = scmService.getRepository(repositoryId); - - if (!repository?.provider.acceptInputCommand) { - return Promise.resolve(null); - } - - const id = repository.provider.acceptInputCommand.id; - const args = repository.provider.acceptInputCommand.arguments; - const commandService = accessor.get(ICommandService); - - return commandService.executeCommand(id, ...(args || [])); - } -}); - -KeybindingsRegistry.registerCommandAndKeybindingRule({ - id: 'scm.clearInput', - weight: KeybindingWeight.WorkbenchContrib, - when: ContextKeyExpr.and(ContextKeyExpr.has('scmRepository'), SuggestContext.Visible.toNegated()), - primary: KeyCode.Escape, - handler: async (accessor) => { - const scmService = accessor.get(ISCMService); - const contextKeyService = accessor.get(IContextKeyService); - - const context = contextKeyService.getContext(getActiveElement()); - const repositoryId = context.getValue('scmRepository'); - const repository = repositoryId ? scmService.getRepository(repositoryId) : undefined; - repository?.input.setValue('', true); - } -}); - -const viewNextCommitCommand = { - description: { description: localize('scm view next commit', "Source Control: View Next Commit"), args: [] }, - weight: KeybindingWeight.WorkbenchContrib, - handler: (accessor: ServicesAccessor) => { - const contextKeyService = accessor.get(IContextKeyService); - const scmService = accessor.get(ISCMService); - const context = contextKeyService.getContext(getActiveElement()); - const repositoryId = context.getValue('scmRepository'); - const repository = repositoryId ? scmService.getRepository(repositoryId) : undefined; - repository?.input.showNextHistoryValue(); - } -}; - -const viewPreviousCommitCommand = { - description: { description: localize('scm view previous commit', "Source Control: View Previous Commit"), args: [] }, - weight: KeybindingWeight.WorkbenchContrib, - handler: (accessor: ServicesAccessor) => { - const contextKeyService = accessor.get(IContextKeyService); - const scmService = accessor.get(ISCMService); - const context = contextKeyService.getContext(getActiveElement()); - const repositoryId = context.getValue('scmRepository'); - const repository = repositoryId ? scmService.getRepository(repositoryId) : undefined; - repository?.input.showPreviousHistoryValue(); - } -}; - -KeybindingsRegistry.registerCommandAndKeybindingRule({ - ...viewNextCommitCommand, - id: 'scm.viewNextCommit', - when: ContextKeyExpr.and(ContextKeyExpr.has('scmRepository'), ContextKeyExpr.has('scmInputIsInLastPosition'), SuggestContext.Visible.toNegated()), - primary: KeyCode.DownArrow -}); - -KeybindingsRegistry.registerCommandAndKeybindingRule({ - ...viewPreviousCommitCommand, - id: 'scm.viewPreviousCommit', - when: ContextKeyExpr.and(ContextKeyExpr.has('scmRepository'), ContextKeyExpr.has('scmInputIsInFirstPosition'), SuggestContext.Visible.toNegated()), - primary: KeyCode.UpArrow -}); - -KeybindingsRegistry.registerCommandAndKeybindingRule({ - ...viewNextCommitCommand, - id: 'scm.forceViewNextCommit', - when: ContextKeyExpr.has('scmRepository'), - primary: KeyMod.Alt | KeyCode.DownArrow -}); - -KeybindingsRegistry.registerCommandAndKeybindingRule({ - ...viewPreviousCommitCommand, - id: 'scm.forceViewPreviousCommit', - when: ContextKeyExpr.has('scmRepository'), - primary: KeyMod.Alt | KeyCode.UpArrow -}); - -CommandsRegistry.registerCommand('scm.openInIntegratedTerminal', async (accessor, ...providers: ISCMProvider[]) => { - if (!providers || providers.length === 0) { - return; - } - - const commandService = accessor.get(ICommandService); - const listService = accessor.get(IListService); - - let provider = providers.length === 1 ? providers[0] : undefined; - - if (!provider) { - const list = listService.lastFocusedList; - const element = list?.getHTMLElement(); - - if (list instanceof WorkbenchList && element && isActiveElement(element)) { - const [index] = list.getFocus(); - const focusedElement = list.element(index); - - // Source Control Repositories - if (isSCMRepository(focusedElement)) { - provider = focusedElement.provider; - } - } - } - - if (!provider?.rootUri) { - return; - } - - await commandService.executeCommand('openInIntegratedTerminal', provider.rootUri); -}); - -CommandsRegistry.registerCommand('scm.openInTerminal', async (accessor, provider: ISCMProvider) => { - if (!provider || !provider.rootUri) { - return; - } - - const commandService = accessor.get(ICommandService); - await commandService.executeCommand('openInTerminal', provider.rootUri); -}); - -MenuRegistry.appendMenuItem(MenuId.SCMSourceControl, { - group: '100_end', - command: { - id: 'scm.openInTerminal', - title: localize('open in external terminal', "Open in External Terminal") - }, - when: ContextKeyExpr.and(ContextKeyExpr.equals('scmProviderHasRootUri', true), ContextKeyExpr.or(ContextKeyExpr.equals('config.terminal.sourceControlRepositoriesKind', 'external'), ContextKeyExpr.equals('config.terminal.sourceControlRepositoriesKind', 'both'))) -}); - -MenuRegistry.appendMenuItem(MenuId.SCMSourceControl, { - group: '100_end', - command: { - id: 'scm.openInIntegratedTerminal', - title: localize('open in integrated terminal', "Open in Integrated Terminal") - }, - when: ContextKeyExpr.and(ContextKeyExpr.equals('scmProviderHasRootUri', true), ContextKeyExpr.or(ContextKeyExpr.equals('config.terminal.sourceControlRepositoriesKind', 'integrated'), ContextKeyExpr.equals('config.terminal.sourceControlRepositoriesKind', 'both'))) -}); - -KeybindingsRegistry.registerCommandAndKeybindingRule({ - id: 'workbench.scm.action.focusPreviousInput', - weight: KeybindingWeight.WorkbenchContrib, - when: ContextKeys.RepositoryVisibilityCount.notEqualsTo(0), - handler: async accessor => { - const viewsService = accessor.get(IViewsService); - const scmView = await viewsService.openView(VIEW_PANE_ID); - if (scmView) { - scmView.focusPreviousInput(); - } - } -}); - -KeybindingsRegistry.registerCommandAndKeybindingRule({ - id: 'workbench.scm.action.focusNextInput', - weight: KeybindingWeight.WorkbenchContrib, - when: ContextKeys.RepositoryVisibilityCount.notEqualsTo(0), - handler: async accessor => { - const viewsService = accessor.get(IViewsService); - const scmView = await viewsService.openView(VIEW_PANE_ID); - if (scmView) { - scmView.focusNextInput(); - } - } -}); - -KeybindingsRegistry.registerCommandAndKeybindingRule({ - id: 'workbench.scm.action.focusPreviousResourceGroup', - weight: KeybindingWeight.WorkbenchContrib, - handler: async accessor => { - const viewsService = accessor.get(IViewsService); - const scmView = await viewsService.openView(VIEW_PANE_ID); - if (scmView) { - scmView.focusPreviousResourceGroup(); - } - } -}); - -KeybindingsRegistry.registerCommandAndKeybindingRule({ - id: 'workbench.scm.action.focusNextResourceGroup', - weight: KeybindingWeight.WorkbenchContrib, - handler: async accessor => { - const viewsService = accessor.get(IViewsService); - const scmView = await viewsService.openView(VIEW_PANE_ID); - if (scmView) { - scmView.focusNextResourceGroup(); - } - } -}); - -registerSingleton(ISCMService, SCMService, InstantiationType.Delayed); -registerSingleton(ISCMViewService, SCMViewService, InstantiationType.Delayed); -registerSingleton(IQuickDiffService, QuickDiffService, InstantiationType.Delayed); -registerSingleton(IDirtyDiffModelService, DirtyDiffModelService, InstantiationType.Delayed); diff --git a/src/vs/workbench/test/browser/workbenchTestServices.ts b/src/vs/workbench/test/browser/workbenchTestServices.ts deleted file mode 100644 index 4a850d040d8d2..0000000000000 --- a/src/vs/workbench/test/browser/workbenchTestServices.ts +++ /dev/null @@ -1,2308 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { FileEditorInput } from '../../contrib/files/browser/editors/fileEditorInput.js'; -import { TestInstantiationService } from '../../../platform/instantiation/test/common/instantiationServiceMock.js'; -import { basename, isEqual } from '../../../base/common/resources.js'; -import { URI } from '../../../base/common/uri.js'; -import { ITelemetryData, ITelemetryService, TelemetryLevel } from '../../../platform/telemetry/common/telemetry.js'; -import { NullTelemetryService } from '../../../platform/telemetry/common/telemetryUtils.js'; -import { EditorInput } from '../../common/editor/editorInput.js'; -import { EditorInputWithOptions, IEditorIdentifier, IUntitledTextResourceEditorInput, IResourceDiffEditorInput, IEditorPane, IEditorCloseEvent, IEditorPartOptions, IRevertOptions, GroupIdentifier, EditorsOrder, IFileEditorInput, IEditorFactoryRegistry, IEditorSerializer, EditorExtensions, ISaveOptions, IMoveResult, ITextDiffEditorPane, IVisibleEditorPane, IEditorOpenContext, EditorExtensions as Extensions, EditorInputCapabilities, IUntypedEditorInput, IEditorWillMoveEvent, IEditorWillOpenEvent, IActiveEditorChangeEvent, EditorPaneSelectionChangeReason, IEditorPaneSelection, IToolbarActions } from '../../common/editor.js'; -import { EditorServiceImpl, IEditorGroupView, IEditorGroupsView, IEditorGroupTitleHeight, DEFAULT_EDITOR_PART_OPTIONS } from '../../browser/parts/editor/editor.js'; -import { Event, Emitter } from '../../../base/common/event.js'; -import { IResolvedWorkingCopyBackup, IWorkingCopyBackupService } from '../../services/workingCopy/common/workingCopyBackup.js'; -import { IConfigurationService, ConfigurationTarget, IConfigurationValue } from '../../../platform/configuration/common/configuration.js'; -import { IWorkbenchLayoutService, PanelAlignment, Parts, Position as PartPosition } from '../../services/layout/browser/layoutService.js'; -import { TextModelResolverService } from '../../services/textmodelResolver/common/textModelResolverService.js'; -import { ITextModelService } from '../../../editor/common/services/resolverService.js'; -import { IEditorOptions, IResourceEditorInput, IResourceEditorInputIdentifier, ITextResourceEditorInput, ITextEditorOptions } from '../../../platform/editor/common/editor.js'; -import { IUntitledTextEditorService, UntitledTextEditorService } from '../../services/untitled/common/untitledTextEditorService.js'; -import { IWorkspaceContextService, IWorkspaceIdentifier } from '../../../platform/workspace/common/workspace.js'; -import { ILifecycleService, ShutdownReason, StartupKind, LifecyclePhase, WillShutdownEvent, BeforeShutdownErrorEvent, InternalBeforeShutdownEvent, IWillShutdownEventJoiner } from '../../services/lifecycle/common/lifecycle.js'; -import { ServiceCollection } from '../../../platform/instantiation/common/serviceCollection.js'; -import { FileOperationEvent, IFileService, IFileStat, IFileStatResult, FileChangesEvent, IResolveFileOptions, ICreateFileOptions, IFileSystemProvider, FileSystemProviderCapabilities, IFileChange, IWatchOptions, IStat, FileType, IFileDeleteOptions, IFileOverwriteOptions, IFileWriteOptions, IFileOpenOptions, IFileStatWithMetadata, IResolveMetadataFileOptions, IWriteFileOptions, IReadFileOptions, IFileContent, IFileStreamContent, FileOperationError, IFileSystemProviderWithFileReadStreamCapability, IFileReadStreamOptions, IReadFileStreamOptions, IFileSystemProviderCapabilitiesChangeEvent, IFileStatWithPartialMetadata, IFileSystemWatcher, IWatchOptionsWithCorrelation, IFileSystemProviderActivationEvent } from '../../../platform/files/common/files.js'; -import { IModelService } from '../../../editor/common/services/model.js'; -import { LanguageService } from '../../../editor/common/services/languageService.js'; -import { ModelService } from '../../../editor/common/services/modelService.js'; -import { IResourceEncoding, ITextFileService, IReadTextFileOptions, ITextFileStreamContent, IWriteTextFileOptions, ITextFileEditorModel, ITextFileEditorModelManager } from '../../services/textfile/common/textfiles.js'; -import { ILanguageService } from '../../../editor/common/languages/language.js'; -import { IHistoryService } from '../../services/history/common/history.js'; -import { IInstantiationService, ServiceIdentifier } from '../../../platform/instantiation/common/instantiation.js'; -import { TestConfigurationService } from '../../../platform/configuration/test/common/testConfigurationService.js'; -import { MenuBarVisibility, IWindowOpenable, IOpenWindowOptions, IOpenEmptyWindowOptions } from '../../../platform/window/common/window.js'; -import { TestWorkspace } from '../../../platform/workspace/test/common/testWorkspace.js'; -import { IEnvironmentService } from '../../../platform/environment/common/environment.js'; -import { IThemeService } from '../../../platform/theme/common/themeService.js'; -import { ThemeIcon } from '../../../base/common/themables.js'; -import { TestThemeService } from '../../../platform/theme/test/common/testThemeService.js'; -import { ITextResourceConfigurationService, ITextResourcePropertiesService } from '../../../editor/common/services/textResourceConfiguration.js'; -import { IPosition, Position as EditorPosition } from '../../../editor/common/core/position.js'; -import { IMenuService, MenuId, IMenu, IMenuChangeEvent, IMenuActionOptions, MenuItemAction, SubmenuItemAction } from '../../../platform/actions/common/actions.js'; -import { ContextKeyValue, IContextKeyService } from '../../../platform/contextkey/common/contextkey.js'; -import { MockContextKeyService, MockKeybindingService } from '../../../platform/keybinding/test/common/mockKeybindingService.js'; -import { ITextBufferFactory, DefaultEndOfLine, EndOfLinePreference, ITextSnapshot } from '../../../editor/common/model.js'; -import { Range } from '../../../editor/common/core/range.js'; -import { IDialogService, IPickAndOpenOptions, ISaveDialogOptions, IOpenDialogOptions, IFileDialogService, ConfirmResult } from '../../../platform/dialogs/common/dialogs.js'; -import { INotificationService } from '../../../platform/notification/common/notification.js'; -import { TestNotificationService } from '../../../platform/notification/test/common/testNotificationService.js'; -import { IExtensionService } from '../../services/extensions/common/extensions.js'; -import { IKeybindingService } from '../../../platform/keybinding/common/keybinding.js'; -import { IDecorationsService, IResourceDecorationChangeEvent, IDecoration, IDecorationData, IDecorationsProvider } from '../../services/decorations/common/decorations.js'; -import { IDisposable, toDisposable, Disposable, DisposableStore } from '../../../base/common/lifecycle.js'; -import { IEditorGroupsService, IEditorGroup, GroupsOrder, GroupsArrangement, GroupDirection, IMergeGroupOptions, IEditorReplacement, IFindGroupScope, EditorGroupLayout, ICloseEditorOptions, GroupOrientation, ICloseAllEditorsOptions, ICloseEditorsFilter, IEditorDropTargetDelegate, IEditorPart, IAuxiliaryEditorPart, IEditorGroupsContainer, IEditorWorkingSet, IEditorGroupContextKeyProvider, IEditorWorkingSetOptions } from '../../services/editor/common/editorGroupsService.js'; -import { IEditorService, ISaveEditorsOptions, IRevertAllEditorsOptions, PreferredGroup, IEditorsChangeEvent, ISaveEditorsResult } from '../../services/editor/common/editorService.js'; -import { ICodeEditorService } from '../../../editor/browser/services/codeEditorService.js'; -import { IEditorPaneRegistry, EditorPaneDescriptor } from '../../browser/editor.js'; -import { IDimension } from '../../../base/browser/dom.js'; -import { ILoggerService, ILogService, NullLogService } from '../../../platform/log/common/log.js'; -import { ILabelService } from '../../../platform/label/common/label.js'; -import { DeferredPromise, timeout } from '../../../base/common/async.js'; -import { PaneComposite, PaneCompositeDescriptor } from '../../browser/panecomposite.js'; -import { IStorageService, StorageScope, StorageTarget } from '../../../platform/storage/common/storage.js'; -import { IProcessEnvironment, isLinux, isWindows, OperatingSystem } from '../../../base/common/platform.js'; -import { LabelService } from '../../services/label/common/labelService.js'; -import { Part } from '../../browser/part.js'; -import { bufferToStream, VSBuffer, VSBufferReadable, VSBufferReadableStream } from '../../../base/common/buffer.js'; -import { Schemas } from '../../../base/common/network.js'; -import { IProductService } from '../../../platform/product/common/productService.js'; -import product from '../../../platform/product/common/product.js'; -import { IHostService } from '../../services/host/browser/host.js'; -import { IWorkingCopyService, WorkingCopyService } from '../../services/workingCopy/common/workingCopyService.js'; -import { IWorkingCopy, IWorkingCopyBackupMeta, IWorkingCopyIdentifier } from '../../services/workingCopy/common/workingCopy.js'; -import { IFilesConfigurationService, FilesConfigurationService } from '../../services/filesConfiguration/common/filesConfigurationService.js'; -import { IAccessibilityService } from '../../../platform/accessibility/common/accessibility.js'; -import { BrowserWorkbenchEnvironmentService } from '../../services/environment/browser/environmentService.js'; -import { BrowserTextFileService } from '../../services/textfile/browser/browserTextFileService.js'; -import { IWorkbenchEnvironmentService } from '../../services/environment/common/environmentService.js'; -import { createTextBufferFactoryFromStream } from '../../../editor/common/model/textModel.js'; -import { IPathService } from '../../services/path/common/pathService.js'; -import { Direction, IViewSize } from '../../../base/browser/ui/grid/grid.js'; -import { IProgressService, IProgressOptions, IProgressWindowOptions, IProgressNotificationOptions, IProgressCompositeOptions, IProgress, IProgressStep, Progress, IProgressDialogOptions, IProgressIndicator } from '../../../platform/progress/common/progress.js'; -import { IWorkingCopyFileService, WorkingCopyFileService } from '../../services/workingCopy/common/workingCopyFileService.js'; -import { UndoRedoService } from '../../../platform/undoRedo/common/undoRedoService.js'; -import { IUndoRedoService } from '../../../platform/undoRedo/common/undoRedo.js'; -import { TextFileEditorModel } from '../../services/textfile/common/textFileEditorModel.js'; -import { Registry } from '../../../platform/registry/common/platform.js'; -import { EditorPane } from '../../browser/parts/editor/editorPane.js'; -import { CancellationToken } from '../../../base/common/cancellation.js'; -import { SyncDescriptor } from '../../../platform/instantiation/common/descriptors.js'; -import { TestDialogService } from '../../../platform/dialogs/test/common/testDialogService.js'; -import { CodeEditorService } from '../../services/editor/browser/codeEditorService.js'; -import { MainEditorPart } from '../../browser/parts/editor/editorPart.js'; -import { ICodeEditor } from '../../../editor/browser/editorBrowser.js'; -import { IDiffEditor, IEditor } from '../../../editor/common/editorCommon.js'; -import { IInputBox, IInputOptions, IPickOptions, IQuickInputButton, IQuickInputService, IQuickNavigateConfiguration, IQuickPick, IQuickPickItem, IQuickWidget, QuickPickInput } from '../../../platform/quickinput/common/quickInput.js'; -import { QuickInputService } from '../../services/quickinput/browser/quickInputService.js'; -import { IListService } from '../../../platform/list/browser/listService.js'; -import { win32, posix } from '../../../base/common/path.js'; -import { TestContextService, TestStorageService, TestTextResourcePropertiesService, TestExtensionService, TestProductService, createFileStat, TestLoggerService, TestWorkspaceTrustManagementService, TestWorkspaceTrustRequestService, TestMarkerService, TestHistoryService } from '../common/workbenchTestServices.js'; -import { IView, IViewDescriptor, ViewContainer, ViewContainerLocation } from '../../common/views.js'; -import { IViewsService } from '../../services/views/common/viewsService.js'; -import { IPaneComposite } from '../../common/panecomposite.js'; -import { IUriIdentityService } from '../../../platform/uriIdentity/common/uriIdentity.js'; -import { UriIdentityService } from '../../../platform/uriIdentity/common/uriIdentityService.js'; -import { InMemoryFileSystemProvider } from '../../../platform/files/common/inMemoryFilesystemProvider.js'; -import { newWriteableStream, ReadableStreamEvents } from '../../../base/common/stream.js'; -import { EncodingOracle, IEncodingOverride } from '../../services/textfile/browser/textFileService.js'; -import { UTF16le, UTF16be, UTF8_with_bom } from '../../services/textfile/common/encoding.js'; -import { ColorScheme } from '../../../platform/theme/common/theme.js'; -import { Iterable } from '../../../base/common/iterator.js'; -import { InMemoryWorkingCopyBackupService } from '../../services/workingCopy/common/workingCopyBackupService.js'; -import { BrowserWorkingCopyBackupService } from '../../services/workingCopy/browser/workingCopyBackupService.js'; -import { FileService } from '../../../platform/files/common/fileService.js'; -import { TextResourceEditor } from '../../browser/parts/editor/textResourceEditor.js'; -import { TestCodeEditor } from '../../../editor/test/browser/testCodeEditor.js'; -import { TextFileEditor } from '../../contrib/files/browser/editors/textFileEditor.js'; -import { TextResourceEditorInput } from '../../common/editor/textResourceEditorInput.js'; -import { UntitledTextEditorInput } from '../../services/untitled/common/untitledTextEditorInput.js'; -import { SideBySideEditor } from '../../browser/parts/editor/sideBySideEditor.js'; -import { IEnterWorkspaceResult, IRecent, IRecentlyOpened, IWorkspaceFolderCreationData, IWorkspacesService } from '../../../platform/workspaces/common/workspaces.js'; -import { IWorkspaceTrustManagementService, IWorkspaceTrustRequestService } from '../../../platform/workspace/common/workspaceTrust.js'; -import { IExtensionTerminalProfile, IShellLaunchConfig, ITerminalBackend, ITerminalLogService, ITerminalProfile, TerminalIcon, TerminalLocation, TerminalShellType } from '../../../platform/terminal/common/terminal.js'; -import { ICreateTerminalOptions, IDeserializedTerminalEditorInput, ITerminalConfigurationService, ITerminalEditorService, ITerminalGroup, ITerminalGroupService, ITerminalInstance, ITerminalInstanceService, TerminalEditorLocation } from '../../contrib/terminal/browser/terminal.js'; -import { assertIsDefined, upcast } from '../../../base/common/types.js'; -import { IRegisterContributedProfileArgs, IShellLaunchConfigResolveOptions, ITerminalProfileProvider, ITerminalProfileResolverService, ITerminalProfileService, type ITerminalConfiguration } from '../../contrib/terminal/common/terminal.js'; -import { EditorResolverService } from '../../services/editor/browser/editorResolverService.js'; -import { FILE_EDITOR_INPUT_ID } from '../../contrib/files/common/files.js'; -import { IEditorResolverService } from '../../services/editor/common/editorResolverService.js'; -import { IWorkingCopyEditorService, WorkingCopyEditorService } from '../../services/workingCopy/common/workingCopyEditorService.js'; -import { IElevatedFileService } from '../../services/files/common/elevatedFileService.js'; -import { BrowserElevatedFileService } from '../../services/files/browser/elevatedFileService.js'; -import { IEditorWorkerService } from '../../../editor/common/services/editorWorker.js'; -import { ResourceMap } from '../../../base/common/map.js'; -import { SideBySideEditorInput } from '../../common/editor/sideBySideEditorInput.js'; -import { ITextEditorService, TextEditorService } from '../../services/textfile/common/textEditorService.js'; -import { IPaneCompositePartService } from '../../services/panecomposite/browser/panecomposite.js'; -import { IPaneCompositePart } from '../../browser/parts/paneCompositePart.js'; -import { ILanguageConfigurationService } from '../../../editor/common/languages/languageConfigurationRegistry.js'; -import { TestLanguageConfigurationService } from '../../../editor/test/common/modes/testLanguageConfigurationService.js'; -import { TerminalEditorInput } from '../../contrib/terminal/browser/terminalEditorInput.js'; -import { IGroupModelChangeEvent } from '../../common/editor/editorGroupModel.js'; -import { env } from '../../../base/common/process.js'; -import { isValidBasename } from '../../../base/common/extpath.js'; -import { TestAccessibilityService } from '../../../platform/accessibility/test/common/testAccessibilityService.js'; -import { ILanguageFeatureDebounceService, LanguageFeatureDebounceService } from '../../../editor/common/services/languageFeatureDebounce.js'; -import { ILanguageFeaturesService } from '../../../editor/common/services/languageFeatures.js'; -import { LanguageFeaturesService } from '../../../editor/common/services/languageFeaturesService.js'; -import { TextEditorPaneSelection } from '../../browser/parts/editor/textEditor.js'; -import { Selection } from '../../../editor/common/core/selection.js'; -import { IFolderBackupInfo, IWorkspaceBackupInfo } from '../../../platform/backup/common/backup.js'; -import { TestEditorWorkerService } from '../../../editor/test/common/services/testEditorWorkerService.js'; -import { IExtensionHostExitInfo, IRemoteAgentConnection, IRemoteAgentService } from '../../services/remote/common/remoteAgentService.js'; -import { ILanguageDetectionService } from '../../services/languageDetection/common/languageDetectionWorkerService.js'; -import { IDiagnosticInfoOptions, IDiagnosticInfo } from '../../../platform/diagnostics/common/diagnostics.js'; -import { ExtensionType, IExtension, IExtensionDescription, IRelaxedExtensionManifest, TargetPlatform } from '../../../platform/extensions/common/extensions.js'; -import { IRemoteAgentEnvironment } from '../../../platform/remote/common/remoteAgentEnvironment.js'; -import { ILayoutOffsetInfo } from '../../../platform/layout/browser/layoutService.js'; -import { IUserDataProfile, IUserDataProfilesService, toUserDataProfile, UserDataProfilesService } from '../../../platform/userDataProfile/common/userDataProfile.js'; -import { UserDataProfileService } from '../../services/userDataProfile/common/userDataProfileService.js'; -import { IUserDataProfileService } from '../../services/userDataProfile/common/userDataProfile.js'; -import { EnablementState, IResourceExtension, IScannedExtension, IWebExtensionsScannerService, IWorkbenchExtensionEnablementService, IWorkbenchExtensionManagementService } from '../../services/extensionManagement/common/extensionManagement.js'; -import { ILocalExtension, IGalleryExtension, InstallOptions, UninstallOptions, IExtensionsControlManifest, IGalleryMetadata, IExtensionManagementParticipant, Metadata, InstallExtensionResult, InstallExtensionInfo, UninstallExtensionInfo } from '../../../platform/extensionManagement/common/extensionManagement.js'; -import { Codicon } from '../../../base/common/codicons.js'; -import { IRemoteExtensionsScannerService } from '../../../platform/remote/common/remoteExtensionsScanner.js'; -import { IRemoteSocketFactoryService, RemoteSocketFactoryService } from '../../../platform/remote/common/remoteSocketFactoryService.js'; -import { EditorParts } from '../../browser/parts/editor/editorParts.js'; -import { mainWindow } from '../../../base/browser/window.js'; -import { IMarkerService } from '../../../platform/markers/common/markers.js'; -import { IAccessibilitySignalService } from '../../../platform/accessibilitySignal/browser/accessibilitySignalService.js'; -import { IEditorPaneService } from '../../services/editor/common/editorPaneService.js'; -import { EditorPaneService } from '../../services/editor/browser/editorPaneService.js'; -import { IContextMenuService, IContextViewService } from '../../../platform/contextview/browser/contextView.js'; -import { ContextViewService } from '../../../platform/contextview/browser/contextViewService.js'; -import { CustomEditorLabelService, ICustomEditorLabelService } from '../../services/editor/common/customEditorLabelService.js'; -import { TerminalConfigurationService } from '../../contrib/terminal/browser/terminalConfigurationService.js'; -import { TerminalLogService } from '../../../platform/terminal/common/terminalLogService.js'; -import { IEnvironmentVariableService } from '../../contrib/terminal/common/environmentVariable.js'; -import { EnvironmentVariableService } from '../../contrib/terminal/common/environmentVariableService.js'; -import { ContextMenuService } from '../../../platform/contextview/browser/contextMenuService.js'; -import { IHoverService } from '../../../platform/hover/browser/hover.js'; -import { NullHoverService } from '../../../platform/hover/test/browser/nullHoverService.js'; -import { IActionViewItemService, NullActionViewItemService } from '../../../platform/actions/browser/actionViewItemService.js'; -import { IMarkdownString } from '../../../base/common/htmlContent.js'; - -export function createFileEditorInput(instantiationService: IInstantiationService, resource: URI): FileEditorInput { - return instantiationService.createInstance(FileEditorInput, resource, undefined, undefined, undefined, undefined, undefined, undefined); -} - -Registry.as(EditorExtensions.EditorFactory).registerFileEditorFactory({ - - typeId: FILE_EDITOR_INPUT_ID, - - createFileEditor: (resource, preferredResource, preferredName, preferredDescription, preferredEncoding, preferredLanguageId, preferredContents, instantiationService): IFileEditorInput => { - return instantiationService.createInstance(FileEditorInput, resource, preferredResource, preferredName, preferredDescription, preferredEncoding, preferredLanguageId, preferredContents); - }, - - isFileEditor: (obj): obj is IFileEditorInput => { - return obj instanceof FileEditorInput; - } -}); - -export class TestTextResourceEditor extends TextResourceEditor { - - protected override createEditorControl(parent: HTMLElement, configuration: any): void { - this.editorControl = this._register(this.instantiationService.createInstance(TestCodeEditor, parent, configuration, {})); - } -} - -export class TestTextFileEditor extends TextFileEditor { - - protected override createEditorControl(parent: HTMLElement, configuration: any): void { - this.editorControl = this._register(this.instantiationService.createInstance(TestCodeEditor, parent, configuration, { contributions: [] })); - } - - setSelection(selection: Selection | undefined, reason: EditorPaneSelectionChangeReason): void { - this._options = selection ? upcast({ selection }) : undefined; - - this._onDidChangeSelection.fire({ reason }); - } - - override getSelection(): IEditorPaneSelection | undefined { - const options = this.options; - if (!options) { - return undefined; - } - - const textSelection = (options as ITextEditorOptions).selection; - if (!textSelection) { - return undefined; - } - - return new TextEditorPaneSelection(new Selection(textSelection.startLineNumber, textSelection.startColumn, textSelection.endLineNumber ?? textSelection.startLineNumber, textSelection.endColumn ?? textSelection.startColumn)); - } -} - -export interface ITestInstantiationService extends IInstantiationService { - stub(service: ServiceIdentifier, ctor: any): T; -} - -export class TestWorkingCopyService extends WorkingCopyService { - testUnregisterWorkingCopy(workingCopy: IWorkingCopy): void { - return super.unregisterWorkingCopy(workingCopy); - } -} - -export function workbenchInstantiationService( - overrides?: { - environmentService?: (instantiationService: IInstantiationService) => IEnvironmentService; - fileService?: (instantiationService: IInstantiationService) => IFileService; - workingCopyBackupService?: (instantiationService: IInstantiationService) => IWorkingCopyBackupService; - configurationService?: (instantiationService: IInstantiationService) => TestConfigurationService; - textFileService?: (instantiationService: IInstantiationService) => ITextFileService; - pathService?: (instantiationService: IInstantiationService) => IPathService; - editorService?: (instantiationService: IInstantiationService) => IEditorService; - contextKeyService?: (instantiationService: IInstantiationService) => IContextKeyService; - textEditorService?: (instantiationService: IInstantiationService) => ITextEditorService; - }, - disposables: Pick = new DisposableStore() -): TestInstantiationService { - const instantiationService = disposables.add(new TestInstantiationService(new ServiceCollection( - [ILifecycleService, disposables.add(new TestLifecycleService())], - [IActionViewItemService, new SyncDescriptor(NullActionViewItemService)], - ))); - - instantiationService.stub(IProductService, TestProductService); - instantiationService.stub(IEditorWorkerService, new TestEditorWorkerService()); - instantiationService.stub(IWorkingCopyService, disposables.add(new TestWorkingCopyService())); - const environmentService = overrides?.environmentService ? overrides.environmentService(instantiationService) : TestEnvironmentService; - instantiationService.stub(IEnvironmentService, environmentService); - instantiationService.stub(IWorkbenchEnvironmentService, environmentService); - instantiationService.stub(ILogService, new NullLogService()); - const contextKeyService = overrides?.contextKeyService ? overrides.contextKeyService(instantiationService) : instantiationService.createInstance(MockContextKeyService); - instantiationService.stub(IContextKeyService, contextKeyService); - instantiationService.stub(IProgressService, new TestProgressService()); - const workspaceContextService = new TestContextService(TestWorkspace); - instantiationService.stub(IWorkspaceContextService, workspaceContextService); - const configService = overrides?.configurationService ? overrides.configurationService(instantiationService) : new TestConfigurationService({ - files: { - participants: { - timeout: 60000 - } - } - }); - instantiationService.stub(IConfigurationService, configService); - const textResourceConfigurationService = new TestTextResourceConfigurationService(configService); - instantiationService.stub(ITextResourceConfigurationService, textResourceConfigurationService); - instantiationService.stub(IUntitledTextEditorService, disposables.add(instantiationService.createInstance(UntitledTextEditorService))); - instantiationService.stub(IStorageService, disposables.add(new TestStorageService())); - instantiationService.stub(IRemoteAgentService, new TestRemoteAgentService()); - instantiationService.stub(ILanguageDetectionService, new TestLanguageDetectionService()); - instantiationService.stub(IPathService, overrides?.pathService ? overrides.pathService(instantiationService) : new TestPathService()); - const layoutService = new TestLayoutService(); - instantiationService.stub(IWorkbenchLayoutService, layoutService); - instantiationService.stub(IDialogService, new TestDialogService()); - const accessibilityService = new TestAccessibilityService(); - instantiationService.stub(IAccessibilityService, accessibilityService); - instantiationService.stub(IAccessibilitySignalService, { - playSignal: async () => { }, - isSoundEnabled(signal: unknown) { return false; }, - } as any); - instantiationService.stub(IFileDialogService, instantiationService.createInstance(TestFileDialogService)); - instantiationService.stub(ILanguageService, disposables.add(instantiationService.createInstance(LanguageService))); - instantiationService.stub(ILanguageFeaturesService, new LanguageFeaturesService()); - instantiationService.stub(ILanguageFeatureDebounceService, instantiationService.createInstance(LanguageFeatureDebounceService)); - instantiationService.stub(IHistoryService, new TestHistoryService()); - instantiationService.stub(ITextResourcePropertiesService, new TestTextResourcePropertiesService(configService)); - instantiationService.stub(IUndoRedoService, instantiationService.createInstance(UndoRedoService)); - const themeService = new TestThemeService(); - instantiationService.stub(IThemeService, themeService); - instantiationService.stub(ILanguageConfigurationService, disposables.add(new TestLanguageConfigurationService())); - instantiationService.stub(IModelService, disposables.add(instantiationService.createInstance(ModelService))); - const fileService = overrides?.fileService ? overrides.fileService(instantiationService) : disposables.add(new TestFileService()); - instantiationService.stub(IFileService, fileService); - instantiationService.stub(IUriIdentityService, disposables.add(new UriIdentityService(fileService))); - const markerService = new TestMarkerService(); - instantiationService.stub(IMarkerService, markerService); - instantiationService.stub(IFilesConfigurationService, disposables.add(instantiationService.createInstance(TestFilesConfigurationService))); - const userDataProfilesService = instantiationService.stub(IUserDataProfilesService, disposables.add(instantiationService.createInstance(UserDataProfilesService))); - instantiationService.stub(IUserDataProfileService, disposables.add(new UserDataProfileService(userDataProfilesService.defaultProfile))); - instantiationService.stub(IWorkingCopyBackupService, overrides?.workingCopyBackupService ? overrides?.workingCopyBackupService(instantiationService) : disposables.add(new TestWorkingCopyBackupService())); - instantiationService.stub(ITelemetryService, NullTelemetryService); - instantiationService.stub(INotificationService, new TestNotificationService()); - instantiationService.stub(IUntitledTextEditorService, disposables.add(instantiationService.createInstance(UntitledTextEditorService))); - instantiationService.stub(IMenuService, new TestMenuService()); - const keybindingService = new MockKeybindingService(); - instantiationService.stub(IKeybindingService, keybindingService); - instantiationService.stub(IDecorationsService, new TestDecorationsService()); - instantiationService.stub(IExtensionService, new TestExtensionService()); - instantiationService.stub(IWorkingCopyFileService, disposables.add(instantiationService.createInstance(WorkingCopyFileService))); - instantiationService.stub(ITextFileService, overrides?.textFileService ? overrides.textFileService(instantiationService) : disposables.add(instantiationService.createInstance(TestTextFileService))); - instantiationService.stub(IHostService, instantiationService.createInstance(TestHostService)); - instantiationService.stub(ITextModelService, disposables.add(instantiationService.createInstance(TextModelResolverService))); - instantiationService.stub(ILoggerService, disposables.add(new TestLoggerService(TestEnvironmentService.logsHome))); - const editorGroupService = new TestEditorGroupsService([new TestEditorGroupView(0)]); - instantiationService.stub(IEditorGroupsService, editorGroupService); - instantiationService.stub(ILabelService, disposables.add(instantiationService.createInstance(LabelService))); - const editorService = overrides?.editorService ? overrides.editorService(instantiationService) : disposables.add(new TestEditorService(editorGroupService)); - instantiationService.stub(IEditorService, editorService); - instantiationService.stub(IEditorPaneService, new EditorPaneService()); - instantiationService.stub(IWorkingCopyEditorService, disposables.add(instantiationService.createInstance(WorkingCopyEditorService))); - instantiationService.stub(IEditorResolverService, disposables.add(instantiationService.createInstance(EditorResolverService))); - const textEditorService = overrides?.textEditorService ? overrides.textEditorService(instantiationService) : disposables.add(instantiationService.createInstance(TextEditorService)); - instantiationService.stub(ITextEditorService, textEditorService); - instantiationService.stub(ICodeEditorService, disposables.add(new CodeEditorService(editorService, themeService, configService))); - instantiationService.stub(IPaneCompositePartService, disposables.add(new TestPaneCompositeService())); - instantiationService.stub(IListService, new TestListService()); - instantiationService.stub(IContextViewService, disposables.add(instantiationService.createInstance(ContextViewService))); - instantiationService.stub(IContextMenuService, disposables.add(instantiationService.createInstance(ContextMenuService))); - instantiationService.stub(IQuickInputService, disposables.add(new QuickInputService(configService, instantiationService, keybindingService, contextKeyService, themeService, layoutService))); - instantiationService.stub(IWorkspacesService, new TestWorkspacesService()); - instantiationService.stub(IWorkspaceTrustManagementService, disposables.add(new TestWorkspaceTrustManagementService())); - instantiationService.stub(IWorkspaceTrustRequestService, disposables.add(new TestWorkspaceTrustRequestService(false))); - instantiationService.stub(ITerminalInstanceService, new TestTerminalInstanceService()); - instantiationService.stub(ITerminalEditorService, new TestTerminalEditorService()); - instantiationService.stub(ITerminalGroupService, new TestTerminalGroupService()); - instantiationService.stub(ITerminalProfileService, new TestTerminalProfileService()); - instantiationService.stub(ITerminalProfileResolverService, new TestTerminalProfileResolverService()); - instantiationService.stub(ITerminalConfigurationService, disposables.add(instantiationService.createInstance(TestTerminalConfigurationService))); - instantiationService.stub(ITerminalLogService, disposables.add(instantiationService.createInstance(TerminalLogService))); - instantiationService.stub(IEnvironmentVariableService, disposables.add(instantiationService.createInstance(EnvironmentVariableService))); - instantiationService.stub(IElevatedFileService, new BrowserElevatedFileService()); - instantiationService.stub(IRemoteSocketFactoryService, new RemoteSocketFactoryService()); - instantiationService.stub(ICustomEditorLabelService, disposables.add(new CustomEditorLabelService(configService, workspaceContextService))); - instantiationService.stub(IHoverService, NullHoverService); - - return instantiationService; -} - -export class TestServiceAccessor { - constructor( - @ILifecycleService public lifecycleService: TestLifecycleService, - @ITextFileService public textFileService: TestTextFileService, - @ITextEditorService public textEditorService: ITextEditorService, - @IWorkingCopyFileService public workingCopyFileService: IWorkingCopyFileService, - @IFilesConfigurationService public filesConfigurationService: TestFilesConfigurationService, - @IWorkspaceContextService public contextService: TestContextService, - @IModelService public modelService: ModelService, - @IFileService public fileService: TestFileService, - @IFileDialogService public fileDialogService: TestFileDialogService, - @IDialogService public dialogService: TestDialogService, - @IWorkingCopyService public workingCopyService: TestWorkingCopyService, - @IEditorService public editorService: TestEditorService, - @IEditorPaneService public editorPaneService: IEditorPaneService, - @IWorkbenchEnvironmentService public environmentService: IWorkbenchEnvironmentService, - @IPathService public pathService: IPathService, - @IEditorGroupsService public editorGroupService: IEditorGroupsService, - @IEditorResolverService public editorResolverService: IEditorResolverService, - @ILanguageService public languageService: ILanguageService, - @ITextModelService public textModelResolverService: ITextModelService, - @IUntitledTextEditorService public untitledTextEditorService: UntitledTextEditorService, - @IConfigurationService public testConfigurationService: TestConfigurationService, - @IWorkingCopyBackupService public workingCopyBackupService: TestWorkingCopyBackupService, - @IHostService public hostService: TestHostService, - @IQuickInputService public quickInputService: IQuickInputService, - @ILabelService public labelService: ILabelService, - @ILogService public logService: ILogService, - @IUriIdentityService public uriIdentityService: IUriIdentityService, - @IInstantiationService public instantitionService: IInstantiationService, - @INotificationService public notificationService: INotificationService, - @IWorkingCopyEditorService public workingCopyEditorService: IWorkingCopyEditorService, - @IInstantiationService public instantiationService: IInstantiationService, - @IElevatedFileService public elevatedFileService: IElevatedFileService, - @IWorkspaceTrustRequestService public workspaceTrustRequestService: TestWorkspaceTrustRequestService, - @IDecorationsService public decorationsService: IDecorationsService, - @IProgressService public progressService: IProgressService, - ) { } -} - -export class TestTextFileService extends BrowserTextFileService { - private readStreamError: FileOperationError | undefined = undefined; - private writeError: FileOperationError | undefined = undefined; - - constructor( - @IFileService fileService: IFileService, - @IUntitledTextEditorService untitledTextEditorService: IUntitledTextEditorService, - @ILifecycleService lifecycleService: ILifecycleService, - @IInstantiationService instantiationService: IInstantiationService, - @IModelService modelService: IModelService, - @IWorkbenchEnvironmentService environmentService: IWorkbenchEnvironmentService, - @IDialogService dialogService: IDialogService, - @IFileDialogService fileDialogService: IFileDialogService, - @ITextResourceConfigurationService textResourceConfigurationService: ITextResourceConfigurationService, - @IFilesConfigurationService filesConfigurationService: IFilesConfigurationService, - @ICodeEditorService codeEditorService: ICodeEditorService, - @IPathService pathService: IPathService, - @IWorkingCopyFileService workingCopyFileService: IWorkingCopyFileService, - @IUriIdentityService uriIdentityService: IUriIdentityService, - @ILanguageService languageService: ILanguageService, - @ILogService logService: ILogService, - @IElevatedFileService elevatedFileService: IElevatedFileService, - @IDecorationsService decorationsService: IDecorationsService - ) { - super( - fileService, - untitledTextEditorService, - lifecycleService, - instantiationService, - modelService, - environmentService, - dialogService, - fileDialogService, - textResourceConfigurationService, - filesConfigurationService, - codeEditorService, - pathService, - workingCopyFileService, - uriIdentityService, - languageService, - elevatedFileService, - logService, - decorationsService - ); - } - - setReadStreamErrorOnce(error: FileOperationError): void { - this.readStreamError = error; - } - - override async readStream(resource: URI, options?: IReadTextFileOptions): Promise { - if (this.readStreamError) { - const error = this.readStreamError; - this.readStreamError = undefined; - - throw error; - } - - const content = await this.fileService.readFileStream(resource, options); - return { - resource: content.resource, - name: content.name, - mtime: content.mtime, - ctime: content.ctime, - etag: content.etag, - encoding: 'utf8', - value: await createTextBufferFactoryFromStream(content.value), - size: 10, - readonly: false, - locked: false - }; - } - - setWriteErrorOnce(error: FileOperationError): void { - this.writeError = error; - } - - override async write(resource: URI, value: string | ITextSnapshot, options?: IWriteTextFileOptions): Promise { - if (this.writeError) { - const error = this.writeError; - this.writeError = undefined; - - throw error; - } - - return super.write(resource, value, options); - } -} - -export class TestBrowserTextFileServiceWithEncodingOverrides extends BrowserTextFileService { - - private _testEncoding: TestEncodingOracle | undefined; - override get encoding(): TestEncodingOracle { - if (!this._testEncoding) { - this._testEncoding = this._register(this.instantiationService.createInstance(TestEncodingOracle)); - } - - return this._testEncoding; - } -} - -export class TestEncodingOracle extends EncodingOracle { - - protected override get encodingOverrides(): IEncodingOverride[] { - return [ - { extension: 'utf16le', encoding: UTF16le }, - { extension: 'utf16be', encoding: UTF16be }, - { extension: 'utf8bom', encoding: UTF8_with_bom } - ]; - } - - protected override set encodingOverrides(overrides: IEncodingOverride[]) { } -} - -class TestEnvironmentServiceWithArgs extends BrowserWorkbenchEnvironmentService { - args = []; -} - -export const TestEnvironmentService = new TestEnvironmentServiceWithArgs('', URI.file('tests').with({ scheme: 'vscode-tests' }), Object.create(null), TestProductService); - -export class TestProgressService implements IProgressService { - - declare readonly _serviceBrand: undefined; - - withProgress( - options: IProgressOptions | IProgressDialogOptions | IProgressWindowOptions | IProgressNotificationOptions | IProgressCompositeOptions, - task: (progress: IProgress) => Promise, - onDidCancel?: ((choice?: number | undefined) => void) | undefined - ): Promise { - return task(Progress.None); - } -} - -export class TestDecorationsService implements IDecorationsService { - - declare readonly _serviceBrand: undefined; - - onDidChangeDecorations: Event = Event.None; - - registerDecorationsProvider(_provider: IDecorationsProvider): IDisposable { return Disposable.None; } - getDecoration(_uri: URI, _includeChildren: boolean, _overwrite?: IDecorationData): IDecoration | undefined { return undefined; } -} - -export class TestMenuService implements IMenuService { - - declare readonly _serviceBrand: undefined; - - createMenu(_id: MenuId, _scopedKeybindingService: IContextKeyService): IMenu { - return { - onDidChange: Event.None, - dispose: () => undefined, - getActions: () => [] - }; - } - - getMenuActions(id: MenuId, contextKeyService: IContextKeyService, options?: IMenuActionOptions): [string, Array][] { - throw new Error('Method not implemented.'); - } - - getMenuContexts(id: MenuId): ReadonlySet { - throw new Error('Method not implemented.'); - } - - resetHiddenStates(): void { - // nothing - } -} - -export class TestFileDialogService implements IFileDialogService { - - declare readonly _serviceBrand: undefined; - - private confirmResult!: ConfirmResult; - - constructor( - @IPathService private readonly pathService: IPathService - ) { } - async defaultFilePath(_schemeFilter?: string): Promise { return this.pathService.userHome(); } - async defaultFolderPath(_schemeFilter?: string): Promise { return this.pathService.userHome(); } - async defaultWorkspacePath(_schemeFilter?: string): Promise { return this.pathService.userHome(); } - async preferredHome(_schemeFilter?: string): Promise { return this.pathService.userHome(); } - pickFileFolderAndOpen(_options: IPickAndOpenOptions): Promise { return Promise.resolve(0); } - pickFileAndOpen(_options: IPickAndOpenOptions): Promise { return Promise.resolve(0); } - pickFolderAndOpen(_options: IPickAndOpenOptions): Promise { return Promise.resolve(0); } - pickWorkspaceAndOpen(_options: IPickAndOpenOptions): Promise { return Promise.resolve(0); } - - private fileToSave!: URI; - setPickFileToSave(path: URI): void { this.fileToSave = path; } - pickFileToSave(defaultUri: URI, availableFileSystems?: string[]): Promise { return Promise.resolve(this.fileToSave); } - - showSaveDialog(_options: ISaveDialogOptions): Promise { return Promise.resolve(undefined); } - showOpenDialog(_options: IOpenDialogOptions): Promise { return Promise.resolve(undefined); } - - setConfirmResult(result: ConfirmResult): void { this.confirmResult = result; } - showSaveConfirm(fileNamesOrResources: (string | URI)[]): Promise { return Promise.resolve(this.confirmResult); } -} - -export class TestLayoutService implements IWorkbenchLayoutService { - - declare readonly _serviceBrand: undefined; - - openedDefaultEditors = false; - - mainContainerDimension: IDimension = { width: 800, height: 600 }; - activeContainerDimension: IDimension = { width: 800, height: 600 }; - mainContainerOffset: ILayoutOffsetInfo = { top: 0, quickPickTop: 0 }; - activeContainerOffset: ILayoutOffsetInfo = { top: 0, quickPickTop: 0 }; - - mainContainer: HTMLElement = mainWindow.document.body; - containers = [mainWindow.document.body]; - activeContainer: HTMLElement = mainWindow.document.body; - - onDidChangeZenMode: Event = Event.None; - onDidChangeMainEditorCenteredLayout: Event = Event.None; - onDidChangeWindowMaximized: Event<{ windowId: number; maximized: boolean }> = Event.None; - onDidChangePanelPosition: Event = Event.None; - onDidChangePanelAlignment: Event = Event.None; - onDidChangePartVisibility: Event = Event.None; - onDidLayoutMainContainer = Event.None; - onDidLayoutActiveContainer = Event.None; - onDidLayoutContainer = Event.None; - onDidChangeNotificationsVisibility = Event.None; - onDidAddContainer = Event.None; - onDidChangeActiveContainer = Event.None; - - layout(): void { } - isRestored(): boolean { return true; } - whenReady: Promise = Promise.resolve(undefined); - whenRestored: Promise = Promise.resolve(undefined); - hasFocus(_part: Parts): boolean { return false; } - focusPart(_part: Parts): void { } - hasMainWindowBorder(): boolean { return false; } - getMainWindowBorderRadius(): string | undefined { return undefined; } - isVisible(_part: Parts): boolean { return true; } - getContainer(): HTMLElement { return mainWindow.document.body; } - whenContainerStylesLoaded() { return undefined; } - isTitleBarHidden(): boolean { return false; } - isStatusBarHidden(): boolean { return false; } - isActivityBarHidden(): boolean { return false; } - setActivityBarHidden(_hidden: boolean): void { } - setBannerHidden(_hidden: boolean): void { } - isSideBarHidden(): boolean { return false; } - async setEditorHidden(_hidden: boolean): Promise { } - async setSideBarHidden(_hidden: boolean): Promise { } - async setAuxiliaryBarHidden(_hidden: boolean): Promise { } - async setPartHidden(_hidden: boolean, part: Parts): Promise { } - isPanelHidden(): boolean { return false; } - async setPanelHidden(_hidden: boolean): Promise { } - toggleMaximizedPanel(): void { } - isPanelMaximized(): boolean { return false; } - getMenubarVisibility(): MenuBarVisibility { throw new Error('not implemented'); } - toggleMenuBar(): void { } - getSideBarPosition() { return 0; } - getPanelPosition() { return 0; } - getPanelAlignment(): PanelAlignment { return 'center'; } - async setPanelPosition(_position: PartPosition): Promise { } - async setPanelAlignment(_alignment: PanelAlignment): Promise { } - addClass(_clazz: string): void { } - removeClass(_clazz: string): void { } - getMaximumEditorDimensions(): IDimension { throw new Error('not implemented'); } - toggleZenMode(): void { } - isMainEditorLayoutCentered(): boolean { return false; } - centerMainEditorLayout(_active: boolean): void { } - resizePart(_part: Parts, _sizeChangeWidth: number, _sizeChangeHeight: number): void { } - getSize(part: Parts): IViewSize { throw new Error('Method not implemented.'); } - setSize(part: Parts, size: IViewSize): void { throw new Error('Method not implemented.'); } - registerPart(part: Part): IDisposable { return Disposable.None; } - isWindowMaximized(targetWindow: Window) { return false; } - updateWindowMaximizedState(targetWindow: Window, maximized: boolean): void { } - getVisibleNeighborPart(part: Parts, direction: Direction): Parts | undefined { return undefined; } - focus() { } -} - -const activeViewlet: PaneComposite = {} as any; - -export class TestPaneCompositeService extends Disposable implements IPaneCompositePartService { - declare readonly _serviceBrand: undefined; - - onDidPaneCompositeOpen: Event<{ composite: IPaneComposite; viewContainerLocation: ViewContainerLocation }>; - onDidPaneCompositeClose: Event<{ composite: IPaneComposite; viewContainerLocation: ViewContainerLocation }>; - - private parts = new Map(); - - constructor() { - super(); - - this.parts.set(ViewContainerLocation.Panel, new TestPanelPart()); - this.parts.set(ViewContainerLocation.Sidebar, new TestSideBarPart()); - - this.onDidPaneCompositeOpen = Event.any(...([ViewContainerLocation.Panel, ViewContainerLocation.Sidebar].map(loc => Event.map(this.parts.get(loc)!.onDidPaneCompositeOpen, composite => { return { composite, viewContainerLocation: loc }; })))); - this.onDidPaneCompositeClose = Event.any(...([ViewContainerLocation.Panel, ViewContainerLocation.Sidebar].map(loc => Event.map(this.parts.get(loc)!.onDidPaneCompositeClose, composite => { return { composite, viewContainerLocation: loc }; })))); - } - - openPaneComposite(id: string | undefined, viewContainerLocation: ViewContainerLocation, focus?: boolean): Promise { - return this.getPartByLocation(viewContainerLocation).openPaneComposite(id, focus); - } - getActivePaneComposite(viewContainerLocation: ViewContainerLocation): IPaneComposite | undefined { - return this.getPartByLocation(viewContainerLocation).getActivePaneComposite(); - } - getPaneComposite(id: string, viewContainerLocation: ViewContainerLocation): PaneCompositeDescriptor | undefined { - return this.getPartByLocation(viewContainerLocation).getPaneComposite(id); - } - getPaneComposites(viewContainerLocation: ViewContainerLocation): PaneCompositeDescriptor[] { - return this.getPartByLocation(viewContainerLocation).getPaneComposites(); - } - getProgressIndicator(id: string, viewContainerLocation: ViewContainerLocation): IProgressIndicator | undefined { - return this.getPartByLocation(viewContainerLocation).getProgressIndicator(id); - } - hideActivePaneComposite(viewContainerLocation: ViewContainerLocation): void { - this.getPartByLocation(viewContainerLocation).hideActivePaneComposite(); - } - getLastActivePaneCompositeId(viewContainerLocation: ViewContainerLocation): string { - return this.getPartByLocation(viewContainerLocation).getLastActivePaneCompositeId(); - } - - getPinnedPaneCompositeIds(viewContainerLocation: ViewContainerLocation): string[] { - throw new Error('Method not implemented.'); - } - - getVisiblePaneCompositeIds(viewContainerLocation: ViewContainerLocation): string[] { - throw new Error('Method not implemented.'); - } - - getPaneCompositeIds(viewContainerLocation: ViewContainerLocation): string[] { - throw new Error('Method not implemented.'); - } - - getPartByLocation(viewContainerLocation: ViewContainerLocation): IPaneCompositePart { - return assertIsDefined(this.parts.get(viewContainerLocation)); - } -} - -export class TestSideBarPart implements IPaneCompositePart { - declare readonly _serviceBrand: undefined; - - onDidViewletRegisterEmitter = new Emitter(); - onDidViewletDeregisterEmitter = new Emitter(); - onDidViewletOpenEmitter = new Emitter(); - onDidViewletCloseEmitter = new Emitter(); - - readonly partId = Parts.SIDEBAR_PART; - element: HTMLElement = undefined!; - minimumWidth = 0; - maximumWidth = 0; - minimumHeight = 0; - maximumHeight = 0; - onDidChange = Event.None; - onDidPaneCompositeOpen = this.onDidViewletOpenEmitter.event; - onDidPaneCompositeClose = this.onDidViewletCloseEmitter.event; - - openPaneComposite(id: string, focus?: boolean): Promise { return Promise.resolve(undefined); } - getPaneComposites(): PaneCompositeDescriptor[] { return []; } - getAllViewlets(): PaneCompositeDescriptor[] { return []; } - getActivePaneComposite(): IPaneComposite { return activeViewlet; } - getDefaultViewletId(): string { return 'workbench.view.explorer'; } - getPaneComposite(id: string): PaneCompositeDescriptor | undefined { return undefined; } - getProgressIndicator(id: string) { return undefined; } - hideActivePaneComposite(): void { } - getLastActivePaneCompositeId(): string { return undefined!; } - dispose() { } - getPinnedPaneCompositeIds() { return []; } - getVisiblePaneCompositeIds() { return []; } - getPaneCompositeIds() { return []; } - layout(width: number, height: number, top: number, left: number): void { } -} - -export class TestPanelPart implements IPaneCompositePart { - declare readonly _serviceBrand: undefined; - - element: HTMLElement = undefined!; - minimumWidth = 0; - maximumWidth = 0; - minimumHeight = 0; - maximumHeight = 0; - onDidChange = Event.None; - onDidPaneCompositeOpen = new Emitter().event; - onDidPaneCompositeClose = new Emitter().event; - readonly partId = Parts.AUXILIARYBAR_PART; - - async openPaneComposite(id?: string, focus?: boolean): Promise { return undefined; } - getPaneComposite(id: string): any { return activeViewlet; } - getPaneComposites() { return []; } - getPinnedPaneCompositeIds() { return []; } - getVisiblePaneCompositeIds() { return []; } - getPaneCompositeIds() { return []; } - getActivePaneComposite(): IPaneComposite { return activeViewlet; } - setPanelEnablement(id: string, enabled: boolean): void { } - dispose() { } - getProgressIndicator(id: string) { return null!; } - hideActivePaneComposite(): void { } - getLastActivePaneCompositeId(): string { return undefined!; } - layout(width: number, height: number, top: number, left: number): void { } -} - -export class TestViewsService implements IViewsService { - declare readonly _serviceBrand: undefined; - - - onDidChangeViewContainerVisibility = new Emitter<{ id: string; visible: boolean; location: ViewContainerLocation }>().event; - isViewContainerVisible(id: string): boolean { return true; } - isViewContainerActive(id: string): boolean { return true; } - getVisibleViewContainer(): ViewContainer | null { return null; } - openViewContainer(id: string, focus?: boolean): Promise { return Promise.resolve(null); } - closeViewContainer(id: string): void { } - - onDidChangeViewVisibilityEmitter = new Emitter<{ id: string; visible: boolean }>(); - onDidChangeViewVisibility = this.onDidChangeViewVisibilityEmitter.event; - onDidChangeFocusedViewEmitter = new Emitter(); - onDidChangeFocusedView = this.onDidChangeFocusedViewEmitter.event; - isViewVisible(id: string): boolean { return true; } - getActiveViewWithId(id: string): T | null { return null; } - getViewWithId(id: string): T | null { return null; } - openView(id: string, focus?: boolean | undefined): Promise { return Promise.resolve(null); } - closeView(id: string): void { } - getViewProgressIndicator(id: string) { return null!; } - getActiveViewPaneContainerWithId(id: string) { return null; } - getFocusedViewName(): string { return ''; } - getFocusedView(): IViewDescriptor | null { return null; } -} - -export class TestEditorGroupsService implements IEditorGroupsService { - - declare readonly _serviceBrand: undefined; - - constructor(public groups: TestEditorGroupView[] = []) { } - - readonly parts: readonly IEditorPart[] = [this]; - - windowId = mainWindow.vscodeWindowId; - - onDidCreateAuxiliaryEditorPart: Event = Event.None; - onDidChangeActiveGroup: Event = Event.None; - onDidActivateGroup: Event = Event.None; - onDidAddGroup: Event = Event.None; - onDidRemoveGroup: Event = Event.None; - onDidMoveGroup: Event = Event.None; - onDidChangeGroupIndex: Event = Event.None; - onDidChangeGroupLabel: Event = Event.None; - onDidChangeGroupLocked: Event = Event.None; - onDidChangeGroupMaximized: Event = Event.None; - onDidLayout: Event = Event.None; - onDidChangeEditorPartOptions = Event.None; - onDidScroll = Event.None; - onWillDispose = Event.None; - - orientation = GroupOrientation.HORIZONTAL; - isReady = true; - whenReady: Promise = Promise.resolve(undefined); - whenRestored: Promise = Promise.resolve(undefined); - hasRestorableState = false; - - contentDimension = { width: 800, height: 600 }; - - get activeGroup(): IEditorGroup { return this.groups[0]; } - get sideGroup(): IEditorGroup { return this.groups[0]; } - get count(): number { return this.groups.length; } - - getPart(group: number | IEditorGroup): IEditorPart { return this; } - saveWorkingSet(name: string): IEditorWorkingSet { throw new Error('Method not implemented.'); } - getWorkingSets(): IEditorWorkingSet[] { throw new Error('Method not implemented.'); } - applyWorkingSet(workingSet: IEditorWorkingSet | 'empty', options?: IEditorWorkingSetOptions): Promise { throw new Error('Method not implemented.'); } - deleteWorkingSet(workingSet: IEditorWorkingSet): Promise { throw new Error('Method not implemented.'); } - getGroups(_order?: GroupsOrder): readonly IEditorGroup[] { return this.groups; } - getGroup(identifier: number): IEditorGroup | undefined { return this.groups.find(group => group.id === identifier); } - getLabel(_identifier: number): string { return 'Group 1'; } - findGroup(_scope: IFindGroupScope, _source?: number | IEditorGroup, _wrap?: boolean): IEditorGroup { throw new Error('not implemented'); } - activateGroup(_group: number | IEditorGroup): IEditorGroup { throw new Error('not implemented'); } - restoreGroup(_group: number | IEditorGroup): IEditorGroup { throw new Error('not implemented'); } - getSize(_group: number | IEditorGroup): { width: number; height: number } { return { width: 100, height: 100 }; } - setSize(_group: number | IEditorGroup, _size: { width: number; height: number }): void { } - arrangeGroups(_arrangement: GroupsArrangement): void { } - toggleMaximizeGroup(): void { } - hasMaximizedGroup(): boolean { throw new Error('not implemented'); } - toggleExpandGroup(): void { } - applyLayout(_layout: EditorGroupLayout): void { } - getLayout(): EditorGroupLayout { throw new Error('not implemented'); } - setGroupOrientation(_orientation: GroupOrientation): void { } - addGroup(_location: number | IEditorGroup, _direction: GroupDirection): IEditorGroup { throw new Error('not implemented'); } - removeGroup(_group: number | IEditorGroup): void { } - moveGroup(_group: number | IEditorGroup, _location: number | IEditorGroup, _direction: GroupDirection): IEditorGroup { throw new Error('not implemented'); } - mergeGroup(_group: number | IEditorGroup, _target: number | IEditorGroup, _options?: IMergeGroupOptions): boolean { throw new Error('not implemented'); } - mergeAllGroups(_group: number | IEditorGroup): boolean { throw new Error('not implemented'); } - copyGroup(_group: number | IEditorGroup, _location: number | IEditorGroup, _direction: GroupDirection): IEditorGroup { throw new Error('not implemented'); } - centerLayout(active: boolean): void { } - isLayoutCentered(): boolean { return false; } - createEditorDropTarget(container: HTMLElement, delegate: IEditorDropTargetDelegate): IDisposable { return Disposable.None; } - registerContextKeyProvider(_provider: IEditorGroupContextKeyProvider): IDisposable { throw new Error('not implemented'); } - getScopedInstantiationService(part: IEditorPart): IInstantiationService { throw new Error('Method not implemented.'); } - - partOptions!: IEditorPartOptions; - enforcePartOptions(options: IEditorPartOptions): IDisposable { return Disposable.None; } - - readonly mainPart = this; - registerEditorPart(part: any): IDisposable { return Disposable.None; } - createAuxiliaryEditorPart(): Promise { throw new Error('Method not implemented.'); } -} - -export class TestEditorGroupView implements IEditorGroupView { - - constructor(public id: number) { } - - windowId = mainWindow.vscodeWindowId; - groupsView: IEditorGroupsView = undefined!; - activeEditorPane!: IVisibleEditorPane; - activeEditor!: EditorInput; - selectedEditors: EditorInput[] = []; - previewEditor!: EditorInput; - count!: number; - stickyCount!: number; - disposed!: boolean; - editors: readonly EditorInput[] = []; - label!: string; - isLocked!: boolean; - ariaLabel!: string; - index!: number; - whenRestored: Promise = Promise.resolve(undefined); - element!: HTMLElement; - minimumWidth!: number; - maximumWidth!: number; - minimumHeight!: number; - maximumHeight!: number; - - titleHeight!: IEditorGroupTitleHeight; - - isEmpty = true; - - onWillDispose: Event = Event.None; - onDidModelChange: Event = Event.None; - onWillCloseEditor: Event = Event.None; - onDidCloseEditor: Event = Event.None; - onDidOpenEditorFail: Event = Event.None; - onDidFocus: Event = Event.None; - onDidChange: Event<{ width: number; height: number }> = Event.None; - onWillMoveEditor: Event = Event.None; - onWillOpenEditor: Event = Event.None; - onDidActiveEditorChange: Event = Event.None; - - getEditors(_order?: EditorsOrder): readonly EditorInput[] { return []; } - findEditors(_resource: URI): readonly EditorInput[] { return []; } - getEditorByIndex(_index: number): EditorInput { throw new Error('not implemented'); } - getIndexOfEditor(_editor: EditorInput): number { return -1; } - isFirst(editor: EditorInput): boolean { return false; } - isLast(editor: EditorInput): boolean { return false; } - openEditor(_editor: EditorInput, _options?: IEditorOptions): Promise { throw new Error('not implemented'); } - openEditors(_editors: EditorInputWithOptions[]): Promise { throw new Error('not implemented'); } - isPinned(_editor: EditorInput): boolean { return false; } - isSticky(_editor: EditorInput): boolean { return false; } - isTransient(_editor: EditorInput): boolean { return false; } - isActive(_editor: EditorInput | IUntypedEditorInput): boolean { return false; } - setSelection(_activeSelectedEditor: EditorInput, _inactiveSelectedEditors: EditorInput[]): Promise { throw new Error('not implemented'); } - isSelected(_editor: EditorInput): boolean { return false; } - contains(candidate: EditorInput | IUntypedEditorInput): boolean { return false; } - moveEditor(_editor: EditorInput, _target: IEditorGroup, _options?: IEditorOptions): boolean { return true; } - moveEditors(_editors: EditorInputWithOptions[], _target: IEditorGroup): boolean { return true; } - copyEditor(_editor: EditorInput, _target: IEditorGroup, _options?: IEditorOptions): void { } - copyEditors(_editors: EditorInputWithOptions[], _target: IEditorGroup): void { } - async closeEditor(_editor?: EditorInput, options?: ICloseEditorOptions): Promise { return true; } - async closeEditors(_editors: EditorInput[] | ICloseEditorsFilter, options?: ICloseEditorOptions): Promise { return true; } - async closeAllEditors(options?: ICloseAllEditorsOptions): Promise { return true; } - async replaceEditors(_editors: IEditorReplacement[]): Promise { } - pinEditor(_editor?: EditorInput): void { } - stickEditor(editor?: EditorInput | undefined): void { } - unstickEditor(editor?: EditorInput | undefined): void { } - lock(locked: boolean): void { } - focus(): void { } - get scopedContextKeyService(): IContextKeyService { throw new Error('not implemented'); } - setActive(_isActive: boolean): void { } - notifyIndexChanged(_index: number): void { } - notifyLabelChanged(_label: string): void { } - dispose(): void { } - toJSON(): object { return Object.create(null); } - layout(_width: number, _height: number): void { } - relayout() { } - createEditorActions(_menuDisposable: IDisposable): { actions: IToolbarActions; onDidChange: Event } { throw new Error('not implemented'); } -} - -export class TestEditorGroupAccessor implements IEditorGroupsView { - - label: string = ''; - windowId = mainWindow.vscodeWindowId; - - groups: IEditorGroupView[] = []; - activeGroup!: IEditorGroupView; - - partOptions: IEditorPartOptions = { ...DEFAULT_EDITOR_PART_OPTIONS }; - - onDidChangeEditorPartOptions = Event.None; - onDidVisibilityChange = Event.None; - - getGroup(identifier: number): IEditorGroupView | undefined { throw new Error('Method not implemented.'); } - getGroups(order: GroupsOrder): IEditorGroupView[] { throw new Error('Method not implemented.'); } - activateGroup(identifier: number | IEditorGroupView): IEditorGroupView { throw new Error('Method not implemented.'); } - restoreGroup(identifier: number | IEditorGroupView): IEditorGroupView { throw new Error('Method not implemented.'); } - addGroup(location: number | IEditorGroupView, direction: GroupDirection): IEditorGroupView { throw new Error('Method not implemented.'); } - mergeGroup(group: number | IEditorGroupView, target: number | IEditorGroupView, options?: IMergeGroupOptions | undefined): boolean { throw new Error('Method not implemented.'); } - moveGroup(group: number | IEditorGroupView, location: number | IEditorGroupView, direction: GroupDirection): IEditorGroupView { throw new Error('Method not implemented.'); } - copyGroup(group: number | IEditorGroupView, location: number | IEditorGroupView, direction: GroupDirection): IEditorGroupView { throw new Error('Method not implemented.'); } - removeGroup(group: number | IEditorGroupView): void { throw new Error('Method not implemented.'); } - arrangeGroups(arrangement: GroupsArrangement, target?: number | IEditorGroupView | undefined): void { throw new Error('Method not implemented.'); } - toggleMaximizeGroup(group: number | IEditorGroupView): void { throw new Error('Method not implemented.'); } - toggleExpandGroup(group: number | IEditorGroupView): void { throw new Error('Method not implemented.'); } -} - -export class TestEditorService extends Disposable implements EditorServiceImpl { - - declare readonly _serviceBrand: undefined; - - onDidActiveEditorChange: Event = Event.None; - onDidVisibleEditorsChange: Event = Event.None; - onDidEditorsChange: Event = Event.None; - onWillOpenEditor: Event = Event.None; - onDidCloseEditor: Event = Event.None; - onDidOpenEditorFail: Event = Event.None; - onDidMostRecentlyActiveEditorsChange: Event = Event.None; - - private _activeTextEditorControl: ICodeEditor | IDiffEditor | undefined; - public get activeTextEditorControl(): ICodeEditor | IDiffEditor | undefined { return this._activeTextEditorControl; } - public set activeTextEditorControl(value: ICodeEditor | IDiffEditor | undefined) { this._activeTextEditorControl = value; } - - activeEditorPane: IVisibleEditorPane | undefined; - activeTextEditorLanguageId: string | undefined; - - private _activeEditor: EditorInput | undefined; - public get activeEditor(): EditorInput | undefined { return this._activeEditor; } - public set activeEditor(value: EditorInput | undefined) { this._activeEditor = value; } - - editors: readonly EditorInput[] = []; - mostRecentlyActiveEditors: readonly IEditorIdentifier[] = []; - visibleEditorPanes: readonly IVisibleEditorPane[] = []; - visibleTextEditorControls = []; - getVisibleTextEditorControls(order: EditorsOrder): readonly (IEditor | IDiffEditor)[] { return this.visibleTextEditorControls; } - visibleEditors: readonly EditorInput[] = []; - count = this.editors.length; - - constructor(private editorGroupService?: IEditorGroupsService) { - super(); - } - createScoped(editorGroupsContainer: IEditorGroupsContainer): IEditorService { return this; } - getEditors() { return []; } - findEditors() { return [] as any; } - openEditor(editor: EditorInput, options?: IEditorOptions, group?: PreferredGroup): Promise; - openEditor(editor: IResourceEditorInput | IUntitledTextResourceEditorInput, group?: PreferredGroup): Promise; - openEditor(editor: IResourceDiffEditorInput, group?: PreferredGroup): Promise; - async openEditor(editor: EditorInput | IUntypedEditorInput, optionsOrGroup?: IEditorOptions | PreferredGroup, group?: PreferredGroup): Promise { - // openEditor takes ownership of the input, register it to the TestEditorService - // so it's not marked as leaked during tests. - if ('dispose' in editor) { - this._register(editor); - } - return undefined; - } - async closeEditor(editor: IEditorIdentifier, options?: ICloseEditorOptions): Promise { } - async closeEditors(editors: IEditorIdentifier[], options?: ICloseEditorOptions): Promise { } - doResolveEditorOpenRequest(editor: EditorInput | IUntypedEditorInput): [IEditorGroup, EditorInput, IEditorOptions | undefined] | undefined { - if (!this.editorGroupService) { - return undefined; - } - - return [this.editorGroupService.activeGroup, editor as EditorInput, undefined]; - } - openEditors(_editors: any, _group?: any): Promise { throw new Error('not implemented'); } - isOpened(_editor: IResourceEditorInputIdentifier): boolean { return false; } - isVisible(_editor: EditorInput): boolean { return false; } - replaceEditors(_editors: any, _group: any) { return Promise.resolve(undefined); } - save(editors: IEditorIdentifier[], options?: ISaveEditorsOptions): Promise { throw new Error('Method not implemented.'); } - saveAll(options?: ISaveEditorsOptions): Promise { throw new Error('Method not implemented.'); } - revert(editors: IEditorIdentifier[], options?: IRevertOptions): Promise { throw new Error('Method not implemented.'); } - revertAll(options?: IRevertAllEditorsOptions): Promise { throw new Error('Method not implemented.'); } -} - -export class TestFileService implements IFileService { - - declare readonly _serviceBrand: undefined; - - private readonly _onDidFilesChange = new Emitter(); - get onDidFilesChange(): Event { return this._onDidFilesChange.event; } - fireFileChanges(event: FileChangesEvent): void { this._onDidFilesChange.fire(event); } - - private readonly _onDidRunOperation = new Emitter(); - get onDidRunOperation(): Event { return this._onDidRunOperation.event; } - fireAfterOperation(event: FileOperationEvent): void { this._onDidRunOperation.fire(event); } - - private readonly _onDidChangeFileSystemProviderCapabilities = new Emitter(); - get onDidChangeFileSystemProviderCapabilities(): Event { return this._onDidChangeFileSystemProviderCapabilities.event; } - fireFileSystemProviderCapabilitiesChangeEvent(event: IFileSystemProviderCapabilitiesChangeEvent): void { this._onDidChangeFileSystemProviderCapabilities.fire(event); } - - private _onWillActivateFileSystemProvider = new Emitter(); - readonly onWillActivateFileSystemProvider = this._onWillActivateFileSystemProvider.event; - readonly onDidWatchError = Event.None; - - private content = 'Hello Html'; - private lastReadFileUri!: URI; - - readonly = false; - - setContent(content: string): void { this.content = content; } - getContent(): string { return this.content; } - getLastReadFileUri(): URI { return this.lastReadFileUri; } - - resolve(resource: URI, _options: IResolveMetadataFileOptions): Promise; - resolve(resource: URI, _options?: IResolveFileOptions): Promise; - async resolve(resource: URI, _options?: IResolveFileOptions): Promise { - return createFileStat(resource, this.readonly); - } - - stat(resource: URI): Promise { - return this.resolve(resource, { resolveMetadata: true }); - } - - async resolveAll(toResolve: { resource: URI; options?: IResolveFileOptions }[]): Promise { - const stats = await Promise.all(toResolve.map(resourceAndOption => this.resolve(resourceAndOption.resource, resourceAndOption.options))); - - return stats.map(stat => ({ stat, success: true })); - } - - readonly notExistsSet = new ResourceMap(); - - async exists(_resource: URI): Promise { return !this.notExistsSet.has(_resource); } - - readShouldThrowError: Error | undefined = undefined; - - async readFile(resource: URI, options?: IReadFileOptions | undefined): Promise { - if (this.readShouldThrowError) { - throw this.readShouldThrowError; - } - - this.lastReadFileUri = resource; - - return { - ...createFileStat(resource, this.readonly), - value: VSBuffer.fromString(this.content) - }; - } - - async readFileStream(resource: URI, options?: IReadFileStreamOptions | undefined): Promise { - if (this.readShouldThrowError) { - throw this.readShouldThrowError; - } - - this.lastReadFileUri = resource; - - return { - ...createFileStat(resource, this.readonly), - value: bufferToStream(VSBuffer.fromString(this.content)) - }; - } - - writeShouldThrowError: Error | undefined = undefined; - - async writeFile(resource: URI, bufferOrReadable: VSBuffer | VSBufferReadable, options?: IWriteFileOptions): Promise { - await timeout(0); - - if (this.writeShouldThrowError) { - throw this.writeShouldThrowError; - } - - return createFileStat(resource, this.readonly); - } - - move(_source: URI, _target: URI, _overwrite?: boolean): Promise { return Promise.resolve(null!); } - copy(_source: URI, _target: URI, _overwrite?: boolean): Promise { return Promise.resolve(null!); } - async cloneFile(_source: URI, _target: URI): Promise { } - createFile(_resource: URI, _content?: VSBuffer | VSBufferReadable, _options?: ICreateFileOptions): Promise { return Promise.resolve(null!); } - createFolder(_resource: URI): Promise { return Promise.resolve(null!); } - - onDidChangeFileSystemProviderRegistrations = Event.None; - - private providers = new Map(); - - registerProvider(scheme: string, provider: IFileSystemProvider) { - this.providers.set(scheme, provider); - - return toDisposable(() => this.providers.delete(scheme)); - } - - getProvider(scheme: string) { - return this.providers.get(scheme); - } - - async activateProvider(_scheme: string): Promise { - this._onWillActivateFileSystemProvider.fire({ scheme: _scheme, join: () => { } }); - } - async canHandleResource(resource: URI): Promise { return this.hasProvider(resource); } - hasProvider(resource: URI): boolean { return resource.scheme === Schemas.file || this.providers.has(resource.scheme); } - listCapabilities() { - return [ - { scheme: Schemas.file, capabilities: FileSystemProviderCapabilities.FileOpenReadWriteClose }, - ...Iterable.map(this.providers, ([scheme, p]) => { return { scheme, capabilities: p.capabilities }; }) - ]; - } - hasCapability(resource: URI, capability: FileSystemProviderCapabilities): boolean { - if (capability === FileSystemProviderCapabilities.PathCaseSensitive && isLinux) { - return true; - } - - const provider = this.getProvider(resource.scheme); - - return !!(provider && (provider.capabilities & capability)); - } - - async del(_resource: URI, _options?: { useTrash?: boolean; recursive?: boolean }): Promise { } - - createWatcher(resource: URI, options: IWatchOptions): IFileSystemWatcher { - return { - onDidChange: Event.None, - dispose: () => { } - }; - } - - - readonly watches: URI[] = []; - watch(_resource: URI, options: IWatchOptionsWithCorrelation): IFileSystemWatcher; - watch(_resource: URI): IDisposable; - watch(_resource: URI): IDisposable { - this.watches.push(_resource); - - return toDisposable(() => this.watches.splice(this.watches.indexOf(_resource), 1)); - } - - getWriteEncoding(_resource: URI): IResourceEncoding { return { encoding: 'utf8', hasBOM: false }; } - dispose(): void { } - - async canCreateFile(source: URI, options?: ICreateFileOptions): Promise { return true; } - async canMove(source: URI, target: URI, overwrite?: boolean | undefined): Promise { return true; } - async canCopy(source: URI, target: URI, overwrite?: boolean | undefined): Promise { return true; } - async canDelete(resource: URI, options?: { useTrash?: boolean | undefined; recursive?: boolean | undefined } | undefined): Promise { return true; } -} - -export class TestWorkingCopyBackupService extends InMemoryWorkingCopyBackupService { - - readonly resolved: Set = new Set(); - - constructor() { - super(); - } - - parseBackupContent(textBufferFactory: ITextBufferFactory): string { - const textBuffer = textBufferFactory.create(DefaultEndOfLine.LF).textBuffer; - const lineCount = textBuffer.getLineCount(); - const range = new Range(1, 1, lineCount, textBuffer.getLineLength(lineCount) + 1); - - return textBuffer.getValueInRange(range, EndOfLinePreference.TextDefined); - } - - override async resolve(identifier: IWorkingCopyIdentifier): Promise | undefined> { - this.resolved.add(identifier); - - return super.resolve(identifier); - } -} - -export function toUntypedWorkingCopyId(resource: URI): IWorkingCopyIdentifier { - return toTypedWorkingCopyId(resource, ''); -} - -export function toTypedWorkingCopyId(resource: URI, typeId = 'testBackupTypeId'): IWorkingCopyIdentifier { - return { typeId, resource }; -} - -export class InMemoryTestWorkingCopyBackupService extends BrowserWorkingCopyBackupService { - - private backupResourceJoiners: Function[]; - private discardBackupJoiners: Function[]; - - discardedBackups: IWorkingCopyIdentifier[]; - - constructor() { - const disposables = new DisposableStore(); - const environmentService = TestEnvironmentService; - const logService = new NullLogService(); - const fileService = disposables.add(new FileService(logService)); - disposables.add(fileService.registerProvider(Schemas.file, disposables.add(new InMemoryFileSystemProvider()))); - disposables.add(fileService.registerProvider(Schemas.vscodeUserData, disposables.add(new InMemoryFileSystemProvider()))); - - super(new TestContextService(TestWorkspace), environmentService, fileService, logService); - - this.backupResourceJoiners = []; - this.discardBackupJoiners = []; - this.discardedBackups = []; - - this._register(disposables); - } - - testGetFileService(): IFileService { - return this.fileService; - } - - joinBackupResource(): Promise { - return new Promise(resolve => this.backupResourceJoiners.push(resolve)); - } - - joinDiscardBackup(): Promise { - return new Promise(resolve => this.discardBackupJoiners.push(resolve)); - } - - override async backup(identifier: IWorkingCopyIdentifier, content?: VSBufferReadableStream | VSBufferReadable, versionId?: number, meta?: any, token?: CancellationToken): Promise { - await super.backup(identifier, content, versionId, meta, token); - - while (this.backupResourceJoiners.length) { - this.backupResourceJoiners.pop()!(); - } - } - - override async discardBackup(identifier: IWorkingCopyIdentifier): Promise { - await super.discardBackup(identifier); - this.discardedBackups.push(identifier); - - while (this.discardBackupJoiners.length) { - this.discardBackupJoiners.pop()!(); - } - } - - async getBackupContents(identifier: IWorkingCopyIdentifier): Promise { - const backupResource = this.toBackupResource(identifier); - - const fileContents = await this.fileService.readFile(backupResource); - - return fileContents.value.toString(); - } -} - -export class TestLifecycleService extends Disposable implements ILifecycleService { - - declare readonly _serviceBrand: undefined; - - usePhases = false; - _phase!: LifecyclePhase; - get phase(): LifecyclePhase { return this._phase; } - set phase(value: LifecyclePhase) { - this._phase = value; - if (value === LifecyclePhase.Starting) { - this.whenStarted.complete(); - } else if (value === LifecyclePhase.Ready) { - this.whenReady.complete(); - } else if (value === LifecyclePhase.Restored) { - this.whenRestored.complete(); - } else if (value === LifecyclePhase.Eventually) { - this.whenEventually.complete(); - } - } - - private readonly whenStarted = new DeferredPromise(); - private readonly whenReady = new DeferredPromise(); - private readonly whenRestored = new DeferredPromise(); - private readonly whenEventually = new DeferredPromise(); - async when(phase: LifecyclePhase): Promise { - if (!this.usePhases) { - return; - } - if (phase === LifecyclePhase.Starting) { - await this.whenStarted.p; - } else if (phase === LifecyclePhase.Ready) { - await this.whenReady.p; - } else if (phase === LifecyclePhase.Restored) { - await this.whenRestored.p; - } else if (phase === LifecyclePhase.Eventually) { - await this.whenEventually.p; - } - } - - startupKind!: StartupKind; - - private readonly _onBeforeShutdown = this._register(new Emitter()); - get onBeforeShutdown(): Event { return this._onBeforeShutdown.event; } - - private readonly _onBeforeShutdownError = this._register(new Emitter()); - get onBeforeShutdownError(): Event { return this._onBeforeShutdownError.event; } - - private readonly _onShutdownVeto = this._register(new Emitter()); - get onShutdownVeto(): Event { return this._onShutdownVeto.event; } - - private readonly _onWillShutdown = this._register(new Emitter()); - get onWillShutdown(): Event { return this._onWillShutdown.event; } - - private readonly _onDidShutdown = this._register(new Emitter()); - get onDidShutdown(): Event { return this._onDidShutdown.event; } - - shutdownJoiners: Promise[] = []; - - fireShutdown(reason = ShutdownReason.QUIT): void { - this.shutdownJoiners = []; - - this._onWillShutdown.fire({ - join: p => { - this.shutdownJoiners.push(typeof p === 'function' ? p() : p); - }, - joiners: () => [], - force: () => { /* No-Op in tests */ }, - token: CancellationToken.None, - reason - }); - } - - fireBeforeShutdown(event: InternalBeforeShutdownEvent): void { this._onBeforeShutdown.fire(event); } - - fireWillShutdown(event: WillShutdownEvent): void { this._onWillShutdown.fire(event); } - - async shutdown(): Promise { - this.fireShutdown(); - } -} - -export class TestBeforeShutdownEvent implements InternalBeforeShutdownEvent { - - value: boolean | Promise | undefined; - finalValue: (() => boolean | Promise) | undefined; - reason = ShutdownReason.CLOSE; - - veto(value: boolean | Promise): void { - this.value = value; - } - - finalVeto(vetoFn: () => boolean | Promise): void { - this.value = vetoFn(); - this.finalValue = vetoFn; - } -} - -export class TestWillShutdownEvent implements WillShutdownEvent { - - value: Promise[] = []; - joiners = () => []; - reason = ShutdownReason.CLOSE; - token = CancellationToken.None; - - join(promise: Promise | (() => Promise), joiner: IWillShutdownEventJoiner): void { - this.value.push(typeof promise === 'function' ? promise() : promise); - } - - force() { /* No-Op in tests */ } -} - -export class TestTextResourceConfigurationService implements ITextResourceConfigurationService { - - declare readonly _serviceBrand: undefined; - - constructor(private configurationService = new TestConfigurationService()) { } - - onDidChangeConfiguration() { - return { dispose() { } }; - } - - getValue(resource: URI, arg2?: any, arg3?: any): T { - const position: IPosition | null = EditorPosition.isIPosition(arg2) ? arg2 : null; - const section: string | undefined = position ? (typeof arg3 === 'string' ? arg3 : undefined) : (typeof arg2 === 'string' ? arg2 : undefined); - return this.configurationService.getValue(section, { resource }); - } - - inspect(resource: URI | undefined, position: IPosition | null, section: string): IConfigurationValue> { - return this.configurationService.inspect(section, { resource }); - } - - updateValue(resource: URI, key: string, value: any, configurationTarget?: ConfigurationTarget): Promise { - return this.configurationService.updateValue(key, value); - } -} - -export class RemoteFileSystemProvider implements IFileSystemProvider { - - constructor(private readonly wrappedFsp: IFileSystemProvider, private readonly remoteAuthority: string) { } - - readonly capabilities: FileSystemProviderCapabilities = this.wrappedFsp.capabilities; - readonly onDidChangeCapabilities: Event = this.wrappedFsp.onDidChangeCapabilities; - - readonly onDidChangeFile: Event = Event.map(this.wrappedFsp.onDidChangeFile, changes => changes.map(c => { - return { - type: c.type, - resource: c.resource.with({ scheme: Schemas.vscodeRemote, authority: this.remoteAuthority }), - }; - })); - watch(resource: URI, opts: IWatchOptions): IDisposable { return this.wrappedFsp.watch(this.toFileResource(resource), opts); } - - stat(resource: URI): Promise { return this.wrappedFsp.stat(this.toFileResource(resource)); } - mkdir(resource: URI): Promise { return this.wrappedFsp.mkdir(this.toFileResource(resource)); } - readdir(resource: URI): Promise<[string, FileType][]> { return this.wrappedFsp.readdir(this.toFileResource(resource)); } - delete(resource: URI, opts: IFileDeleteOptions): Promise { return this.wrappedFsp.delete(this.toFileResource(resource), opts); } - - rename(from: URI, to: URI, opts: IFileOverwriteOptions): Promise { return this.wrappedFsp.rename(this.toFileResource(from), this.toFileResource(to), opts); } - copy(from: URI, to: URI, opts: IFileOverwriteOptions): Promise { return this.wrappedFsp.copy!(this.toFileResource(from), this.toFileResource(to), opts); } - - readFile(resource: URI): Promise { return this.wrappedFsp.readFile!(this.toFileResource(resource)); } - writeFile(resource: URI, content: Uint8Array, opts: IFileWriteOptions): Promise { return this.wrappedFsp.writeFile!(this.toFileResource(resource), content, opts); } - - open(resource: URI, opts: IFileOpenOptions): Promise { return this.wrappedFsp.open!(this.toFileResource(resource), opts); } - close(fd: number): Promise { return this.wrappedFsp.close!(fd); } - read(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise { return this.wrappedFsp.read!(fd, pos, data, offset, length); } - write(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise { return this.wrappedFsp.write!(fd, pos, data, offset, length); } - - readFileStream(resource: URI, opts: IFileReadStreamOptions, token: CancellationToken): ReadableStreamEvents { return this.wrappedFsp.readFileStream!(this.toFileResource(resource), opts, token); } - - private toFileResource(resource: URI): URI { return resource.with({ scheme: Schemas.file, authority: '' }); } -} - -export class TestInMemoryFileSystemProvider extends InMemoryFileSystemProvider implements IFileSystemProviderWithFileReadStreamCapability { - override get capabilities(): FileSystemProviderCapabilities { - return FileSystemProviderCapabilities.FileReadWrite - | FileSystemProviderCapabilities.PathCaseSensitive - | FileSystemProviderCapabilities.FileReadStream; - } - - override readFileStream(resource: URI): ReadableStreamEvents { - const BUFFER_SIZE = 64 * 1024; - const stream = newWriteableStream(data => VSBuffer.concat(data.map(data => VSBuffer.wrap(data))).buffer); - - (async () => { - try { - const data = await this.readFile(resource); - - let offset = 0; - while (offset < data.length) { - await timeout(0); - await stream.write(data.subarray(offset, offset + BUFFER_SIZE)); - offset += BUFFER_SIZE; - } - - await timeout(0); - stream.end(); - } catch (error) { - stream.end(error); - } - })(); - - return stream; - } -} - -export const productService: IProductService = { _serviceBrand: undefined, ...product }; - -export class TestHostService implements IHostService { - - declare readonly _serviceBrand: undefined; - - private _hasFocus = true; - get hasFocus() { return this._hasFocus; } - async hadLastFocus(): Promise { return this._hasFocus; } - - private _onDidChangeFocus = new Emitter(); - readonly onDidChangeFocus = this._onDidChangeFocus.event; - - private _onDidChangeWindow = new Emitter(); - readonly onDidChangeActiveWindow = this._onDidChangeWindow.event; - - readonly onDidChangeFullScreen: Event<{ windowId: number; fullscreen: boolean }> = Event.None; - - setFocus(focus: boolean) { - this._hasFocus = focus; - this._onDidChangeFocus.fire(this._hasFocus); - } - - async restart(): Promise { } - async reload(): Promise { } - async close(): Promise { } - async withExpectedShutdown(expectedShutdownTask: () => Promise): Promise { - return await expectedShutdownTask(); - } - - async focus(): Promise { } - async moveTop(): Promise { } - async getCursorScreenPoint(): Promise { return undefined; } - - async openWindow(arg1?: IOpenEmptyWindowOptions | IWindowOpenable[], arg2?: IOpenWindowOptions): Promise { } - - async toggleFullScreen(): Promise { } - - async getScreenshot(): Promise { return undefined; } - - async getNativeWindowHandle(_windowId: number): Promise { return undefined; } - - readonly colorScheme = ColorScheme.DARK; - onDidChangeColorScheme = Event.None; -} - -export class TestFilesConfigurationService extends FilesConfigurationService { - - testOnFilesConfigurationChange(configuration: any): void { - super.onFilesConfigurationChange(configuration, true); - } -} - -export class TestReadonlyTextFileEditorModel extends TextFileEditorModel { - - override isReadonly(): boolean { - return true; - } -} - -export class TestEditorInput extends EditorInput { - - constructor(public resource: URI, private readonly _typeId: string) { - super(); - } - - override get typeId(): string { - return this._typeId; - } - - override get editorId(): string { - return this._typeId; - } - - override resolve(): Promise { - return Promise.resolve(null); - } -} - -export function registerTestEditor(id: string, inputs: SyncDescriptor[], serializerInputId?: string): IDisposable { - const disposables = new DisposableStore(); - - class TestEditor extends EditorPane { - - private _scopedContextKeyService: IContextKeyService; - - constructor(group: IEditorGroup) { - super(id, group, NullTelemetryService, new TestThemeService(), disposables.add(new TestStorageService())); - this._scopedContextKeyService = new MockContextKeyService(); - } - - override async setInput(input: EditorInput, options: IEditorOptions | undefined, context: IEditorOpenContext, token: CancellationToken): Promise { - super.setInput(input, options, context, token); - - await input.resolve(); - } - - override getId(): string { return id; } - layout(): void { } - protected createEditor(): void { } - - override get scopedContextKeyService() { - return this._scopedContextKeyService; - } - } - - disposables.add(Registry.as(Extensions.EditorPane).registerEditorPane(EditorPaneDescriptor.create(TestEditor, id, 'Test Editor Control'), inputs)); - - if (serializerInputId) { - - interface ISerializedTestInput { - resource: string; - } - - class EditorsObserverTestEditorInputSerializer implements IEditorSerializer { - - canSerialize(editorInput: EditorInput): boolean { - return true; - } - - serialize(editorInput: EditorInput): string { - const testEditorInput = editorInput; - const testInput: ISerializedTestInput = { - resource: testEditorInput.resource.toString() - }; - - return JSON.stringify(testInput); - } - - deserialize(instantiationService: IInstantiationService, serializedEditorInput: string): EditorInput { - const testInput: ISerializedTestInput = JSON.parse(serializedEditorInput); - - return new TestFileEditorInput(URI.parse(testInput.resource), serializerInputId!); - } - } - - disposables.add(Registry.as(EditorExtensions.EditorFactory).registerEditorSerializer(serializerInputId, EditorsObserverTestEditorInputSerializer)); - } - - return disposables; -} - -export function registerTestFileEditor(): IDisposable { - const disposables = new DisposableStore(); - - disposables.add(Registry.as(Extensions.EditorPane).registerEditorPane( - EditorPaneDescriptor.create( - TestTextFileEditor, - TestTextFileEditor.ID, - 'Text File Editor' - ), - [new SyncDescriptor(FileEditorInput)] - )); - - return disposables; -} - -export function registerTestResourceEditor(): IDisposable { - const disposables = new DisposableStore(); - - disposables.add(Registry.as(Extensions.EditorPane).registerEditorPane( - EditorPaneDescriptor.create( - TestTextResourceEditor, - TestTextResourceEditor.ID, - 'Text Editor' - ), - [ - new SyncDescriptor(UntitledTextEditorInput), - new SyncDescriptor(TextResourceEditorInput) - ] - )); - - return disposables; -} - -export function registerTestSideBySideEditor(): IDisposable { - const disposables = new DisposableStore(); - - disposables.add(Registry.as(Extensions.EditorPane).registerEditorPane( - EditorPaneDescriptor.create( - SideBySideEditor, - SideBySideEditor.ID, - 'Text Editor' - ), - [ - new SyncDescriptor(SideBySideEditorInput) - ] - )); - - return disposables; -} - -export class TestFileEditorInput extends EditorInput implements IFileEditorInput { - - readonly preferredResource = this.resource; - - gotDisposed = false; - gotSaved = false; - gotSavedAs = false; - gotReverted = false; - dirty = false; - modified: boolean | undefined; - private fails = false; - - disableToUntyped = false; - - constructor( - public resource: URI, - private _typeId: string - ) { - super(); - } - - override get typeId() { return this._typeId; } - override get editorId() { return this._typeId; } - - private _capabilities: EditorInputCapabilities = EditorInputCapabilities.None; - override get capabilities(): EditorInputCapabilities { return this._capabilities; } - override set capabilities(capabilities: EditorInputCapabilities) { - if (this._capabilities !== capabilities) { - this._capabilities = capabilities; - this._onDidChangeCapabilities.fire(); - } - } - - override resolve(): Promise { return !this.fails ? Promise.resolve(null) : Promise.reject(new Error('fails')); } - override matches(other: EditorInput | IResourceEditorInput | ITextResourceEditorInput | IUntitledTextResourceEditorInput): boolean { - if (super.matches(other)) { - return true; - } - if (other instanceof EditorInput) { - return !!(other?.resource && this.resource.toString() === other.resource.toString() && other instanceof TestFileEditorInput && other.typeId === this.typeId); - } - return isEqual(this.resource, other.resource) && (this.editorId === other.options?.override || other.options?.override === undefined); - } - setPreferredResource(resource: URI): void { } - async setEncoding(encoding: string) { } - getEncoding() { return undefined; } - setPreferredName(name: string): void { } - setPreferredDescription(description: string): void { } - setPreferredEncoding(encoding: string) { } - setPreferredContents(contents: string): void { } - setLanguageId(languageId: string, source?: string) { } - setPreferredLanguageId(languageId: string) { } - setForceOpenAsBinary(): void { } - setFailToOpen(): void { - this.fails = true; - } - override async save(groupId: GroupIdentifier, options?: ISaveOptions): Promise { - this.gotSaved = true; - this.dirty = false; - return this; - } - override async saveAs(groupId: GroupIdentifier, options?: ISaveOptions): Promise { - this.gotSavedAs = true; - return this; - } - override async revert(group: GroupIdentifier, options?: IRevertOptions): Promise { - this.gotReverted = true; - this.gotSaved = false; - this.gotSavedAs = false; - this.dirty = false; - } - override toUntyped(): IUntypedEditorInput | undefined { - if (this.disableToUntyped) { - return undefined; - } - return { resource: this.resource }; - } - setModified(): void { this.modified = true; } - override isModified(): boolean { - return this.modified === undefined ? this.dirty : this.modified; - } - setDirty(): void { this.dirty = true; } - override isDirty(): boolean { - return this.dirty; - } - isResolved(): boolean { return false; } - override dispose(): void { - super.dispose(); - this.gotDisposed = true; - } - movedEditor: IMoveResult | undefined = undefined; - override async rename(): Promise { return this.movedEditor; } - - private moveDisabledReason: string | undefined = undefined; - setMoveDisabled(reason: string): void { - this.moveDisabledReason = reason; - } - - override canMove(sourceGroup: GroupIdentifier, targetGroup: GroupIdentifier): string | true { - if (typeof this.moveDisabledReason === 'string') { - return this.moveDisabledReason; - } - return super.canMove(sourceGroup, targetGroup); - } -} - -export class TestSingletonFileEditorInput extends TestFileEditorInput { - - override get capabilities(): EditorInputCapabilities { return EditorInputCapabilities.Singleton; } -} - -export class TestEditorPart extends MainEditorPart implements IEditorGroupsService { - - declare readonly _serviceBrand: undefined; - - readonly mainPart = this; - readonly parts: readonly IEditorPart[] = [this]; - - readonly onDidCreateAuxiliaryEditorPart: Event = Event.None; - - testSaveState(): void { - return super.saveState(); - } - - clearState(): void { - const workspaceMemento = this.getMemento(StorageScope.WORKSPACE, StorageTarget.MACHINE); - for (const key of Object.keys(workspaceMemento)) { - delete workspaceMemento[key]; - } - - const profileMemento = this.getMemento(StorageScope.PROFILE, StorageTarget.MACHINE); - for (const key of Object.keys(profileMemento)) { - delete profileMemento[key]; - } - } - - registerEditorPart(part: IEditorPart): IDisposable { - return Disposable.None; - } - - createAuxiliaryEditorPart(): Promise { - throw new Error('Method not implemented.'); - } - - getScopedInstantiationService(part: IEditorPart): IInstantiationService { - throw new Error('Method not implemented.'); - } - - getPart(group: number | IEditorGroup): IEditorPart { return this; } - - saveWorkingSet(name: string): IEditorWorkingSet { throw new Error('Method not implemented.'); } - getWorkingSets(): IEditorWorkingSet[] { throw new Error('Method not implemented.'); } - applyWorkingSet(workingSet: IEditorWorkingSet | 'empty', options?: IEditorWorkingSetOptions): Promise { throw new Error('Method not implemented.'); } - deleteWorkingSet(workingSet: IEditorWorkingSet): Promise { throw new Error('Method not implemented.'); } - - registerContextKeyProvider(provider: IEditorGroupContextKeyProvider): IDisposable { throw new Error('Method not implemented.'); } -} - -export class TestEditorParts extends EditorParts { - testMainPart!: TestEditorPart; - - protected override createMainEditorPart(): MainEditorPart { - this.testMainPart = this.instantiationService.createInstance(TestEditorPart, this); - - return this.testMainPart; - } -} - -export async function createEditorParts(instantiationService: IInstantiationService, disposables: DisposableStore): Promise { - const parts = instantiationService.createInstance(TestEditorParts); - const part = disposables.add(parts).testMainPart; - part.create(document.createElement('div')); - part.layout(1080, 800, 0, 0); - - await parts.whenReady; - - return parts; -} - -export async function createEditorPart(instantiationService: IInstantiationService, disposables: DisposableStore): Promise { - return (await createEditorParts(instantiationService, disposables)).testMainPart; -} - -export class TestListService implements IListService { - declare readonly _serviceBrand: undefined; - - lastFocusedList: any | undefined = undefined; - - register(): IDisposable { - return Disposable.None; - } -} - -export class TestPathService implements IPathService { - - declare readonly _serviceBrand: undefined; - - constructor(private readonly fallbackUserHome: URI = URI.from({ scheme: Schemas.file, path: '/' }), public defaultUriScheme = Schemas.file) { } - - hasValidBasename(resource: URI, basename?: string): Promise; - hasValidBasename(resource: URI, os: OperatingSystem, basename?: string): boolean; - hasValidBasename(resource: URI, arg2?: string | OperatingSystem, name?: string): boolean | Promise { - if (typeof arg2 === 'string' || typeof arg2 === 'undefined') { - return isValidBasename(arg2 ?? basename(resource)); - } - - return isValidBasename(name ?? basename(resource)); - } - - get path() { return Promise.resolve(isWindows ? win32 : posix); } - - userHome(options?: { preferLocal: boolean }): Promise; - userHome(options: { preferLocal: true }): URI; - userHome(options?: { preferLocal: boolean }): Promise | URI { - return options?.preferLocal ? this.fallbackUserHome : Promise.resolve(this.fallbackUserHome); - } - - get resolvedUserHome() { return this.fallbackUserHome; } - - async fileURI(path: string): Promise { - return URI.file(path); - } -} - -export interface ITestTextFileEditorModelManager extends ITextFileEditorModelManager, IDisposable { - add(resource: URI, model: TextFileEditorModel): void; - remove(resource: URI): void; -} - -interface ITestTextFileEditorModel extends ITextFileEditorModel { - readonly lastResolvedFileStat: IFileStatWithMetadata | undefined; -} - -export function getLastResolvedFileStat(model: unknown): IFileStatWithMetadata | undefined { - const candidate = model as ITestTextFileEditorModel | undefined; - - return candidate?.lastResolvedFileStat; -} - -export class TestWorkspacesService implements IWorkspacesService { - _serviceBrand: undefined; - - onDidChangeRecentlyOpened = Event.None; - - async createUntitledWorkspace(folders?: IWorkspaceFolderCreationData[], remoteAuthority?: string): Promise { throw new Error('Method not implemented.'); } - async deleteUntitledWorkspace(workspace: IWorkspaceIdentifier): Promise { } - async addRecentlyOpened(recents: IRecent[]): Promise { } - async removeRecentlyOpened(workspaces: URI[]): Promise { } - async clearRecentlyOpened(): Promise { } - async getRecentlyOpened(): Promise { return { files: [], workspaces: [] }; } - async getDirtyWorkspaces(): Promise<(IFolderBackupInfo | IWorkspaceBackupInfo)[]> { return []; } - async enterWorkspace(path: URI): Promise { throw new Error('Method not implemented.'); } - async getWorkspaceIdentifier(workspacePath: URI): Promise { throw new Error('Method not implemented.'); } -} - -export class TestTerminalInstanceService implements ITerminalInstanceService { - onDidCreateInstance = Event.None; - onDidRegisterBackend = Event.None; - declare readonly _serviceBrand: undefined; - - convertProfileToShellLaunchConfig(shellLaunchConfigOrProfile?: IShellLaunchConfig | ITerminalProfile, cwd?: string | URI): IShellLaunchConfig { throw new Error('Method not implemented.'); } - preparePathForTerminalAsync(path: string, executable: string | undefined, title: string, shellType: TerminalShellType, remoteAuthority: string | undefined): Promise { throw new Error('Method not implemented.'); } - createInstance(options: ICreateTerminalOptions, target: TerminalLocation): ITerminalInstance { throw new Error('Method not implemented.'); } - async getBackend(remoteAuthority?: string): Promise { throw new Error('Method not implemented.'); } - didRegisterBackend(backend: ITerminalBackend): void { throw new Error('Method not implemented.'); } - getRegisteredBackends(): IterableIterator { throw new Error('Method not implemented.'); } -} - -export class TestTerminalEditorService implements ITerminalEditorService { - _serviceBrand: undefined; - activeInstance: ITerminalInstance | undefined; - instances: readonly ITerminalInstance[] = []; - onDidDisposeInstance = Event.None; - onDidFocusInstance = Event.None; - onDidChangeInstanceCapability = Event.None; - onDidChangeActiveInstance = Event.None; - onDidChangeInstances = Event.None; - openEditor(instance: ITerminalInstance, editorOptions?: TerminalEditorLocation): Promise { throw new Error('Method not implemented.'); } - detachInstance(instance: ITerminalInstance): void { throw new Error('Method not implemented.'); } - splitInstance(instanceToSplit: ITerminalInstance, shellLaunchConfig?: IShellLaunchConfig): ITerminalInstance { throw new Error('Method not implemented.'); } - revealActiveEditor(preserveFocus?: boolean): Promise { throw new Error('Method not implemented.'); } - resolveResource(instance: ITerminalInstance): URI { throw new Error('Method not implemented.'); } - reviveInput(deserializedInput: IDeserializedTerminalEditorInput): TerminalEditorInput { throw new Error('Method not implemented.'); } - getInputFromResource(resource: URI): TerminalEditorInput { throw new Error('Method not implemented.'); } - setActiveInstance(instance: ITerminalInstance): void { throw new Error('Method not implemented.'); } - focusActiveInstance(): Promise { throw new Error('Method not implemented.'); } - focusInstance(instance: ITerminalInstance): void { throw new Error('Method not implemented.'); } - getInstanceFromResource(resource: URI | undefined): ITerminalInstance | undefined { throw new Error('Method not implemented.'); } - focusFindWidget(): void { throw new Error('Method not implemented.'); } - hideFindWidget(): void { throw new Error('Method not implemented.'); } - findNext(): void { throw new Error('Method not implemented.'); } - findPrevious(): void { throw new Error('Method not implemented.'); } -} - -export class TestTerminalGroupService implements ITerminalGroupService { - _serviceBrand: undefined; - activeInstance: ITerminalInstance | undefined; - instances: readonly ITerminalInstance[] = []; - groups: readonly ITerminalGroup[] = []; - activeGroup: ITerminalGroup | undefined; - activeGroupIndex: number = 0; - lastAccessedMenu: 'inline-tab' | 'tab-list' = 'inline-tab'; - onDidChangeActiveGroup = Event.None; - onDidDisposeGroup = Event.None; - onDidShow = Event.None; - onDidChangeGroups = Event.None; - onDidChangePanelOrientation = Event.None; - onDidDisposeInstance = Event.None; - onDidFocusInstance = Event.None; - onDidChangeInstanceCapability = Event.None; - onDidChangeActiveInstance = Event.None; - onDidChangeInstances = Event.None; - createGroup(instance?: any): ITerminalGroup { throw new Error('Method not implemented.'); } - getGroupForInstance(instance: ITerminalInstance): ITerminalGroup | undefined { throw new Error('Method not implemented.'); } - moveGroup(source: ITerminalInstance | ITerminalInstance[], target: ITerminalInstance): void { throw new Error('Method not implemented.'); } - moveGroupToEnd(source: ITerminalInstance | ITerminalInstance[]): void { throw new Error('Method not implemented.'); } - moveInstance(source: ITerminalInstance, target: ITerminalInstance, side: 'before' | 'after'): void { throw new Error('Method not implemented.'); } - unsplitInstance(instance: ITerminalInstance): void { throw new Error('Method not implemented.'); } - joinInstances(instances: ITerminalInstance[]): void { throw new Error('Method not implemented.'); } - instanceIsSplit(instance: ITerminalInstance): boolean { throw new Error('Method not implemented.'); } - getGroupLabels(): string[] { throw new Error('Method not implemented.'); } - setActiveGroupByIndex(index: number): void { throw new Error('Method not implemented.'); } - setActiveGroupToNext(): void { throw new Error('Method not implemented.'); } - setActiveGroupToPrevious(): void { throw new Error('Method not implemented.'); } - setActiveInstanceByIndex(terminalIndex: number): void { throw new Error('Method not implemented.'); } - setContainer(container: HTMLElement): void { throw new Error('Method not implemented.'); } - showPanel(focus?: boolean): Promise { throw new Error('Method not implemented.'); } - hidePanel(): void { throw new Error('Method not implemented.'); } - focusTabs(): void { throw new Error('Method not implemented.'); } - focusHover(): void { throw new Error('Method not implemented.'); } - setActiveInstance(instance: ITerminalInstance): void { throw new Error('Method not implemented.'); } - focusActiveInstance(): Promise { throw new Error('Method not implemented.'); } - focusInstance(instance: ITerminalInstance): void { throw new Error('Method not implemented.'); } - getInstanceFromResource(resource: URI | undefined): ITerminalInstance | undefined { throw new Error('Method not implemented.'); } - focusFindWidget(): void { throw new Error('Method not implemented.'); } - hideFindWidget(): void { throw new Error('Method not implemented.'); } - findNext(): void { throw new Error('Method not implemented.'); } - findPrevious(): void { throw new Error('Method not implemented.'); } - updateVisibility(): void { throw new Error('Method not implemented.'); } -} - -export class TestTerminalProfileService implements ITerminalProfileService { - _serviceBrand: undefined; - availableProfiles: ITerminalProfile[] = []; - contributedProfiles: IExtensionTerminalProfile[] = []; - profilesReady: Promise = Promise.resolve(); - onDidChangeAvailableProfiles = Event.None; - getPlatformKey(): Promise { throw new Error('Method not implemented.'); } - refreshAvailableProfiles(): void { throw new Error('Method not implemented.'); } - getDefaultProfileName(): string | undefined { throw new Error('Method not implemented.'); } - getDefaultProfile(): ITerminalProfile | undefined { throw new Error('Method not implemented.'); } - getContributedDefaultProfile(shellLaunchConfig: IShellLaunchConfig): Promise { throw new Error('Method not implemented.'); } - registerContributedProfile(args: IRegisterContributedProfileArgs): Promise { throw new Error('Method not implemented.'); } - getContributedProfileProvider(extensionIdentifier: string, id: string): ITerminalProfileProvider | undefined { throw new Error('Method not implemented.'); } - registerTerminalProfileProvider(extensionIdentifier: string, id: string, profileProvider: ITerminalProfileProvider): IDisposable { throw new Error('Method not implemented.'); } -} - -export class TestTerminalProfileResolverService implements ITerminalProfileResolverService { - _serviceBrand: undefined; - defaultProfileName = ''; - resolveIcon(shellLaunchConfig: IShellLaunchConfig): void { } - async resolveShellLaunchConfig(shellLaunchConfig: IShellLaunchConfig, options: IShellLaunchConfigResolveOptions): Promise { } - async getDefaultProfile(options: IShellLaunchConfigResolveOptions): Promise { return { path: '/default', profileName: 'Default', isDefault: true }; } - async getDefaultShell(options: IShellLaunchConfigResolveOptions): Promise { return '/default'; } - async getDefaultShellArgs(options: IShellLaunchConfigResolveOptions): Promise { return []; } - getDefaultIcon(): TerminalIcon & ThemeIcon { return Codicon.terminal; } - async getEnvironment(): Promise { return env; } - getSafeConfigValue(key: string, os: OperatingSystem): unknown | undefined { return undefined; } - getSafeConfigValueFullKey(key: string): unknown | undefined { return undefined; } - createProfileFromShellAndShellArgs(shell?: unknown, shellArgs?: unknown): Promise { throw new Error('Method not implemented.'); } -} - -export class TestTerminalConfigurationService extends TerminalConfigurationService { - get fontMetrics() { return this._fontMetrics; } - setConfig(config: Partial) { this._config = config as any; } -} - -export class TestQuickInputService implements IQuickInputService { - declare readonly _serviceBrand: undefined; - - readonly onShow = Event.None; - readonly onHide = Event.None; - - readonly currentQuickInput = undefined; - readonly quickAccess = undefined!; - backButton!: IQuickInputButton; - - pick(picks: Promise[]> | QuickPickInput[], options?: IPickOptions & { canPickMany: true }, token?: CancellationToken): Promise; - pick(picks: Promise[]> | QuickPickInput[], options?: IPickOptions & { canPickMany: false }, token?: CancellationToken): Promise; - async pick(picks: Promise[]> | QuickPickInput[], options?: Omit, 'canPickMany'>, token?: CancellationToken): Promise { - if (Array.isArray(picks)) { - return { label: 'selectedPick', description: 'pick description', value: 'selectedPick' }; - } else { - return undefined; - } - } - - async input(options?: IInputOptions, token?: CancellationToken): Promise { return options ? 'resolved' + options.prompt : 'resolved'; } - - createQuickPick(): IQuickPick { throw new Error('not implemented.'); } - createInputBox(): IInputBox { throw new Error('not implemented.'); } - createQuickWidget(): IQuickWidget { throw new Error('Method not implemented.'); } - focus(): void { throw new Error('not implemented.'); } - toggle(): void { throw new Error('not implemented.'); } - navigate(next: boolean, quickNavigate?: IQuickNavigateConfiguration): void { throw new Error('not implemented.'); } - accept(): Promise { throw new Error('not implemented.'); } - back(): Promise { throw new Error('not implemented.'); } - cancel(): Promise { throw new Error('not implemented.'); } -} - -class TestLanguageDetectionService implements ILanguageDetectionService { - - declare readonly _serviceBrand: undefined; - - isEnabledForLanguage(languageId: string): boolean { return false; } - async detectLanguage(resource: URI, supportedLangs?: string[] | undefined): Promise { return undefined; } -} - -export class TestRemoteAgentService implements IRemoteAgentService { - - declare readonly _serviceBrand: undefined; - - getConnection(): IRemoteAgentConnection | null { return null; } - async getEnvironment(): Promise { return null; } - async getRawEnvironment(): Promise { return null; } - async getExtensionHostExitInfo(reconnectionToken: string): Promise { return null; } - async getDiagnosticInfo(options: IDiagnosticInfoOptions): Promise { return undefined; } - async updateTelemetryLevel(telemetryLevel: TelemetryLevel): Promise { } - async logTelemetry(eventName: string, data?: ITelemetryData): Promise { } - async flushTelemetry(): Promise { } - async getRoundTripTime(): Promise { return undefined; } - async endConnection(): Promise { } -} - -export class TestRemoteExtensionsScannerService implements IRemoteExtensionsScannerService { - declare readonly _serviceBrand: undefined; - async whenExtensionsReady(): Promise { } - scanExtensions(): Promise { throw new Error('Method not implemented.'); } -} - -export class TestWorkbenchExtensionEnablementService implements IWorkbenchExtensionEnablementService { - _serviceBrand: undefined; - onEnablementChanged = Event.None; - getEnablementState(extension: IExtension): EnablementState { return EnablementState.EnabledGlobally; } - getEnablementStates(extensions: IExtension[], workspaceTypeOverrides?: { trusted?: boolean | undefined } | undefined): EnablementState[] { return []; } - getDependenciesEnablementStates(extension: IExtension): [IExtension, EnablementState][] { return []; } - canChangeEnablement(extension: IExtension): boolean { return true; } - canChangeWorkspaceEnablement(extension: IExtension): boolean { return true; } - isEnabled(extension: IExtension): boolean { return true; } - isEnabledEnablementState(enablementState: EnablementState): boolean { return true; } - isDisabledGlobally(extension: IExtension): boolean { return false; } - async setEnablement(extensions: IExtension[], state: EnablementState): Promise { return []; } - async updateExtensionsEnablementsWhenWorkspaceTrustChanges(): Promise { } -} - -export class TestWorkbenchExtensionManagementService implements IWorkbenchExtensionManagementService { - _serviceBrand: undefined; - onInstallExtension = Event.None; - onDidInstallExtensions = Event.None; - onUninstallExtension = Event.None; - onDidUninstallExtension = Event.None; - onDidUpdateExtensionMetadata = Event.None; - onProfileAwareInstallExtension = Event.None; - onProfileAwareDidInstallExtensions = Event.None; - onProfileAwareUninstallExtension = Event.None; - onProfileAwareDidUninstallExtension = Event.None; - onDidProfileAwareUninstallExtensions = Event.None; - onProfileAwareDidUpdateExtensionMetadata = Event.None; - onDidChangeProfile = Event.None; - onDidEnableExtensions = Event.None; - installVSIX(location: URI, manifest: Readonly, installOptions?: InstallOptions | undefined): Promise { - throw new Error('Method not implemented.'); - } - installFromLocation(location: URI): Promise { - throw new Error('Method not implemented.'); - } - installGalleryExtensions(extensions: InstallExtensionInfo[]): Promise { - throw new Error('Method not implemented.'); - } - async updateFromGallery(gallery: IGalleryExtension, extension: ILocalExtension, installOptions?: InstallOptions | undefined): Promise { return extension; } - zip(extension: ILocalExtension): Promise { - throw new Error('Method not implemented.'); - } - getManifest(vsix: URI): Promise> { - throw new Error('Method not implemented.'); - } - install(vsix: URI, options?: InstallOptions | undefined): Promise { - throw new Error('Method not implemented.'); - } - isAllowed(): true | IMarkdownString { return true; } - async canInstall(extension: IGalleryExtension): Promise { return true; } - installFromGallery(extension: IGalleryExtension, options?: InstallOptions | undefined): Promise { - throw new Error('Method not implemented.'); - } - uninstall(extension: ILocalExtension, options?: UninstallOptions | undefined): Promise { - throw new Error('Method not implemented.'); - } - uninstallExtensions(extensions: UninstallExtensionInfo[]): Promise { - throw new Error('Method not implemented.'); - } - async reinstallFromGallery(extension: ILocalExtension): Promise { - throw new Error('Method not implemented.'); - } - async getInstalled(type?: ExtensionType | undefined): Promise { return []; } - getExtensionsControlManifest(): Promise { - throw new Error('Method not implemented.'); - } - async updateMetadata(local: ILocalExtension, metadata: Partial): Promise { return local; } - registerParticipant(pariticipant: IExtensionManagementParticipant): void { } - async getTargetPlatform(): Promise { return TargetPlatform.UNDEFINED; } - async cleanUp(): Promise { } - download(): Promise { - throw new Error('Method not implemented.'); - } - copyExtensions(): Promise { throw new Error('Not Supported'); } - toggleAppliationScope(): Promise { throw new Error('Not Supported'); } - installExtensionsFromProfile(): Promise { throw new Error('Not Supported'); } - whenProfileChanged(from: IUserDataProfile, to: IUserDataProfile): Promise { throw new Error('Not Supported'); } - getInstalledWorkspaceExtensionLocations(): URI[] { throw new Error('Method not implemented.'); } - getInstalledWorkspaceExtensions(): Promise { throw new Error('Method not implemented.'); } - installResourceExtension(): Promise { throw new Error('Method not implemented.'); } - getExtensions(): Promise { throw new Error('Method not implemented.'); } - resetPinnedStateForAllUserExtensions(pinned: boolean): Promise { throw new Error('Method not implemented.'); } -} - -export class TestUserDataProfileService implements IUserDataProfileService { - - readonly _serviceBrand: undefined; - readonly onDidChangeCurrentProfile = Event.None; - readonly currentProfile = toUserDataProfile('test', 'test', URI.file('tests').with({ scheme: 'vscode-tests' }), URI.file('tests').with({ scheme: 'vscode-tests' })); - async updateCurrentProfile(): Promise { } -} - -export class TestWebExtensionsScannerService implements IWebExtensionsScannerService { - _serviceBrand: undefined; - onDidChangeProfile = Event.None; - async scanSystemExtensions(): Promise { return []; } - async scanUserExtensions(): Promise { return []; } - async scanExtensionsUnderDevelopment(): Promise { return []; } - async copyExtensions(): Promise { - throw new Error('Method not implemented.'); - } - scanExistingExtension(extensionLocation: URI, extensionType: ExtensionType): Promise { - throw new Error('Method not implemented.'); - } - addExtension(location: URI, metadata?: Partial | undefined): Promise { - throw new Error('Method not implemented.'); - } - addExtensionFromGallery(galleryExtension: IGalleryExtension, metadata?: Partial | undefined): Promise { - throw new Error('Method not implemented.'); - } - removeExtension(): Promise { - throw new Error('Method not implemented.'); - } - updateMetadata(extension: IScannedExtension, metaData: Partial, profileLocation: URI): Promise { - throw new Error('Method not implemented.'); - } - scanExtensionManifest(extensionLocation: URI): Promise | null> { - throw new Error('Method not implemented.'); - } -} - -export async function workbenchTeardown(instantiationService: IInstantiationService): Promise { - return instantiationService.invokeFunction(async accessor => { - const workingCopyService = accessor.get(IWorkingCopyService); - const editorGroupService = accessor.get(IEditorGroupsService); - - for (const workingCopy of workingCopyService.workingCopies) { - await workingCopy.revert(); - } - - for (const group of editorGroupService.groups) { - await group.closeAllEditors(); - } - - for (const group of editorGroupService.groups) { - editorGroupService.removeGroup(group); - } - }); -} diff --git a/src/vs/workbench/workbench.desktop.main.ts b/src/vs/workbench/workbench.desktop.main.ts deleted file mode 100644 index 57bf9f0167c4f..0000000000000 --- a/src/vs/workbench/workbench.desktop.main.ts +++ /dev/null @@ -1,184 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - -// ####################################################################### -// ### ### -// ### !!! PLEASE ADD COMMON IMPORTS INTO WORKBENCH.COMMON.MAIN.TS !!! ### -// ### ### -// ####################################################################### - -//#region --- workbench common - -import './workbench.common.main.js'; - -//#endregion - - -//#region --- workbench (desktop main) - -import './electron-sandbox/desktop.main.js'; -import './electron-sandbox/desktop.contribution.js'; - -//#endregion - - -//#region --- workbench parts - -import './electron-sandbox/parts/dialogs/dialog.contribution.js'; - -//#endregion - - -//#region --- workbench services - -import './services/textfile/electron-sandbox/nativeTextFileService.js'; -import './services/dialogs/electron-sandbox/fileDialogService.js'; -import './services/workspaces/electron-sandbox/workspacesService.js'; -import './services/menubar/electron-sandbox/menubarService.js'; -import './services/update/electron-sandbox/updateService.js'; -import './services/url/electron-sandbox/urlService.js'; -import './services/lifecycle/electron-sandbox/lifecycleService.js'; -import './services/title/electron-sandbox/titleService.js'; -import './services/host/electron-sandbox/nativeHostService.js'; -import './services/request/electron-sandbox/requestService.js'; -import './services/clipboard/electron-sandbox/clipboardService.js'; -import './services/contextmenu/electron-sandbox/contextmenuService.js'; -import './services/workspaces/electron-sandbox/workspaceEditingService.js'; -import './services/configurationResolver/electron-sandbox/configurationResolverService.js'; -import './services/accessibility/electron-sandbox/accessibilityService.js'; -import './services/keybinding/electron-sandbox/nativeKeyboardLayout.js'; -import './services/path/electron-sandbox/pathService.js'; -import './services/themes/electron-sandbox/nativeHostColorSchemeService.js'; -import './services/extensionManagement/electron-sandbox/extensionManagementService.js'; -import './services/encryption/electron-sandbox/encryptionService.js'; -import './services/secrets/electron-sandbox/secretStorageService.js'; -import './services/localization/electron-sandbox/languagePackService.js'; -import './services/telemetry/electron-sandbox/telemetryService.js'; -import './services/extensions/electron-sandbox/extensionHostStarter.js'; -import '../platform/extensionResourceLoader/common/extensionResourceLoaderService.js'; -import './services/localization/electron-sandbox/localeService.js'; -import './services/extensions/electron-sandbox/extensionsScannerService.js'; -import './services/extensionManagement/electron-sandbox/extensionManagementServerService.js'; -import './services/extensionManagement/electron-sandbox/extensionTipsService.js'; -import './services/userDataSync/electron-sandbox/userDataSyncService.js'; -import './services/userDataSync/electron-sandbox/userDataAutoSyncService.js'; -import './services/timer/electron-sandbox/timerService.js'; -import './services/environment/electron-sandbox/shellEnvironmentService.js'; -import './services/integrity/electron-sandbox/integrityService.js'; -import './services/workingCopy/electron-sandbox/workingCopyBackupService.js'; -import './services/checksum/electron-sandbox/checksumService.js'; -import '../platform/remote/electron-sandbox/sharedProcessTunnelService.js'; -import './services/tunnel/electron-sandbox/tunnelService.js'; -import '../platform/diagnostics/electron-sandbox/diagnosticsService.js'; -import '../platform/profiling/electron-sandbox/profilingService.js'; -import '../platform/telemetry/electron-sandbox/customEndpointTelemetryService.js'; -import '../platform/remoteTunnel/electron-sandbox/remoteTunnelService.js'; -import './services/files/electron-sandbox/elevatedFileService.js'; -import './services/search/electron-sandbox/searchService.js'; -import './services/workingCopy/electron-sandbox/workingCopyHistoryService.js'; -import './services/userDataSync/browser/userDataSyncEnablementService.js'; -import './services/extensions/electron-sandbox/nativeExtensionService.js'; -import '../platform/userDataProfile/electron-sandbox/userDataProfileStorageService.js'; -import './services/auxiliaryWindow/electron-sandbox/auxiliaryWindowService.js'; -import '../platform/extensionManagement/electron-sandbox/extensionsProfileScannerService.js'; - -import { registerSingleton } from '../platform/instantiation/common/extensions.js'; -import { IUserDataInitializationService, UserDataInitializationService } from './services/userData/browser/userDataInit.js'; -import { SyncDescriptor } from '../platform/instantiation/common/descriptors.js'; - -registerSingleton(IUserDataInitializationService, new SyncDescriptor(UserDataInitializationService, [[]], true)); - - -//#endregion - - -//#region --- workbench contributions - -// Logs -import './contrib/logs/electron-sandbox/logs.contribution.js'; - -// Localizations -import './contrib/localization/electron-sandbox/localization.contribution.js'; - -// Explorer -import './contrib/files/electron-sandbox/fileActions.contribution.js'; - -// CodeEditor Contributions -import './contrib/codeEditor/electron-sandbox/codeEditor.contribution.js'; - -// Debug -import './contrib/debug/electron-sandbox/extensionHostDebugService.js'; - -// Extensions Management -import './contrib/extensions/electron-sandbox/extensions.contribution.js'; - -// Issues -import './contrib/issue/electron-sandbox/issue.contribution.js'; - -// Process -import './contrib/issue/electron-sandbox/process.contribution.js'; - -// Remote -import './contrib/remote/electron-sandbox/remote.contribution.js'; - -// Configuration Exporter -import './contrib/configExporter/electron-sandbox/configurationExportHelper.contribution.js'; - -// Terminal -import './contrib/terminal/electron-sandbox/terminal.contribution.js'; - -// Themes -import './contrib/themes/browser/themes.test.contribution.js'; -import './services/themes/electron-sandbox/themes.contribution.js'; - -// User Data Sync -import './contrib/userDataSync/electron-sandbox/userDataSync.contribution.js'; - -// Tags -import './contrib/tags/electron-sandbox/workspaceTagsService.js'; -import './contrib/tags/electron-sandbox/tags.contribution.js'; - -// Performance -import './contrib/performance/electron-sandbox/performance.contribution.js'; - -// Tasks -import './contrib/tasks/electron-sandbox/taskService.js'; - -// External terminal -import './contrib/externalTerminal/electron-sandbox/externalTerminal.contribution.js'; - -// Webview -import './contrib/webview/electron-sandbox/webview.contribution.js'; - -// Splash -import './contrib/splash/electron-sandbox/splash.contribution.js'; - -// Local History -import './contrib/localHistory/electron-sandbox/localHistory.contribution.js'; - -// Merge Editor -import './contrib/mergeEditor/electron-sandbox/mergeEditor.contribution.js'; - -// Multi Diff Editor -import './contrib/multiDiffEditor/browser/multiDiffEditor.contribution.js'; - -// Remote Tunnel -import './contrib/remoteTunnel/electron-sandbox/remoteTunnel.contribution.js'; - -// Chat -import './contrib/chat/electron-sandbox/chat.contribution.js'; -import './contrib/inlineChat/electron-sandbox/inlineChat.contribution.js'; - -// Encryption -import './contrib/encryption/electron-sandbox/encryption.contribution.js'; - -// Emergency Alert -import './contrib/emergencyAlert/electron-sandbox/emergencyAlert.contribution.js'; - -//#endregion - - -export { main } from './electron-sandbox/desktop.main.js'; diff --git a/test/unit/electron/renderer.js b/test/unit/electron/renderer.js deleted file mode 100644 index b93d91a78e943..0000000000000 --- a/test/unit/electron/renderer.js +++ /dev/null @@ -1,464 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -/*eslint-env mocha*/ - -// @ts-check - -const fs = require('fs'); - -(function () { - const originals = {}; - let logging = false; - let withStacks = false; - - globalThis.beginLoggingFS = (_withStacks) => { - logging = true; - withStacks = _withStacks || false; - }; - globalThis.endLoggingFS = () => { - logging = false; - withStacks = false; - }; - - function createSpy(element, cnt) { - return function (...args) { - if (logging) { - console.log(`calling ${element}: ` + args.slice(0, cnt).join(',') + (withStacks ? (`\n` + new Error().stack?.split('\n').slice(2).join('\n')) : '')); - } - return originals[element].call(this, ...args); - }; - } - - function intercept(element, cnt) { - originals[element] = fs[element]; - fs[element] = createSpy(element, cnt); - } - - [ - ['realpathSync', 1], - ['readFileSync', 1], - ['openSync', 3], - ['readSync', 1], - ['closeSync', 1], - ['readFile', 2], - ['mkdir', 1], - ['lstat', 1], - ['stat', 1], - ['watch', 1], - ['readdir', 1], - ['access', 2], - ['open', 2], - ['write', 1], - ['fdatasync', 1], - ['close', 1], - ['read', 1], - ['unlink', 1], - ['rmdir', 1], - ].forEach((element) => { - intercept(element[0], element[1]); - }); -})(); - -const { ipcRenderer } = require('electron'); -const assert = require('assert'); -const path = require('path'); -const glob = require('glob'); -const util = require('util'); -const coverage = require('../coverage'); -const { pathToFileURL } = require('url'); - -// Disabled custom inspect. See #38847 -if (util.inspect && util.inspect['defaultOptions']) { - util.inspect['defaultOptions'].customInspect = false; -} - -// VSCODE_GLOBALS: package/product.json -globalThis._VSCODE_PRODUCT_JSON = require('../../../product.json'); -globalThis._VSCODE_PACKAGE_JSON = require('../../../package.json'); - -// Test file operations that are common across platforms. Used for test infra, namely snapshot tests -Object.assign(globalThis, { - __readFileInTests: path => fs.promises.readFile(path, 'utf-8'), - __writeFileInTests: (path, contents) => fs.promises.writeFile(path, contents), - __readDirInTests: path => fs.promises.readdir(path), - __unlinkInTests: path => fs.promises.unlink(path), - __mkdirPInTests: path => fs.promises.mkdir(path, { recursive: true }), -}); - -const IS_CI = !!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY; -const _tests_glob = '**/test/**/*.test.js'; - - -/** - * Loads one or N modules. - * @type {{ - * (module: string|string[]): Promise|Promise; - * _out: string; - * }} - */ -let loadFn; - -const _loaderErrors = []; - -function initNls(opts) { - if (opts.build) { - // when running from `out-build`, ensure to load the default - // messages file, because all `nls.localize` calls have their - // english values removed and replaced by an index. - globalThis._VSCODE_NLS_MESSAGES = require(`../../../out-build/nls.messages.json`); - } -} - -function initLoadFn(opts) { - const outdir = opts.build ? 'out-build' : 'out'; - const out = path.join(__dirname, `../../../${outdir}`); - - const baseUrl = pathToFileURL(path.join(__dirname, `../../../${outdir}/`)); - globalThis._VSCODE_FILE_ROOT = baseUrl.href; - - // set loader - function importModules(modules) { - const moduleArray = Array.isArray(modules) ? modules : [modules]; - const tasks = moduleArray.map(mod => { - const url = new URL(`./${mod}.js`, baseUrl).href; - return import(url).catch(err => { - console.log(mod, url); - console.log(err); - _loaderErrors.push(err); - throw err; - }); - }); - - return Array.isArray(modules) - ? Promise.all(tasks) - : tasks[0]; - } - importModules._out = out; - loadFn = importModules; -} - -async function createCoverageReport(opts) { - if (!opts.coverage) { - return undefined; - } - return coverage.createReport(opts.run || opts.runGlob); -} - -async function loadModules(modules) { - for (const file of modules) { - mocha.suite.emit(Mocha.Suite.constants.EVENT_FILE_PRE_REQUIRE, globalThis, file, mocha); - const m = await loadFn(file); - mocha.suite.emit(Mocha.Suite.constants.EVENT_FILE_REQUIRE, m, file, mocha); - mocha.suite.emit(Mocha.Suite.constants.EVENT_FILE_POST_REQUIRE, globalThis, file, mocha); - } -} - -const globAsync = util.promisify(glob); - -async function loadTestModules(opts) { - - if (opts.run) { - const files = Array.isArray(opts.run) ? opts.run : [opts.run]; - const modules = files.map(file => { - file = file.replace(/^src[\\/]/, ''); - return file.replace(/\.[jt]s$/, ''); - }); - return loadModules(modules); - } - - const pattern = opts.runGlob || _tests_glob; - const files = await globAsync(pattern, { cwd: loadFn._out }); - const modules = files.map(file => file.replace(/\.js$/, '')); - return loadModules(modules); -} - -/** @type Mocha.Test */ -let currentTest; - -async function loadTests(opts) { - - //#region Unexpected Output - - const _allowedTestOutput = [ - /The vm module of Node\.js is deprecated in the renderer process and will be removed./, - ]; - - // allow snapshot mutation messages locally - if (!IS_CI) { - _allowedTestOutput.push(/Creating new snapshot in/); - _allowedTestOutput.push(/Deleting [0-9]+ old snapshots/); - } - - const perTestCoverage = opts['per-test-coverage'] ? await PerTestCoverage.init() : undefined; - - const _allowedTestsWithOutput = new Set([ - 'creates a snapshot', // self-testing - 'validates a snapshot', // self-testing - 'cleans up old snapshots', // self-testing - 'issue #149412: VS Code hangs when bad semantic token data is received', // https://github.com/microsoft/vscode/issues/192440 - 'issue #134973: invalid semantic tokens should be handled better', // https://github.com/microsoft/vscode/issues/192440 - 'issue #148651: VSCode UI process can hang if a semantic token with negative values is returned by language service', // https://github.com/microsoft/vscode/issues/192440 - 'issue #149130: vscode freezes because of Bracket Pair Colorization', // https://github.com/microsoft/vscode/issues/192440 - 'property limits', // https://github.com/microsoft/vscode/issues/192443 - 'Error events', // https://github.com/microsoft/vscode/issues/192443 - 'fetch returns keybinding with user first if title and id matches', // - 'throw ListenerLeakError' - ]); - - const _allowedSuitesWithOutput = new Set([ - 'InlineChatController' - ]); - - let _testsWithUnexpectedOutput = false; - - for (const consoleFn of [console.log, console.error, console.info, console.warn, console.trace, console.debug]) { - console[consoleFn.name] = function (msg) { - if (!currentTest) { - consoleFn.apply(console, arguments); - } else if (!_allowedTestOutput.some(a => a.test(msg)) && !_allowedTestsWithOutput.has(currentTest.title) && !_allowedSuitesWithOutput.has(currentTest.parent?.title ?? '')) { - _testsWithUnexpectedOutput = true; - consoleFn.apply(console, arguments); - } - }; - } - - //#endregion - - //#region Unexpected / Loader Errors - - const _unexpectedErrors = []; - - const _allowedTestsWithUnhandledRejections = new Set([ - // Lifecycle tests - 'onWillShutdown - join with error is handled', - 'onBeforeShutdown - veto with error is treated as veto', - 'onBeforeShutdown - final veto with error is treated as veto', - // Search tests - 'Search Model: Search reports timed telemetry on search when error is called' - ]); - - const errors = await loadFn('vs/base/common/errors'); - const onUnexpectedError = function (err) { - if (err.name === 'Canceled') { - return; // ignore canceled errors that are common - } - - let stack = (err ? err.stack : null); - if (!stack) { - stack = new Error().stack; - } - - _unexpectedErrors.push((err && err.message ? err.message : err) + '\n' + stack); - }; - - process.on('uncaughtException', error => onUnexpectedError(error)); - process.on('unhandledRejection', (reason, promise) => { - onUnexpectedError(reason); - promise.catch(() => { }); - }); - window.addEventListener('unhandledrejection', event => { - event.preventDefault(); // Do not log to test output, we show an error later when test ends - event.stopPropagation(); - - if (!_allowedTestsWithUnhandledRejections.has(currentTest.title)) { - onUnexpectedError(event.reason); - } - }); - - errors.setUnexpectedErrorHandler(onUnexpectedError); - //#endregion - - const { assertCleanState } = await loadFn('vs/workbench/test/common/utils'); - - suite('Tests are using suiteSetup and setup correctly', () => { - test('assertCleanState - check that registries are clean at the start of test running', () => { - assertCleanState(); - }); - }); - - setup(async () => { - await perTestCoverage?.startTest(); - }); - - teardown(async () => { - await perTestCoverage?.finishTest(currentTest.file, currentTest.fullTitle()); - - // should not have unexpected output - if (_testsWithUnexpectedOutput && !opts.dev) { - assert.ok(false, 'Error: Unexpected console output in test run. Please ensure no console.[log|error|info|warn] usage in tests or runtime errors.'); - } - - // should not have unexpected errors - const errors = _unexpectedErrors.concat(_loaderErrors); - if (errors.length) { - for (const error of errors) { - console.error(`Error: Test run should not have unexpected errors:\n${error}`); - } - assert.ok(false, 'Error: Test run should not have unexpected errors.'); - } - }); - - suiteTeardown(() => { // intentionally not in teardown because some tests only cleanup in suiteTeardown - - // should have cleaned up in registries - assertCleanState(); - }); - - return loadTestModules(opts); -} - -function serializeSuite(suite) { - return { - root: suite.root, - suites: suite.suites.map(serializeSuite), - tests: suite.tests.map(serializeRunnable), - title: suite.title, - fullTitle: suite.fullTitle(), - titlePath: suite.titlePath(), - timeout: suite.timeout(), - retries: suite.retries(), - slow: suite.slow(), - bail: suite.bail() - }; -} - -function serializeRunnable(runnable) { - return { - title: runnable.title, - fullTitle: runnable.fullTitle(), - titlePath: runnable.titlePath(), - async: runnable.async, - slow: runnable.slow(), - speed: runnable.speed, - duration: runnable.duration - }; -} - -function serializeError(err) { - return { - message: err.message, - stack: err.stack, - snapshotPath: err.snapshotPath, - actual: safeStringify({ value: err.actual }), - expected: safeStringify({ value: err.expected }), - uncaught: err.uncaught, - showDiff: err.showDiff, - inspect: typeof err.inspect === 'function' ? err.inspect() : '' - }; -} - -function safeStringify(obj) { - const seen = new Set(); - return JSON.stringify(obj, (key, value) => { - if (value === undefined) { - return '[undefined]'; - } - - if (isObject(value) || Array.isArray(value)) { - if (seen.has(value)) { - return '[Circular]'; - } else { - seen.add(value); - } - } - return value; - }); -} - -function isObject(obj) { - // The method can't do a type cast since there are type (like strings) which - // are subclasses of any put not positvely matched by the function. Hence type - // narrowing results in wrong results. - return typeof obj === 'object' - && obj !== null - && !Array.isArray(obj) - && !(obj instanceof RegExp) - && !(obj instanceof Date); -} - -class IPCReporter { - - constructor(runner) { - runner.on('start', () => ipcRenderer.send('start')); - runner.on('end', () => ipcRenderer.send('end')); - runner.on('suite', suite => ipcRenderer.send('suite', serializeSuite(suite))); - runner.on('suite end', suite => ipcRenderer.send('suite end', serializeSuite(suite))); - runner.on('test', test => ipcRenderer.send('test', serializeRunnable(test))); - runner.on('test end', test => ipcRenderer.send('test end', serializeRunnable(test))); - runner.on('hook', hook => ipcRenderer.send('hook', serializeRunnable(hook))); - runner.on('hook end', hook => ipcRenderer.send('hook end', serializeRunnable(hook))); - runner.on('pass', test => ipcRenderer.send('pass', serializeRunnable(test))); - runner.on('fail', (test, err) => ipcRenderer.send('fail', serializeRunnable(test), serializeError(err))); - runner.on('pending', test => ipcRenderer.send('pending', serializeRunnable(test))); - } -} - -async function runTests(opts) { - // this *must* come before loadTests, or it doesn't work. - if (opts.timeout !== undefined) { - mocha.timeout(opts.timeout); - } - - await loadTests(opts); - - if (opts.grep) { - mocha.grep(opts.grep); - } - - if (!opts.dev) { - // @ts-expect-error - mocha.reporter(IPCReporter); - } - - const runner = mocha.run(async () => { - await createCoverageReport(opts) - ipcRenderer.send('all done'); - }); - - runner.on('test', test => currentTest = test); - - if (opts.dev) { - runner.on('fail', (test, err) => { - console.error(test.fullTitle()); - console.error(err.stack); - }); - } -} - -ipcRenderer.on('run', async (_e, opts) => { - initNls(opts); - initLoadFn(opts); - - await Promise.resolve(globalThis._VSCODE_TEST_INIT); - - try { - await runTests(opts); - } catch (err) { - if (typeof err !== 'string') { - err = JSON.stringify(err); - } - console.error(err); - ipcRenderer.send('error', err); - } -}); - -class PerTestCoverage { - static async init() { - await ipcRenderer.invoke('startCoverage'); - return new PerTestCoverage(); - } - - async startTest() { - if (!this.didInit) { - this.didInit = true; - await ipcRenderer.invoke('snapshotCoverage'); - } - } - - async finishTest(file, fullTitle) { - await ipcRenderer.invoke('snapshotCoverage', { file, fullTitle }); - } -}